[tbb] 15/64: Imported Upstream version 2.2+r004

Graham Inggs ginggs at moszumanska.debian.org
Mon Jul 3 12:27:41 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 e8febd78e772b621494aa196a89e0b3896b4092a
Author: Graham Inggs <ginggs at debian.org>
Date:   Mon Jul 3 14:13:32 2017 +0200

    Imported Upstream version 2.2+r004
---
 CHANGES                                            |  150 +-
 Makefile                                           |    4 +
 build/FreeBSD.gcc.inc                              |    9 +-
 build/FreeBSD.inc                                  |    4 +-
 build/Makefile.rml                                 |  158 ++
 build/Makefile.tbb                                 |   14 +-
 build/Makefile.tbbmalloc                           |   30 +-
 build/Makefile.test                                |  137 +-
 build/SunOS.gcc.inc                                |    6 +-
 build/SunOS.inc                                    |    4 +-
 build/SunOS.suncc.inc                              |    6 +-
 build/common.inc                                   |    2 +
 build/detect.js                                    |   37 +-
 build/generate_tbbvars.bat                         |   36 +-
 build/generate_tbbvars.sh                          |   16 +-
 build/index.html                                   |   10 +-
 build/linux.gcc.inc                                |    8 +-
 build/linux.icc.inc                                |   10 +-
 build/linux.inc                                    |   10 +-
 build/macos.gcc.inc                                |    6 +-
 build/macos.icc.inc                                |    9 +-
 build/macos.inc                                    |    2 +-
 build/version_info_windows.js                      |   81 +-
 build/vsproject/index.html                         |   31 +
 build/vsproject/makefile.sln                       |   72 +
 build/vsproject/tbb.vcproj                         |  910 +++++++
 build/vsproject/tbbmalloc.vcproj                   |  818 ++++++
 .../vsproject/tbbmalloc_proxy.vcproj               |  203 +-
 build/vsproject/version_string.tmp                 |    1 +
 build/windows.cl.inc                               |    4 +-
 build/{windows.cl.inc => windows.gcc.inc}          |  136 +-
 build/windows.icl.inc                              |    8 +-
 build/windows.inc                                  |   20 +-
 doc/Release_Notes.txt                              |   55 +-
 doc/html/a00001.html                               |    6 +-
 doc/html/{a00031.html => a00002.html}              |    5 +-
 doc/html/{a00001.html => a00003.html}              |    6 +-
 doc/html/{a00005.html => a00004.html}              |   28 +-
 doc/html/a00005.html                               |   24 +-
 doc/html/a00006.html                               |   22 +-
 doc/html/a00007.html                               |   30 +-
 doc/html/a00008.html                               |   49 -
 doc/html/{a00010.html => a00009.html}              |    8 +-
 doc/html/a00011.html                               |   42 +
 doc/html/a00012.html                               |    6 +-
 doc/html/a00013.html                               |  113 +-
 doc/html/a00014.html                               |   41 -
 doc/html/a00015.html                               |   14 +-
 doc/html/a00016.html                               |   41 +
 doc/html/a00017.html                               |   39 +
 doc/html/a00018.html                               |   55 +
 doc/html/a00019.html                               |   56 +-
 doc/html/a00021.html                               |   98 +-
 doc/html/a00022.html                               |  102 +
 doc/html/a00025.html                               |   42 +-
 doc/html/{a00024.html => a00029.html}              |   17 +-
 doc/html/a00030.html                               |   11 +-
 doc/html/a00033.html                               |   37 -
 doc/html/a00034.html                               |   36 -
 doc/html/{a00030.html => a00035.html}              |    6 +-
 doc/html/a00036.html                               |    7 +-
 doc/html/{a00032.html => a00037.html}              |    4 +-
 doc/html/a00038.html                               |   12 +-
 doc/html/a00039.html                               |   20 +-
 doc/html/a00040.html                               |   40 -
 doc/html/a00041.html                               |   12 +-
 doc/html/a00043.html                               |   15 +-
 doc/html/a00044.html                               |   27 +-
 doc/html/a00045.html                               |   30 +-
 doc/html/a00046.html                               |   19 +-
 doc/html/a00047.html                               |   25 +-
 doc/html/{a00042.html => a00048.html}              |   14 +-
 doc/html/a00049.html                               |   12 +-
 doc/html/{a00044.html => a00050.html}              |   18 +-
 doc/html/a00051.html                               |   17 +-
 doc/html/a00052.html                               |   15 +-
 doc/html/a00053.html                               |   24 +-
 doc/html/a00054.html                               |   40 -
 doc/html/a00055.html                               |   16 +-
 doc/html/a00057.html                               |   62 +-
 doc/html/a00058.html                               |   58 +-
 doc/html/a00059.html                               |   19 +-
 doc/html/a00060.html                               |   19 +-
 doc/html/a00061.html                               |   49 +
 doc/html/a00063.html                               |   90 +
 doc/html/a00064.html                               |   61 +-
 doc/html/{a00059.html => a00065.html}              |   16 +-
 doc/html/{a00060.html => a00073.html}              |   20 +-
 doc/html/{a00062.html => a00075.html}              |   44 +-
 doc/html/a00077.html                               |    6 +-
 doc/html/a00079.html                               |   17 +-
 doc/html/a00080.html                               |   41 -
 doc/html/{a00049.html => a00081.html}              |    9 +-
 doc/html/{a00066.html => a00083.html}              |    6 +-
 doc/html/{a00067.html => a00084.html}              |   12 +-
 doc/html/{a00068.html => a00085.html}              |   20 +-
 doc/html/{a00069.html => a00086.html}              |   26 +-
 doc/html/a00087.html                               |   37 +
 doc/html/{a00070.html => a00088.html}              |   10 +-
 doc/html/a00092.html                               |   63 -
 doc/html/a00094.html                               |   59 -
 doc/html/a00095.html                               |   39 +-
 doc/html/a00096.html                               |   50 -
 doc/html/a00097.html                               |  224 --
 doc/html/a00098.html                               |   63 +-
 doc/html/a00099.html                               |   76 +-
 doc/html/a00100.html                               |  114 -
 doc/html/a00102.html                               |  148 --
 doc/html/a00103.html                               |  573 -----
 doc/html/a00104.html                               |   66 -
 doc/html/a00105.html                               |   89 -
 doc/html/a00106.html                               |  299 ---
 doc/html/a00107.html                               |  438 ----
 doc/html/a00108.html                               |   51 -
 doc/html/a00109.html                               |  194 --
 doc/html/a00111.html                               |  168 --
 doc/html/a00115.html                               |  114 +-
 doc/html/a00116.html                               |   74 +-
 doc/html/a00117.html                               |   32 +-
 doc/html/a00118.html                               |   49 +-
 doc/html/a00119.html                               |   86 +-
 doc/html/a00120.html                               |   53 +-
 doc/html/a00121.html                               |  121 +-
 doc/html/a00122.html                               |  200 +-
 doc/html/a00123.html                               |   87 +-
 doc/html/a00124.html                               |   97 +-
 doc/html/a00125.html                               |   83 +-
 doc/html/a00126.html                               |   39 +-
 doc/html/a00127.html                               |  118 +-
 doc/html/a00128.html                               |   63 +-
 doc/html/a00129.html                               |  279 +-
 doc/html/a00130.html                               |  533 +++-
 doc/html/a00131.html                               |   38 +-
 doc/html/a00132.html                               |  611 +----
 doc/html/a00133.html                               |  168 +-
 doc/html/a00134.html                               |  149 +-
 doc/html/a00135.html                               |  149 +-
 doc/html/a00136.html                               |  594 ++++-
 doc/html/a00137.html                               |   36 +-
 doc/html/a00138.html                               |  237 +-
 doc/html/a00139.html                               |  181 +-
 doc/html/a00140.html                               |   39 +-
 doc/html/a00141.html                               |  153 +-
 doc/html/a00142.html                               |   78 +-
 doc/html/{a00113.html => a00143.html}              |   26 +-
 doc/html/{a00114.html => a00144.html}              |   10 +-
 doc/html/{a00115.html => a00145.html}              |   26 +-
 doc/html/{a00116.html => a00146.html}              |   31 +-
 doc/html/{a00110.html => a00147.html}              |   20 +-
 doc/html/{a00112.html => a00148.html}              |   41 +-
 doc/html/{a00119.html => a00149.html}              |   22 +-
 doc/html/{a00120.html => a00150.html}              |   18 +-
 doc/html/{a00121.html => a00151.html}              |   26 +-
 doc/html/{a00122.html => a00152.html}              |   51 +-
 doc/html/{a00123.html => a00153.html}              |   54 +-
 doc/html/{a00124.html => a00154.html}              |   20 +-
 doc/html/{a00101.html => a00155.html}              |   24 +-
 doc/html/{a00091.html => a00156.html}              |   31 +-
 doc/html/{a00127.html => a00157.html}              |   51 +-
 doc/html/{a00128.html => a00158.html}              |   50 +-
 doc/html/{a00129.html => a00159.html}              |   79 +-
 doc/html/{a00130.html => a00160.html}              |   26 +-
 doc/html/{a00093.html => a00161.html}              |   23 +-
 doc/html/{a00132.html => a00162.html}              |  216 +-
 doc/html/{a00133.html => a00163.html}              |  103 +-
 doc/html/{a00134.html => a00164.html}              |   22 +-
 doc/html/{a00135.html => a00165.html}              |   34 +-
 doc/html/{a00136.html => a00166.html}              |   28 +-
 doc/html/a00167.html                               |   74 +-
 doc/html/{a00138.html => a00168.html}              |   38 +-
 doc/html/a00169.html                               |   88 +
 doc/html/{a00139.html => a00170.html}              |   10 +-
 doc/html/a00171.html                               |  120 +
 doc/html/{a00140.html => a00172.html}              |   20 +-
 doc/html/{a00141.html => a00173.html}              |   26 +-
 doc/html/{a00142.html => a00174.html}              |    8 +-
 doc/html/a00175.html                               |   93 +
 doc/html/{a00137.html => a00176.html}              |   35 +-
 doc/html/a00183.html                               |  236 --
 doc/html/a00184.html                               |   38 -
 doc/html/a00187.html                               |   32 -
 doc/html/a00193.html                               |  457 ----
 doc/html/a00203.html                               |  143 --
 doc/html/a00205.html                               |  945 -------
 doc/html/{a00167.html => a00206.html}              |   28 +-
 doc/html/a00213.html                               |  363 ---
 doc/html/a00219.html                               |  829 ------
 doc/html/{a00181.html => a00224.html}              |  499 ++--
 doc/html/a00228.html                               |  501 ++--
 doc/html/a00229.html                               |   83 +-
 doc/html/{a00185.html => a00230.html}              |   50 +-
 doc/html/{a00186.html => a00231.html}              |   28 +-
 doc/html/a00232.html                               |   70 +-
 doc/html/{a00188.html => a00233.html}              |   20 +-
 doc/html/a00234.html                               | 1259 ++++++---
 doc/html/a00243.html                               |  174 --
 doc/html/a00245.html                               |  436 ----
 doc/html/{a00189.html => a00250.html}              |    0
 doc/html/{a00191.html => a00252.html}              |    8 +-
 doc/html/a00253.html                               |  401 +++
 doc/html/{a00200.html => a00261.html}              |   38 +-
 doc/html/{a00201.html => a00262.html}              |   36 +-
 doc/html/{a00202.html => a00263.html}              |   52 +-
 doc/html/a00264.html                               |  262 +-
 doc/html/a00266.html                               |   96 +
 doc/html/a00267.html                               | 1099 ++++++++
 doc/html/a00269.html                               |  192 --
 doc/html/a00272.html                               |  211 --
 doc/html/a00274.html                               |  154 --
 doc/html/a00276.html                               |  790 +++---
 doc/html/a00277.html                               |  875 +++++++
 doc/html/a00286.html                               |  847 +++++-
 doc/html/a00288.html                               |  149 --
 doc/html/a00289.html                               |  221 --
 doc/html/a00294.html                               |  407 ++-
 doc/html/{a00229.html => a00296.html}              |    4 +-
 doc/html/a00299.html                               |  282 +-
 doc/html/{a00234.html => a00301.html}              |   22 +-
 doc/html/a00310.html                               |  226 ++
 doc/html/a00314.html                               |   94 +
 doc/html/a00316.html                               |  348 +++
 doc/html/a00322.html                               |  359 +++
 doc/html/{a00251.html => a00326.html}              |   44 +-
 doc/html/{a00256.html => a00331.html}              |   16 +-
 doc/html/{a00260.html => a00335.html}              |   38 +-
 doc/html/{a00264.html => a00339.html}              |  207 +-
 doc/html/a00344.html                               |  237 ++
 doc/html/{a00270.html => a00345.html}              |   30 +-
 doc/html/{a00271.html => a00346.html}              |   38 +-
 doc/html/a00347.html                               |  247 ++
 doc/html/{a00273.html => a00348.html}              |   64 +-
 doc/html/a00349.html                               |  192 ++
 doc/html/{a00275.html => a00350.html}              |  118 +-
 doc/html/a00351.html                               |  656 +++++
 doc/html/a00360.html                               |  242 ++
 doc/html/{a00285.html => a00368.html}              |   24 +-
 doc/html/{a00286.html => a00369.html}              |    0
 doc/html/{a00286.html => a00371.html}              |   82 +-
 doc/html/a00372.html                               |  201 ++
 doc/html/a00376.html                               |  166 ++
 doc/html/a00377.html                               |  254 ++
 doc/html/{a00290.html => a00378.html}              | 1049 ++++----
 doc/html/{a00293.html => a00381.html}              |    4 +-
 doc/html/{a00294.html => a00382.html}              |  249 +-
 doc/html/{a00299.html => a00387.html}              |    0
 doc/html/a00395.html                               |   96 +
 doc/html/{a00307.html => a00397.html}              |   52 +-
 doc/html/annotated.html                            |  114 +-
 doc/html/deprecated.html                           |    7 +-
 doc/html/files.html                                |   83 +-
 doc/html/functions.html                            |  364 +--
 doc/html/functions_enum.html                       |    6 +-
 doc/html/functions_eval.html                       |   20 +-
 doc/html/functions_func.html                       |  308 ++-
 doc/html/functions_rela.html                       |    4 +-
 doc/html/functions_type.html                       |   22 +-
 doc/html/functions_vars.html                       |    6 +-
 doc/html/globals.html                              |   16 +-
 doc/html/globals_func.html                         |   16 +-
 doc/html/hierarchy.html                            |  120 +-
 doc/html/modules.html                              |   12 +-
 doc/html/namespacemembers.html                     |   35 +-
 doc/html/namespacemembers_enum.html                |    6 +-
 doc/html/namespacemembers_eval.html                |    7 +-
 doc/html/namespacemembers_func.html                |   23 +-
 doc/html/namespacemembers_type.html                |    3 +-
 ...embers_type.html => namespacemembers_vars.html} |    7 +-
 doc/html/namespaces.html                           |    2 +-
 examples/GettingStarted/sub_string_finder/Makefile |    2 +-
 .../sub_string_finder/sub_string_finder.cpp        |    4 +-
 .../sub_string_finder_extended.cpp                 |    4 +-
 .../sub_string_finder/sub_string_finder_pretty.cpp |    4 +-
 .../vc7.1/sub_string_finder.vcproj                 |   16 +-
 .../vc7.1/sub_string_finder_extended.vcproj        |   16 +-
 .../vc7.1/sub_string_finder_pretty.vcproj          |   16 +-
 .../sub_string_finder/vc8/sub_string_finder.vcproj |   32 +-
 .../vc8/sub_string_finder_extended.vcproj          |   32 +-
 .../vc8/sub_string_finder_pretty.vcproj            |   32 +-
 .../sub_string_finder/vc9/sub_string_finder.vcproj |   32 +-
 .../vc9/sub_string_finder_extended.vcproj          |   32 +-
 .../vc9/sub_string_finder_pretty.vcproj            |   32 +-
 examples/Makefile                                  |   29 +-
 .../seismic/Makefile => common/gui/Makefile.gmake} |   72 +-
 .../concurrent_hash_map/count_strings/Makefile     |    2 +-
 .../count_strings/count_strings.cpp                |   19 +-
 .../count_strings/vc7.1/count_strings.vcproj       |   16 +-
 .../count_strings/vc8/count_strings.vcproj         |   32 +-
 .../count_strings/vc9/count_strings.vcproj         |   32 +-
 examples/index.html                                |   16 +-
 examples/parallel_do/parallel_preorder/Makefile    |    2 +-
 .../parallel_preorder/parallel_preorder.cpp        |    1 +
 .../vc7.1/parallel_preorder.vcproj                 |   16 +-
 .../parallel_preorder/vc8/parallel_preorder.vcproj |   32 +-
 .../parallel_preorder/vc9/parallel_preorder.vcproj |   32 +-
 .../game_of_life.NET}/Makefile                     |   15 +-
 .../game_of_life.NET/Makefile.windows}             |   30 +-
 examples/parallel_for/game_of_life.NET/index.html  |   53 +
 .../game_of_life.NET/src/AssemblyInfo.cpp          |   45 +-
 examples/parallel_for/game_of_life.NET/src/Board.h |  124 +
 .../game_of_life.NET/src/Evolution.cpp             |  248 ++
 .../parallel_for/game_of_life.NET/src/Evolution.h  |  201 ++
 examples/parallel_for/game_of_life.NET/src/Form1.h |  314 +++
 .../game_of_life.NET/src/Game_of_life.cpp          |  223 ++
 .../game_of_life.NET/src/Update_state.cpp          |  410 +++
 .../game_of_life.NET/vc8/Game_of_life.sln          |   25 +
 .../game_of_life.NET/vc8/Game_of_life.vcproj}      |  219 +-
 examples/parallel_for/game_of_life.NET/vc8/app.ico |  Bin 0 -> 1078 bytes
 examples/parallel_for/game_of_life.NET/vc8/app.rc  |   63 +
 .../parallel_for/game_of_life.NET/vc8/resource.h   |    3 +
 .../game_of_life.NET/vc9/Game_of_life.sln          |   25 +
 .../game_of_life.NET/vc9/Game_of_life.vcproj}      |  216 +-
 examples/parallel_for/game_of_life.NET/vc9/app.ico |  Bin 0 -> 1078 bytes
 examples/parallel_for/game_of_life.NET/vc9/app.rc  |   63 +
 .../parallel_for/game_of_life.NET/vc9/resource.h   |    3 +
 examples/parallel_for/index.html                   |    2 +
 examples/parallel_for/polygon_overlay/Makefile     |   55 +-
 examples/parallel_for/polygon_overlay/polymain.cpp |    6 +
 examples/parallel_for/polygon_overlay/polyover.cpp |    3 +
 .../polygon_overlay/vc7.1/pover.vcproj             |   60 +-
 .../parallel_for/polygon_overlay/vc8/pover.vcproj  |   64 +-
 .../parallel_for/polygon_overlay/vc9/pover.vcproj  |   64 +-
 examples/parallel_for/seismic/Makefile             |   45 +-
 .../seismic/vc7.1/SeismicSimulation.vcproj         |   32 +-
 .../seismic/vc8/SeismicSimulation.vcproj           |   64 +-
 .../seismic/vc9/SeismicSimulation.vcproj           |   64 +-
 examples/parallel_for/tachyon/Makefile             |   63 +-
 examples/parallel_for/tachyon/src/trace.tbb.cpp    |    2 +-
 examples/parallel_for/tachyon/src/types.h          |    4 +-
 .../parallel_for/tachyon/vc7.1/tachyon.tbb.vcproj  |   32 +-
 .../tachyon/vc7.1/tachyon.tbb1d.vcproj             |   32 +-
 .../parallel_for/tachyon/vc8/tachyon.tbb.vcproj    |   64 +-
 .../parallel_for/tachyon/vc8/tachyon.tbb1d.vcproj  |   64 +-
 .../parallel_for/tachyon/vc9/tachyon.tbb.vcproj    |   64 +-
 .../parallel_for/tachyon/vc9/tachyon.tbb1d.vcproj  |   64 +-
 examples/parallel_reduce/convex_hull/Makefile      |    2 +-
 .../convex_hull/convex_hull_bench.cpp              |   10 +-
 .../convex_hull/convex_hull_sample.cpp             |    4 +-
 .../convex_hull/vc7.1/convex_hull_bench.vcproj     |   16 +-
 .../convex_hull/vc7.1/convex_hull_sample.vcproj    |   16 +-
 .../convex_hull/vc8/convex_hull_benchmark.vcproj   |   32 +-
 .../convex_hull/vc8/convex_hull_sample.vcproj      |   32 +-
 .../convex_hull/vc9/convex_hull_benchmark.vcproj   |   32 +-
 .../convex_hull/vc9/convex_hull_sample.vcproj      |   32 +-
 examples/parallel_reduce/primes/Makefile           |    2 +-
 examples/parallel_reduce/primes/primes.cpp         |    5 +-
 .../parallel_reduce/primes/vc7.1/primes.vcproj     |   16 +-
 examples/parallel_reduce/primes/vc8/primes.vcproj  |   32 +-
 examples/parallel_reduce/primes/vc9/primes.vcproj  |   32 +-
 .../vc7.1/parallel_preorder.vcproj                 |   16 +-
 .../parallel_preorder/vc8/parallel_preorder.vcproj |   32 +-
 .../parallel_preorder/vc9/parallel_preorder.vcproj |   32 +-
 examples/pipeline/index.html                       |    4 +-
 examples/pipeline/square/Makefile                  |   14 +-
 examples/pipeline/square/index.html                |   21 +-
 examples/pipeline/square/vc7.1/square.vcproj       |   21 +-
 examples/pipeline/square/vc8/square.vcproj         |   36 +-
 examples/pipeline/square/vc9/square.vcproj         |   40 +-
 examples/pipeline/text_filter/Makefile             |    2 +-
 .../pipeline/text_filter/vc7.1/text_filter.vcproj  |   16 +-
 .../pipeline/text_filter/vc8/text_filter.vcproj    |   32 +-
 .../pipeline/text_filter/vc9/text_filter.vcproj    |   32 +-
 examples/task/tree_sum/Makefile                    |    2 +-
 examples/task/tree_sum/vc7.1/tree_sum.vcproj       |   16 +-
 examples/task/tree_sum/vc8/tree_sum.vcproj         |   32 +-
 examples/task/tree_sum/vc9/tree_sum.vcproj         |   32 +-
 examples/test_all/fibonacci/Fibonacci.cpp          |   28 +-
 examples/test_all/fibonacci/Makefile               |    2 +-
 examples/test_all/fibonacci/vc7.1/fibonacci.vcproj |   16 +-
 examples/test_all/fibonacci/vc8/fibonacci.vcproj   |   32 +-
 examples/test_all/fibonacci/vc9/fibonacci.vcproj   |   32 +-
 include/index.html                                 |    4 +-
 include/tbb/_concurrent_queue_internal.h           |  966 +++++++
 include/tbb/atomic.h                               |  263 +-
 .../tbb/combinable.h                               |   55 +-
 .../tbb/compat/ppl.h                               |   34 +-
 include/tbb/concurrent_hash_map.h                  | 1181 +++++----
 include/tbb/concurrent_queue.h                     |  407 ++-
 include/tbb/concurrent_vector.h                    |  181 +-
 include/tbb/enumerable_thread_specific.h           |  863 +++++++
 {examples/parallel_for => include/tbb}/index.html  |   15 +-
 include/tbb/machine/linux_ia32.h                   |   23 +-
 .../tbb/machine/{linux_itanium.h => linux_ia64.h}  |   12 +-
 .../tbb/machine/{linux_em64t.h => linux_intel64.h} |   17 +-
 include/tbb/machine/mac_ppc.h                      |    4 +-
 include/tbb/machine/windows_ia32.h                 |   52 +-
 include/tbb/machine/windows_ia32_inline.h          |  189 --
 .../machine/{windows_em64t.h => windows_intel64.h} |   35 +-
 include/tbb/mutex.h                                |   72 +-
 include/tbb/parallel_for.h                         |   62 +-
 include/tbb/parallel_for_each.h                    |   79 +
 include/tbb/parallel_invoke.h                      |  333 +++
 include/tbb/parallel_reduce.h                      |  186 +-
 include/tbb/parallel_scan.h                        |    9 +-
 include/tbb/partitioner.h                          |    1 +
 include/tbb/pipeline.h                             |   96 +-
 include/tbb/recursive_mutex.h                      |   77 +-
 include/tbb/scalable_allocator.h                   |    2 +
 include/tbb/spin_mutex.h                           |   41 +
 include/tbb/spin_rw_mutex.h                        |   31 +-
 include/tbb/task.h                                 |  169 +-
 include/tbb/task_group.h                           |  220 ++
 .../concurrent_hash_map.cpp => include/tbb/tbb.h   |   57 +-
 include/tbb/tbb_allocator.h                        |   58 +
 include/tbb/tbb_config.h                           |  167 ++
 include/tbb/tbb_exception.h                        |   37 +
 include/tbb/tbb_machine.h                          |   65 +-
 include/tbb/tbb_profiling.h                        |    4 +-
 include/tbb/tbb_stddef.h                           |   67 +-
 .../proxy.h => include/tbb/tbbmalloc_proxy.h       |   68 +-
 index.html                                         |    2 +-
 src/Makefile                                       |   32 +-
 src/index.html                                     |    2 +
 src/old/concurrent_queue_v2.cpp                    |   13 +-
 src/old/concurrent_vector_v2.cpp                   |    8 +-
 src/old/spin_rw_mutex_v2.cpp                       |   10 +-
 src/perf/fibonacci_cutoff.cpp                      |  134 +
 .../fibonacci_impl_tbb.cpp}                        |   80 +-
 src/perf/perf_util.h                               |    2 +-
 src/perf/statistics.cpp                            |  341 ++-
 src/perf/statistics.h                              |    2 +-
 src/perf/statistics_xml.h                          |    4 +-
 src/perf/time_base.cpp                             |    2 +
 src/perf/time_framework.h                          |  127 +-
 src/perf/time_hash_map.cpp                         |   59 +-
 src/perf/time_locked_work.cpp                      |  174 ++
 src/perf/time_sandbox.h                            |  168 ++
 src/rml/client/index.html                          |   43 +
 .../client/omp_dynamic_link.cpp}                   |   21 +-
 .../client/omp_dynamic_link.h}                     |   26 +-
 src/rml/client/rml_factory.h                       |   98 +
 .../client/rml_omp.cpp}                            |   29 +-
 .../client/rml_tbb.cpp}                            |   31 +-
 {examples/pipeline => src/rml/include}/index.html  |   15 +-
 src/rml/include/rml_base.h                         |  186 ++
 src/rml/include/rml_omp.h                          |  123 +
 src/rml/include/rml_tbb.h                          |   98 +
 {examples/parallel_for => src/rml}/index.html      |   19 +-
 src/rml/perfor/omp_nested.cpp                      |  135 +
 src/rml/perfor/omp_simple.cpp                      |  159 ++
 src/rml/perfor/tbb_multi_omp.cpp                   |  168 ++
 src/rml/perfor/tbb_simple.cpp                      |  167 ++
 src/rml/perfor/thread_level.h                      |  140 +
 src/rml/server/hunk.h                              |  114 +
 {include => src/rml/server}/index.html             |    9 +-
 src/{tbbmalloc/tbbmalloc.rc => rml/server/irml.rc} |   17 +-
 src/rml/server/job_automaton.h                     |  146 ++
 .../server/lin-rml-export.def}                     |   19 +-
 src/rml/server/ring.h                              |  140 +
 src/rml/server/rml_server.cpp                      | 1377 ++++++++++
 src/rml/server/thread_monitor.h                    |  224 ++
 .../server/wait_counter.h}                         |   56 +-
 .../server/win32-rml-export.def}                   |   16 +-
 .../server/win64-rml-export.def}                   |   16 +-
 .../proxy.h => rml/test/rml_omp_stub.cpp}          |   60 +-
 src/rml/test/test_hunk.cpp                         |  104 +
 src/rml/test/test_job_automaton.cpp                |  154 ++
 src/rml/test/test_ring.cpp                         |  139 +
 src/rml/test/test_rml_mixed.cpp                    |  247 ++
 src/rml/test/test_rml_omp.cpp                      |  173 ++
 .../test/test_rml_omp_c_linkage.c}                 |   12 +-
 src/rml/test/test_rml_tbb.cpp                      |  122 +
 src/rml/test/test_server.h                         |  398 +++
 src/rml/test/test_thread_monitor.cpp               |  129 +
 src/tbb/cache_aligned_allocator.cpp                |   31 +-
 src/tbb/concurrent_hash_map.cpp                    |   23 +-
 src/tbb/concurrent_queue.cpp                       |   55 +-
 src/tbb/concurrent_vector.cpp                      |  141 +-
 src/tbb/dynamic_link.cpp                           |  133 +
 src/tbb/dynamic_link.h                             |  104 +
 src/tbb/enumerable_thread_specific.cpp             |  172 ++
 src/tbb/gate.h                                     |   37 +-
 src/tbb/{itanium-gas => ia64-gas}/atomic_support.s |    0
 .../{itanium-gas/pause.s => ia64-gas/ia64_misc.s}  |   24 +-
 src/tbb/{itanium-gas => ia64-gas}/lock_byte.s      |    0
 src/tbb/{itanium-gas => ia64-gas}/log2.s           |    0
 src/tbb/{itanium-gas => ia64-gas}/pause.s          |    0
 src/tbb/index.html                                 |   32 +
 .../atomic_support.asm                             |    0
 src/tbb/itt_notify.cpp                             |  103 +-
 src/tbb/itt_notify.h                               |  124 +-
 .../itt_notify_proxy.c}                            |   34 +-
 src/tbb/lin32-tbb-export.def                       |   16 +-
 src/tbb/lin64-tbb-export.def                       |   16 +-
 src/tbb/lin64ipf-tbb-export.def                    |   16 +-
 src/tbb/mac32-tbb-export.def                       |   10 +-
 src/tbb/mac64-tbb-export.def                       |   10 +-
 src/tbb/pipeline.cpp                               |  362 ++-
 src/tbb/private_server.cpp                         |  333 +++
 src/tbb/queuing_mutex.cpp                          |    4 +-
 src/tbb/queuing_rw_mutex.cpp                       |   56 +-
 src/tbb/spin_rw_mutex.cpp                          |    8 +-
 src/tbb/task.cpp                                   | 2709 +++++++++++++++-----
 src/tbb/tbb_assert_impl.h                          |   10 +-
 src/tbb/tbb_misc.cpp                               |   97 +-
 src/tbb/tbb_misc.h                                 |   88 +-
 src/tbb/tls.h                                      |  119 +
 src/{tbbmalloc/proxy.h => tbb/tools_api/_config.h} |   88 +-
 .../_disable_warnings.h}                           |   21 +-
 src/tbb/tools_api/_ittnotify_static.h              |  166 ++
 src/tbb/tools_api/ittnotify.h                      | 1234 +++++++++
 src/tbb/tools_api/ittnotify_static.c               |  577 +++++
 src/tbb/win32-tbb-export.def                       |   16 +-
 src/tbb/win64-tbb-export.def                       |   16 +-
 src/tbbmalloc/Customize.h                          |   12 +-
 src/tbbmalloc/LifoQueue.h                          |    8 +-
 src/tbbmalloc/MemoryAllocator.cpp                  |  483 +++-
 src/tbbmalloc/Statistics.h                         |   39 +-
 src/tbbmalloc/TypeDefinitions.h                    |    9 +-
 src/tbbmalloc/lin-tbbmalloc-export.def             |   26 +-
 src/tbbmalloc/lin32-proxy-export.def               |    9 +-
 src/tbbmalloc/lin64-proxy-export.def               |    9 +-
 src/tbbmalloc/lin64ipf-proxy-export.def            |    9 +-
 src/tbbmalloc/proxy.cpp                            |  205 ++
 src/tbbmalloc/proxy.h                              |    5 +-
 src/tbbmalloc/tbb_function_replacement.cpp         |  370 +++
 .../tbb_function_replacement.h}                    |   41 +-
 src/tbbmalloc/tbbmalloc.cpp                        |   65 +-
 src/tbbmalloc/tbbmalloc.rc                         |    2 +-
 src/tbbmalloc/win-gcc-tbbmalloc-export.def         |   34 +
 src/tbbmalloc/win32-tbbmalloc-export.def           |    3 +
 src/tbbmalloc/win64-tbbmalloc-export.def           |    3 +
 src/test/harness.h                                 |  118 +-
 src/test/harness_assert.h                          |    7 +-
 src/test/harness_barrier.h                         |   84 +
 src/test/harness_concurrency_tracker.h             |   85 +
 src/test/harness_eh.h                              |  210 ++
 src/test/harness_iterator.h                        |   98 +
 src/test/harness_memory.h                          |   16 +-
 src/test/harness_trace.h                           |   28 +-
 src/test/test_ScalableAllocator_STL.cpp            |    2 +-
 src/test/test_allocator.h                          |   15 +-
 src/test/test_allocator_STL.h                      |   44 +-
 src/test/test_assembly.cpp                         |   38 +-
 src/test/test_atomic.cpp                           |   92 +-
 src/test/test_cache_aligned_allocator.cpp          |    8 +-
 src/test/test_cache_aligned_allocator_STL.cpp      |    5 +-
 src/test/test_combinable.cpp                       |  478 ++++
 src/test/test_concurrent_hash_map.cpp              |    8 +-
 src/test/test_concurrent_queue.cpp                 |  211 +-
 src/test/test_concurrent_vector.cpp                |  161 +-
 src/test/test_eh_algorithms.cpp                    | 1809 +++++--------
 src/test/test_eh_tasks.cpp                         |  805 +++---
 src/test/test_enumerable_thread_specific.cpp       |  932 +++++++
 src/test/test_handle_perror.cpp                    |    4 +-
 src/test/test_ittnotify.cpp                        |  103 +
 src/test/test_malloc_compliance.cpp                |  331 ++-
 src/test/test_malloc_functionality.cpp             |  159 ++
 src/test/test_malloc_overload.cpp                  |   51 +-
 src/test/test_model_plugin.cpp                     |    4 +-
 src/test/test_mutex.cpp                            |  144 +-
 src/test/test_parallel_do.cpp                      |   45 +-
 src/test/test_parallel_for.cpp                     |  112 +-
 src/test/test_parallel_for_each.cpp                |  164 ++
 src/test/test_parallel_invoke.cpp                  |  296 +++
 src/test/test_parallel_reduce.cpp                  |   62 +-
 src/test/test_parallel_sort.cpp                    |   44 +-
 src/test/test_pipeline.cpp                         |  139 +-
 src/test/test_pipeline_with_tbf.cpp                |  353 +++
 src/test/test_task.cpp                             |  215 ++
 src/test/test_task_assertions.cpp                  |    8 +-
 ...leAllocator_STL.cpp => test_task_auto_init.cpp} |   17 +-
 src/test/test_task_group.cpp                       |  821 ++++++
 src/test/test_task_leaks.cpp                       |   10 +-
 src/test/test_task_scheduler_observer.cpp          |   63 +-
 src/test/test_tbb_header.cpp                       |  119 +
 src/test/test_tbb_thread.cpp                       |   18 +-
 src/test/test_tbb_version.cpp                      |    8 +-
 src/test/test_user_events.cpp                      |  210 ++
 568 files changed, 45014 insertions(+), 21485 deletions(-)

diff --git a/CHANGES b/CHANGES
index 0b88742..df28a48 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,50 @@
+TBB 2.2 commercial-aligned release
+
+Changes (w.r.t. TBB 2.1 U4 commercial-aligned release):
+
+- Incorporates all changes from open-source releases below.
+- Architecture folders renamed from em64t to intel64 and from itanium
+    to ia64.
+- Major Interface version changed from 3 to 4. Deprecated interfaces 
+    might be removed in future releases.
+- 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 
+    significantly.
+- A few other small changes in code and documentation.
+
+------------------------------------------------------------------------
+20090511 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Basic support for MinGW32 development kit.
+- Added tbb::zero_allocator class that initializes memory with zeros.
+    It can be used as an adaptor to any STL-compatible allocator class.
+- Added tbb::parallel_for_each template function as alias to parallel_do.
+- Added more overloads for tbb::parallel_for.
+- Added support for exact exception propagation (can only be used with 
+    compilers that support C++0x std::exception_ptr).
+- tbb::atomic template class can be used with enumerations.
+- mutex, recursive_mutex, spin_mutex, spin_rw_mutex classes extended
+    with explicit lock/unlock methods.
+- Fixed size() and grow_to_at_least() methods of tbb::concurrent_vector
+    to provide space allocation guarantees. More methods added for
+    compatibility with std::vector, including some from C++0x.
+- Preview of a lambda-friendly interface for low-level use of tasks.
+- scalable_msize function added to the scalable allocator (Windows only).
+- Rationalized internal auxiliary functions for spin-waiting and backoff.
+- Several tests undergo decent refactoring.
+
+Changes affecting backward compatibility:
+
+- Improvements in concurrent_queue, including limited API changes. 
+    The previous version is deprecated; its functionality is accessible 
+    via methods of the new tbb::concurrent_bounded_queue class.
+- grow* and push_back methods of concurrent_vector changed to return
+    iterators; old semantics is deprecated. 
+
+------------------------------------------------------------------------
 TBB 2.1 Update 4 commercial-aligned release
 
 Changes (w.r.t. TBB 2.1 U3 commercial-aligned release):
@@ -16,6 +63,33 @@ Bugs fixed:
     for compatibility with MS implementation of STL containers (1566).
 
 ------------------------------------------------------------------------
+20090313 open-source release
+
+Changes (w.r.t. 20081109 open-source release):
+
+- Includes all changes introduced in TBB 2.1 Update 2 & Update 3
+    commercial-aligned releases (see below for details).
+- Added tbb::parallel_invoke template function. It runs up to 10 
+    user-defined functions in parallel and waits for them to complete.
+- Added a special library providing ability to replace the standard
+    memory allocation routines in Microsoft* C/C++ RTL (malloc/free,
+    global new/delete, etc.) with the TBB memory allocator. 
+    Usage details are described in include/tbb/tbbmalloc_proxy.h file.
+- Task scheduler switched to use new implementation of its core 
+    functionality (deque based task pool, new structure of arena slots).
+- Preview of Microsoft* Visual Studio* 2005 project files for 
+    building the library is available in build/vsproject folder.
+- Added tests for aligned memory allocations and malloc replacement.
+- Added parallel_for/game_of_life.net example (for Windows only) 
+    showing TBB usage in a .NET application.
+- A number of other fixes and improvements to code, tests, makefiles,
+    examples and documents.
+
+Bugs fixed: 
+
+- The same list as in TBB 2.1 Update 4 right above.
+
+------------------------------------------------------------------------
 TBB 2.1 Update 3 commercial-aligned release
 
 Changes (w.r.t. TBB 2.1 U2 commercial-aligned release):
@@ -26,53 +100,91 @@ Changes (w.r.t. TBB 2.1 U2 commercial-aligned release):
     TBB memory allocator.
 - Added null_mutex and null_rw_mutex: no-op classes interface-compliant 
     to other TBB mutexes.
-- Improved performance of parallel_sort, to close most of gap with
-    std::sort in serial, and beat it on 2 and more cores.
-- Fixed the problem where parallel_for hanged after exception throw 
-    if affinity_partitioner was used. 
-- Fixed VS 2008 warnings about mbstowcs deprecation, and some others.
-- Fixed operator== for concurrent_vector::iterator to work correctly
-    with different vector instances.
+- Improved performance of parallel_sort, to close most of the serial gap
+    with std::sort, and beat it on 2 and more cores.
 - A few other small changes.
 
+Bugs fixed:
+
+- the problem where parallel_for hanged after exception throw 
+    if affinity_partitioner was used (1556).
+- get rid of VS warnings about mbstowcs deprecation (1560),
+    as well as some other warnings.
+- operator== for concurrent_vector::iterator fixed to work correctly
+    with different vector instances.
+
 ------------------------------------------------------------------------
 TBB 2.1 Update 2 commercial-aligned release
 
 Changes (w.r.t. TBB 2.1 U1 commercial-aligned release):
 
+- Incorporates all open-source-release changes down to TBB 2.1 U1,
+    except for:
+    - 20081019 addition of enumerable_thread_specific;
 - Warning level for Microsoft* Visual C++* compiler raised to /W4 /Wp64;
     warnings found on this level were cleaned or suppressed.
 - Added TBB_runtime_interface_version API function.
 - Added new example: pipeline/square.
 - Added exception handling and cancellation support
     for parallel_do and pipeline.
-- Added new serial out of order filter for tbb::pipeline.
 - Added copy constructor and [begin,end) constructor to concurrent_queue.
 - Added some support for beta version of Intel(R) Parallel Amplifier.
 - Added scripts to set environment for cross-compilation of 32-bit 
     applications on 64-bit Linux with Intel(R) C++ Compiler.
-- Dependency from Microsoft* CRT was integrated to the libraries using 
-    manifests, to avoid issues if called from code that uses different 
-    version of Visual C++* runtime than the library.
-- Introduced new defines TBB_USE_ASSERT, TBB_USE_DEBUG, 
-    TBB_USE_PERFORMANCE_WARNINGS, TBB_USE_THREADING_TOOLS.
 - Fixed semantics of concurrent_vector::clear() to not deallocate
     internal arrays. Fixed compact() to perform such deallocation later.
 - Fixed the issue with atomic<T*> when T is incomplete type.
+- Improved support for PowerPC* Macintosh*, including the fix 
+    for a bug in masked compare-and-swap reported by a customer.
+- As usual, a number of other improvements everywhere.
+
+------------------------------------------------------------------------
+20081109 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Added new serial out of order filter for tbb::pipeline.
 - Fixed the issue with atomic<T*>::operator= reported at the forum.
 - Fixed the issue with using tbb::task::self() in task destructor 
     reported at the forum.
-- Fixed more concurrent_queue issues also reported at the forum.
-- Improved support for Intel(R) Threading Analysis Tools
-    on Intel(R) 64 architecture.
-- Improved support for PowerPC* Macintosh*, including the fix 
-    for a bug in masked compare-and-swap reported by a customer.
 - A number of other improvements to code, tests, makefiles, examples 
     and documents.
 
 Open-source contributions integrated: 
 - Changes in the memory allocator were partially integrated.
-- linker optimization: /incremental:no.
+
+------------------------------------------------------------------------
+20081019 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Introduced enumerable_thread_specific<T>.  This new class provides a 
+    wrapper around native thread local storage as well as iterators and 
+    ranges for accessing the thread local copies (1533).
+- Improved support for Intel(R) Threading Analysis Tools
+    on Intel(R) 64 architecture.
+- Dependency from Microsoft* CRT was integrated to the libraries using 
+    manifests, to avoid issues if called from code that uses different 
+    version of Visual C++* runtime than the library.
+- Introduced new defines TBB_USE_ASSERT, TBB_USE_DEBUG, 
+    TBB_USE_PERFORMANCE_WARNINGS, TBB_USE_THREADING_TOOLS.
+- A number of other improvements to code, tests, makefiles, examples 
+    and documents.
+
+Open-source contributions integrated:
+
+- linker optimization: /incremental:no .
+
+------------------------------------------------------------------------
+20080925 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Same fix for a memory leak in the memory allocator as in TBB 2.1 U1.
+- Improved support for lambda functions.
+- Fixed more concurrent_queue issues reported at the forum.
+- A number of other improvements to code, tests, makefiles, examples 
+    and documents.
 
 ------------------------------------------------------------------------
 TBB 2.1 Update 1 commercial-aligned release
diff --git a/Makefile b/Makefile
index 383d1b9..ceac272 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,10 @@ test: tbb tbbmalloc
 	-$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test tbb_root=$(tbb_root)
 	-$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root) 
 
+rml: mkdir
+	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.rml cfg=debug tbb_root=$(tbb_root)
+	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.rml cfg=release tbb_root=$(tbb_root)
+
 
 examples: tbb tbbmalloc
 	$(MAKE) -C examples -r -f Makefile tbb_root=.. release test
diff --git a/build/FreeBSD.gcc.inc b/build/FreeBSD.gcc.inc
index 3efcb52..2e2fb4c 100644
--- a/build/FreeBSD.gcc.inc
+++ b/build/FreeBSD.gcc.inc
@@ -39,9 +39,10 @@ DYLIB_KEY = -shared
 TBB_NOSTRICT = 1
 
 CPLUS = g++ 
+CONLY = gcc
 LIB_LINK_FLAGS = -shared
 LIBS = -lpthread 
-C_FLAGS = $(CPLUS_FLAGS) -x c
+C_FLAGS = $(CPLUS_FLAGS)
 
 ifeq ($(cfg), release)
         CPLUS_FLAGS = -O2 -DUSE_PTHREAD
@@ -55,12 +56,12 @@ ASM_FLAGS=
 
 TBB_ASM.OBJ=
 
-ifeq (itanium,$(arch))
+ifeq (ia64,$(arch))
 # Position-independent code (PIC) is a must on IA-64, even for regular (not shared) executables
     CPLUS_FLAGS += $(PIC_KEY)
 endif 
 
-ifeq (em64t,$(arch))
+ifeq (intel64,$(arch))
     CPLUS_FLAGS += -m64
     LIB_LINK_FLAGS += -m64
 endif 
@@ -74,7 +75,7 @@ endif
 # Setting assembler data.
 #------------------------------------------------------------------------------
 ASSEMBLY_SOURCE=$(arch)-gas
-ifeq (itanium,$(arch))
+ifeq (ia64,$(arch))
     ASM=as
     TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
 endif 
diff --git a/build/FreeBSD.inc b/build/FreeBSD.inc
index e0b03cc..82b3daa 100644
--- a/build/FreeBSD.inc
+++ b/build/FreeBSD.inc
@@ -29,10 +29,10 @@ ifndef arch
                 export arch:=ia32
         endif
         ifeq ($(shell uname -m),ia64)
-                export arch:=itanium
+                export arch:=ia64
         endif
         ifeq ($(shell uname -m),amd64)
-                export arch:=em64t
+                export arch:=intel64
         endif
 endif
 
diff --git a/build/Makefile.rml b/build/Makefile.rml
new file mode 100644
index 0000000..af3b536
--- /dev/null
+++ b/build/Makefile.rml
@@ -0,0 +1,158 @@
+# 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.
+
+tbb_root ?= $(TBB22_INSTALL_DIR)
+BUILDING_PHASE=1
+include $(tbb_root)/build/common.inc
+DEBUG_SUFFIX=$(findstring _debug,_$(cfg))
+
+# default target
+default_rml: rml rml_test
+
+RML_ROOT ?= $(tbb_root)/src/rml
+RML_SERVER_ROOT = $(RML_ROOT)/server
+
+VPATH = $(tbb_root)/src/tbb $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE)
+VPATH += $(RML_ROOT)/server $(RML_ROOT)/client $(RML_ROOT)/test
+
+include $(tbb_root)/build/common_rules.inc
+
+#--------------------------------------------------------------------------
+# Define rules for making the RML server shared library and client objects.
+#--------------------------------------------------------------------------
+
+# Object files that make up RML server 
+RML_SERVER.OBJ = rml_server.$(OBJ)
+
+# Object files that RML clients need
+RML_TBB_CLIENT.OBJ = rml_tbb.$(OBJ) dynamic_link.$(OBJ)
+RML_OMP_CLIENT.OBJ = rml_omp.$(OBJ) omp_dynamic_link.$(OBJ)
+
+RML.OBJ = $(RML_SERVER.OBJ) $(RML_TBB_CLIENT.OBJ) $(RML_OMP_CLIENT.OBJ)
+ifeq (windows,$(tbb_os))
+RML_ASM.OBJ = $(if $(findstring intel64,$(arch)),$(TBB_ASM.OBJ))
+endif
+ifeq (linux,$(tbb_os))
+RML_ASM.OBJ = $(if $(findstring ia64,$(arch)),$(TBB_ASM.OBJ))
+endif
+
+RML_TBB_DEP= cache_aligned_allocator_rml.$(OBJ) dynamic_link_rml.$(OBJ) concurrent_vector_rml.$(OBJ) tbb_misc_rml.$(OBJ)
+TBB_DEP_NON_RML_TEST= cache_aligned_allocator_rml.$(OBJ) dynamic_link_rml.$(OBJ) $(RML_ASM.OBJ)
+TBB_DEP_RML_TEST= $(RML_ASM.OBJ)
+ifeq ($(cfg),debug)
+RML_TBB_DEP+= spin_mutex_rml.$(OBJ) 
+TBB_DEP_NON_RML_TEST+= tbb_misc_rml.$(OBJ) 
+TBB_DEP_RML_TEST+= tbb_misc_rml.$(OBJ) 
+endif
+LIBS += $(LIBDL)
+
+INCLUDES += $(INCLUDE_KEY)$(RML_ROOT)/include $(INCLUDE_KEY).
+T_INCLUDES = $(INCLUDES) $(INCLUDE_KEY)$(tbb_root)/src/test $(INCLUDE_KEY)$(RML_SERVER_ROOT)
+
+# Suppress superfluous warnings for RML compilation
+R_CPLUS_FLAGS =  $(subst DO_ITT_NOTIFY,DO_ITT_NOTIFY=0,$(CPLUS_FLAGS_NOSTRICT)) $(WARNING_SUPPRESS) \
+		 $(DEFINE_KEY)TBB_USE_THREADING_TOOLS=0 $(DEFINE_KEY)__TBB_RML_STATIC=1 $(DEFINE_KEY)__TBB_NO_IMPLICIT_LINKAGE=1
+
+%.$(OBJ): %.cpp
+	$(CPLUS) $(COMPILE_ONLY) $(R_CPLUS_FLAGS) $(PIC_KEY) $(INCLUDES) $<
+
+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_TBB_DEP): %_rml.$(OBJ): %.cpp
+	$(CPLUS) $(COMPILE_ONLY) $(OUTPUTOBJ_KEY)$@ $(R_CPLUS_FLAGS) $(PIC_KEY) $(INCLUDES) $< 
+
+$(RML_TEST.OBJ): %.$(OBJ): %.cpp
+	$(CPLUS) $(COMPILE_ONLY) $(R_CPLUS_FLAGS) $(PIC_KEY) $(T_INCLUDES) $<
+
+ifneq (,$(RML.DEF))
+rml.def: $(RML.DEF)
+	$(CMD) "$(CPLUS) $(PREPROC_ONLY) $(RML.DEF) $(filter $(DEFINE_KEY)%,$(CPLUS_FLAGS)) >rml.def 2>$(NUL) || exit 0"
+
+LIB_LINK_FLAGS += $(EXPORT_KEY)rml.def
+$(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)
+	$(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))
+$(RML_NO_VERSION.DLL):
+	echo "INPUT ($(RML.DLL))" > $(RML_NO_VERSION.DLL)
+endif
+
+rml: $(RML.DLL) $(RML_TBB_CLIENT.OBJ) $(RML_OMP_CLIENT.OBJ)
+
+#------------------------------------------------------
+# End of rules for making the RML server shared library
+#------------------------------------------------------
+
+#------------------------------------------------------
+# Define rules for making the RML unit tests
+#------------------------------------------------------
+
+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
+
+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)
+
+test_rml_omp.exe: test_rml_omp.$(OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_NON_RML_TEST)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) test_rml_omp.$(OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_NON_RML_TEST) $(LIBS) $(LINK_FLAGS) 
+
+test_rml_mixed.exe: test_rml_mixed.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_RML_TEST)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) test_rml_mixed.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_RML_TEST) $(LIBS) $(LINK_FLAGS) 
+
+rml_omp_stub.$(OBJ): rml_omp_stub.cpp
+	$(CPLUS) $(COMPILE_ONLY) $(M_CPLUS_FLAGS) $(WARNING_SUPPRESS) $(T_INCLUDES) $(PIC_KEY) $<
+
+test_rml_omp_c_linkage.exe: test_rml_omp_c_linkage.$(OBJ) rml_omp_stub.$(OBJ)
+	$(CONLY) $(C_FLAGS) $(OUTPUT_KEY)$@ test_rml_omp_c_linkage.$(OBJ) rml_omp_stub.$(OBJ)
+
+test_%.exe: test_%.$(OBJ) $(TBB_DEP_NON_RML_TEST)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(TBB_DEP_NON_RML_TEST) $(LIBS) $(LINK_FLAGS)
+
+### 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
+	$(run_cmd) ./test_rml_mixed.exe
+	$(run_cmd) ./test_rml_omp_c_linkage.exe
+
+#------------------------------------------------------
+# End of rules for making the TBBMalloc unit tests
+#------------------------------------------------------
+
+# Include automatically generated dependences
+-include *.d
diff --git a/build/Makefile.tbb b/build/Makefile.tbb
index 169c22a..338752e 100644
--- a/build/Makefile.tbb
+++ b/build/Makefile.tbb
@@ -28,7 +28,7 @@
 # Define rules for making the TBB shared library.
 #------------------------------------------------------------------------------
 
-tbb_root ?= "$(TBB21_INSTALL_DIR)"
+tbb_root ?= "$(TBB22_INSTALL_DIR)"
 BUILDING_PHASE=1
 include $(tbb_root)/build/common.inc
 DEBUG_SUFFIX=$(findstring _debug,_$(cfg))
@@ -62,6 +62,7 @@ endif
 TBB_CPLUS.OBJ = concurrent_hash_map.$(OBJ) \
 		concurrent_queue.$(OBJ) \
 		concurrent_vector.$(OBJ) \
+		dynamic_link.$(OBJ) \
 		itt_notify.$(OBJ) \
 		cache_aligned_allocator.$(OBJ) \
 		pipeline.$(OBJ) \
@@ -73,7 +74,8 @@ TBB_CPLUS.OBJ = concurrent_hash_map.$(OBJ) \
 		tbb_misc.$(OBJ) \
 		mutex.$(OBJ) \
 		recursive_mutex.$(OBJ) \
-		tbb_thread.$(OBJ)
+		tbb_thread.$(OBJ) \
+		itt_notify_proxy.$(OBJ)
 
 # OLD/Legacy object files for backward binary compatibility
 ifeq (,$(findstring $(DEFINE_KEY)TBB_NO_LEGACY,$(CPLUS_FLAGS)))
@@ -89,11 +91,17 @@ 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 
+
 include $(tbb_root)/build/common_rules.inc
 
 ifneq (,$(TBB.DEF))
 tbb.def: $(TBB.DEF)
-	$(CMD) "$(CPLUS) $(PREPROC_ONLY) $(TBB.DEF) $(filter $(DEFINE_KEY)%,$(CPLUS_FLAGS)) >tbb.def 2>$(NUL) || exit 0"
+	$(CMD) "$(CPLUS) $(PREPROC_ONLY) $(TBB.DEF) $(INCLUDES) $(filter $(DEFINE_KEY)%,$(CPLUS_FLAGS)) >tbb.def 2>$(NUL) || exit 0"
 
 LIB_LINK_FLAGS += $(EXPORT_KEY)tbb.def
 $(TBB.DLL): tbb.def
diff --git a/build/Makefile.tbbmalloc b/build/Makefile.tbbmalloc
index 046b261..e96651f 100644
--- a/build/Makefile.tbbmalloc
+++ b/build/Makefile.tbbmalloc
@@ -24,7 +24,7 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
-tbb_root ?= $(TBB21_INSTALL_DIR)
+tbb_root ?= $(TBB22_INSTALL_DIR)
 BUILDING_PHASE=1
 include $(tbb_root)/build/common.inc
 DEBUG_SUFFIX=$(findstring _debug,_$(cfg))
@@ -39,7 +39,6 @@ VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/s
 VPATH += $(MALLOC_ROOT) $(MALLOC_SOURCE_ROOT)
 
 KNOWN_NOSTRICT = test_ScalableAllocator_STL.$(OBJ) test_malloc_compliance.$(OBJ) test_malloc_overload.$(OBJ)
-KNOWN_WARNINGS =
 
 CPLUS_FLAGS += $(if $(crosstest),$(DEFINE_KEY)__TBBMALLOC_NO_IMPLICIT_LINKAGE=1)
 
@@ -50,20 +49,22 @@ include $(tbb_root)/build/common_rules.inc
 #------------------------------------------------------
 
 # Object files that make up TBBMalloc
-MALLOC_CPLUS.OBJ = tbbmalloc.$(OBJ)
+MALLOC_CPLUS.OBJ = tbbmalloc.$(OBJ) dynamic_link.$(OBJ)
 MALLOC_CUSTOM.OBJ += tbb_misc_malloc.$(OBJ)
 MALLOC_ASM.OBJ = $(TBB_ASM.OBJ)
 
 # MALLOC_CPLUS.OBJ is built in two steps due to Intel Compiler Tracker # C69574
-MALLOC.OBJ := $(MALLOC_CPLUS.OBJ) $(MALLOC_ASM.OBJ) $(MALLOC_CUSTOM.OBJ) MemoryAllocator.$(OBJ)
+MALLOC.OBJ := $(MALLOC_CPLUS.OBJ) $(MALLOC_ASM.OBJ) $(MALLOC_CUSTOM.OBJ) MemoryAllocator.$(OBJ) itt_notify_proxy.$(OBJ)
 MALLOC_CPLUS.OBJ += MemoryAllocator.$(OBJ)
-PROXY.OBJ := proxy.$(OBJ)
+PROXY.OBJ := proxy.$(OBJ) tbb_function_replacement.$(OBJ)
 M_CPLUS_FLAGS := $(subst $(WARNING_KEY),,$(M_CPLUS_FLAGS)) $(DEFINE_KEY)__TBB_BUILD=1
 M_INCLUDES = $(INCLUDES) $(INCLUDE_KEY)$(MALLOC_ROOT) $(INCLUDE_KEY)$(MALLOC_SOURCE_ROOT)
 
 # Suppress superfluous warnings for TBBmalloc compilation
 $(MALLOC.OBJ): M_CPLUS_FLAGS += $(WARNING_SUPPRESS)
 
+itt_notify_proxy.$(OBJ): C_FLAGS += $(PIC_KEY)
+
 $(PROXY.OBJ): %.$(OBJ): %.cpp
 	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS) $(PIC_KEY) $(M_INCLUDES) $<
 
@@ -98,8 +99,8 @@ endif
 
 ifneq (,$(MALLOCPROXY.DLL))
 $(MALLOCPROXY.DLL): BUILDING_LIBRARY = $(MALLOCPROXY.DLL)
-$(MALLOCPROXY.DLL): $(PROXY.OBJ) $(MALLOCPROXY_NO_VERSION.DLL) $(MALLOC.DLL)
-	$(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(MALLOCPROXY.DLL) $(PROXY.OBJ) $(LIB_LINK_LIBS) $(LINK_MALLOC.LIB) $(PROXY_LINK_FLAGS)
+$(MALLOCPROXY.DLL): $(PROXY.OBJ) $(MALLOCPROXY_NO_VERSION.DLL) $(MALLOC.DLL) $(MALLOC.RES)
+	$(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(MALLOCPROXY.DLL) $(PROXY.OBJ) $(MALLOC.RES) $(LIB_LINK_LIBS) $(LINK_MALLOC.LIB) $(PROXY_LINK_FLAGS)
 
 malloc: $(MALLOCPROXY.DLL)
 endif
@@ -116,7 +117,11 @@ endif
 
 malloc: $(MALLOC.DLL) $(MALLOCPROXY.DLL)
 
-.PHONY: malloc
+malloc_dll: $(MALLOC.DLL) 
+
+malloc_proxy_dll: $(MALLOCPROXY.DLL)
+
+.PHONY: malloc malloc_dll malloc_proxy_dll
 
 #------------------------------------------------------
 # End of rules for making the TBBMalloc shared library
@@ -129,10 +134,14 @@ malloc: $(MALLOC.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
+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
 
+ifeq (windows.gcc,$(tbb_os).$(compiler))
+test_malloc_overload.exe: LIBS += $(call cross_suffix,$(MALLOCPROXY.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))
@@ -145,7 +154,8 @@ $(MALLOC_C_TESTS): %.exe: %.$(OBJ) $(call cross_suffix,$(MALLOC.LIB))
 
 # run_cmd is usually empty
 malloc_test: $(call cross_suffix,$(MALLOC.DLL)) $(MALLOC_MAIN_TESTS) $(MALLOC_C_TESTS) $(MALLOC_OVERLOAD_TESTS)
-	$(run_cmd) $(TEST_LAUNCHER) -l $(MALLOCPROXY.DLL) test_malloc_overload.exe
+	$(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
diff --git a/build/Makefile.test b/build/Makefile.test
index 9d86d32..f52d00b 100644
--- a/build/Makefile.test
+++ b/build/Makefile.test
@@ -29,7 +29,7 @@
 #------------------------------------------------------------------------------
 .PHONY: default test_tbb_plain test_tbb_old clean
 
-tbb_root ?= $(TBB21_INSTALL_DIR)
+tbb_root ?= $(TBB22_INSTALL_DIR)
 BUILDING_PHASE=1
 include $(tbb_root)/build/common.inc
 DEBUG_SUFFIX=$(findstring _debug,$(call cross_cfg,_$(cfg)))
@@ -57,6 +57,7 @@ KNOWN_NOSTRICT += \
 	test_concurrent_hash_map.o	\
 	test_concurrent_vector.o	\
 	test_concurrent_queue.o	        \
+	test_enumerable_thread_specific.o \
 	test_handle_perror.o		\
 	test_cache_aligned_allocator_STL.o	\
 	test_task_scheduler_init.o	\
@@ -64,14 +65,14 @@ KNOWN_NOSTRICT += \
 	test_parallel_do.o	\
 	test_eh_algorithms.o	\
 	test_parallel_sort.o    \
+	test_parallel_for_each.o	\
+	test_task_group.o	\
+	test_tbb_header.o	\
+	test_combinable.o	\
 	test_tbb_version.o
 
 endif
 
-# KNOWN_WARNINGS is empty now! Kept here as a placeholder
-# KNOWN_WARNINGS = 
-
-
 include $(tbb_root)/build/common_rules.inc
 
 # Rule for generating executable test
@@ -82,14 +83,13 @@ include $(tbb_root)/build/common_rules.inc
 %.$(DLL).$(OBJ): %.cpp
 	$(CPLUS) $(COMPILE_ONLY) $(OUTPUTOBJ_KEY)$@ $(CPLUS_FLAGS_NOSTRICT) $(PIC_KEY) $(DEFINE_KEY)_USRDLL $(INCLUDES) $<
 %.$(DLL): %.$(DLL).$(OBJ) $(TBB.LIB)
-	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS) $(PIC_KEY) $(DYLIB_KEY)
+	$(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)
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LIBDL) $(LIBS) $(LINK_FLAGS)
 
-
-TASK_CPP_DEPENDENCIES = $(TBB_ASM.OBJ) cache_aligned_allocator.$(OBJ) tbb_misc.$(OBJ) itt_notify.$(OBJ) mutex.$(OBJ) spin_rw_mutex.$(OBJ) spin_mutex.$(OBJ)
+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)
 
 # These executables don't depend on the TBB library, but include task.cpp directly
 TASK_CPP_DIRECTLY_INCLUDED = test_eh_tasks.exe \
@@ -112,43 +112,52 @@ test_concurrent_hash_map_string.exe: test_concurrent_hash_map_string.$(OBJ)
 
 
 # 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_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_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_tbb_version.exe           	\
-	test_eh_tasks.exe        \
-	test_eh_algorithms.exe
+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
 
 ifdef OPENMP_FLAG
 	TEST_TBB_PLAIN.EXE += test_tbb_openmp
@@ -170,6 +179,7 @@ test_tbb_plain: $(TEST_TBB_PLAIN.EXE)
         # 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
@@ -197,33 +207,60 @@ test_tbb_plain: $(TEST_TBB_PLAIN.EXE)
         # 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_tbb_version.exe
 	$(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
+
+CPLUS_FLAGS_DEPRECATED = $(DEFINE_KEY)TBB_DEPRECATED=1 $(subst $(WARNING_KEY),,$(CPLUS_FLAGS_NOSTRICT)) $(WARNING_SUPPRESS)
 
 TEST_TBB_OLD.OBJ = test_concurrent_vector_v2.$(OBJ) test_concurrent_queue_v2.$(OBJ) test_mutex_v2.$(OBJ)
 
-# For old files, we don't mind warnings etc., thus compilation rules are most relaxed
+TEST_TBB_DEPRECATED.OBJ = test_concurrent_queue_deprecated.$(OBJ) \
+	test_concurrent_vector_deprecated.$(OBJ) \
+
+
+# For deprecated files, we don't mind warnings etc., thus compilation rules are most relaxed
 $(TEST_TBB_OLD.OBJ): %.$(OBJ): %.cpp
-	$(CPLUS) $(COMPILE_ONLY) $(subst $(WARNING_KEY),,$(CPLUS_FLAGS_NOSTRICT)) $(WARNING_SUPPRESS) $(INCLUDES) $<
+	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS_DEPRECATED) $(INCLUDES) $<
 
-TEST_TBB_OLD.EXE = $(subst .$(OBJ),.exe,$(TEST_TBB_OLD.OBJ))
+%_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: $(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
+ifeq (,$(repeat))
 	$(run_cmd) ./$^ $(args)
+else
+ifeq (windows,$(tbb_os))
+	for /L %%i in (1,1,$(repeat)) do echo %%i of $(repeat): && $^ $(args)
+else
+	for ((i=1;i<=$(repeat);++i)); do echo $$i of $(repeat): && ./$^ $(args); done
+endif
+endif # repeat
 ifneq (,$(codecov))
 	profmerge
 	codecov $(if $(findstring -,$(codecov)),$(codecov),) -demang -comp $(tbb_root)/build/codecov.txt
@@ -233,7 +270,7 @@ time_%: time_%.exe
 	$(run_cmd) ./$^ $(args)
 
 clean_%: 
-	$(RM) $*.$(OBJ) $*.exe $*.$(DLL) $*.$(LIBEXT) $*.res $*.map $*.ilk $*.pdb $*.exp $*.*manifest $*.tmp $*.d pgopti.* *.dyn
+	$(RM) $*.$(OBJ) $*.exe $*.$(DLL) $*.$(LIBEXT) $*.res $*.map $*.ilk $*.pdb $*.exp $*.*manifest $*.tmp $*.d
 
 clean:
 	$(RM) *.$(OBJ) *.exe *.$(DLL) *.$(LIBEXT) *.res *.map *.ilk *.pdb *.exp *.manifest *.tmp *.d pgopti.* *.dyn core core.*[0-9][0-9]
diff --git a/build/SunOS.gcc.inc b/build/SunOS.gcc.inc
index b8cc312..f60073b 100644
--- a/build/SunOS.gcc.inc
+++ b/build/SunOS.gcc.inc
@@ -55,12 +55,12 @@ ASM_FLAGS=
 
 TBB_ASM.OBJ=
 
-ifeq (itanium,$(arch))
+ifeq (ia64,$(arch))
 # Position-independent code (PIC) is a must for IA-64
     CPLUS_FLAGS += $(PIC_KEY)
 endif 
 
-ifeq (em64t,$(arch))
+ifeq (intel64,$(arch))
     CPLUS_FLAGS += -m64
     LIB_LINK_FLAGS += -m64
 endif 
@@ -80,7 +80,7 @@ endif
 # Setting assembler data.
 #------------------------------------------------------------------------------
 ASSEMBLY_SOURCE=$(arch)-gas
-ifeq (itanium,$(arch))
+ifeq (ia64,$(arch))
     ASM=ias
     TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
 endif 
diff --git a/build/SunOS.inc b/build/SunOS.inc
index caafa8f..a3b378a 100644
--- a/build/SunOS.inc
+++ b/build/SunOS.inc
@@ -28,7 +28,7 @@ ifndef arch
         arch:=$(shell uname -p)
         ifeq ($(arch),i386)
             ifeq ($(shell isainfo -b),64)
-                arch:=em64t
+                arch:=intel64
             else
                 arch:=ia32
             endif
@@ -83,6 +83,8 @@ LINK_TBB.LIB = $(TBB.LIB)
 MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
 MALLOC.LIB = $(MALLOC.DLL)
 
+MALLOCPROXY.DLL = libtbbmalloc_proxy$(DEBUG_SUFFIX).$(DLL)
+
 TBB_NOSTRICT=1
 
 TEST_LAUNCHER=sh $(tbb_root)/build/test_launcher.sh
diff --git a/build/SunOS.suncc.inc b/build/SunOS.suncc.inc
index 540cb56..9aac117 100644
--- a/build/SunOS.suncc.inc
+++ b/build/SunOS.suncc.inc
@@ -24,8 +24,8 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
-COMPILE_ONLY = -c -MMD -errtags
-PREPROC_ONLY = -E -MMD
+COMPILE_ONLY = -c -xMMD -errtags
+PREPROC_ONLY = -E -xMMD
 INCLUDE_KEY = -I
 DEFINE_KEY = -D
 OUTPUT_KEY = -o #
@@ -59,7 +59,7 @@ ASM_FLAGS=
 
 TBB_ASM.OBJ=
 
-ifeq (em64t,$(arch))
+ifeq (intel64,$(arch))
     CPLUS_FLAGS += -m64
     ASM_FLAGS += -m64
     LIB_LINK_FLAGS += -m64
diff --git a/build/common.inc b/build/common.inc
index 4fbf5b7..90af75d 100644
--- a/build/common.inc
+++ b/build/common.inc
@@ -67,6 +67,8 @@ 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
+ lambdas ?= 0
   # include compiler-specific build configurations
  -include $(tbb_root)/build/$(tbb_os).$(compiler).inc
  ifdef extra_inc
diff --git a/build/detect.js b/build/detect.js
index feebb99..b11c954 100644
--- a/build/detect.js
+++ b/build/detect.js
@@ -24,16 +24,23 @@
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.
 
-if ( WScript.Arguments.Count() > 0 ) {
-	
-	try {
-		
+function doWork() {
 		var WshShell = WScript.CreateObject("WScript.Shell");
 
 		var fso = new ActiveXObject("Scripting.FileSystemObject");
 
 		var tmpExec;
-		
+
+		if ( WScript.Arguments.Count() > 1 && WScript.Arguments(1) == "gcc" ) {
+			if ( WScript.Arguments(0) == "/arch" ) {
+				WScript.Echo( "ia32" );
+			}
+			else if ( WScript.Arguments(0) == "/runtime" ) {
+				WScript.Echo( "mingw" );
+			}
+			return;
+		}
+
 		//Compile binary
 		tmpExec = WshShell.Exec("cmd /c echo int main(){return 0;} >detect.c");
 		while ( tmpExec.Status == 0 ) {
@@ -50,13 +57,13 @@ if ( WScript.Arguments.Count() > 0 ) {
 			var clVersion = tmpExec.StdErr.ReadAll();
 			
 			//detect target architecture
-			var em64t=/AMD64|EM64T|x64/mgi;
-			var itanium=/IA-64|Itanium/mgi;
+			var intel64=/AMD64|EM64T|x64/mgi;
+			var ia64=/IA-64|Itanium/mgi;
 			var ia32=/80x86/mgi;
-			if ( clVersion.match(em64t) ) {
-				WScript.Echo( "em64t" );
-			} else if ( clVersion.match(itanium) ) {
-				WScript.Echo( "itanium" );
+			if ( clVersion.match(intel64) ) {
+				WScript.Echo( "intel64" );
+			} else if ( clVersion.match(ia64) ) {
+				WScript.Echo( "ia64" );
 			} else if ( clVersion.match(ia32) ) {
 				WScript.Echo( "ia32" );
 			} else {
@@ -74,6 +81,7 @@ if ( WScript.Arguments.Count() > 0 ) {
 			var vc71=/MSVCR71\.DLL/mgi;
 			var vc80=/MSVCR80\.DLL/mgi;
 			var vc90=/MSVCR90\.DLL/mgi;
+			var vc100=/MSVCR100\.DLL/mgi;
 			var psdk=/MSVCRT\.DLL/mgi;
 			if ( mapContext.match(vc71) ) {
 				WScript.Echo( "vc7.1" );
@@ -81,6 +89,8 @@ if ( WScript.Arguments.Count() > 0 ) {
 				WScript.Echo( "vc8" );
 			} else if ( mapContext.match(vc90) ) {
 				WScript.Echo( "vc9" );
+			} else if ( mapContext.match(vc100) ) {
+				WScript.Echo( "vc10" );
 			} else if ( mapContext.match(psdk) ) {
 				// Our current naming convention assumes vc7.1 for 64-bit Windows PSDK
 				WScript.Echo( "vc7.1" ); 
@@ -100,7 +110,12 @@ if ( WScript.Arguments.Count() > 0 ) {
 			fso.DeleteFile ("detect.exe", false);
 		if ( fso.FileExists("detect.exe.manifest") )
 			fso.DeleteFile ("detect.exe.manifest", false);
+}
 
+if ( WScript.Arguments.Count() > 0 ) {
+	
+	try {
+		doWork();
 	} catch( error )
 	{
 		WScript.Echo( "unknown" );
diff --git a/build/generate_tbbvars.bat b/build/generate_tbbvars.bat
index 9c13c87..0a20885 100644
--- a/build/generate_tbbvars.bat
+++ b/build/generate_tbbvars.bat
@@ -33,54 +33,54 @@ setlocal
 for %%D in ("%tbb_root%") do set actual_root=%%~fD
 if x%1==x goto without
 
-echo SET TBB21_INSTALL_DIR=%actual_root%>>tbbvars.bat
+echo SET TBB22_INSTALL_DIR=%actual_root%>>tbbvars.bat
 echo SET TBB_ARCH_PLATFORM=%arch%\%runtime%>>tbbvars.bat
-echo SET INCLUDE=%%TBB21_INSTALL_DIR%%\include;%%INCLUDE%%>>tbbvars.bat
-echo SET LIB=%%TBB21_INSTALL_DIR%%\build\%1;%%LIB%%>>tbbvars.bat
-echo SET PATH=%%TBB21_INSTALL_DIR%%\build\%1;%%PATH%%>>tbbvars.bat
+echo SET INCLUDE=%%TBB22_INSTALL_DIR%%\include;%%INCLUDE%%>>tbbvars.bat
+echo SET LIB=%%TBB22_INSTALL_DIR%%\build\%1;%%LIB%%>>tbbvars.bat
+echo SET PATH=%%TBB22_INSTALL_DIR%%\build\%1;%%PATH%%>>tbbvars.bat
 
 if exist tbbvars.sh goto skipsh
 set fslash_root=%actual_root:\=/%
 echo Generating tbbvars.sh
 echo #!/bin/sh>tbbvars.sh
-echo export TBB21_INSTALL_DIR="%fslash_root%">>tbbvars.sh
+echo export TBB22_INSTALL_DIR="%fslash_root%">>tbbvars.sh
 echo TBB_ARCH_PLATFORM="%arch%\%runtime%">>tbbvars.sh
 echo if [ -z "${PATH}" ]; then>>tbbvars.sh
-echo     export PATH="${TBB21_INSTALL_DIR}/build/%1">>tbbvars.sh
+echo     export PATH="${TBB22_INSTALL_DIR}/build/%1">>tbbvars.sh
 echo else>>tbbvars.sh
-echo     export PATH="${TBB21_INSTALL_DIR}/build/%1;$PATH">>tbbvars.sh
+echo     export PATH="${TBB22_INSTALL_DIR}/build/%1;$PATH">>tbbvars.sh
 echo fi>>tbbvars.sh
 echo if [ -z "${LIB}" ]; then>>tbbvars.sh
-echo     export LIB="${TBB21_INSTALL_DIR}/build/%1">>tbbvars.sh
+echo     export LIB="${TBB22_INSTALL_DIR}/build/%1">>tbbvars.sh
 echo else>>tbbvars.sh
-echo     export LIB="${TBB21_INSTALL_DIR}/build/%1;$LIB">>tbbvars.sh
+echo     export LIB="${TBB22_INSTALL_DIR}/build/%1;$LIB">>tbbvars.sh
 echo fi>>tbbvars.sh
 echo if [ -z "${INCLUDE}" ]; then>>tbbvars.sh
-echo     export INCLUDE="${TBB21_INSTALL_DIR}/include">>tbbvars.sh
+echo     export INCLUDE="${TBB22_INSTALL_DIR}/include">>tbbvars.sh
 echo else>>tbbvars.sh
-echo     export INCLUDE="${TBB21_INSTALL_DIR}/include;$INCLUDE">>tbbvars.sh
+echo     export INCLUDE="${TBB22_INSTALL_DIR}/include;$INCLUDE">>tbbvars.sh
 echo fi>>tbbvars.sh
 :skipsh
 
 if exist tbbvars.csh goto skipcsh
 echo Generating tbbvars.csh
 echo #!/bin/csh>tbbvars.csh
-echo setenv TBB21_INSTALL_DIR "%actual_root%">>tbbvars.csh
+echo setenv TBB22_INSTALL_DIR "%actual_root%">>tbbvars.csh
 echo setenv TBB_ARCH_PLATFORM "%arch%\%runtime%">>tbbvars.csh
 echo if (! $?PATH) then>>tbbvars.csh
-echo     setenv PATH "${TBB21_INSTALL_DIR}\build\%1">>tbbvars.csh
+echo     setenv PATH "${TBB22_INSTALL_DIR}\build\%1">>tbbvars.csh
 echo else>>tbbvars.csh
-echo     setenv PATH "${TBB21_INSTALL_DIR}\build\%1;$PATH">>tbbvars.csh
+echo     setenv PATH "${TBB22_INSTALL_DIR}\build\%1;$PATH">>tbbvars.csh
 echo endif>>tbbvars.csh
 echo if (! $?LIB) then>>tbbvars.csh
-echo     setenv LIB "${TBB21_INSTALL_DIR}\build\%1">>tbbvars.csh
+echo     setenv LIB "${TBB22_INSTALL_DIR}\build\%1">>tbbvars.csh
 echo else>>tbbvars.csh
-echo     setenv LIB "${TBB21_INSTALL_DIR}\build\%1;$LIB">>tbbvars.csh
+echo     setenv LIB "${TBB22_INSTALL_DIR}\build\%1;$LIB">>tbbvars.csh
 echo endif>>tbbvars.csh
 echo if (! $?INCLUDE) then>>tbbvars.csh
-echo     setenv INCLUDE "${TBB21_INSTALL_DIR}\include">>tbbvars.csh
+echo     setenv INCLUDE "${TBB22_INSTALL_DIR}\include">>tbbvars.csh
 echo else>>tbbvars.csh
-echo     setenv INCLUDE "${TBB21_INSTALL_DIR}\include;$INCLUDE">>tbbvars.csh
+echo     setenv INCLUDE "${TBB22_INSTALL_DIR}\include;$INCLUDE">>tbbvars.csh
 echo endif>>tbbvars.csh
 )
 :skipcsh
diff --git a/build/generate_tbbvars.sh b/build/generate_tbbvars.sh
index 84a8c95..1e1b02c 100644
--- a/build/generate_tbbvars.sh
+++ b/build/generate_tbbvars.sh
@@ -89,12 +89,12 @@ EOF
 else # make with TBB_INSTALL_DIR
 [ -f ./tbbvars.sh ] || cat >./tbbvars.sh <<EOF
 #!/bin/bash
-export TBB21_INSTALL_DIR="${tbb_root}" #
-tbb_bin="\${TBB21_INSTALL_DIR}/build/$1" #
+export TBB22_INSTALL_DIR="${tbb_root}" #
+tbb_bin="\${TBB22_INSTALL_DIR}/build/$1" #
 if [ -z "\$CPATH" ]; then #
-    export CPATH="\${TBB21_INSTALL_DIR}/include" #
+    export CPATH="\${TBB22_INSTALL_DIR}/include" #
 else #
-    export CPATH="\${TBB21_INSTALL_DIR}/include:\$CPATH" #
+    export CPATH="\${TBB22_INSTALL_DIR}/include:\$CPATH" #
 fi #
 if [ -z "\$LIBRARY_PATH" ]; then #
     export LIBRARY_PATH="\${tbb_bin}" #
@@ -110,12 +110,12 @@ ${custom_exp_sh} #
 EOF
 [ -f ./tbbvars.csh ] || cat >./tbbvars.csh <<EOF
 #!/bin/csh
-setenv TBB21_INSTALL_DIR "${tbb_root}" #
-setenv tbb_bin "\${TBB21_INSTALL_DIR}/build/$1" #
+setenv TBB22_INSTALL_DIR "${tbb_root}" #
+setenv tbb_bin "\${TBB22_INSTALL_DIR}/build/$1" #
 if (! \$?CPATH) then #
-    setenv CPATH "\${TBB21_INSTALL_DIR}/include" #
+    setenv CPATH "\${TBB22_INSTALL_DIR}/include" #
 else #
-    setenv CPATH "\${TBB21_INSTALL_DIR}/include:\$CPATH" #
+    setenv CPATH "\${TBB22_INSTALL_DIR}/include:\$CPATH" #
 endif #
 if (! \$?LIBRARY_PATH) then #
     setenv LIBRARY_PATH "\${tbb_bin}" #
diff --git a/build/index.html b/build/index.html
index 6b3435e..db60186 100644
--- a/build/index.html
+++ b/build/index.html
@@ -25,7 +25,7 @@ The files here are not intended to be used directly.  See below for usage.
 <DD>Main common included Makefile that includes OS-specific and compiler-specific Makefiles.
 <DT><os>.inc
 <DD>OS-specific Makefile for a particular <os>.
-<DT><os>_<compiler>.inc
+<DT><os>.<compiler>.inc
 <DD>Compiler-specific Makefile for a particular <os> / <compiler> combination.
 <DT>*.sh
 <DD>Infrastructure utilities for Linux*, Mac OS* X, and UNIX*-related systems.
@@ -119,7 +119,7 @@ To perform different build and/or test operations, use the following steps.
     <DT><TT>make compiler=<B>{</B>icl, icc<B>}</B> <B>[</B>(above options or targets)<B>]</B></TT>
     <DD>Build and run as above, but use Intel® compilers instead of default, native compilers
 	(e.g., icl instead of cl.exe on Windows* systems, or icc instead of g++ on Linux* or Mac OS* X systems).
-    <DT><TT>make arch=<B>{</B>ia32, em64t, itanium<B>}</B> <B>[</B>(above options or targets)<B>]</B></TT>
+    <DT><TT>make arch=<B>{</B>ia32, intel64, ia64<B>}</B> <B>[</B>(above options or targets)<B>]</B></TT>
     <DD>Build and run as above, but build libraries for the selected ABI.
         Might be useful for cross-compilation; ensure proper environment is set before running this command.
     <DT><TT>make tbb_root=<B>{</B>(TBB directory)<B>}</B> <B>[</B>(above options or targets)<B>]</B></TT>
@@ -196,7 +196,7 @@ See the Makefile infrastructure files for examples.
 <LI>The <A HREF=../Makefile>top-level Makefile</A> includes <A HREF=common.inc>common.inc</A> to determine the operating system.
     <UL>
     <LI>To add a new operating system, add the appropriate test to <A HREF=common.inc>common.inc</A>,
-	and create the needed <os>.inc and <os>_<compiler>.inc files (see below).
+	and create the needed <os>.inc and <os>.<compiler>.inc files (see below).
     </UL>
 <LI>The <os>.inc file makes OS-specific settings for a particular <os>.
     <UL>
@@ -205,14 +205,14 @@ See the Makefile infrastructure files for examples.
 	and sets other platform-dependent values.
     <LI>Add a new <os>.inc file for each new operating system added.
     </UL>
-<LI>The <os>_<compiler>.inc file makes compiler-specific settings for a particular
+<LI>The <os>.<compiler>.inc file makes compiler-specific settings for a particular
     <os> / <compiler> combination.
     <UL>
     <LI>For example, <A HREF=linux.gcc.inc>linux.gcc.inc</A> makes specific settings for using GCC on Linux* systems,
 	and <A HREF=linux.icc.inc>linux.icc.inc</A> makes specific settings for using the Intel® C++ compiler on Linux* systems.
     <LI>This file sets particular compiler, assembler and linker options required when using a particular
 	<os> / <compiler> combination.
-    <LI>Add a new <os>_<compiler>.inc file for each new <os> / <compiler> combination added.
+    <LI>Add a new <os>.<compiler>.inc file for each new <os> / <compiler> combination added.
     </UL>
 </OL>
 
diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
index 8565bf7..2cead9a 100644
--- a/build/linux.gcc.inc
+++ b/build/linux.gcc.inc
@@ -57,12 +57,12 @@ ASM_FLAGS=
 
 TBB_ASM.OBJ=
 
-ifeq (itanium,$(arch))
+ifeq (ia64,$(arch))
 # Position-independent code (PIC) is a must on IA-64, even for regular (not shared) executables
     CPLUS_FLAGS += $(PIC_KEY)
 endif 
 
-ifeq (em64t,$(arch))
+ifeq (intel64,$(arch))
     CPLUS_FLAGS += -m64
     LIB_LINK_FLAGS += -m64
 endif 
@@ -82,10 +82,10 @@ endif
 # Setting assembler data.
 #------------------------------------------------------------------------------
 ASSEMBLY_SOURCE=$(arch)-gas
-ifeq (itanium,$(arch))
+ifeq (ia64,$(arch))
     ASM=as
     ASM_FLAGS += -xexplicit
-    TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
+    TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o ia64_misc.o
 endif 
 #------------------------------------------------------------------------------
 # End of setting assembler data.
diff --git a/build/linux.icc.inc b/build/linux.icc.inc
index fe851fd..ea68195 100644
--- a/build/linux.icc.inc
+++ b/build/linux.icc.inc
@@ -65,18 +65,22 @@ ASM_FLAGS=
 
 TBB_ASM.OBJ=
 
-ifeq (itanium,$(arch))
+ifeq (ia64,$(arch))
 # Position-independent code (PIC) is a must on IA-64, even for regular (not shared) executables
     CPLUS_FLAGS += $(PIC_KEY)
 endif 
 
+ifneq (0,$(lambdas))
+	CPLUS_FLAGS += -std=c++0x -D_TBB_CPP0X
+endif
+
 #------------------------------------------------------------------------------
 # Setting assembler data.
 #------------------------------------------------------------------------------
 ASSEMBLY_SOURCE=$(arch)-gas
-ifeq (itanium,$(arch))
+ifeq (ia64,$(arch))
     ASM=ias
-    TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
+    TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o ia64_misc.o
 endif 
 #------------------------------------------------------------------------------
 # End of setting assembler data.
diff --git a/build/linux.inc b/build/linux.inc
index a411d30..d858445 100644
--- a/build/linux.inc
+++ b/build/linux.inc
@@ -30,10 +30,10 @@ ifndef arch
                 export arch:=ia32
         endif
         ifeq ($(uname_m),ia64)
-                export arch:=itanium
+                export arch:=ia64
         endif
         ifeq ($(uname_m),x86_64)
-                export arch:=em64t
+                export arch:=intel64
         endif
         ifeq ($(uname_m),sparc64)
                 export arch:=sparc
@@ -78,7 +78,7 @@ DLL = so
 LIBEXT = so
 SONAME_SUFFIX =$(shell grep TBB_COMPATIBLE_INTERFACE_VERSION $(tbb_root)/include/tbb/tbb_stddef.h | egrep -o [0-9.]+)
 
-def_prefix = $(if $(findstring 32,$(arch)),lin32,$(if $(findstring 64,$(arch)),lin64,lin64ipf))
+def_prefix = $(if $(findstring 32,$(arch)),lin32,$(if $(findstring intel64,$(arch)),lin64,lin64ipf))
 TBB.DEF = $(tbb_root)/src/tbb/$(def_prefix)-tbb-export.def
 
 EXPORT_KEY = -Wl,--version-script,
@@ -98,6 +98,10 @@ MALLOCPROXY.DEF = $(MALLOC_ROOT)/$(def_prefix)-proxy-export.def
 MALLOCPROXY.DLL = $(MALLOCPROXY_NO_VERSION.DLL).$(SONAME_SUFFIX)
 MALLOCPROXY.LIB = $(MALLOCPROXY_NO_VERSION.DLL)
 
+RML_NO_VERSION.DLL = libirml$(DEBUG_SUFFIX).$(DLL)
+RML.DEF = $(RML_SERVER_ROOT)/lin-rml-export.def
+RML.DLL = $(RML_NO_VERSION.DLL).1
+RML.LIB = $(RML_NO_VERSION.DLL)
 
 TBB_NOSTRICT=1
 
diff --git a/build/macos.gcc.inc b/build/macos.gcc.inc
index 7fe6ed7..89a2182 100644
--- a/build/macos.gcc.inc
+++ b/build/macos.gcc.inc
@@ -25,6 +25,7 @@
 # the GNU General Public License.
 
 CPLUS = g++
+CONLY = gcc
 COMPILE_ONLY = -c -MMD
 PREPROC_ONLY = -E -x c
 INCLUDE_KEY = -I
@@ -34,6 +35,7 @@ OUTPUTOBJ_KEY = -o #
 PIC_KEY = -fPIC
 WARNING_AS_ERROR_KEY = -Werror
 WARNING_KEY = -Wall
+WARNING_SUPPRESS =
 DYLIB_KEY = -dynamiclib
 EXPORT_KEY = -Wl,-exported_symbols_list,
 LIBDL = -ldl
@@ -41,7 +43,7 @@ LIBDL = -ldl
 LIBS = -lpthread
 LINK_FLAGS = 
 LIB_LINK_FLAGS = -dynamiclib
-C_FLAGS = $(CPLUS_FLAGS) -x c
+C_FLAGS = $(CPLUS_FLAGS)
 
 ifeq ($(cfg), release)
     CPLUS_FLAGS = -O2
@@ -51,7 +53,7 @@ endif
 
 CPLUS_FLAGS += -DUSE_PTHREAD
 
-ifeq (em64t,$(arch))
+ifeq (intel64,$(arch))
     CPLUS_FLAGS += -m64
     LINK_FLAGS += -m64
     LIB_LINK_FLAGS += -m64
diff --git a/build/macos.icc.inc b/build/macos.icc.inc
index 243b6d5..039ea74 100644
--- a/build/macos.icc.inc
+++ b/build/macos.icc.inc
@@ -25,6 +25,7 @@
 # the GNU General Public License.
 
 CPLUS = icpc
+CONLY = icc
 COMPILE_ONLY = -c -MMD
 PREPROC_ONLY = -E -x c
 INCLUDE_KEY = -I
@@ -44,7 +45,7 @@ OPENMP_FLAG = -openmp
 LIBS = -lpthread
 LINK_FLAGS = 
 LIB_LINK_FLAGS = -dynamiclib -i-static
-C_FLAGS = $(CPLUS_FLAGS) -x c
+C_FLAGS = $(CPLUS_FLAGS)
 
 ifeq ($(cfg), release)
     CPLUS_FLAGS = -O2 -fno-omit-frame-pointer
@@ -58,11 +59,11 @@ ifneq (,$(codecov))
     CPLUS_FLAGS += -prof-genx
 endif
 
-ifeq (em64t,$(arch))
-#    LINK_FLAGS += -m64
-#    LIB_LINK_FLAGS += -m64
+ifneq (0,$(lambdas))
+	CPLUS_FLAGS += -std=c++0x -D_TBB_CPP0X
 endif
 
+
 #------------------------------------------------------------------------------
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
diff --git a/build/macos.inc b/build/macos.inc
index c99e390..4e2f4db 100644
--- a/build/macos.inc
+++ b/build/macos.inc
@@ -34,7 +34,7 @@ ifndef arch
    endif
  else
    ifeq ($(shell /usr/sbin/sysctl -n hw.optional.x86_64 2>/dev/null),1)
-     export arch:=em64t
+     export arch:=intel64
    else
      export arch:=ia32
    endif
diff --git a/build/version_info_windows.js b/build/version_info_windows.js
index bb36001..1d1efb9 100644
--- a/build/version_info_windows.js
+++ b/build/version_info_windows.js
@@ -32,54 +32,59 @@ WScript.Echo("#define __TBB_VERSION_STRINGS \\");
 
 //Getting BUILD_HOST
 WScript.echo( "\"TBB: BUILD_HOST\\t\\t" + 
-			  WshShell.ExpandEnvironmentStrings("%COMPUTERNAME%") +
-			  "\" ENDL \\" );
+              WshShell.ExpandEnvironmentStrings("%COMPUTERNAME%") +
+              "\" ENDL \\" );
 
 //Getting BUILD_OS
 tmpExec = WshShell.Exec("cmd /c ver");
 while ( tmpExec.Status == 0 ) {
-	WScript.Sleep(100);
+    WScript.Sleep(100);
 }
 tmpExec.StdOut.ReadLine();
 
 WScript.echo( "\"TBB: BUILD_OS\\t\\t" + 
-			  tmpExec.StdOut.ReadLine() +
-			  "\" ENDL \\" );
-
-
-//Getting BUILD_CL
-tmpExec = WshShell.Exec("cmd /c echo #define 0 0>empty.cpp");
-tmpExec = WshShell.Exec("cl -c empty.cpp ");
-while ( tmpExec.Status == 0 ) {
-	WScript.Sleep(100);
+              tmpExec.StdOut.ReadLine() +
+              "\" ENDL \\" );
+
+if ( WScript.Arguments(0).toLowerCase().match("gcc") ) {
+    tmpExec = WshShell.Exec("gcc --version");
+    WScript.echo( "\"TBB: BUILD_COMPILER\\t" + 
+                  tmpExec.StdOut.ReadLine() + 
+                  "\" ENDL \\" );
+
+} else { // MS / Intel compilers
+    //Getting BUILD_CL
+    tmpExec = WshShell.Exec("cmd /c echo #define 0 0>empty.cpp");
+    tmpExec = WshShell.Exec("cl -c empty.cpp ");
+    while ( tmpExec.Status == 0 ) {
+        WScript.Sleep(100);
+    }
+    var clVersion = tmpExec.StdErr.ReadLine();
+    WScript.echo( "\"TBB: BUILD_CL\\t\\t" + 
+                  clVersion +
+                  "\" ENDL \\" );
+
+    //Getting BUILD_COMPILER
+    if ( WScript.Arguments(0).toLowerCase().match("icl") ) {
+        tmpExec = WshShell.Exec("icl -c empty.cpp ");
+        while ( tmpExec.Status == 0 ) {
+            WScript.Sleep(100);
+        }
+        WScript.echo( "\"TBB: BUILD_COMPILER\\t" + 
+                      tmpExec.StdErr.ReadLine() + 
+                      "\" ENDL \\" );
+    } else {
+        WScript.echo( "\"TBB: BUILD_COMPILER\\t\\t" + 
+                      clVersion +
+                      "\" ENDL \\" );
+    }
+    tmpExec = WshShell.Exec("cmd /c del /F /Q empty.obj empty.cpp");
 }
-var clVersion = tmpExec.StdErr.ReadLine();
-WScript.echo( "\"TBB: BUILD_CL\\t\\t" + 
-			  clVersion +
-			  "\" ENDL \\" );
-
-//Getting BUILD_COMPILER
-if ( WScript.Arguments(0).toLowerCase().match("icl") ) {
-	tmpExec = WshShell.Exec("icl -c empty.cpp ");
-	while ( tmpExec.Status == 0 ) {
-		WScript.Sleep(100);
-	}
-	WScript.echo( "\"TBB: BUILD_COMPILER\\t" + 
-				  tmpExec.StdErr.ReadLine() + 
-				  "\" ENDL \\" );
-} else {
-	WScript.echo( "\"TBB: BUILD_COMPILER\\t\\t" + 
-				  clVersion +
-				  "\" ENDL \\" );
-}
-
-tmpExec = WshShell.Exec("cmd /c del /F /Q empty.cpp ");
-tmpExec = WshShell.Exec("cmd /c del /F /Q empty.obj ");
 
 //Getting BUILD_TARGET
 WScript.echo( "\"TBB: BUILD_TARGET\\t" + 
-			  WScript.Arguments(1) + 
-			  "\" ENDL \\" );
+              WScript.Arguments(1) + 
+              "\" ENDL \\" );
 
 //Getting BUILD_COMMAND
 WScript.echo( "\"TBB: BUILD_COMMAND\\t" + WScript.Arguments(2) + "\" ENDL" );
@@ -88,8 +93,8 @@ WScript.echo( "\"TBB: BUILD_COMMAND\\t" + WScript.Arguments(2) + "\" ENDL" );
 var date = new Date();
 WScript.echo( "#define __TBB_DATETIME \"" + date.toUTCString() + "\"" );
 WScript.echo( "#define __TBB_VERSION_YMD " + date.getUTCFullYear() + ", " + 
-			  (date.getUTCMonth() > 8 ? (date.getUTCMonth()+1):("0"+(date.getUTCMonth()+1))) + 
-			  (date.getUTCDate() > 9 ? date.getUTCDate():("0"+date.getUTCDate())) );
+              (date.getUTCMonth() > 8 ? (date.getUTCMonth()+1):("0"+(date.getUTCMonth()+1))) + 
+              (date.getUTCDate() > 9 ? date.getUTCDate():("0"+date.getUTCDate())) );
 
 
 /*
diff --git a/build/vsproject/index.html b/build/vsproject/index.html
new file mode 100644
index 0000000..82cad00
--- /dev/null
+++ b/build/vsproject/index.html
@@ -0,0 +1,31 @@
+<HTML>
+<BODY>
+
+<H2>Overview</H2>
+This directory contains the visual studio* 2005 solution to build Threading Building Blocks.
+
+
+<H2>Files</H2>
+<DL>
+<DT><A HREF="makefile.sln">makefile.sln</A>
+<DD>Solution file.
+<DT><A HREF="tbb.vcproj">tbb.vcproj</A>
+<DD>Library project file.
+<DT><A HREF="tbbmalloc.vcproj">tbbmalloc.vcproj</A>
+<DD>Scalable allocator library project file. Allocator sources are expected to be located in <A HREF="../../src/tbbmalloc">../../src/tbbmalloc</A> folder.
+<DT><A HREF="tbbmalloc_proxy.vcproj">tbbmalloc_proxy.vcproj</A>
+<DD>Standard allocator replacement project file. 
+</DL>
+
+<HR>
+<A HREF="../index.html">Up to parent directory</A>
+<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.
+</BODY>
+</HTML>
diff --git a/build/vsproject/makefile.sln b/build/vsproject/makefile.sln
new file mode 100644
index 0000000..2a681d4
--- /dev/null
+++ b/build/vsproject/makefile.sln
@@ -0,0 +1,72 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tbb", "tbb.vcproj", "{F62787DD-1327-448B-9818-030062BCFAA5}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tbbmalloc", "tbbmalloc.vcproj", "{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{F62787DD-1327-448B-9818-030062BCFAA5} = {F62787DD-1327-448B-9818-030062BCFAA5}
+	EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8898CE0B-0BFB-45AE-AA71-83735ED2510D}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(SolutionItems) = preProject
+		index.html = index.html
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tbbmalloc_proxy", "tbbmalloc_proxy.vcproj", "{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{B15F131E-328A-4D42-ADC2-9FF4CA6306D8} = {B15F131E-328A-4D42-ADC2-9FF4CA6306D8}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F62787DD-1327-448B-9818-030062BCFAA5}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F62787DD-1327-448B-9818-030062BCFAA5}.Debug|Win32.Build.0 = Debug|Win32
+		{F62787DD-1327-448B-9818-030062BCFAA5}.Debug|x64.ActiveCfg = Debug|x64
+		{F62787DD-1327-448B-9818-030062BCFAA5}.Debug|x64.Build.0 = Debug|x64
+		{F62787DD-1327-448B-9818-030062BCFAA5}.Release|Win32.ActiveCfg = Release|Win32
+		{F62787DD-1327-448B-9818-030062BCFAA5}.Release|Win32.Build.0 = Release|Win32
+		{F62787DD-1327-448B-9818-030062BCFAA5}.Release|x64.ActiveCfg = Release|x64
+		{F62787DD-1327-448B-9818-030062BCFAA5}.Release|x64.Build.0 = Release|x64
+		{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Debug|Win32.Build.0 = Debug|Win32
+		{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Debug|x64.ActiveCfg = Debug|x64
+		{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Debug|x64.Build.0 = Debug|x64
+		{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Release|Win32.ActiveCfg = Release|Win32
+		{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Release|Win32.Build.0 = Release|Win32
+		{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Release|x64.ActiveCfg = Release|x64
+		{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}.Release|x64.Build.0 = Release|x64
+		{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Debug|Win32.Build.0 = Debug|Win32
+		{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Debug|x64.ActiveCfg = Debug|x64
+		{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Debug|x64.Build.0 = Debug|x64
+		{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Release|Win32.ActiveCfg = Release|Win32
+		{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Release|Win32.Build.0 = Release|Win32
+		{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Release|x64.ActiveCfg = Release|x64
+		{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/build/vsproject/tbb.vcproj b/build/vsproject/tbb.vcproj
new file mode 100644
index 0000000..7576596
--- /dev/null
+++ b/build/vsproject/tbb.vcproj
@@ -0,0 +1,910 @@
+<?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"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+		<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>
+		<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>
+		<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>
+		<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>
+	</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"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="MASM"
+						AdditionalOptions="/coff /Zi"
+					/>
+				</FileConfiguration>
+				<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"
+					/>
+				</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>
+				<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>
+			</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"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="MASM"
+						AdditionalOptions="/coff /Zi"
+					/>
+				</FileConfiguration>
+				<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"
+					/>
+				</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>
+				<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>
+				<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>
+			</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"
+					/>
+				</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>
+				<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>
+				<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>
+			</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>
+			<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>
+			<File
+				RelativePath="..\..\include\tbb\queuing_rw_mutex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\recursive_mutex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\scalable_allocator.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\spin_mutex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\spin_rw_mutex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\old\spin_rw_mutex_v2.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\task.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\task_scheduler_init.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\task_scheduler_observer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_allocator.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tbb\tbb_assert_impl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_exception.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_machine.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tbb\tbb_misc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_profiling.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_stddef.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_thread.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tbb\tbb_version.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbbmalloc_proxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tick_count.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\machine\windows_intel64.h"
+				>
+			</File>
+			<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"
+					/>
+				</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>
+				<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>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/build/vsproject/tbbmalloc.vcproj b/build/vsproject/tbbmalloc.vcproj
new file mode 100644
index 0000000..72e0928
--- /dev/null
+++ b/build/vsproject/tbbmalloc.vcproj
@@ -0,0 +1,818 @@
+<?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"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+		<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>
+		<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>
+		<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>
+		<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>
+	</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"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="MASM"
+						AdditionalOptions="/coff /Zi"
+					/>
+				</FileConfiguration>
+				<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"
+					/>
+				</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>
+				<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>
+			</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"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="MASM"
+						AdditionalOptions="/coff /Zi"
+					/>
+				</FileConfiguration>
+				<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"
+					/>
+				</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>
+				<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>
+				<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>
+			</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"
+					/>
+				</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>
+				<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>
+				<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>
+			</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>
+			<File
+				RelativePath="..\..\include\tbb\queuing_mutex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\queuing_rw_mutex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\recursive_mutex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\scalable_allocator.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\spin_mutex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\spin_rw_mutex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tbbmalloc\Statistics.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\task.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\task_scheduler_init.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\task_scheduler_observer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_allocator.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_exception.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_machine.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_profiling.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_stddef.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbb_thread.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tbbmalloc_proxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\tick_count.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tbbmalloc\TypeDefinitions.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\tbb\machine\windows_intel64.h"
+				>
+			</File>
+			<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"
+					/>
+				</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>
+				<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>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/pipeline/square/vc8/square.vcproj b/build/vsproject/tbbmalloc_proxy.vcproj
similarity index 50%
copy from examples/pipeline/square/vc8/square.vcproj
copy to build/vsproject/tbbmalloc_proxy.vcproj
index 2e4d5b2..72713df 100644
--- a/examples/pipeline/square/vc8/square.vcproj
+++ b/build/vsproject/tbbmalloc_proxy.vcproj
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="windows-1252"?>
+<?xml version="1.0" encoding="windows-1251"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="8,00"
-	Name="square"
-	ProjectGUID="{A21C0AEE-ADDC-45F0-A668-58FF10351D23}"
-	RootNamespace="square"
+	Name="tbbmalloc_proxy"
+	ProjectGUID="{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}"
+	RootNamespace="tbbmalloc_proxy"
 	Keyword="Win32Proj"
 	>
 	<Platforms>
@@ -16,24 +16,26 @@
 		/>
 	</Platforms>
 	<ToolFiles>
+		<DefaultToolFile
+			FileName="masm.rules"
+		/>
 	</ToolFiles>
 	<Configurations>
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
+			OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)"
+			IntermediateDirectory="ia32\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
+			/>
+			<Tool
+				Name="MASM"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -46,12 +48,18 @@
 			/>
 			<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="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
+				AdditionalIncludeDirectories="."
+				PreprocessorDefinitions=""
+				MinimalRebuild="true"
+				ExceptionHandling="1"
+				BasicRuntimeChecks="0"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
-				Detect64BitPortabilityProblems="true"
+				WarningLevel="4"
+				SuppressStartupBanner="false"
+				Detect64BitPortabilityProblems="false"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -65,13 +73,13 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalOptions="/DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO "
+				AdditionalDependencies="$(OutDir)\tbbmalloc_debug.lib"
+				OutputFile="$(OutDir)\tbbmalloc_proxy_debug.dll"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
-				SubSystem="1"
+				SubSystem="2"
 				TargetMachine="1"
-				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -96,26 +104,23 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
 			Name="Debug|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
+			OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)"
+			IntermediateDirectory="intel64\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
+			/>
+			<Tool
+				Name="MASM"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -129,12 +134,20 @@
 			/>
 			<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="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
+				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"
@@ -147,13 +160,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbbmalloc.def"
+				OutputFile="$(OutDir)\tbbmalloc_proxy_debug.dll"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
-				SubSystem="1"
+				SubSystem="2"
 				TargetMachine="17"
-				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -178,26 +190,24 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
+			OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)"
+			IntermediateDirectory="ia32\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="0"
+			WholeProgramOptimization="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
+			/>
+			<Tool
+				Name="MASM"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -210,11 +220,15 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+				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"
-				Detect64BitPortabilityProblems="true"
+				WarningLevel="4"
+				SuppressStartupBanner="false"
+				Detect64BitPortabilityProblems="false"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -228,15 +242,14 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  "
+				OutputFile="$(OutDir)\tbbmalloc_proxy.dll"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
-				SubSystem="1"
+				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
 				TargetMachine="1"
-				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -261,26 +274,24 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
 			Name="Release|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
+			OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)"
+			IntermediateDirectory="intel64\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="0"
+			WholeProgramOptimization="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
+			/>
+			<Tool
+				Name="MASM"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -294,10 +305,15 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+				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
@@ -311,15 +327,14 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)\tbbmalloc.def"
+				OutputFile="$(OutDir)\tbbmalloc_proxy.dll"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
-				SubSystem="1"
+				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
 				TargetMachine="17"
-				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -344,8 +359,6 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
@@ -358,7 +371,11 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath="..\square.cpp"
+				RelativePath="..\..\src\tbbmalloc\proxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tbbmalloc\tbb_function_replacement.cpp"
 				>
 			</File>
 		</Filter>
@@ -367,12 +384,56 @@
 			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"
+					/>
+				</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>
+				<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>
+			</File>
 		</Filter>
 	</Files>
 	<Globals>
diff --git a/build/vsproject/version_string.tmp b/build/vsproject/version_string.tmp
new file mode 100644
index 0000000..2098d67
--- /dev/null
+++ b/build/vsproject/version_string.tmp
@@ -0,0 +1 @@
+#define __TBB_VERSION_STRINGS "Empty"
diff --git a/build/windows.cl.inc b/build/windows.cl.inc
index f7aa6d9..1051ece 100644
--- a/build/windows.cl.inc
+++ b/build/windows.cl.inc
@@ -77,7 +77,7 @@ ifeq ($(runtime),vc9)
         OPENMP_FLAG = /openmp
 endif
 
-ifeq (em64t,$(arch))
+ifeq (intel64,$(arch))
         CPLUS_FLAGS += /GS-
 endif
 
@@ -95,7 +95,7 @@ C_FLAGS = $(CPLUS_FLAGS)
 # Setting assembler data.
 #------------------------------------------------------------------------------
 ASSEMBLY_SOURCE=$(arch)-masm
-ifeq (em64t,$(arch))
+ifeq (intel64,$(arch))
     ASM=ml64
     ASM_FLAGS += /DEM64T=1 /c /Zi
     TBB_ASM.OBJ = atomic_support.obj
diff --git a/build/windows.cl.inc b/build/windows.gcc.inc
similarity index 62%
copy from build/windows.cl.inc
copy to build/windows.gcc.inc
index f7aa6d9..b52d2a7 100644
--- a/build/windows.cl.inc
+++ b/build/windows.gcc.inc
@@ -25,98 +25,98 @@
 # the GNU General Public License.
 
 #------------------------------------------------------------------------------
-# Define compiler-specific variables.
+# Overriding settings from windows.inc
 #------------------------------------------------------------------------------
 
+SLASH= $(strip \)
+OBJ = o
+LIBEXT = dll # MinGW allows linking with DLLs directly
+
+TBB.RES =
+MALLOC.RES =
+TBB.MANIFEST =
+MALLOC.MANIFEST =
+
+# TODO: do better when/if mingw64 support is added
+TBB.DEF = $(tbb_root)/src/tbb/lin32-tbb-export.def
+MALLOC.DEF = $(MALLOC_ROOT)/win-gcc-tbbmalloc-export.def
+
+LINK_TBB.LIB = $(TBB.LIB)
 
 #------------------------------------------------------------------------------
-# Setting compiler flags.
+# End of overridden settings
+#------------------------------------------------------------------------------
+# Compiler-specific variables
 #------------------------------------------------------------------------------
-CPLUS = cl /nologo
-LINK_FLAGS = /link /nologo
-LIB_LINK_FLAGS=/link /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO
-MS_CRT_KEY = /MD$(if $(findstring debug,$(cfg)),d)
-EH_FLAGS = /EHsc /GR
-              
-ifeq ($(cfg), release)
-        CPLUS_FLAGS = $(MS_CRT_KEY) /O2 /Zi $(EH_FLAGS) /Zc:forScope /Zc:wchar_t
-        ASM_FLAGS =
-ifeq (ia32,$(arch))
-        CPLUS_FLAGS += /Oy
-endif
-endif
-ifeq ($(cfg), debug)
-        CPLUS_FLAGS = $(MS_CRT_KEY) /Od /Ob0 /Zi $(EH_FLAGS) /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG
-        ASM_FLAGS = /DUSE_FRAME_POINTER
-endif
-
 
-COMPILE_ONLY = /c
-PREPROC_ONLY = /TC /EP
-INCLUDE_KEY = /I
-DEFINE_KEY = /D
-OUTPUT_KEY = /Fe
-OUTPUTOBJ_KEY = /Fo
-WARNING_AS_ERROR_KEY = /WX
+CPLUS = g++ 
+COMPILE_ONLY = -c -MMD
+PREPROC_ONLY = -E -x c
+INCLUDE_KEY = -I
+DEFINE_KEY = -D
+OUTPUT_KEY = -o #
+OUTPUTOBJ_KEY = -o #
+PIC_KEY =
+WARNING_AS_ERROR_KEY = -Werror
+WARNING_KEY = -Wall  -Wno-uninitialized
+WARNING_SUPPRESS = -Wno-parentheses
+DYLIB_KEY = -shared
+LIBDL = 
+EXPORT_KEY = -Wl,--version-script,
+LIBS = -lpsapi
 
-ifeq ($(runtime),vc7.1)
-        WARNING_KEY = /W3
-else
-        WARNING_KEY = /W4
-endif
+#------------------------------------------------------------------------------
+# End of compiler-specific variables
+#------------------------------------------------------------------------------
+# Command lines
+#------------------------------------------------------------------------------
 
-DYLIB_KEY = /DLL
-EXPORT_KEY = /DEF:
+LINK_FLAGS = -Wl,--enable-auto-import
+LIB_LINK_FLAGS = $(DYLIB_KEY)
 
-ifeq ($(runtime),vc8)
-        OPENMP_FLAG = /openmp
-        WARNING_KEY += /Wp64
-        CPLUS_FLAGS += /D_USE_RTM_VERSION
-endif
-ifeq ($(runtime),vc9)
-        OPENMP_FLAG = /openmp
+ifeq ($(cfg), release)
+        CPLUS_FLAGS = -O2
 endif
-
-ifeq (em64t,$(arch))
-        CPLUS_FLAGS += /GS-
+ifeq ($(cfg), debug)
+        CPLUS_FLAGS = -g -O0 -DTBB_USE_DEBUG
 endif
+CPLUS_FLAGS += -DUSE_WINTHREAD
 
+# MinGW specific
+CPLUS_FLAGS += -D__MSVCRT_VERSION__=0x0700 -msse -mthreads
 
-
-CPLUS_FLAGS += /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE \
-        /D_WIN32_WINNT=$(_WIN32_WINNT)
+CONLY = gcc
 C_FLAGS = $(CPLUS_FLAGS)
-#------------------------------------------------------------------------------
-# End of setting compiler flags.
-#------------------------------------------------------------------------------
 
+ifeq (intel64,$(arch))
+    CPLUS_FLAGS += -m64
+    LIB_LINK_FLAGS += -m64
+endif 
+
+ifeq (ia32,$(arch))
+    CPLUS_FLAGS += -m32
+    LIB_LINK_FLAGS += -m32
+endif 
 
 #------------------------------------------------------------------------------
-# Setting assembler data.
+# End of command lines
 #------------------------------------------------------------------------------
-ASSEMBLY_SOURCE=$(arch)-masm
-ifeq (em64t,$(arch))
-    ASM=ml64
-    ASM_FLAGS += /DEM64T=1 /c /Zi
-    TBB_ASM.OBJ = atomic_support.obj
-else
-    ASM=ml
-    ASM_FLAGS += /c /coff /Zi
-    TBB_ASM.OBJ = atomic_support.obj lock_byte.obj
-endif
-#------------------------------------------------------------------------------
-# End of setting assembler data.
+# Setting assembler data
 #------------------------------------------------------------------------------
 
+ASM=
+ASM_FLAGS=
+TBB_ASM.OBJ=
+ASSEMBLY_SOURCE=$(arch)-gas
 
 #------------------------------------------------------------------------------
-# Setting tbbmalloc data.
-#------------------------------------------------------------------------------
-M_CPLUS_FLAGS = $(subst $(EH_FLAGS),/EHs-,$(CPLUS_FLAGS))
+# End of setting assembler data
 #------------------------------------------------------------------------------
-# End of setting tbbmalloc data.
+# Setting tbbmalloc data
 #------------------------------------------------------------------------------
 
+M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
+
 #------------------------------------------------------------------------------
-# End of define compiler-specific variables.
+# End of setting tbbmalloc data
 #------------------------------------------------------------------------------
diff --git a/build/windows.icl.inc b/build/windows.icl.inc
index 5dd5c2a..4c44d4a 100644
--- a/build/windows.icl.inc
+++ b/build/windows.icl.inc
@@ -72,7 +72,7 @@ WARNING_KEY = /W3
 DYLIB_KEY = /DLL
 EXPORT_KEY = /DEF:
 
-ifeq (em64t,$(arch))
+ifeq (intel64,$(arch))
     CPLUS_FLAGS += /GS-
 endif
 
@@ -92,6 +92,10 @@ endif
 
 C_FLAGS = $(CPLUS_FLAGS)
 
+ifneq (0,$(lambdas))
+	CPLUS_FLAGS += /Qstd=c++0x /D_TBB_CPP0X
+endif
+
 VCVERSION:=$(runtime)
 VCCOMPAT_FLAG := $(if $(findstring vc7.1, $(VCVERSION)),/Qvc7.1)
 ifeq ($(VCCOMPAT_FLAG),)
@@ -113,7 +117,7 @@ export VCCOMPAT_FLAG
 # Setting assembler data.
 #------------------------------------------------------------------------------
 ASSEMBLY_SOURCE=$(arch)-masm
-ifeq (em64t,$(arch))
+ifeq (intel64,$(arch))
     ASM=ml64
     ASM_FLAGS += /DEM64T=1 /c /Zi
     TBB_ASM.OBJ = atomic_support.obj
diff --git a/build/windows.inc b/build/windows.inc
index dc4cb49..6e899c5 100644
--- a/build/windows.inc
+++ b/build/windows.inc
@@ -32,11 +32,11 @@ endif
 
 # TODO give an error if archs doesn't match
 ifndef arch
-  export arch:=$(shell cmd /C "cscript /nologo /E:jscript $(tbb_root)/build/detect.js /arch")
+  export arch:=$(shell cmd /C "cscript /nologo /E:jscript $(tbb_root)/build/detect.js /arch $(compiler)")
 endif
 
 ifndef runtime
-  export runtime:=$(shell cmd /C "cscript /nologo /E:jscript $(tbb_root)/build/detect.js /runtime")
+  export runtime:=$(shell cmd /C "cscript /nologo /E:jscript $(tbb_root)/build/detect.js /runtime $(compiler)")
 endif
 
 native_compiler := cl
@@ -69,8 +69,8 @@ TBB.RES = tbb_resource.res
 # But for cross-configuration testing, need to link explicitly
 LINK_TBB.LIB = $(if $(crosstest),$(TBB.LIB))
 TBB.MANIFEST = 
-ifneq ($(runtime),vc7.1)
-TBB.MANIFEST = tbbmanifest.exe.manifest
+ifneq ($(filter vc8 vc9,$(runtime)),)
+    TBB.MANIFEST = tbbmanifest.exe.manifest
 endif
 
 MALLOC.DEF = $(MALLOC_ROOT)/$(def_prefix)-tbbmalloc-export.def
@@ -81,6 +81,18 @@ MALLOC.MANIFEST =
 ifneq ($(runtime),vc7.1)
 MALLOC.MANIFEST = tbbmanifest.exe.manifest
 endif
+LINK_MALLOC.LIB = $(MALLOC.LIB)
+
+MALLOCPROXY.DLL = tbbmalloc_proxy$(DEBUG_SUFFIX).$(DLL)
+MALLOCPROXY.LIB = tbbmalloc_proxy$(DEBUG_SUFFIX).$(LIBEXT)
+
+RML.DEF = $(RML_SERVER_ROOT)/$(def_prefix)-rml-export.def
+RML.DLL = irml$(DEBUG_SUFFIX).$(DLL)
+RML.LIB = irml$(DEBUG_SUFFIX).$(LIBEXT)
+RML.RES = irml.res
+ifneq ($(runtime),vc7.1)
+RML.MANIFEST = tbbmanifest.exe.manifest
+endif
 
 MAKE_VERSIONS = cmd /C cscript /nologo /E:jscript $(subst \,/,$(tbb_root))/build/version_info_windows.js $(compiler) $(arch) $(subst \,/,"$(CPLUS) $(CPLUS_FLAGS) $(INCLUDES)") > version_string.tmp
 MAKE_TBBVARS  = cmd /C "$(subst /,\,$(tbb_root))\build\generate_tbbvars.bat"
diff --git a/doc/Release_Notes.txt b/doc/Release_Notes.txt
index 5529cb1..8fc0549 100644
--- a/doc/Release_Notes.txt
+++ b/doc/Release_Notes.txt
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 Intel(R) Threading Building Blocks - Release Notes
-		  Version 2.1
+		  Version 2.2
 ------------------------------------------------------------------------
 
 
@@ -33,11 +33,7 @@ Hardware - Recommended
 
 Hardware - Supported
 
-    Intel(R) Pentium(R) 4 processor family
-    Intel(R) Pentium(R) D processor family
-    Intel(R) Xeon(R) processor family
-    Intel(R) Core(TM) processor family
-    Intel(R) Core(TM) 2 processor family
+    Intel(R) Pentium(R) 4 processor family and higher
     Intel(R) Itanium(R) processor family (Linux* systems only)
     Non Intel(R) processors compatible with the above processors
 
@@ -51,6 +47,7 @@ Software - Minimum Requirements
 
 Software - Recommended
 
+    Intel(R) Parallel Studio
     Intel(R) C++ Compiler 10.0 or higher
     Intel(R) Thread Checker 3.1 or higher
     Intel(R) Thread Profiler 3.1 or higher
@@ -67,23 +64,21 @@ Software - Supported Operating Systems
 	    (when using Red Hat* Enterprise Linux* 4 with Intel(R)
 	    Itanium(R) processors, operating system Update 2 or higher
 	    is recommended)
-	Red Hat* Fedora* Core 8, 9, 10
+	Red Hat* Fedora* 10, 11
 	    (not with Intel(R) Itanium(R) processors)
 	Asianux* 3.0
-	Debian* GNU/Linux* 4.0
-	Ubuntu* 7.04, 7.10, 8.04, 8.10
+	Debian* GNU/Linux* 4.0, 5.0
+	Ubuntu* 8.04, 8.10, 9.04
 	SuSE* Linux* Enterprise Server (SLES) 9, 10, 11
-	SGI* Propack* 4.0 (with Intel(R) Itanium(R) processors only)
 	SGI* Propack* 5.0 (not with IA-32 architecture processors)
-	Turbolinux* GreatTurbo Enterprise Server 10 SP1, Turbolinux* 11
-	    (not with Intel(R) Itanium(R) processors)
+	Turbolinux* 11
     Mac OS* X Systems
-	Mac OS* X 10.4.9 or higher
+	Mac OS* X 10.5.6 or higher
 
 Software - Supported Compilers
 
     Microsoft* Visual C++* 7.1 (Microsoft* Visual Studio* .NET 2003,
-	Windows* systems only)
+	Windows* systems only, deprecated)
     Microsoft* Visual C++ 8.0 (Microsoft* Visual Studio* 2005,
 	Windows* systems only)
     Microsoft* Visual C++ 9.0 (Microsoft* Visual Studio* 2008,
@@ -91,10 +86,10 @@ Software - Supported Compilers
     Intel(R) C++ Compiler 10.0 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.3
+	including gcc 3.2 through 4.4
     For each supported Mac OS* X operating system, the standard gcc
 	version provided with that operating system is supported,
-	including: 4.0.1 (Xcode* tool suite 2.4.1 or higher)
+	including: 4.0.1 (Xcode* tool suite 3.1.2 or higher)
 
 
 Known Issues
@@ -136,25 +131,15 @@ Library Issues
 	debug libraries; not doing so may cause run-time failures.  See
 	the Tutorial in the product "doc" sub-directory for more details
 	on debug vs. release libraries.
-
-    - When using Ubuntu* 7.04 in 64-bit mode, compilations can fail with
-	error messages saying that "`::system' has not been declared".
-	These failures can be worked around by removing libpthread-dev
-	from the system.  See the following link for more details:
-
-	https://bugs.launchpad.net/ubuntu/+source/gcc-4.1/+bug/77559
-
-	- By default, Ubuntu* in 64-bit mode does not install packages 
-	required to compile 32-bit applications. Trying to compile 32-bit 
-	applications (including TBB examples), you may get errors like:
-		/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
-		/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
-		/usr/bin/ld: cannot find -lpthread
-	or
-		/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
-	In order to overcome the issue, additional packages should be
-	installed, such as gcc-multilib, ia32-libs, and others.
-	Refer to your provider of Ubuntu distribution for more details.
+    
+    - 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* 
+	Fedora* 11. To install the product on the system use license 
+	file provided after registration of the serial number.  
 
 ------------------------------------------------------------------------
 Copyright (C) 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00001.html b/doc/html/a00001.html
index 3a28afa..8ca6cad 100644
--- a/doc/html/a00001.html
+++ b/doc/html/a00001.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::aligned_space< T, N > Member List</h1>This is the complete list of members for <a class="el" href="a00092.html">tbb::aligned_space< T, N ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00092.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()</td><td><a class="el" href="a00092.html">tbb::aligned_space< T, N ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00092.html#024be075c23c0394c9a2518d993bcd9e">end</a>()</td><td><a class="el" href="a00092.html">tbb::aligned_space< T, N ></a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::aligned_space< T, N > Member List</h1>This is the complete list of members for <a class="el" href="a00116.html">tbb::aligned_space< T, N ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()</td><td><a class="el" href="a00116.html">tbb::aligned_space< T, N ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00116.html#024be075c23c0394c9a2518d993bcd9e">end</a>()</td><td><a class="el" href="a00116.html">tbb::aligned_space< T, N ></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/a00031.html b/doc/html/a00002.html
similarity index 67%
rename from doc/html/a00031.html
rename to doc/html/a00002.html
index 5e77703..84c8e75 100644
--- a/doc/html/a00031.html
+++ b/doc/html/a00002.html
@@ -20,8 +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::pre_scan_tag Member List</h1>This is the complete list of members for <a class="el" href="a00117.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="a00117.html">tbb::pre_scan_tag</a>)</td><td><a class="el" href="a00117.html">tbb::pre_scan_tag</a></td><td><code> [inline, static]</code></td></tr>
+<h1>tbb::atomic< T > Member List</h1>This is the complete list of members for <a class="el" href="a00117.html">tbb::atomic< T ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>operator=</b>(T rhs) (defined in <a class="el" href="a00117.html">tbb::atomic< T ></a>)</td><td><a class="el" href="a00117.html">tbb::atomic< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator=</b>(const atomic< T > &rhs) (defined in <a class="el" href="a00117.html">tbb::atomic< T ></a>)</td><td><a class="el" href="a00117.html">tbb::atomic< T ></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/a00001.html b/doc/html/a00003.html
similarity index 65%
copy from doc/html/a00001.html
copy to doc/html/a00003.html
index 3a28afa..fa7c0d3 100644
--- a/doc/html/a00001.html
+++ b/doc/html/a00003.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::aligned_space< T, N > Member List</h1>This is the complete list of members for <a class="el" href="a00092.html">tbb::aligned_space< T, N ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00092.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()</td><td><a class="el" href="a00092.html">tbb::aligned_space< T, N ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00092.html#024be075c23c0394c9a2518d993bcd9e">end</a>()</td><td><a class="el" href="a00092.html">tbb::aligned_space< T, N ></a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::atomic< void * > Member List</h1>This is the complete list of members for <a class="el" href="a00118.html">tbb::atomic< void * ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>operator=</b>(void *rhs) (defined in <a class="el" href="a00118.html">tbb::atomic< void * ></a>)</td><td><a class="el" href="a00118.html">tbb::atomic< void * ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator=</b>(const atomic< void * > &rhs) (defined in <a class="el" href="a00118.html">tbb::atomic< void * ></a>)</td><td><a class="el" href="a00118.html">tbb::atomic< void * ></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/a00005.html b/doc/html/a00004.html
similarity index 61%
copy from doc/html/a00005.html
copy to doc/html/a00004.html
index 74cb0d9..90ea45c 100644
--- a/doc/html/a00005.html
+++ b/doc/html/a00004.html
@@ -20,20 +20,20 @@
     <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::blocked_range< Value > Member List</h1>This is the complete list of members for <a class="el" href="a00097.html">tbb::blocked_range< Value ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00097.html#18d2258400756ac1446dac7676b18df3">begin</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#94607755c5110d199202234d58d022ac">blocked_range</a>()</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#14795a36ead1414b4371dbe1a4656359">blocked_range</a>(Value begin_, Value end_, size_type grainsize_=1)</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">blocked_range</a>(blocked_range &r, split)</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range2d</b> (defined in <a class="el" href="a00097.html">tbb::blocked_range< Value ></a>)</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b> (defined in <a class="el" href="a00097.html">tbb::blocked_range< Value ></a>)</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> typedef</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> typedef</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td></td></tr>
+<h1>tbb::blocked_range< Value > Member List</h1>This is the complete list of members for <a class="el" href="a00122.html">tbb::blocked_range< Value ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin</a>() const </td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#94607755c5110d199202234d58d022ac">blocked_range</a>()</td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#14795a36ead1414b4371dbe1a4656359">blocked_range</a>(Value begin_, Value end_, size_type grainsize_=1)</td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">blocked_range</a>(blocked_range &r, split)</td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>blocked_range2d</b> (defined in <a class="el" href="a00122.html">tbb::blocked_range< Value ></a>)</td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b> (defined in <a class="el" href="a00122.html">tbb::blocked_range< Value ></a>)</td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> typedef</td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() const </td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>() const </td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>() const </td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() const </td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>() const </td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> typedef</td><td><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00005.html b/doc/html/a00005.html
index 74cb0d9..735b644 100644
--- a/doc/html/a00005.html
+++ b/doc/html/a00005.html
@@ -20,20 +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::blocked_range< Value > Member List</h1>This is the complete list of members for <a class="el" href="a00097.html">tbb::blocked_range< Value ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00097.html#18d2258400756ac1446dac7676b18df3">begin</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#94607755c5110d199202234d58d022ac">blocked_range</a>()</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#14795a36ead1414b4371dbe1a4656359">blocked_range</a>(Value begin_, Value end_, size_type grainsize_=1)</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">blocked_range</a>(blocked_range &r, split)</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range2d</b> (defined in <a class="el" href="a00097.html">tbb::blocked_range< Value ></a>)</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b> (defined in <a class="el" href="a00097.html">tbb::blocked_range< Value ></a>)</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> typedef</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>() const </td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> typedef</td><td><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td></td></tr>
+<h1>tbb::blocked_range2d< RowValue, ColValue > Member List</h1>This is the complete list of members for <a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>blocked_range2d</b>(RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize) (defined in <a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>blocked_range2d</b>(RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end) (defined in <a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>blocked_range2d</b>(blocked_range2d &r, split) (defined in <a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>col_range_type</b> typedef (defined in <a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00123.html#392a46759af2c884957115771affa7f4">cols</a>() const </td><td><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00123.html#d144cb2d88cef553420311aca8667a44">empty</a>() const </td><td><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00123.html#ad36a9b38e4fef26d376f99552ce2d92">is_divisible</a>() const </td><td><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00123.html#a807a22fe658ec38b8edfd69521d0383">row_range_type</a> typedef</td><td><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00123.html#f496e7348a82652fba581203477cc07c">rows</a>() const </td><td><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></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/a00006.html b/doc/html/a00006.html
index bd25f57..c58b3e5 100644
--- a/doc/html/a00006.html
+++ b/doc/html/a00006.html
@@ -20,16 +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::blocked_range2d< RowValue, ColValue > Member List</h1>This is the complete list of members for <a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range2d</b>(RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize) (defined in <a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range2d</b>(RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end) (defined in <a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range2d</b>(blocked_range2d &r, split) (defined in <a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>col_range_type</b> typedef (defined in <a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00098.html#392a46759af2c884957115771affa7f4">cols</a>() const </td><td><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00098.html#d144cb2d88cef553420311aca8667a44">empty</a>() const </td><td><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00098.html#ad36a9b38e4fef26d376f99552ce2d92">is_divisible</a>() const </td><td><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00098.html#a807a22fe658ec38b8edfd69521d0383">row_range_type</a> typedef</td><td><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00098.html#f496e7348a82652fba581203477cc07c">rows</a>() const </td><td><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::blocked_range3d< PageValue, RowValue, ColValue > Member List</h1>This is the complete list of members for <a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b>(PageValue page_begin, PageValue page_end, RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end) (defined in <a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b>(PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize, RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize) (defined in <a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00124.html">tbb::blocked_range3d [...]
+  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b>(blocked_range3d &r, split) (defined in <a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>col_range_type</b> typedef (defined in <a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00124.html#3336ba9480fd6c43e158f9beb024c050">cols</a>() const </td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00124.html#356860e1c977d91711e8216bd55c0b25">empty</a>() const </td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00124.html#39d69191721c488e737ae5d9c5336b9c">is_divisible</a>() const </td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00124.html#b8ebf17a552ba47825e9b3887855b719">page_range_type</a> typedef</td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00124.html#cf971430aa12361d3ed245344b7c6764">pages</a>() const </td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>row_range_type</b> typedef (defined in <a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00124.html#1584623e59ff32a8aa82006827508be4">rows</a>() const </td><td><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></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/a00007.html b/doc/html/a00007.html
index 31800eb..50d7ea8 100644
--- a/doc/html/a00007.html
+++ b/doc/html/a00007.html
@@ -20,18 +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::blocked_range3d< PageValue, RowValue, ColValue > Member List</h1>This is the complete list of members for <a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b>(PageValue page_begin, PageValue page_end, RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end) (defined in <a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b>(PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize, RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize) (defined in <a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00099.html">tbb::blocked_range3d [...]
-  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b>(blocked_range3d &r, split) (defined in <a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>col_range_type</b> typedef (defined in <a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00099.html#3336ba9480fd6c43e158f9beb024c050">cols</a>() const </td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00099.html#356860e1c977d91711e8216bd55c0b25">empty</a>() const </td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00099.html#39d69191721c488e737ae5d9c5336b9c">is_divisible</a>() const </td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00099.html#b8ebf17a552ba47825e9b3887855b719">page_range_type</a> typedef</td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00099.html#cf971430aa12361d3ed245344b7c6764">pages</a>() const </td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>row_range_type</b> typedef (defined in <a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00099.html#1584623e59ff32a8aa82006827508be4">rows</a>() const </td><td><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::cache_aligned_allocator< T > Member List</h1>This is the complete list of members for <a class="el" href="a00125.html">tbb::cache_aligned_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="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_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="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">allocate</a>(size_type n, const void *hint=0)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>cache_aligned_allocator</b>() (defined in <a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>cache_aligned_allocator</b>(const cache_aligned_allocator &) (defined in <a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>cache_aligned_allocator</b>(const cache_aligned_allocator< U > &) (defined in <a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_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="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00125.html#958ee8745c86c275bfc9533af565e017">construct</a>(pointer p, const value_type &value)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00125.html#cd298895a4f1654b5149ec84b591ecb5">destroy</a>(pointer p)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_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="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00125.html#fb23b687b4c0429dab4c7f8017266cf0">max_size</a>() const </td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00008.html b/doc/html/a00008.html
deleted file mode 100644
index b4bfb79..0000000
--- a/doc/html/a00008.html
+++ /dev/null
@@ -1,49 +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>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::cache_aligned_allocator< T > Member List</h1>This is the complete list of members for <a class="el" href="a00100.html">tbb::cache_aligned_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="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_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="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00100.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">allocate</a>(size_type n, const void *hint=0)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>cache_aligned_allocator</b>() (defined in <a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>cache_aligned_allocator</b>(const cache_aligned_allocator &) (defined in <a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>cache_aligned_allocator</b>(const cache_aligned_allocator< U > &) (defined in <a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_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="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00100.html#958ee8745c86c275bfc9533af565e017">construct</a>(pointer p, const value_type &value)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00100.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00100.html#cd298895a4f1654b5149ec84b591ecb5">destroy</a>(pointer p)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_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="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00100.html#fb23b687b4c0429dab4c7f8017266cf0">max_size</a>() const </td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a></td><td></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/a00010.html b/doc/html/a00009.html
similarity index 81%
rename from doc/html/a00010.html
rename to doc/html/a00009.html
index 9c70250..e2a1965 100644
--- a/doc/html/a00010.html
+++ b/doc/html/a00009.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::cache_aligned_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00101.html">tbb::cache_aligned_allocator< void ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00101.html">tbb::cache_aligned_allocator< void ></a>)</td><td><a class="el" href="a00101.html">tbb::cache_aligned_allocator< void ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00101.html">tbb::cache_aligned_allocator< void ></a>)</td><td><a class="el" href="a00101.html">tbb::cache_aligned_allocator< void ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00101.html">tbb::cache_aligned_allocator< void ></a>)</td><td><a class="el" href="a00101.html">tbb::cache_aligned_allocator< void ></a></td><td></td></tr>
+<h1>tbb::cache_aligned_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00126.html">tbb::cache_aligned_allocator< void ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00126.html">tbb::cache_aligned_allocator< void ></a>)</td><td><a class="el" href="a00126.html">tbb::cache_aligned_allocator< void ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00126.html">tbb::cache_aligned_allocator< void ></a>)</td><td><a class="el" href="a00126.html">tbb::cache_aligned_allocator< void ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00126.html">tbb::cache_aligned_allocator< void ></a>)</td><td><a class="el" href="a00126.html">tbb::cache_aligned_allocator< void ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00011.html b/doc/html/a00011.html
new file mode 100644
index 0000000..434e35e
--- /dev/null
+++ b/doc/html/a00011.html
@@ -0,0 +1,42 @@
+<!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::combinable< T > Member List</h1>This is the complete list of members for <a class="el" href="a00128.html">tbb::combinable< T ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>clear</b>() (defined in <a class="el" href="a00128.html">tbb::combinable< T ></a>)</td><td><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>combinable</b>() (defined in <a class="el" href="a00128.html">tbb::combinable< T ></a>)</td><td><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>combinable</b>(finit _finit) (defined in <a class="el" href="a00128.html">tbb::combinable< T ></a>)</td><td><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>combinable</b>(const combinable &other) (defined in <a class="el" href="a00128.html">tbb::combinable< T ></a>)</td><td><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>combine</b>(FCombine fcombine) (defined in <a class="el" href="a00128.html">tbb::combinable< T ></a>)</td><td><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>combine_each</b>(FCombine fcombine) (defined in <a class="el" href="a00128.html">tbb::combinable< T ></a>)</td><td><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>local</b>() (defined in <a class="el" href="a00128.html">tbb::combinable< T ></a>)</td><td><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>local</b>(bool &exists) (defined in <a class="el" href="a00128.html">tbb::combinable< T ></a>)</td><td><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator=</b>(const combinable &other) (defined in <a class="el" href="a00128.html">tbb::combinable< T ></a>)</td><td><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00128.html#2c87e79ae98588a5780f708773388843">~combinable</a>()</td><td><a class="el" href="a00128.html">tbb::combinable< T ></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/a00012.html b/doc/html/a00012.html
index 3ec643d..182b357 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="a00139.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="a00139.html">tbb::tbb_hash_compare< T ></a>)</td><td><a class="el" href="a00139.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="a00139.html">tbb::tbb_hash_compare< T ></a>)</td><td><a class="el" href="a00139.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="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>
 </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 bae62a5..0c36d5a 100644
--- a/doc/html/a00013.html
+++ b/doc/html/a00013.html
@@ -20,58 +20,67 @@
     <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::concurrent_hash_map< Key, T, HashCompare, A > Member List</h1>This is the complete list of members for <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>allocator_type</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>begin</b>() (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>begin</b>() const  (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>chain</b> (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#36bcd50fd5383f3682032323b2d74333">clear</a>()</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#6a65733441a84e3581491eb49e305cf8">concurrent_hash_map</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#6af4e2b7d2434bc72a645b7e5eb3959f">concurrent_hash_map</a>(const concurrent_hash_map &table, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#51cccc7b42e83884462dcadede034822">concurrent_hash_map</a>(I first, I last, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_accessor</b> (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_range_type</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#345daf26f2f7e2b4d93382fea80b3a7f">count</a>(const Key &key) const </td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#b9599dd587892366ed31dea23e5c5837">empty</a>() const </td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>end</b>() (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>end</b>() const  (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>equal_range</b>(const Key &key) (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>equal_range</b>(const Key &key) const  (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#58df7a1e4373c55eb4c2fa9dc69516b1">erase</a>(const Key &key)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#cc090be8a6c0a3765360ec363cf2474e">erase</a>(const_accessor &item_accessor)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#b5bd8c8f49f8d0e72afedca53caa6b15">erase</a>(accessor &item_accessor)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#ae4b9cb9aa025de8251f90f5f21e9e95">find</a>(const_accessor &result, const Key &key) const </td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#68a6bd5b8a0bc2d5066e5eb175fd5ba9">find</a>(accessor &result, const Key &key)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#14255f38f7b10bb892b233fce283fbce">get_allocator</a>() const </td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#2c10a645a8b40c6438c2bb119a61e93b">insert</a>(const_accessor &result, const Key &key)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#da381dd244a7dbad494e1e60743b5afa">insert</a>(accessor &result, const Key &key)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#7fa987ae247a894ce9f1ca097a919fd4">insert</a>(const_accessor &result, const value_type &value)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#2182c693d5898106675b76b443812b47">insert</a>(accessor &result, const value_type &value)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#70017dbe0ebbe8c83b9740cd54a6b7e0">insert</a>(const value_type &value)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#06a95a56a40fcbdf3897051d22aaab19">insert</a>(I first, I last)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::hash_map_iterator</b> (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::hash_map_range</b> (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>key_type</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>mapped_type</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#62d1fdc2c4d37d84b0dca1cd45f1cf1f">max_size</a>() const </td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>node</b> (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#d70ad33f97ce38d004620580bb1b09ba">operator=</a>(const concurrent_hash_map &table)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>range</b>(size_type grainsize=1) (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>range</b>(size_type grainsize=1) const  (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>range_type</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>segment</b> (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#75bb57a153952ffadfcf2e4c73deabb1">size</a>() const </td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#74990f452286f35ad6aa08cab6c5a8cd">swap</a>(concurrent_hash_map &table)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00103.html#5a683e8db50438b9976e46e7d4f60e65">~concurrent_hash_map</a>()</td><td><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
+<h1>tbb::concurrent_hash_map< Key, T, HashCompare, Allocator > Member List</h1>This is the complete list of members for <a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>allocator_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 bgcolor="#f0f0f0"><td><b>begin</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> [inline]</code></td></tr>
+  <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#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>
+  <tr bgcolor="#f0f0f0"><td><b>const_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>const_pointer</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>const_range_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 bgcolor="#f0f0f0"><td><b>const_reference</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#a3e97a1f3cb66e81a2336b013ef1ae7d">count</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]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>delete_node</b>(node_base *n) (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, protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>difference_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#3e5d085375320cd3f34faeedc5bba8f6">empty</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 bgcolor="#f0f0f0"><td><b>end</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> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>end</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 bgcolor="#f0f0f0"><td><b>equal_range</b>(const Key &key) (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 bgcolor="#f0f0f0"><td><b>equal_range</b>(const Key &key) 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#58df7a1e4373c55eb4c2fa9dc69516b1">erase</a>(const Key &key)</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#fc64086f9f518cef8c368c9429d0064e">erase</a>(const_accessor &item_accessor)</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#b65abfa291da566617dd58dfb349630a">erase</a>(accessor &item_accessor)</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#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>
+  <tr class="memlist"><td><a class="el" href="a00130.html#68a46a26bd4308c1780d021ca7e8fc15">insert</a>(const_accessor &result, const value_type &value)</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#7bd4dcf6ea74a32299fd57d8d7fc7ed8">insert</a>(accessor &result, const value_type &value)</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#3034a308bc839695a5714a107380c4b9">insert</a>(const value_type &value)</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#7b42dba04d71e1367f0d542087906178">insert</a>(I first, I last)</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>internal::hash_map_iterator</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>
+  <tr bgcolor="#f0f0f0"><td><b>internal::hash_map_range</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>
+  <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 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>
+  <tr bgcolor="#f0f0f0"><td><b>mapped_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#6ed260e217fb310050928d7bd03f1b5e">max_size</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 bgcolor="#f0f0f0"><td><b>my_allocator</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> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>my_hash_compare</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> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>node_allocator_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><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00130.html#adadeb9d1acb8c3b34517435666cf297">operator=</a>(const concurrent_hash_map &table)</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>pointer</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>range</b>(size_type grainsize=1) (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 bgcolor="#f0f0f0"><td><b>range</b>(size_type grainsize=1) 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 bgcolor="#f0f0f0"><td><b>range_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 bgcolor="#f0f0f0"><td><b>reference</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>rehash_bucket</b>(bucket *b_new, const hashcode_t h) (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, protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>search_bucket</b>(const key_type &key, bucket *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, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00130.html#25b0e3881038877604c5efc1c14c4afd">size</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 bgcolor="#f0f0f0"><td><b>size_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#dd73f70aa6602021ea2c56bac9715353">swap</a>(concurrent_hash_map &table)</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>value_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#5e96649f71f68f3b6bf3b1eee6b441a7">~concurrent_hash_map</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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00014.html b/doc/html/a00014.html
deleted file mode 100644
index 2cda8ac..0000000
--- a/doc/html/a00014.html
+++ /dev/null
@@ -1,41 +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>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::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor Member List</h1>This is the complete list of members for <a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>accessor</b> (defined in <a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>)</td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>concurrent_hash_map< Key, T, HashCompare, A ></b> (defined in <a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>)</td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#2a73cc49914e218e579eb77d3d9d6551">const_accessor</a>()</td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#38712b9809d23d2fba5e4780bb3c4f18">empty</a>() const </td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#ea4d48e45dd039a2be10178df9336001">operator *</a>() const </td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#def170ba3b18905cd4e9d90f8a9a9cd9">operator-></a>() const </td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#c7f3f43eb5f98d8451b2b1d456a4ccd4">release</a>()</td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#b5fe45b58ccc252b8ce70ac6c896c648">value_type</a> typedef</td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#9b3fdcb8850d6f6dc749b72dbf2d593d">~const_accessor</a>()</td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</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/a00015.html b/doc/html/a00015.html
index a0eff77..a868022 100644
--- a/doc/html/a00015.html
+++ b/doc/html/a00015.html
@@ -20,14 +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::concurrent_hash_map< Key, T, HashCompare, A >::accessor Member List</h1>This is the complete list of members for <a class="el" href="a00104.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00105.html#2a73cc49914e218e579eb77d3d9d6551">const_accessor</a>()</td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#38712b9809d23d2fba5e4780bb3c4f18">empty</a>() const </td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00104.html#52334dd5411e7b95635b90527d7d6062">operator *</a>() const </td><td><a class="el" href="a00104.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00104.html#0fae0495144540e2b011a6530f68f1cb">operator-></a>() const </td><td><a class="el" href="a00104.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#c7f3f43eb5f98d8451b2b1d456a4ccd4">release</a>()</td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00104.html#8bc15c9c07f3e21583ab1a4ad0901ce5">value_type</a> typedef</td><td><a class="el" href="a00104.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00105.html#9b3fdcb8850d6f6dc749b72dbf2d593d">~const_accessor</a>()</td><td><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor Member List</h1>This is the complete list of members for <a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00132.html#7b75959ce5a971b05cfefcbc1d09a022">acquire</a>(concurrent_hash_map *base, const hashcode_t h, bool writer=false)</td><td><a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>bucket_accessor</b>(concurrent_hash_map *base, const hashcode_t h, bool writer=false) (defined in <a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a>)</td><td><a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00132.html#adf8e405df5787351fe816c42042b9ec">is_writer</a>()</td><td><a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00132.html#7e98ad1b46ed35fb4a92d65c16c6982d">operator()</a>()</td><td><a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>upgrade_to_writer</b>() (defined in <a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a>)</td><td><a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</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/a00016.html b/doc/html/a00016.html
new file mode 100644
index 0000000..304bd06
--- /dev/null
+++ b/doc/html/a00016.html
@@ -0,0 +1,41 @@
+<!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::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor Member List</h1>This is the complete list of members for <a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>accessor</b> (defined in <a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a>)</td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_hash_map< Key, T, HashCompare, Allocator ></b> (defined in <a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a>)</td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#6eedb35a3ca397dd289ed5ca6fb4d95d">const_accessor</a>()</td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#e55c7c3f0acd7fd823a07957e71a7462">empty</a>() const </td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#d95b7a39a08b7ab256dfff2ca37cdb75">operator *</a>() const </td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#6fc0491f6420ffe38c48786e7b9ab042">operator-></a>() const </td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>()</td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#b5de4197079009b1cfd8bdeb594c6428">value_type</a> typedef</td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#e002771760f510e06c03e0a198286172">~const_accessor</a>()</td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</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/a00017.html b/doc/html/a00017.html
new file mode 100644
index 0000000..8aeadb0
--- /dev/null
+++ b/doc/html/a00017.html
@@ -0,0 +1,39 @@
+<!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::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor Member List</h1>This is the complete list of members for <a class="el" href="a00131.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00133.html#6eedb35a3ca397dd289ed5ca6fb4d95d">const_accessor</a>()</td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#e55c7c3f0acd7fd823a07957e71a7462">empty</a>() const </td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00131.html#03a091f7355a3c0c03f839893695f372">operator *</a>() const </td><td><a class="el" href="a00131.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00131.html#302f02e5deec0a67b872e9cfb08d9e60">operator-></a>() const </td><td><a class="el" href="a00131.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>()</td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00131.html#34035ddb9e2a27f2f0a1f6a2a16730cf">value_type</a> typedef</td><td><a class="el" href="a00131.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00133.html#e002771760f510e06c03e0a198286172">~const_accessor</a>()</td><td><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</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/a00018.html b/doc/html/a00018.html
new file mode 100644
index 0000000..73dfbb2
--- /dev/null
+++ b/doc/html/a00018.html
@@ -0,0 +1,55 @@
+<!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::strict_ppl::concurrent_queue< T, A > Member List</h1>This is the complete list of members for <a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a> typedef</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#c32e8e84c0524155133b4aae32d2a827">clear</a>()</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#7c48a05a94a1f4f98fdfadfbef98ecf6">concurrent_queue</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#25209656c84f2f9b030e2f9162713341">concurrent_queue</a>(InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#8a6b98ea11a867db8ac868f0113ca429">concurrent_queue</a>(const concurrent_queue &src, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#4d48e7ff93f81636bca2c74f7da34750">const_reference</a> typedef</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#068576d16c7e4e05d52f9db7a45b5b65">difference_type</a> typedef</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#f3f6fce0cfa2d581d6f3b47e0613ad64">empty</a>() const </td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#f034f70caef445fe8abc9113ec926a8d">get_allocator</a>() const </td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::concurrent_queue_iterator</b> (defined in <a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#73c47563ffcc4c2f6452f25a04ebe2e2">push</a>(const T &source)</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#a8d725c50a9834bb7af5b67c0aff92b8">reference</a> typedef</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#8fc30e93f8342a1960357f71e4fe8a2b">size_type</a> typedef</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#ae31ca0db34ef96ef1e74aa0d28c95f8">try_pop</a>(T &result)</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_begin</b>() (defined in <a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_begin</b>() const  (defined in <a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_end</b>() (defined in <a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_end</b>() const  (defined in <a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#eaa35a5274606779802e9a669a706260">unsafe_size</a>() const </td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#682c3978d5cb0620000994f11c44a476">value_type</a> typedef</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00134.html#830b33753d6b149c366344e29b2edd8c">~concurrent_queue</a>()</td><td><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td></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/a00019.html b/doc/html/a00019.html
index ee7009f..753d85d 100644
--- a/doc/html/a00019.html
+++ b/doc/html/a00019.html
@@ -20,34 +20,34 @@
     <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::concurrent_queue< T, A > Member List</h1>This is the complete list of members for <a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a> typedef</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>begin</b>() (defined in <a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>begin</b>() const  (defined in <a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#95796a6ad29ea6fe102ac1663a776d07">capacity</a>() const </td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#8a6a8a7a8d977d86ae8bd254b9794af1">clear</a>()</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#6a4f9b451ceb08ae82709eef4c8a1a6b">concurrent_queue</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#a919fd9a3d593dc4c8205a4636a8062e">concurrent_queue</a>(const concurrent_queue &src, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#d3ec1af9c793007ec2ecbdcf637f8ec5">concurrent_queue</a>(InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#981c7c13a4aef3d03f35797ebe214d59">const_reference</a> typedef</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#3c0b5f19b820719ab4f69eeb9bf75afc">difference_type</a> typedef</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#313c369998b69de6e039b9afb9ca3237">empty</a>() const </td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>end</b>() (defined in <a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>end</b>() const  (defined in <a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#11a088eee45cc1cb0c0b32adadbff92e">get_allocator</a>() const </td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::concurrent_queue_iterator</b> (defined in <a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#170ab4b57a20f0ff00fb8642d4f55e5c">pop</a>(T &destination)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#7088b06d6c226c44a07a310c12176a0c">pop_if_present</a>(T &destination)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#28259b68d5ba6cc77abf72b8d7d22e69">push</a>(const T &source)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#0a91166177c0ceb5a1ddd22827509345">push_if_not_full</a>(const T &source)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#ea0fab9094080138fef0802125160739">reference</a> typedef</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#92977e1eb9af259f3aef69f0181476c1">set_capacity</a>(size_type capacity)</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#94499bca8d540a1927f9368b386dabea">size</a>() const </td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a> typedef</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#ec587adbe0da968d828c0178b2d863b0">value_type</a> typedef</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00106.html#43480ba7f4ba2401d1213ee23248e4cd">~concurrent_queue</a>()</td><td><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+<h1>tbb::concurrent_bounded_queue< T, A > Member List</h1>This is the complete list of members for <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#b2888b3e4e837d7e03f2c731963a402b">capacity</a>() const </td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">clear</a>()</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#e3525226732963ff0f13e89d8e6dab5b">concurrent_bounded_queue</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#7b7fb414d2eaa8a7f5d68fc4cd63ac50">concurrent_bounded_queue</a>(const concurrent_bounded_queue &src, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#a5e04dcd7db9fd9b583b4e7df832246a">concurrent_bounded_queue</a>(InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#796713d0b9ba93a4721cbe13e4474068">const_reference</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#4b45c91297e69515d83d5eef85ae1f49">difference_type</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">empty</a>() const </td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#415eb87e53b1c6a266de06ecbc490d16">get_allocator</a>() const </td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::concurrent_queue_iterator</b> (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#41f4c6bd7a82ab070e840bbf81b0b123">pop</a>(T &destination)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#ceb08c743b11ba88c878e73fff8af20b">push</a>(const T &source)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#dcd44ca6a88c0dc7a847a47a10811f0c">reference</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#089f33dfd504e30a95f40ed2a5799367">set_capacity</a>(size_type capacity)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#7dc14d1a579a4cccda9f857585e1768d">size</a>() const </td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#0ca487019bbb00a196442aff78a1e4f7">try_pop</a>(T &destination)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#2bd6232531279fb3ccbd296bea23066b">try_push</a>(const T &source)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_begin</b>() (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_begin</b>() const  (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_end</b>() (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_end</b>() const  (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#98245517a931e5893f6601e66c51fc75">value_type</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#acaf5b510dc0dfc7780b8c956cf773cf">~concurrent_bounded_queue</a>()</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00021.html b/doc/html/a00021.html
index 2ceec7f..a6a2de7 100644
--- a/doc/html/a00021.html
+++ b/doc/html/a00021.html
@@ -20,67 +20,43 @@
     <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::concurrent_vector< T, A > Member List</h1>This is the complete list of members for <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>allocator_type</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#423e5aa15e0e3309ad86d026fd85f6f6">assign</a>(size_type n, const_reference t)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#93a06b3112cb804f42f40efb5e7387b4">assign</a>(I first, I last)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#0c073ca43e787c7cbf7b0e26d2221748">at</a>(size_type index)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#23e14a38af748edff96a7adc3a0f1c58">at</a>(size_type index) const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#41ce48d6015a1a2812d41cf620ec3476">back</a>()</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#bd518e204107d07fd08d0ec5bdfd383d">back</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#730b23a251ecb6d37f692fb22f38e029">begin</a>()</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#78a06182276ff758788d4c0623ae0d71">begin</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#3ed6b9ae7217af5103d974045b6f5cd5">capacity</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#26f937a359a66b6aae904c3cd9a3c444">clear</a>()</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#1693d1da41b1a8235871be9c6633be35">compact</a>()</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#2c8ca9cabfcd30ad5943324c853664b5">concurrent_vector</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#dd8a200b99a8088435a37934b58fe335">concurrent_vector</a>(const concurrent_vector &vector, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#64432f13f7b29bfe4acfb5568f34f3a8">concurrent_vector</a>(const concurrent_vector< T, M > &vector, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#2a2e261dfe1cab3f73f7b1a94137cfca">concurrent_vector</a>(size_type n)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#3883a8a908b44e249a57f454de3f55d8">concurrent_vector</a>(size_type n, const_reference t, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#4450de83c5862ea4bcd9443fd7e67419">concurrent_vector</a>(I first, I last, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_range_type</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_reverse_iterator</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_reverse_iterator</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#c6426cb93cf20d3af40f3c90f1f0481a">empty</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#c0b51160e5a764982ec97a455f94f2c6">end</a>()</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">end</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#15181759c0bfa2ddce5d10c7550e0002">front</a>()</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#502615a858eb9fa0390ee59169065e90">front</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#2fdba8e90de6a4d2300222236d46758e">get_allocator</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#30484e3959892fd5392fa93c873c31f0">grow_by</a>(size_type delta)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#38274ab3f772ecba600c7daca7690102">grow_by</a>(size_type delta, const_reference t)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#47fe588214dd5fa06ab6e8ab78d83874">grow_to_at_least</a>(size_type n)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::vector_iterator</b> (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal_vector_base</b>() const  (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#2c248a017f0576df3e7cd99627836fd6">max_size</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#691f0f3cda3e489c37a657016e375eaf">operator=</a>(const concurrent_vector &vector)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#19f4ab88a01b0fd056af3bba463e7bd6">operator=</a>(const concurrent_vector< T, M > &vector)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#4c52f2950bb1832886bd4458eb09d7eb">operator[]</a>(size_type index)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#c6fade5c732cc95274d1d8277ea619d1">operator[]</a>(size_type index) const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#e0087c0f58b49e43b6322ff1ec0bc98d">push_back</a>(const_reference item)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#a4c6ffff3bf08b92939aa2fc516edfba">range</a>(size_t grainsize=1)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#3d09ccfb581b879ae64203741035e193">range</a>(size_t grainsize=1) const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>range_type</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#5e220926d09236d98f04fe0721e5f9a1">rbegin</a>()</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#9f9c103e18d5f212703805354074ad44">rbegin</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#290119a4eb43cd6a9e98fa17016ba3c2">rend</a>()</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#d438b9b32ea3a8ffb703015b6dce055b">rend</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#5a0ce05026994b010018f72cfdeb72c1">reserve</a>(size_type n)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reverse_iterator</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reverse_iterator</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>() const </td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#96c9c4bd968ed3edb8dd276854d2dae0">swap</a>(concurrent_vector &vector)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00107.html#da2444b28bb840d38f60d0030333a5fc">~concurrent_vector</a>()</td><td><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::deprecated::concurrent_queue< T, A > Member List</h1>This is the complete list of members for <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>begin</b>() (defined in <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>begin</b>() const  (defined in <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#b2888b3e4e837d7e03f2c731963a402b">capacity</a>() const </td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">clear</a>()</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#e3525226732963ff0f13e89d8e6dab5b">concurrent_bounded_queue</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#7b7fb414d2eaa8a7f5d68fc4cd63ac50">concurrent_bounded_queue</a>(const concurrent_bounded_queue &src, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#a5e04dcd7db9fd9b583b4e7df832246a">concurrent_bounded_queue</a>(InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00135.html#aaf19bd7337b72f3131ece60f7315ef7">concurrent_queue</a>(const A &a=A())</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00135.html#fc092b9082f233482f3513fc3bb670f7">concurrent_queue</a>(const concurrent_queue &src, const A &a=A())</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00135.html#383187b910f8c3ca27a39c1638566f15">concurrent_queue</a>(InputIterator begin, InputIterator end, const A &a=A())</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#796713d0b9ba93a4721cbe13e4474068">const_reference</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#4b45c91297e69515d83d5eef85ae1f49">difference_type</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">empty</a>() const </td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>end</b>() (defined in <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>end</b>() const  (defined in <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#415eb87e53b1c6a266de06ecbc490d16">get_allocator</a>() const </td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::concurrent_queue_iterator</b> (defined in <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#41f4c6bd7a82ab070e840bbf81b0b123">pop</a>(T &destination)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00135.html#48da3536245318af6cb5fd58bac78039">pop_if_present</a>(T &destination)</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#ceb08c743b11ba88c878e73fff8af20b">push</a>(const T &source)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00135.html#7c45561bafe71107d09b2bc1b8f4e681">push_if_not_full</a>(const T &source)</td><td><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#dcd44ca6a88c0dc7a847a47a10811f0c">reference</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#089f33dfd504e30a95f40ed2a5799367">set_capacity</a>(size_type capacity)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#7dc14d1a579a4cccda9f857585e1768d">size</a>() const </td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#0ca487019bbb00a196442aff78a1e4f7">try_pop</a>(T &destination)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#2bd6232531279fb3ccbd296bea23066b">try_push</a>(const T &source)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_begin</b>() (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_begin</b>() const  (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_end</b>() (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>unsafe_end</b>() const  (defined in <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>)</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#98245517a931e5893f6601e66c51fc75">value_type</a> typedef</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00129.html#acaf5b510dc0dfc7780b8c956cf773cf">~concurrent_bounded_queue</a>()</td><td><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00022.html b/doc/html/a00022.html
new file mode 100644
index 0000000..8f2a1d1
--- /dev/null
+++ b/doc/html/a00022.html
@@ -0,0 +1,102 @@
+<!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::concurrent_vector< T, A > Member List</h1>This is the complete list of members for <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>allocator_type</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#423e5aa15e0e3309ad86d026fd85f6f6">assign</a>(size_type n, const_reference t)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#93a06b3112cb804f42f40efb5e7387b4">assign</a>(I first, I last)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#0c073ca43e787c7cbf7b0e26d2221748">at</a>(size_type index)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#23e14a38af748edff96a7adc3a0f1c58">at</a>(size_type index) const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#41ce48d6015a1a2812d41cf620ec3476">back</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#bd518e204107d07fd08d0ec5bdfd383d">back</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#78a06182276ff758788d4c0623ae0d71">begin</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#3ed6b9ae7217af5103d974045b6f5cd5">capacity</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#f88fcf1c920693c39bd9709db33c199f">cbegin</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#0c15a5d0f1cf75d687dabba07da1d46b">cend</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">clear</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#1693d1da41b1a8235871be9c6633be35">compact</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#2c8ca9cabfcd30ad5943324c853664b5">concurrent_vector</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#dd8a200b99a8088435a37934b58fe335">concurrent_vector</a>(const concurrent_vector &vector, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#64432f13f7b29bfe4acfb5568f34f3a8">concurrent_vector</a>(const concurrent_vector< T, M > &vector, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#2a2e261dfe1cab3f73f7b1a94137cfca">concurrent_vector</a>(size_type n)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#3883a8a908b44e249a57f454de3f55d8">concurrent_vector</a>(size_type n, const_reference t, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#4450de83c5862ea4bcd9443fd7e67419">concurrent_vector</a>(I first, I last, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_range_type</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_reverse_iterator</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_reverse_iterator</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#db78a1d28c9c966050e8a2926d834a33">crbegin</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#fff9cece89438587997ebedf93c5e962">crend</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">empty</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#c0b51160e5a764982ec97a455f94f2c6">end</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">end</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#15181759c0bfa2ddce5d10c7550e0002">front</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#502615a858eb9fa0390ee59169065e90">front</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#2fdba8e90de6a4d2300222236d46758e">get_allocator</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#30484e3959892fd5392fa93c873c31f0">grow_by</a>(size_type delta)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#c8177b1865270ea68aa1ab9148e5e35e">grow_by</a>(size_type delta)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#38274ab3f772ecba600c7daca7690102">grow_by</a>(size_type delta, const_reference t)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#473a59a4c9308b93411b898b3110d26c">grow_by</a>(size_type delta, const_reference t)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#47fe588214dd5fa06ab6e8ab78d83874">grow_to_at_least</a>(size_type n)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#a7e3b67c8ccab16d0aecc80899ae799d">grow_to_at_least</a>(size_type n)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::vector_iterator</b> (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_vector_base</b>() const  (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">max_size</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#691f0f3cda3e489c37a657016e375eaf">operator=</a>(const concurrent_vector &vector)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#19f4ab88a01b0fd056af3bba463e7bd6">operator=</a>(const concurrent_vector< T, M > &vector)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#4c52f2950bb1832886bd4458eb09d7eb">operator[]</a>(size_type index)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#c6fade5c732cc95274d1d8277ea619d1">operator[]</a>(size_type index) const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(const_reference item) iterator push_back(const _reference item)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#a4c6ffff3bf08b92939aa2fc516edfba">range</a>(size_t grainsize=1)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#3d09ccfb581b879ae64203741035e193">range</a>(size_t grainsize=1) const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>range_type</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#5e220926d09236d98f04fe0721e5f9a1">rbegin</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#9f9c103e18d5f212703805354074ad44">rbegin</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#290119a4eb43cd6a9e98fa17016ba3c2">rend</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#d438b9b32ea3a8ffb703015b6dce055b">rend</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#5a0ce05026994b010018f72cfdeb72c1">reserve</a>(size_type n)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#8dfb0cb0eef96d440b4dcf801807a718">resize</a>(size_type n)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#98ce6b2c6d2622f0c030b46dfac3880c">resize</a>(size_type n, const_reference t)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reverse_iterator</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reverse_iterator</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#03c6f4cf66532bf4cc907ee738a9a186">shrink_to_fit</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>() const </td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#96c9c4bd968ed3edb8dd276854d2dae0">swap</a>(concurrent_vector &vector)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00136.html#da2444b28bb840d38f60d0030333a5fc">~concurrent_vector</a>()</td><td><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></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/a00025.html b/doc/html/a00025.html
index ccc9c48..415bdca 100644
--- a/doc/html/a00025.html
+++ b/doc/html/a00025.html
@@ -20,13 +20,41 @@
     <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::mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00113.html">tbb::mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00113.html#862e022841cdc522e4296a5533b22efd">acquire</a>(mutex &mutex)</td><td><a class="el" href="a00113.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00113.html#0d51d18cd99df3b2e93bf07378d0992c">release</a>()</td><td><a class="el" href="a00113.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00113.html#1d403ae51b484df5d86d85ae38f11e6e">scoped_lock</a>()</td><td><a class="el" href="a00113.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00113.html#605a6b9af0f8cdabdf81825e0de99600">scoped_lock</a>(mutex &mutex)</td><td><a class="el" href="a00113.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00113.html#591e0c49b82bcedffcbe0923f1b915ec">try_acquire</a>(mutex &mutex)</td><td><a class="el" href="a00113.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00113.html#0ebbbecaf4311e9df7362cb76ceaa368">~scoped_lock</a>()</td><td><a class="el" href="a00113.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::enumerable_thread_specific< T, Allocator, ETS_key_type > Member List</h1>This is the complete list of members for <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">allocator_type</a> typedef</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>()</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#ba6674c6102a6faf8f96d131497654b3">begin</a>() const </td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">clear</a>()</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>combine</b>(combine_func_t f_combine) (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>combine_each</b>(combine_func_t f_combine) (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_range_type</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#ad23345a722622199deaa4dfd243d9f8">empty</a>() const </td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>()</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#89811890e6a77f1e0cfc6c24ed35d09b">end</a>() const </td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>enumerable_thread_specific</b> (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>()</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#e5698930b84c098bb6d87175b8b50306">enumerable_thread_specific</a>(Finit _finit)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#0466c43272d8458185e980fc2dc4abe2">enumerable_thread_specific</a>(const T &_exemplar)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>enumerable_thread_specific</b>(const enumerable_thread_specific< U, Alloc, Cachetype > &other) (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>enumerable_thread_specific</b>(const enumerable_thread_specific &other) (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a>()</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#9505351eace34ed7130257adcae91706">local</a>(bool &exists)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator=</b>(const enumerable_thread_specific &other) (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator=</b>(const enumerable_thread_specific< U, Alloc, Cachetype > &other) (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#56f6124f5870e26433a5bb2b71e4b7e9">range</a>(size_t grainsize=1)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#a32dd1d88e42dc1faccceca244b12b6c">range</a>(size_t grainsize=1) const </td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>range_type</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#302a4d6f55f852d5b7a6679e0e00316e">size</a>() const </td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>)</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00138.html#41176526161d6fef1bdd19c2db7ded4d">~enumerable_thread_specific</a>()</td><td><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></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/a00024.html b/doc/html/a00029.html
similarity index 57%
rename from doc/html/a00024.html
rename to doc/html/a00029.html
index 58acd1c..5c35987 100644
--- a/doc/html/a00024.html
+++ b/doc/html/a00029.html
@@ -20,13 +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::mutex Member List</h1>This is the complete list of members for <a class="el" href="a00112.html">tbb::mutex</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00112.html">tbb::mutex</a>)</td><td><a class="el" href="a00112.html">tbb::mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00112.html">tbb::mutex</a>)</td><td><a class="el" href="a00112.html">tbb::mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00112.html">tbb::mutex</a>)</td><td><a class="el" href="a00112.html">tbb::mutex</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>()</td><td><a class="el" href="a00112.html">tbb::mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00112.html">tbb::mutex</a>)</td><td><a class="el" href="a00112.html">tbb::mutex</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>~mutex</b>() (defined in <a class="el" href="a00112.html">tbb::mutex</a>)</td><td><a class="el" href="a00112.html">tbb::mutex</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::mutex Member List</h1>This is the complete list of members for <a class="el" href="a00142.html">tbb::mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00142.html">tbb::mutex</a>)</td><td><a class="el" href="a00142.html">tbb::mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00142.html">tbb::mutex</a>)</td><td><a class="el" href="a00142.html">tbb::mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00142.html">tbb::mutex</a>)</td><td><a class="el" href="a00142.html">tbb::mutex</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00142.html#4470e61c24c129a0299ca6c17240adbb">lock</a>()</td><td><a class="el" href="a00142.html">tbb::mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00142.html#05313cb77d4f85213103d4dab74ed454">mutex</a>()</td><td><a class="el" href="a00142.html">tbb::mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00142.html">tbb::mutex</a>)</td><td><a class="el" href="a00142.html">tbb::mutex</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00142.html#4331652c79dea1c1131bd59ab161b234">try_lock</a>()</td><td><a class="el" href="a00142.html">tbb::mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00142.html#5fc9ef443ae75d966695546be399cc6b">unlock</a>()</td><td><a class="el" href="a00142.html">tbb::mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~mutex</b>() (defined in <a class="el" href="a00142.html">tbb::mutex</a>)</td><td><a class="el" href="a00142.html">tbb::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/a00030.html b/doc/html/a00030.html
index bf754c1..4dde8fc 100644
--- a/doc/html/a00030.html
+++ b/doc/html/a00030.html
@@ -20,9 +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::parallel_do_feeder< Item > Member List</h1>This is the complete list of members for <a class="el" href="a00114.html">tbb::parallel_do_feeder< Item ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00114.html#40baaf0f6856f4491dd0adf896c93516">add</a>(const Item &item)</td><td><a class="el" href="a00114.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="a00114.html">tbb::parallel_do_feeder< Item ></a>)</td><td><a class="el" href="a00114.html">tbb::parallel_do_feeder< Item ></a></td><td><code> [friend]</code></td></tr>
+<h1>tbb::mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00143.html">tbb::mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00143.html#862e022841cdc522e4296a5533b22efd">acquire</a>(mutex &mutex)</td><td><a class="el" href="a00143.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>mutex</b> (defined in <a class="el" href="a00143.html">tbb::mutex::scoped_lock</a>)</td><td><a class="el" href="a00143.html">tbb::mutex::scoped_lock</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00143.html#0d51d18cd99df3b2e93bf07378d0992c">release</a>()</td><td><a class="el" href="a00143.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00143.html#1d403ae51b484df5d86d85ae38f11e6e">scoped_lock</a>()</td><td><a class="el" href="a00143.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00143.html#605a6b9af0f8cdabdf81825e0de99600">scoped_lock</a>(mutex &mutex)</td><td><a class="el" href="a00143.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00143.html#591e0c49b82bcedffcbe0923f1b915ec">try_acquire</a>(mutex &mutex)</td><td><a class="el" href="a00143.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00143.html#0ebbbecaf4311e9df7362cb76ceaa368">~scoped_lock</a>()</td><td><a class="el" href="a00143.html">tbb::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/a00033.html b/doc/html/a00033.html
deleted file mode 100644
index 81f0cb7..0000000
--- a/doc/html/a00033.html
+++ /dev/null
@@ -1,37 +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>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::parallel_while< Body > Member List</h1>This is the complete list of members for <a class="el" href="a00115.html">tbb::parallel_while< Body ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00115.html#e131c560057a58229992b61eb8dba4c6">add</a>(const value_type &item)</td><td><a class="el" href="a00115.html">tbb::parallel_while< Body ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00115.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a>()</td><td><a class="el" href="a00115.html">tbb::parallel_while< Body ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00115.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a>(Stream &stream, const Body &body)</td><td><a class="el" href="a00115.html">tbb::parallel_while< Body ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00115.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> typedef</td><td><a class="el" href="a00115.html">tbb::parallel_while< Body ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00115.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a>()</td><td><a class="el" href="a00115.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.
-<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/a00034.html b/doc/html/a00034.html
deleted file mode 100644
index c770bea..0000000
--- a/doc/html/a00034.html
+++ /dev/null
@@ -1,36 +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>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::simple_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00126.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="a00126.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00126.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="a00126.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00126.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="a00126.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00126.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="a00126.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00126.html">tbb::simple_partitioner</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/a00030.html b/doc/html/a00035.html
similarity index 85%
copy from doc/html/a00030.html
copy to doc/html/a00035.html
index bf754c1..891f6e2 100644
--- a/doc/html/a00030.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="a00114.html">tbb::parallel_do_feeder< Item ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00114.html#40baaf0f6856f4491dd0adf896c93516">add</a>(const Item &item)</td><td><a class="el" href="a00114.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="a00114.html">tbb::parallel_do_feeder< Item ></a>)</td><td><a class="el" href="a00114.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="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>
 </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 d7a5895..577b97c 100644
--- a/doc/html/a00036.html
+++ b/doc/html/a00036.html
@@ -20,11 +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::auto_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00095.html">tbb::auto_partitioner</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>auto_partitioner</b>() (defined in <a class="el" href="a00095.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00095.html">tbb::auto_partitioner</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::start_for</b> (defined in <a class="el" href="a00095.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00095.html">tbb::auto_partitioner</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::start_reduce</b> (defined in <a class="el" href="a00095.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00095.html">tbb::auto_partitioner</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::start_scan</b> (defined in <a class="el" href="a00095.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00095.html">tbb::auto_partitioner</a></td><td><code> [friend]</code></td></tr>
+<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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00032.html b/doc/html/a00037.html
similarity index 89%
rename from doc/html/a00032.html
rename to doc/html/a00037.html
index 218cf29..cdc7802 100644
--- a/doc/html/a00032.html
+++ b/doc/html/a00037.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::final_scan_tag Member List</h1>This is the complete list of members for <a class="el" href="a00110.html">tbb::final_scan_tag</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>is_final_scan</b>() (defined in <a class="el" href="a00110.html">tbb::final_scan_tag</a>)</td><td><a class="el" href="a00110.html">tbb::final_scan_tag</a></td><td><code> [inline, static]</code></td></tr>
+<h1>tbb::final_scan_tag Member List</h1>This is the complete list of members for <a class="el" href="a00140.html">tbb::final_scan_tag</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_final_scan</b>() (defined in <a class="el" href="a00140.html">tbb::final_scan_tag</a>)</td><td><a class="el" href="a00140.html">tbb::final_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 8c7cb3b..0cf4b5e 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::affinity_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00091.html">tbb::affinity_partitioner</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>affinity_partitioner</b>() (defined in <a class="el" href="a00091.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00091.html">tbb::affinity_partitioner</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::affinity_partition_type</b> (defined in <a class="el" href="a00091.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00091.html">tbb::affinity_partitioner</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::start_for</b> (defined in <a class="el" href="a00091.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00091.html">tbb::affinity_partitioner</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::start_reduce_with_affinity</b> (defined in <a class="el" href="a00091.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00091.html">tbb::affinity_partitioner</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::start_scan</b> (defined in <a class="el" href="a00091.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00091.html">tbb::affinity_partitioner</a></td><td><code> [friend]</code></td></tr>
+<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>
 </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 28a53ad..0b489ce 100644
--- a/doc/html/a00039.html
+++ b/doc/html/a00039.html
@@ -20,21 +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::filter Member List</h1>This is the complete list of members for <a class="el" href="a00109.html">tbb::filter</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>filter</b>(bool is_serial_) (defined in <a class="el" href="a00109.html">tbb::filter</a>)</td><td><a class="el" href="a00109.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="a00109.html">tbb::filter</a>)</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td><code> [inline, protected]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00109.html#56275eb889c77c4807967133e21401bd">finalize</a>(void *)</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td><code> [inline, virtual]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::stage_task</b> (defined in <a class="el" href="a00109.html">tbb::filter</a>)</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_ordered</b>() const  (defined in <a class="el" href="a00109.html">tbb::filter</a>)</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00109.html#fcfec27656a69ff2072802ac001e936f">is_serial</a>() const </td><td><a class="el" href="a00109.html">tbb::filter</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> enum name</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00109.html#fa1b3dc1f4f47563ccab7f4d92f5b543">operator()</a>(void *item)=0</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a> enum value</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pipeline</b> (defined in <a class="el" href="a00109.html">tbb::filter</a>)</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> enum value</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">serial_in_order</a> enum value</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">serial_out_of_order</a> enum value</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00109.html#66d159f362293e3964ba3da8bc1d2604">~filter</a>()</td><td><a class="el" href="a00109.html">tbb::filter</a></td><td><code> [virtual]</code></td></tr>
+<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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00040.html b/doc/html/a00040.html
deleted file mode 100644
index fa10baa..0000000
--- a/doc/html/a00040.html
+++ /dev/null
@@ -1,40 +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>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::pipeline Member List</h1>This is the complete list of members for <a class="el" href="a00116.html">tbb::pipeline</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00116.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a>(filter &filter_)</td><td><a class="el" href="a00116.html">tbb::pipeline</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00116.html#2c84aef5b834b555ee220b176e25931e">clear</a>()</td><td><a class="el" href="a00116.html">tbb::pipeline</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>filter</b> (defined in <a class="el" href="a00116.html">tbb::pipeline</a>)</td><td><a class="el" href="a00116.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="a00116.html">tbb::pipeline</a>)</td><td><a class="el" href="a00116.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00116.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a>()</td><td><a class="el" href="a00116.html">tbb::pipeline</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00116.html#f627616049b3fe36801f37ee40403ef8">run</a>(size_t max_number_of_live_tokens)</td><td><a class="el" href="a00116.html">tbb::pipeline</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00116.html#93d7fec8cd607b803dd2d79fb46bd260">run</a>(size_t max_number_of_live_tokens, tbb::task_group_context &context)</td><td><a class="el" href="a00116.html">tbb::pipeline</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00116.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a>()</td><td><a class="el" href="a00116.html">tbb::pipeline</a></td><td><code> [virtual]</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/a00041.html b/doc/html/a00041.html
index 4834d21..f1a08f6 100644
--- a/doc/html/a00041.html
+++ b/doc/html/a00041.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="a00118.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="a00118.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00118.html">tbb::queuing_mutex</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00118.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00118.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="a00118.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00118.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="a00118.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00118.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00118.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a>()</td><td><a class="el" href="a00118.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="a00118.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00118.html">tbb::queuing_mutex</a></td><td><code> [friend]</code></td></tr>
+<h1>tbb::auto_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00120.html">tbb::auto_partitioner</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>auto_partitioner</b>() (defined in <a class="el" href="a00120.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00120.html">tbb::auto_partitioner</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_for</b> (defined in <a class="el" href="a00120.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00120.html">tbb::auto_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_reduce</b> (defined in <a class="el" href="a00120.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00120.html">tbb::auto_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_scan</b> (defined in <a class="el" href="a00120.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00120.html">tbb::auto_partitioner</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/a00043.html b/doc/html/a00043.html
index 256ef13..8f7d482 100644
--- a/doc/html/a00043.html
+++ b/doc/html/a00043.html
@@ -20,14 +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_rw_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00120.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="a00120.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00120.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="a00120.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00120.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="a00120.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00120.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="a00120.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00120.html">tbb::queuing_rw_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00120.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_mutex</a>()</td><td><a class="el" href="a00120.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="a00120.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00120.html">tbb::queuing_rw_mutex</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00120.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</a>()</td><td><a class="el" href="a00120.html">tbb::queuing_rw_mutex</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::affinity_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00115.html">tbb::affinity_partitioner</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>affinity_partitioner</b>() (defined in <a class="el" href="a00115.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00115.html">tbb::affinity_partitioner</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::affinity_partition_type</b> (defined in <a class="el" href="a00115.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00115.html">tbb::affinity_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_for</b> (defined in <a class="el" href="a00115.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00115.html">tbb::affinity_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_reduce</b> (defined in <a class="el" href="a00115.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00115.html">tbb::affinity_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_reduce_with_affinity</b> (defined in <a class="el" href="a00115.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00115.html">tbb::affinity_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_scan</b> (defined in <a class="el" href="a00115.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00115.html">tbb::affinity_partitioner</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/a00044.html b/doc/html/a00044.html
index e8726f0..ab66727 100644
--- a/doc/html/a00044.html
+++ b/doc/html/a00044.html
@@ -20,15 +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::queuing_rw_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00121.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a>()</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#67ae221109ddc69510ab593874e435d4">release</a>()</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>()</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#fbb8798792d3aebb136c46fc63d2529e">scoped_lock</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a>()</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a>()</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::filter Member List</h1>This is the complete list of members for <a class="el" href="a00139.html">tbb::filter</a>, including all inherited members.<p><table>
+  <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>
+  <tr bgcolor="#f0f0f0"><td><b>internal::pipeline_root_task</b> (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> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::stage_task</b> (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> [friend]</code></td></tr>
+  <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 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 bgcolor="#f0f0f0"><td><b>pipeline</b> (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> [friend]</code></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>thread_bound_filter</b> (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> [friend]</code></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>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00045.html b/doc/html/a00045.html
index 933c136..5587370 100644
--- a/doc/html/a00045.html
+++ b/doc/html/a00045.html
@@ -20,13 +20,29 @@
     <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="a00122.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="a00122.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00122.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="a00122.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00122.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="a00122.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00122.html">tbb::recursive_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00122.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a>()</td><td><a class="el" href="a00122.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="a00122.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00122.html">tbb::recursive_mutex</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>~recursive_mutex</b>() (defined in <a class="el" href="a00122.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00122.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
+<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>
+  <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>
+  <tr bgcolor="#f0f0f0"><td><b>internal::pipeline_root_task</b> (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> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::stage_task</b> (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> [friend]</code></td></tr>
+  <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 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="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 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>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00046.html b/doc/html/a00046.html
index 3c816d6..01f9fd1 100644
--- a/doc/html/a00046.html
+++ b/doc/html/a00046.html
@@ -20,13 +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::recursive_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00123.html">tbb::recursive_mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00123.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00123.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00123.html#ac480ea0e9d5ea0345a67d57008b6263">release</a>()</td><td><a class="el" href="a00123.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00123.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a>()</td><td><a class="el" href="a00123.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00123.html#dec17713c4c1321ac8fec66816d0c602">scoped_lock</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00123.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00123.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00123.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00123.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a>()</td><td><a class="el" href="a00123.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+<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>
 </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 f0f9078..bd37ccc 100644
--- a/doc/html/a00047.html
+++ b/doc/html/a00047.html
@@ -20,24 +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::scalable_allocator< T > Member List</h1>This is the complete list of members for <a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00124.html#726b1586d05d44665a36e1c7b2699bfd">allocate</a>(size_type n, const void *=0)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00124.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00124.html#880e766f1d913988c21973dbdd874fd5">max_size</a>() const </td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scalable_allocator</b>() (defined in <a class="el" href="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.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="a00124.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00124.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
+<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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00042.html b/doc/html/a00048.html
similarity index 71%
rename from doc/html/a00042.html
rename to doc/html/a00048.html
index fad989e..802002e 100644
--- a/doc/html/a00042.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="a00119.html">tbb::queuing_mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00119.html#533e4fc8355ee321206a0609c42d909d">acquire</a>(queuing_mutex &m)</td><td><a class="el" href="a00119.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00119.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a>()</td><td><a class="el" href="a00119.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00119.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a>()</td><td><a class="el" href="a00119.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00119.html#9b51ef972f5618ac17caadb58841ab6d">scoped_lock</a>(queuing_mutex &m)</td><td><a class="el" href="a00119.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00119.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a>(queuing_mutex &m)</td><td><a class="el" href="a00119.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00119.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a>()</td><td><a class="el" href="a00119.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="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>
 </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 2c97a9f..78a374a 100644
--- a/doc/html/a00049.html
+++ b/doc/html/a00049.html
@@ -20,10 +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::scalable_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00125.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="a00125.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00125.html">tbb::scalable_allocator< void ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00125.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00125.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="a00125.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00125.html">tbb::scalable_allocator< void ></a></td><td></td></tr>
+<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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00044.html b/doc/html/a00050.html
similarity index 68%
copy from doc/html/a00044.html
copy to doc/html/a00050.html
index e8726f0..d1e2afa 100644
--- a/doc/html/a00044.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="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00121.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a>()</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#67ae221109ddc69510ab593874e435d4">release</a>()</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>()</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#fbb8798792d3aebb136c46fc63d2529e">scoped_lock</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a>()</td><td><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00121.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a>()</td><td><a class="el" href="a00121.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="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>
 </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 9c16915..a668ac9 100644
--- a/doc/html/a00051.html
+++ b/doc/html/a00051.html
@@ -20,13 +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="a00127.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="a00127.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00127.html">tbb::spin_mutex</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00127.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00127.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="a00127.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00127.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="a00127.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00127.html">tbb::spin_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00127.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00127.html">tbb::spin_mutex</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00127.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a>()</td><td><a class="el" href="a00127.html">tbb::spin_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="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>
 </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 99785b6..1aee537 100644
--- a/doc/html/a00052.html
+++ b/doc/html/a00052.html
@@ -20,13 +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="a00128.html">tbb::spin_mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00128.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a>(spin_mutex &m)</td><td><a class="el" href="a00128.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00128.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a>()</td><td><a class="el" href="a00128.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00128.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>()</td><td><a class="el" href="a00128.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00128.html#5ce6807050a9e8f87bcb4a65dccb12ef">scoped_lock</a>(spin_mutex &m)</td><td><a class="el" href="a00128.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00128.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a>(spin_mutex &m)</td><td><a class="el" href="a00128.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00128.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a>()</td><td><a class="el" href="a00128.html">tbb::spin_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="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>
 </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 6aaf240..6f2f904 100644
--- a/doc/html/a00053.html
+++ b/doc/html/a00053.html
@@ -20,12 +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::spin_rw_mutex_v3 Member List</h1>This is the complete list of members for <a class="el" href="a00129.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="a00129.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00129.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="a00129.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00129.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="a00129.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00129.html">tbb::spin_rw_mutex_v3</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00129.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a>()</td><td><a class="el" href="a00129.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00129.html#9a815fb2759e55072ed413f1b6970cf3">~spin_rw_mutex_v3</a>()</td><td><a class="el" href="a00129.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
+<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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00054.html b/doc/html/a00054.html
deleted file mode 100644
index 784849c..0000000
--- a/doc/html/a00054.html
+++ /dev/null
@@ -1,40 +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>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::spin_rw_mutex_v3::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00130.html">tbb::spin_rw_mutex_v3::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00130.html#b0b646ec5be02a127d159bbb7ca65353">acquire</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00130.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00130.html#c2c2c38a08cb9080e87099fac3e5bc94">downgrade_to_reader</a>()</td><td><a class="el" href="a00130.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00130.html#61b14d00a78185c9b2d206ebfc379124">release</a>()</td><td><a class="el" href="a00130.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00130.html#d6ea60dee5563f702379bf5e51aa8806">scoped_lock</a>()</td><td><a class="el" href="a00130.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00130.html#42a92d4f8fdde425b111cfa8a9228071">scoped_lock</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00130.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00130.html#9879626968d9b9a04cd2ec0fb2e84ae1">try_acquire</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00130.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00130.html#3f0b1e3f2efab63336400348bd070226">upgrade_to_writer</a>()</td><td><a class="el" href="a00130.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00130.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">~scoped_lock</a>()</td><td><a class="el" href="a00130.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.
-<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/a00055.html b/doc/html/a00055.html
index f156979..801aa32 100644
--- a/doc/html/a00055.html
+++ b/doc/html/a00055.html
@@ -20,18 +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::task_group_context Member List</h1>This is the complete list of members for <a class="el" href="a00133.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="a00133.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00133.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00133.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</a>()</td><td><a class="el" href="a00133.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00133.html#49a55352084fd44b8863d182e839e6dc">init</a>()</td><td><a class="el" href="a00133.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="a00133.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00133.html">tbb::task_group_context</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00133.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a>() const </td><td><a class="el" href="a00133.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="a00133.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00133.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="a00133.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00133.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00133.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</a>()</td><td><a class="el" href="a00133.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>task</b> (defined in <a class="el" href="a00133.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00133.html">tbb::task_group_context</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00133.html#6fc0ba6f3abcdb4d43277c05bd67bdd4">task_group_context</a>(kind_type relation_with_parent=bound)</td><td><a class="el" href="a00133.html">tbb::task_group_context</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>~task_group_context</b>() (defined in <a class="el" href="a00133.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00133.html">tbb::task_group_context</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="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>
 </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 cc019a3..75d7822 100644
--- a/doc/html/a00057.html
+++ b/doc/html/a00057.html
@@ -20,58 +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 Member List</h1>This is the complete list of members for <a class="el" href="a00132.html">tbb::task</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00132.html#b0f98c633647fc73b978fe4cd2277ac4">add_to_depth</a>(int delta)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#3a920a56b0bcf2801518fb45b2c9d2be">affinity</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> typedef</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#1434c79a5138993269d034008bff7329">allocate_continuation</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#23acb0da0afd690da797f9f882027d34">allocate_root</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a>(task_group_context &ctx)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#0f3fb4aac549ab642022450a4bd13326">cancel_group_execution</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#5be823a972b3c3b9901c5963eeb050fd">depth</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> typedef</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(task &victim)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#22c298cd40937a431a06777423f002f6">execute</a>()=0</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_additional_child_of_proxy</b> (defined in <a class="el" href="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#314e98ee4347ccec83efcb9ee22e8596">parent</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#a67a79e18f62b43a623a00cfbd76db4c">recycle_as_continuation</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#3b290d14109704e2b69dc1ac980a7a76">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4f1be9bbcdb487830dbe298b68d85144">recycle_to_reexecute</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#ad774f55eaec008ae02b236423209ced">ref_count</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#bd43e8d6249738efafd12d6a4c72c5e3">self</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#fc4d4e61a56823aa1efdbb5d59e42973">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a>(int count)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a>(task &child)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a>(task_list &list)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#0af7b2d7e6e8b4333b2accfce3dfb374">state</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e">state_type</a> enum name</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>()</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#98245ee0473f84cb19dbbf8c81134908">~task</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+<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>
 </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 0526353..36aa31a 100644
--- a/doc/html/a00058.html
+++ b/doc/html/a00058.html
@@ -20,56 +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::empty_task Member List</h1>This is the complete list of members for <a class="el" href="a00108.html">tbb::empty_task</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00132.html#b0f98c633647fc73b978fe4cd2277ac4">add_to_depth</a>(int delta)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#3a920a56b0bcf2801518fb45b2c9d2be">affinity</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> typedef</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#1434c79a5138993269d034008bff7329">allocate_continuation</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#23acb0da0afd690da797f9f882027d34">allocate_root</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a>(task_group_context &ctx)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#0f3fb4aac549ab642022450a4bd13326">cancel_group_execution</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#5be823a972b3c3b9901c5963eeb050fd">depth</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> typedef</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(task &victim)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_additional_child_of_proxy</b> (defined in <a class="el" href="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.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="a00132.html">tbb::task</a>)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#314e98ee4347ccec83efcb9ee22e8596">parent</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#a67a79e18f62b43a623a00cfbd76db4c">recycle_as_continuation</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#3b290d14109704e2b69dc1ac980a7a76">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4f1be9bbcdb487830dbe298b68d85144">recycle_to_reexecute</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a> enum value</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#ad774f55eaec008ae02b236423209ced">ref_count</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#bd43e8d6249738efafd12d6a4c72c5e3">self</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#fc4d4e61a56823aa1efdbb5d59e42973">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a>(int count)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a>(task &child)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a>(task_list &list)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#0af7b2d7e6e8b4333b2accfce3dfb374">state</a>() const </td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e">state_type</a> enum name</td><td><a class="el" href="a00132.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00132.html#98245ee0473f84cb19dbbf8c81134908">~task</a>()</td><td><a class="el" href="a00132.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+<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>
 </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 9c031b0..a4e1a6d 100644
--- a/doc/html/a00059.html
+++ b/doc/html/a00059.html
@@ -20,14 +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::task_list Member List</h1>This is the complete list of members for <a class="el" href="a00134.html">tbb::task_list</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00134.html#fce446ee13e025969945328f3ff59b95">clear</a>()</td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#f3ac31e092814b90929f81bb30441959">empty</a>() const </td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#5fe85df5ed524418389d34051750347d">pop_front</a>()</td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#4cd34756bc4763dafb8c84838a0124ff">push_back</a>(task &task)</td><td><a class="el" href="a00134.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="a00134.html">tbb::task_list</a>)</td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#416341c2047eaef50417b41eaf7e9de6">task_list</a>()</td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#6d438f1499a02db1e59c24ab6043e5ba">~task_list</a>()</td><td><a class="el" href="a00134.html">tbb::task_list</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="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>
 </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 65d1dd9..2791fe6 100644
--- a/doc/html/a00060.html
+++ b/doc/html/a00060.html
@@ -20,16 +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::task_scheduler_init Member List</h1>This is the complete list of members for <a class="el" href="a00135.html">tbb::task_scheduler_init</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a></td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a>()</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a></td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#d476053cc712e572554823492a5229ce">initialize</a>(int number_of_threads=automatic)</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#d5ed214a8bb53b0466ed91ff4734b9a3">initialize</a>(int number_of_threads, stack_size_type thread_stack_size)</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#12752282977029f23416642bc03e8b74">is_active</a>() const </td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a>(int number_of_threads=automatic, stack_size_type thread_stack_size=0)</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>()</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a>()</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</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="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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00061.html b/doc/html/a00061.html
new file mode 100644
index 0000000..ad29356
--- /dev/null
+++ b/doc/html/a00061.html
@@ -0,0 +1,49 @@
+<!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::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>
+</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/a00063.html b/doc/html/a00063.html
new file mode 100644
index 0000000..83bb7d3
--- /dev/null
+++ b/doc/html/a00063.html
@@ -0,0 +1,90 @@
+<!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::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>
+</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/a00064.html b/doc/html/a00064.html
index 7826750..2a1d5d4 100644
--- a/doc/html/a00064.html
+++ b/doc/html/a00064.html
@@ -20,10 +20,63 @@
     <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="a00137.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="a00137.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00137.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00137.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00137.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="a00137.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00137.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
+<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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00059.html b/doc/html/a00065.html
similarity index 68%
copy from doc/html/a00059.html
copy to doc/html/a00065.html
index 9c031b0..79e7040 100644
--- a/doc/html/a00059.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="a00134.html">tbb::task_list</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00134.html#fce446ee13e025969945328f3ff59b95">clear</a>()</td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#f3ac31e092814b90929f81bb30441959">empty</a>() const </td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#5fe85df5ed524418389d34051750347d">pop_front</a>()</td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#4cd34756bc4763dafb8c84838a0124ff">push_back</a>(task &task)</td><td><a class="el" href="a00134.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="a00134.html">tbb::task_list</a>)</td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#416341c2047eaef50417b41eaf7e9de6">task_list</a>()</td><td><a class="el" href="a00134.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00134.html#6d438f1499a02db1e59c24ab6043e5ba">~task_list</a>()</td><td><a class="el" href="a00134.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="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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00060.html b/doc/html/a00073.html
similarity index 67%
copy from doc/html/a00060.html
copy to doc/html/a00073.html
index 65d1dd9..e61964e 100644
--- a/doc/html/a00060.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="a00135.html">tbb::task_scheduler_init</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a></td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a>()</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a></td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#d476053cc712e572554823492a5229ce">initialize</a>(int number_of_threads=automatic)</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#d5ed214a8bb53b0466ed91ff4734b9a3">initialize</a>(int number_of_threads, stack_size_type thread_stack_size)</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#12752282977029f23416642bc03e8b74">is_active</a>() const </td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a>(int number_of_threads=automatic, stack_size_type thread_stack_size=0)</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>()</td><td><a class="el" href="a00135.html">tbb::task_scheduler_init</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00135.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a>()</td><td><a class="el" href="a00135.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="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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00062.html b/doc/html/a00075.html
similarity index 58%
rename from doc/html/a00062.html
rename to doc/html/a00075.html
index b4e15d8..944c030 100644
--- a/doc/html/a00062.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="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00136.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a>(size_type n, const void *=0)</td><td><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00136.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a>()</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00136.html#ab228ab9e324ed041c2226e1d717df5f">construct</a>(pointer p, const value_type &value)</td><td><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00136.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00136.html#ef133522bf55f05a605bee0763208281">destroy</a>(pointer p)</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00136.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> enum name</td><td><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00136.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a>() const </td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>tbb_allocator</b>() (defined in <a class="el" href="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.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="a00136.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00136.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="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>
 </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 58b4d28..64a69cb 100644
--- a/doc/html/a00077.html
+++ b/doc/html/a00077.html
@@ -20,8 +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::internal::work_around_alignment_bug< Size, T > Member List</h1>This is the complete list of members for <a class="el" href="a00142.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="a00142.html">tbb::internal::work_around_alignment_bug< Size, T ></a>)</td><td><a class="el" href="a00142.html">tbb::internal::work_around_alignment_bug< Size, T ></a></td><td><code> [static]</code></td></tr>
+<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>
 </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 5ca0994..27b97b9 100644
--- a/doc/html/a00079.html
+++ b/doc/html/a00079.html
@@ -20,10 +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::tick_count Member List</h1>This is the complete list of members for <a class="el" href="a00140.html">tbb::tick_count</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00140.html#fb7f78ca61cf28398645ace66e284473">now</a>()</td><td><a class="el" href="a00140.html">tbb::tick_count</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00140.html#09dde78a4100800c11bb883d6204b586">operator-</a>(const tick_count &t1, const tick_count &t0)</td><td><a class="el" href="a00140.html">tbb::tick_count</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00140.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a>()</td><td><a class="el" href="a00140.html">tbb::tick_count</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="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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00080.html b/doc/html/a00080.html
deleted file mode 100644
index e67e5fe..0000000
--- a/doc/html/a00080.html
+++ /dev/null
@@ -1,41 +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>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::tick_count::interval_t Member List</h1>This is the complete list of members for <a class="el" href="a00141.html">tbb::tick_count::interval_t</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00141.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>()</td><td><a class="el" href="a00141.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00141.html#1a21a428e00cced2e6a49e0f5f2258bf">interval_t</a>(double sec)</td><td><a class="el" href="a00141.html">tbb::tick_count::interval_t</a></td><td><code> [inline, explicit]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00141.html#5871ead1ca230efbe52a5008470e6428">operator+</a>(const interval_t &i, const interval_t &j)</td><td><a class="el" href="a00141.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00141.html#cd9814947902e26463a69a111530f81b">operator+=</a>(const interval_t &i)</td><td><a class="el" href="a00141.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00141.html#09dde78a4100800c11bb883d6204b586">operator-</a>(const tick_count &t1, const tick_count &t0)</td><td><a class="el" href="a00141.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00141.html#fa509691e1d689830931e36edd274f76">operator-</a>(const interval_t &i, const interval_t &j)</td><td><a class="el" href="a00141.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00141.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a>(const interval_t &i)</td><td><a class="el" href="a00141.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00141.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a>() const </td><td><a class="el" href="a00141.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="a00141.html">tbb::tick_count::interval_t</a>)</td><td><a class="el" href="a00141.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.
-<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/a00049.html b/doc/html/a00081.html
similarity index 59%
copy from doc/html/a00049.html
copy to doc/html/a00081.html
index 2c97a9f..8b26879 100644
--- a/doc/html/a00049.html
+++ b/doc/html/a00081.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::scalable_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00125.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="a00125.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00125.html">tbb::scalable_allocator< void ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00125.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00125.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="a00125.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00125.html">tbb::scalable_allocator< void ></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="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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00066.html b/doc/html/a00083.html
similarity index 84%
rename from doc/html/a00066.html
rename to doc/html/a00083.html
index ecd347d..1ef49ab 100644
--- a/doc/html/a00066.html
+++ b/doc/html/a00083.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::bad_last_alloc Member List</h1>This is the complete list of members for <a class="el" href="a00096.html">tbb::bad_last_alloc</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>what</b>() const  (defined in <a class="el" href="a00096.html">tbb::bad_last_alloc</a>)</td><td><a class="el" href="a00096.html">tbb::bad_last_alloc</a></td><td><code> [inline, virtual]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>~bad_last_alloc</b>() (defined in <a class="el" href="a00096.html">tbb::bad_last_alloc</a>)</td><td><a class="el" href="a00096.html">tbb::bad_last_alloc</a></td><td><code> [inline, virtual]</code></td></tr>
+<h1>tbb::bad_last_alloc Member List</h1>This is the complete list of members for <a class="el" href="a00121.html">tbb::bad_last_alloc</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>what</b>() const  (defined in <a class="el" href="a00121.html">tbb::bad_last_alloc</a>)</td><td><a class="el" href="a00121.html">tbb::bad_last_alloc</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~bad_last_alloc</b>() (defined in <a class="el" href="a00121.html">tbb::bad_last_alloc</a>)</td><td><a class="el" href="a00121.html">tbb::bad_last_alloc</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/a00067.html b/doc/html/a00084.html
similarity index 73%
rename from doc/html/a00067.html
rename to doc/html/a00084.html
index 5d664aa..1c28d12 100644
--- a/doc/html/a00067.html
+++ b/doc/html/a00084.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::tbb_exception Member List</h1>This is the complete list of members for <a class="el" href="a00138.html">tbb::tbb_exception</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00138.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a>()=0</td><td><a class="el" href="a00138.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00138.html#3e3482bf264d4ca4dde046cd9c02c766">move</a>()=0</td><td><a class="el" href="a00138.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00138.html#d00f6497e552fee978a02bfcbebf46e2">name</a>() const =0</td><td><a class="el" href="a00138.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00138.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a>()=0</td><td><a class="el" href="a00138.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00138.html#e8157689ecb66bc6c72d3618bf3cc371">what</a>() const =0</td><td><a class="el" href="a00138.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="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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00068.html b/doc/html/a00085.html
similarity index 67%
rename from doc/html/a00068.html
rename to doc/html/a00085.html
index 44d8031..a437d3a 100644
--- a/doc/html/a00068.html
+++ b/doc/html/a00085.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::captured_exception Member List</h1>This is the complete list of members for <a class="el" href="a00102.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="a00102.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00102.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="a00102.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00102.html">tbb::captured_exception</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00102.html#667812a82f1525e968c52593dea0ef4c">destroy</a>()</td><td><a class="el" href="a00102.html">tbb::captured_exception</a></td><td><code> [virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00102.html#df6bbb78a362fe862a341e81e2999810">move</a>()</td><td><a class="el" href="a00102.html">tbb::captured_exception</a></td><td><code> [virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00102.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>() const </td><td><a class="el" href="a00102.html">tbb::captured_exception</a></td><td><code> [virtual]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>operator=</b>(const captured_exception &src) (defined in <a class="el" href="a00102.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00102.html">tbb::captured_exception</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00102.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a>()</td><td><a class="el" href="a00102.html">tbb::captured_exception</a></td><td><code> [inline, virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00102.html#6b5988ef74a1fe2a58998d110b3633e0">what</a>() const </td><td><a class="el" href="a00102.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="a00102.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00102.html">tbb::captured_exception</a></td><td><code> [inline]</code></td></tr>
+<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 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 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 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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00069.html b/doc/html/a00086.html
similarity index 67%
rename from doc/html/a00069.html
rename to doc/html/a00086.html
index 90bd466..2e7458f 100644
--- a/doc/html/a00069.html
+++ b/doc/html/a00086.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::movable_exception< ExceptionData > Member List</h1>This is the complete list of members for <a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>data</b>() (defined in <a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a>)</td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>data</b>() const  (defined in <a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a>)</td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00111.html#7a46873119d9f85a7b0009c13e41a258">destroy</a>()</td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>movable_exception</b>(const ExceptionData &data) (defined in <a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a>)</td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>movable_exception</b>(const movable_exception &src) (defined in <a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a>)</td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00111.html#1aea0ad179d6f0481fe7f3495f66adf9">move</a>()</td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00111.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a></td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [protected]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00111.html#bc5f5c4739b17ac5211ac58226c2f5a5">name</a>() const </td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>operator=</b>(const movable_exception &src) (defined in <a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a>)</td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00111.html#17cffba35811c92b7e65d63506b69602">throw_self</a>()</td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00111.html#b33a89bccf0c63106f1270c7bfaaf54f">what</a>() const </td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>~movable_exception</b>() (defined in <a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a>)</td><td><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::movable_exception< ExceptionData > Member List</h1>This is the complete list of members for <a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>data</b>() (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 bgcolor="#f0f0f0"><td><b>data</b>() const  (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#7a46873119d9f85a7b0009c13e41a258">destroy</a>()</td><td><a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>movable_exception</b>(const ExceptionData &data) (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 bgcolor="#f0f0f0"><td><b>movable_exception</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#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 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>
+  <tr bgcolor="#f0f0f0"><td><b>~movable_exception</b>() (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>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00087.html b/doc/html/a00087.html
new file mode 100644
index 0000000..7c6e47e
--- /dev/null
+++ b/doc/html/a00087.html
@@ -0,0 +1,37 @@
+<!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::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>
+</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/a00070.html b/doc/html/a00088.html
similarity index 59%
rename from doc/html/a00070.html
rename to doc/html/a00088.html
index 23f77f6..3505a18 100644
--- a/doc/html/a00070.html
+++ b/doc/html/a00088.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::internal::AtomicBackoff Member List</h1>This is the complete list of members for <a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>AtomicBackoff</b>() (defined in <a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a>)</td><td><a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>bounded_pause</b>() (defined in <a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a>)</td><td><a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">pause</a>()</td><td><a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reset</b>() (defined in <a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a>)</td><td><a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::internal::atomic_backoff Member List</h1>This is the complete list of members for <a class="el" href="a00119.html">tbb::internal::atomic_backoff</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>atomic_backoff</b>() (defined in <a class="el" href="a00119.html">tbb::internal::atomic_backoff</a>)</td><td><a class="el" href="a00119.html">tbb::internal::atomic_backoff</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>bounded_pause</b>() (defined in <a class="el" href="a00119.html">tbb::internal::atomic_backoff</a>)</td><td><a class="el" href="a00119.html">tbb::internal::atomic_backoff</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>()</td><td><a class="el" href="a00119.html">tbb::internal::atomic_backoff</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reset</b>() (defined in <a class="el" href="a00119.html">tbb::internal::atomic_backoff</a>)</td><td><a class="el" href="a00119.html">tbb::internal::atomic_backoff</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/a00092.html b/doc/html/a00092.html
deleted file mode 100644
index 9406e3f..0000000
--- a/doc/html/a00092.html
+++ /dev/null
@@ -1,63 +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::aligned_space< T, N > Class Template 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00092.html">aligned_space</a></div>
-<h1>tbb::aligned_space< T, N > Class Template Reference<br>
-<small>
-[<a class="el" href="a00185.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="a00191.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>
-<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="0d702fc6b9e9d061ace3501b3c861cdf"></a><!-- doxytag: member="tbb::aligned_space::begin" ref="0d702fc6b9e9d061ace3501b3c861cdf" args="()" -->
-T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Pointer to beginning of array. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="024be075c23c0394c9a2518d993bcd9e"></a><!-- doxytag: member="tbb::aligned_space::end" ref="024be075c23c0394c9a2518d993bcd9e" args="()" -->
-T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#024be075c23c0394c9a2518d993bcd9e">end</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Pointer to one past last element in array. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename T, size_t N><br>
- class tbb::aligned_space< T, N ></h3>
-
-Block of space aligned sufficiently to construct an array T with N elements. 
-<p>
-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="a00191.html">aligned_space.h</a></ul>
-<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/a00094.html b/doc/html/a00094.html
deleted file mode 100644
index f03135d..0000000
--- a/doc/html/a00094.html
+++ /dev/null
@@ -1,59 +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::internal::AtomicBackoff Class 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<b>internal</b>::<a class="el" href="a00094.html">AtomicBackoff</a></div>
-<h1>tbb::internal::AtomicBackoff Class Reference</h1><!-- doxytag: class="tbb::internal::AtomicBackoff" -->Class that implements exponential backoff.  
-<a href="#_details">More...</a>
-<p>
-<code>#include <<a class="el" href="a00290.html">tbb_machine.h</a>></code>
-<p>
-<a href="a00070.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="cb1ca420dfc4aa21eca699d3fa4711c7"></a><!-- doxytag: member="tbb::internal::AtomicBackoff::pause" ref="cb1ca420dfc4aa21eca699d3fa4711c7" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">pause</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Pause for a while. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="452a6367368fd34a0f991383f67fb304"></a><!-- doxytag: member="tbb::internal::AtomicBackoff::bounded_pause" ref="452a6367368fd34a0f991383f67fb304" args="()" -->
-bool </td><td class="memItemRight" valign="bottom"><b>bounded_pause</b> ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c705d76ff0cce70a5e00313f4d94c396"></a><!-- doxytag: member="tbb::internal::AtomicBackoff::reset" ref="c705d76ff0cce70a5e00313f4d94c396" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><b>reset</b> ()</td></tr>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Class that implements exponential backoff. 
-<p>
-See implementation of SpinwaitWhileEq for an example. 
-<p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00290.html">tbb_machine.h</a></ul>
-<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/a00095.html b/doc/html/a00095.html
index 8860cfe..0d190e7 100644
--- a/doc/html/a00095.html
+++ b/doc/html/a00095.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::auto_partitioner Class Reference</title>
+<title>Member List</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -20,40 +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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00095.html">auto_partitioner</a></div>
-<h1>tbb::auto_partitioner Class Reference<br>
-<small>
-[<a class="el" href="a00183.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="a00264.html">partitioner.h</a>></code>
-<p>
-<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>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a47f7e0208a2bf68f35b51b27d2ddf2a"></a><!-- doxytag: member="tbb::auto_partitioner::internal::start_for" ref="a47f7e0208a2bf68f35b51b27d2ddf2a" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::start_for</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e8f710e431b62c2a48914bd99d0fe034"></a><!-- doxytag: member="tbb::auto_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="76d97ae6ad98db0acfc8ed8cb7c76705"></a><!-- doxytag: member="tbb::auto_partitioner::internal::start_scan" ref="76d97ae6ad98db0acfc8ed8cb7c76705" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::start_scan</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>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-An auto partitioner. 
-<p>
-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="a00264.html">partitioner.h</a></ul>
-<hr>
+<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>
+</table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
 <p></p>
diff --git a/doc/html/a00096.html b/doc/html/a00096.html
deleted file mode 100644
index b0bb2cd..0000000
--- a/doc/html/a00096.html
+++ /dev/null
@@ -1,50 +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::bad_last_alloc Class 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00096.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="a00289.html">tbb_exception.h</a>></code>
-<p>
-<a href="a00066.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="6f7d876e9190498a13795a5b0ca3e313"></a><!-- doxytag: member="tbb::bad_last_alloc::what" ref="6f7d876e9190498a13795a5b0ca3e313" args="() const " -->
-virtual const char * </td><td class="memItemRight" valign="bottom"><b>what</b> () const   throw ()</td></tr>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Exception for concurrent containers. 
-<p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00289.html">tbb_exception.h</a></ul>
-<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/a00097.html b/doc/html/a00097.html
deleted file mode 100644
index 1b95ee0..0000000
--- a/doc/html/a00097.html
+++ /dev/null
@@ -1,224 +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::blocked_range< Value > Class Template 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00097.html">blocked_range</a></div>
-<h1>tbb::blocked_range< Value > Class Template Reference<br>
-<small>
-[<a class="el" href="a00183.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="a00200.html">blocked_range.h</a>></code>
-<p>
-<a href="a00005.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 Value </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of a value.  <a href="#1a8d05842c2b3dfc177bc4d347e4cef7"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f5707bffea38eee5c9680f37358afb8e"></a><!-- doxytag: member="tbb::blocked_range::size_type" ref="f5707bffea38eee5c9680f37358afb8e" args="" -->
-typedef std::size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Type for size of a range. <br></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="a00097.html#94607755c5110d199202234d58d022ac">blocked_range</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct range with default-constructed values for begin and end.  <a href="#94607755c5110d199202234d58d022ac"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="14795a36ead1414b4371dbe1a4656359"></a><!-- doxytag: member="tbb::blocked_range::blocked_range" ref="14795a36ead1414b4371dbe1a4656359" args="(Value begin_, Value end_, size_type grainsize_=1)" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#14795a36ead1414b4371dbe1a4656359">blocked_range</a> (Value begin_, Value end_, <a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> grainsize_=1)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct range over half-open interval [begin,end), with the given grainsize. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="18d2258400756ac1446dac7676b18df3"></a><!-- doxytag: member="tbb::blocked_range::begin" ref="18d2258400756ac1446dac7676b18df3" args="() const " -->
-<a class="el" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#18d2258400756ac1446dac7676b18df3">begin</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Beginning of range. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8b929d93ddc13f148b11bceef3a3bdf8"></a><!-- doxytag: member="tbb::blocked_range::end" ref="8b929d93ddc13f148b11bceef3a3bdf8" args="() const " -->
-<a class="el" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">One past last value in range. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Size of the range.  <a href="#9eaa0b6beff1420f688570bbf6b8c462"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fcd2e5b8b6c11fd3f20fc0aa9f11bbc2"></a><!-- doxytag: member="tbb::blocked_range::grainsize" ref="fcd2e5b8b6c11fd3f20fc0aa9f11bbc2" args="() const " -->
-<a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The grain size for this range. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8f4f02f530eb3f2e7ea26e06f76aef9d"></a><!-- doxytag: member="tbb::blocked_range::empty" ref="8f4f02f530eb3f2e7ea26e06f76aef9d" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">True if range is empty. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.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="a00097.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">blocked_range</a> (<a class="el" href="a00097.html">blocked_range</a> &r, <a class="el" href="a00131.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>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="395a514a55017e36d571809f1223389b"></a><!-- doxytag: member="tbb::blocked_range::blocked_range2d" ref="395a514a55017e36d571809f1223389b" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="13d172a4da9be197033e64516fff1f4b"></a><!-- doxytag: member="tbb::blocked_range::blocked_range3d" ref="13d172a4da9be197033e64516fff1f4b" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b></td></tr>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename Value><br>
- class tbb::blocked_range< Value ></h3>
-
-A range over which to iterate. 
-<p>
-<hr><h2>Member Typedef Documentation</h2>
-<a class="anchor" name="1a8d05842c2b3dfc177bc4d347e4cef7"></a><!-- doxytag: member="tbb::blocked_range::const_iterator" ref="1a8d05842c2b3dfc177bc4d347e4cef7" args="" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Value> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef Value <a class="el" href="a00097.html">tbb::blocked_range</a>< Value >::<a class="el" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Type of a value. 
-<p>
-Called a const_iterator for sake of algorithms that need to treat a <a class="el" href="a00097.html">blocked_range</a> as an STL container. 
-</div>
-</div><p>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="94607755c5110d199202234d58d022ac"></a><!-- doxytag: member="tbb::blocked_range::blocked_range" ref="94607755c5110d199202234d58d022ac" args="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Value> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="a00097.html">tbb::blocked_range</a>< Value >::<a class="el" href="a00097.html">blocked_range</a>           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Construct range with default-constructed values for begin and end. 
-<p>
-Requires that Value have a default constructor. 
-</div>
-</div><p>
-<a class="anchor" name="4c0efd2be3f96a0ab3ba5085e8b3fcc7"></a><!-- doxytag: member="tbb::blocked_range::blocked_range" ref="4c0efd2be3f96a0ab3ba5085e8b3fcc7" args="(blocked_range &r, split)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Value> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="a00097.html">tbb::blocked_range</a>< Value >::<a class="el" href="a00097.html">blocked_range</a>           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00097.html">blocked_range</a>< Value > & </td>
-          <td class="paramname"> <em>r</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="a00131.html">split</a> </td>
-          <td class="paramname"></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>
-Split range. 
-<p>
-The new Range *this has the second half, the old range r has the first half. Unspecified if <a class="el" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">end()</a><<a class="el" href="a00097.html#18d2258400756ac1446dac7676b18df3">begin()</a> or !is_divisible(). 
-</div>
-</div><p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="41a58b703d574b6e1ca155df3576f578"></a><!-- doxytag: member="tbb::blocked_range::is_divisible" ref="41a58b703d574b6e1ca155df3576f578" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Value> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00097.html">tbb::blocked_range</a>< Value >::is_divisible           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"> const<code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-True if range is divisible. 
-<p>
-Unspecified if <a class="el" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">end()</a><<a class="el" href="a00097.html#18d2258400756ac1446dac7676b18df3">begin()</a>. 
-</div>
-</div><p>
-<a class="anchor" name="9eaa0b6beff1420f688570bbf6b8c462"></a><!-- doxytag: member="tbb::blocked_range::size" ref="9eaa0b6beff1420f688570bbf6b8c462" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Value> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> <a class="el" href="a00097.html">tbb::blocked_range</a>< Value >::size           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"> const<code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Size of the range. 
-<p>
-Unspecified if <a class="el" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">end()</a><<a class="el" href="a00097.html#18d2258400756ac1446dac7676b18df3">begin()</a>. 
-</div>
-</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00200.html">blocked_range.h</a></ul>
-<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/a00098.html b/doc/html/a00098.html
index 94758dc..b4f339b 100644
--- a/doc/html/a00098.html
+++ b/doc/html/a00098.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::blocked_range2d< RowValue, ColValue > Class Template Reference</title>
+<title>Member List</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -20,62 +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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00098.html">blocked_range2d</a></div>
-<h1>tbb::blocked_range2d< RowValue, ColValue > Class Template Reference<br>
-<small>
-[<a class="el" href="a00183.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="a00201.html">blocked_range2d.h</a>></code>
-<p>
-<a href="a00006.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="a807a22fe658ec38b8edfd69521d0383"></a><!-- doxytag: member="tbb::blocked_range2d::row_range_type" ref="a807a22fe658ec38b8edfd69521d0383" args="" -->
-typedef <a class="el" href="a00097.html">blocked_range</a>< RowValue > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#a807a22fe658ec38b8edfd69521d0383">row_range_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Type for size of an iteation range. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="750d5c6ac9915443df477a30031c07fd"></a><!-- doxytag: member="tbb::blocked_range2d::col_range_type" ref="750d5c6ac9915443df477a30031c07fd" args="" -->
-typedef <a class="el" href="a00097.html">blocked_range</a>< ColValue > </td><td class="memItemRight" valign="bottom"><b>col_range_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="4180bc35d4f8ed9f20045dba4f2a1bdc"></a><!-- doxytag: member="tbb::blocked_range2d::blocked_range2d" ref="4180bc35d4f8ed9f20045dba4f2a1bdc" args="(RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize)" -->
- </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</b> (RowValue row_begin, RowValue row_end, typename <a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">row_range_type::size_type</a> row_grainsize, ColValue col_begin, ColValue col_end, typename <a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">col_range_type::size_type</a> col_grainsize)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="485434db1609b2074d86cb604f3c674e"></a><!-- doxytag: member="tbb::blocked_range2d::blocked_range2d" ref="485434db1609b2074d86cb604f3c674e" args="(RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)" -->
- </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</b> (RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d144cb2d88cef553420311aca8667a44"></a><!-- doxytag: member="tbb::blocked_range2d::empty" ref="d144cb2d88cef553420311aca8667a44" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#d144cb2d88cef553420311aca8667a44">empty</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">True if range is empty. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ad36a9b38e4fef26d376f99552ce2d92"></a><!-- doxytag: member="tbb::blocked_range2d::is_divisible" ref="ad36a9b38e4fef26d376f99552ce2d92" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#ad36a9b38e4fef26d376f99552ce2d92">is_divisible</a> () const </td></tr>
-
-<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="a00098.html">blocked_range2d</a> &r, <a class="el" href="a00131.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="a00097.html">row_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#f496e7348a82652fba581203477cc07c">rows</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The rows of the iteration space. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="392a46759af2c884957115771affa7f4"></a><!-- doxytag: member="tbb::blocked_range2d::cols" ref="392a46759af2c884957115771affa7f4" args="() const " -->
-const <a class="el" href="a00097.html">col_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#392a46759af2c884957115771affa7f4">cols</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The columns of the iteration space. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename RowValue, typename ColValue = RowValue><br>
- class tbb::blocked_range2d< RowValue, ColValue ></h3>
-
-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="a00201.html">blocked_range2d.h</a></ul>
-<hr>
+<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>
+</table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
 <p></p>
diff --git a/doc/html/a00099.html b/doc/html/a00099.html
index b22737b..8ed7242 100644
--- a/doc/html/a00099.html
+++ b/doc/html/a00099.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::blocked_range3d< PageValue, RowValue, ColValue > Class Template Reference</title>
+<title>Member List</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -20,69 +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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00099.html">blocked_range3d</a></div>
-<h1>tbb::blocked_range3d< PageValue, RowValue, ColValue > Class Template Reference<br>
-<small>
-[<a class="el" href="a00183.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="a00202.html">blocked_range3d.h</a>></code>
-<p>
-<a href="a00007.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="b8ebf17a552ba47825e9b3887855b719"></a><!-- doxytag: member="tbb::blocked_range3d::page_range_type" ref="b8ebf17a552ba47825e9b3887855b719" args="" -->
-typedef <a class="el" href="a00097.html">blocked_range</a>< PageValue > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00099.html#b8ebf17a552ba47825e9b3887855b719">page_range_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Type for size of an iteation range. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4edc39b1a76c84c8f43ea8bff3e88007"></a><!-- doxytag: member="tbb::blocked_range3d::row_range_type" ref="4edc39b1a76c84c8f43ea8bff3e88007" args="" -->
-typedef <a class="el" href="a00097.html">blocked_range</a>< RowValue > </td><td class="memItemRight" valign="bottom"><b>row_range_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="02229b59d4dc5437bf5fbe72acca7f66"></a><!-- doxytag: member="tbb::blocked_range3d::col_range_type" ref="02229b59d4dc5437bf5fbe72acca7f66" args="" -->
-typedef <a class="el" href="a00097.html">blocked_range</a>< ColValue > </td><td class="memItemRight" valign="bottom"><b>col_range_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="a762f420ed83a887967cb7dfe337582c"></a><!-- doxytag: member="tbb::blocked_range3d::blocked_range3d" ref="a762f420ed83a887967cb7dfe337582c" args="(PageValue page_begin, PageValue page_end, RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)" -->
- </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b> (PageValue page_begin, PageValue page_end, RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b4dcf5b059634b95c1671086bf6d4ff"></a><!-- doxytag: member="tbb::blocked_range3d::blocked_range3d" ref="0b4dcf5b059634b95c1671086bf6d4ff" args="(PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize, RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_gr [...]
- </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b> (PageValue page_begin, PageValue page_end, typename <a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">page_range_type::size_type</a> page_grainsize, RowValue row_begin, RowValue row_end, typename <a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">row_range_type::size_type</a> row_grainsize, ColValue col_begin, ColValue col_end, typename <a class="el" href="a00097.html#f5707bffea38eee [...]
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="356860e1c977d91711e8216bd55c0b25"></a><!-- doxytag: member="tbb::blocked_range3d::empty" ref="356860e1c977d91711e8216bd55c0b25" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00099.html#356860e1c977d91711e8216bd55c0b25">empty</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">True if range is empty. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="39d69191721c488e737ae5d9c5336b9c"></a><!-- doxytag: member="tbb::blocked_range3d::is_divisible" ref="39d69191721c488e737ae5d9c5336b9c" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00099.html#39d69191721c488e737ae5d9c5336b9c">is_divisible</a> () const </td></tr>
-
-<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="a00099.html">blocked_range3d</a> &r, <a class="el" href="a00131.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="a00097.html">page_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00099.html#cf971430aa12361d3ed245344b7c6764">pages</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The pages of the iteration space. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1584623e59ff32a8aa82006827508be4"></a><!-- doxytag: member="tbb::blocked_range3d::rows" ref="1584623e59ff32a8aa82006827508be4" args="() const " -->
-const <a class="el" href="a00097.html">row_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00099.html#1584623e59ff32a8aa82006827508be4">rows</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The rows of the iteration space. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3336ba9480fd6c43e158f9beb024c050"></a><!-- doxytag: member="tbb::blocked_range3d::cols" ref="3336ba9480fd6c43e158f9beb024c050" args="() const " -->
-const <a class="el" href="a00097.html">col_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00099.html#3336ba9480fd6c43e158f9beb024c050">cols</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The columns of the iteration space. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename PageValue, typename RowValue = PageValue, typename ColValue = RowValue><br>
- class tbb::blocked_range3d< PageValue, RowValue, ColValue ></h3>
-
-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="a00202.html">blocked_range3d.h</a></ul>
-<hr>
+<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>
+</table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
 <p></p>
diff --git a/doc/html/a00100.html b/doc/html/a00100.html
deleted file mode 100644
index d43e21e..0000000
--- a/doc/html/a00100.html
+++ /dev/null
@@ -1,114 +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::cache_aligned_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>
-<!-- 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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00100.html">cache_aligned_allocator</a></div>
-<h1>tbb::cache_aligned_allocator< T > Class Template Reference<br>
-<small>
-[<a class="el" href="a00185.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="a00203.html">cache_aligned_allocator.h</a>></code>
-<p>
-<a href="a00008.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="8f7128452e3c43b5bf1801b61d971d17"></a><!-- doxytag: member="tbb::cache_aligned_allocator::value_type" ref="8f7128452e3c43b5bf1801b61d971d17" 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="b23ef1d76c34fe1c2ebbb2f3df5b5676"></a><!-- doxytag: member="tbb::cache_aligned_allocator::pointer" ref="b23ef1d76c34fe1c2ebbb2f3df5b5676" 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="d15affd67eafcabbd12bd1cd07372994"></a><!-- doxytag: member="tbb::cache_aligned_allocator::const_pointer" ref="d15affd67eafcabbd12bd1cd07372994" 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="e8c4e0d5867a07b1cea21d4fca2998c8"></a><!-- doxytag: member="tbb::cache_aligned_allocator::reference" ref="e8c4e0d5867a07b1cea21d4fca2998c8" 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="d3d77a39f0852c42f80c6505843f450c"></a><!-- doxytag: member="tbb::cache_aligned_allocator::const_reference" ref="d3d77a39f0852c42f80c6505843f450c" 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="90ca6a2979ebee466be771f4c2f9337e"></a><!-- doxytag: member="tbb::cache_aligned_allocator::size_type" ref="90ca6a2979ebee466be771f4c2f9337e" 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="b73eba293d042333f343d025c26751a4"></a><!-- doxytag: member="tbb::cache_aligned_allocator::difference_type" ref="b73eba293d042333f343d025c26751a4" 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="74ccd00a29171ddd61a4ea88cfa49c32"></a><!-- doxytag: member="tbb::cache_aligned_allocator::cache_aligned_allocator" ref="74ccd00a29171ddd61a4ea88cfa49c32" args="(const cache_aligned_allocator &)" -->
- </td><td class="memItemRight" valign="bottom"><b>cache_aligned_allocator</b> (const <a class="el" href="a00100.html">cache_aligned_allocator</a> &)  throw ()</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="de57e731c36a51bf39b458c9b8adee58"></a><!-- doxytag: member="tbb::cache_aligned_allocator::cache_aligned_allocator" ref="de57e731c36a51bf39b458c9b8adee58" args="(const cache_aligned_allocator< U > &)" -->
-template<typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>cache_aligned_allocator</b> (const <a class="el" href="a00100.html">cache_aligned_allocator</a>< U > &)  throw ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="023e0cc7cf6ebde69e1f2c12182eb12b"></a><!-- doxytag: member="tbb::cache_aligned_allocator::address" ref="023e0cc7cf6ebde69e1f2c12182eb12b" 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="db4f7613b1de12d1e79285c15636cf3b"></a><!-- doxytag: member="tbb::cache_aligned_allocator::address" ref="db4f7613b1de12d1e79285c15636cf3b" 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="4cdeea67af6c1fcd8f1d5e9c4cab61e8"></a><!-- doxytag: member="tbb::cache_aligned_allocator::allocate" ref="4cdeea67af6c1fcd8f1d5e9c4cab61e8" args="(size_type n, const void *hint=0)" -->
-pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">allocate</a> (size_type n, const void *hint=0)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate space for n objects, starting on a cache/sector line. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d4eadf188f7d85d3805ae534e0b8e1c"></a><!-- doxytag: member="tbb::cache_aligned_allocator::deallocate" ref="3d4eadf188f7d85d3805ae534e0b8e1c" args="(pointer p, size_type)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a> (pointer p, size_type)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Free block of memory that starts on a cache line. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb23b687b4c0429dab4c7f8017266cf0"></a><!-- doxytag: member="tbb::cache_aligned_allocator::max_size" ref="fb23b687b4c0429dab4c7f8017266cf0" args="() const " -->
-size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#fb23b687b4c0429dab4c7f8017266cf0">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="958ee8745c86c275bfc9533af565e017"></a><!-- doxytag: member="tbb::cache_aligned_allocator::construct" ref="958ee8745c86c275bfc9533af565e017" args="(pointer p, const value_type &value)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#958ee8745c86c275bfc9533af565e017">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="cd298895a4f1654b5149ec84b591ecb5"></a><!-- doxytag: member="tbb::cache_aligned_allocator::destroy" ref="cd298895a4f1654b5149ec84b591ecb5" args="(pointer p)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#cd298895a4f1654b5149ec84b591ecb5">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>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>
- class tbb::cache_aligned_allocator< T ></h3>
-
-Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. 
-<p>
-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="a00203.html">cache_aligned_allocator.h</a></ul>
-<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/a00102.html b/doc/html/a00102.html
deleted file mode 100644
index 7ff3e8f..0000000
--- a/doc/html/a00102.html
+++ /dev/null
@@ -1,148 +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::captured_exception Class 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00102.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="a00289.html">tbb_exception.h</a>></code>
-<p>
-Inherits <a class="el" href="a00138.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="a00068.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="b50d9716bcdd281df574ec758a3952f9"></a><!-- doxytag: member="tbb::captured_exception::captured_exception" ref="b50d9716bcdd281df574ec758a3952f9" args="(const captured_exception &src)" -->
- </td><td class="memItemRight" valign="bottom"><b>captured_exception</b> (const <a class="el" href="a00102.html">captured_exception</a> &src)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2ac89d457be837a19a3d505050f3a4e8"></a><!-- doxytag: member="tbb::captured_exception::captured_exception" ref="2ac89d457be837a19a3d505050f3a4e8" args="(const char *name, const char *info)" -->
- </td><td class="memItemRight" valign="bottom"><b>captured_exception</b> (const char *name, const char *info)</td></tr>
-
-<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="a00102.html">captured_exception</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00102.html">captured_exception</a> &src)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00102.html">captured_exception</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#df6bbb78a362fe862a341e81e2999810">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="a00102.html#667812a82f1525e968c52593dea0ef4c">destroy</a> ()  throw ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys objects created by the <a class="el" href="a00102.html#df6bbb78a362fe862a341e81e2999810">move()</a> method.  <a href="#667812a82f1525e968c52593dea0ef4c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.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>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5af82fd677449c5ca727fa1d7e16f9f5"></a><!-- doxytag: member="tbb::captured_exception::name" ref="5af82fd677449c5ca727fa1d7e16f9f5" args="() const " -->
-const char *__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a> () const   throw ()</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="6b5988ef74a1fe2a58998d110b3633e0"></a><!-- doxytag: member="tbb::captured_exception::what" ref="6b5988ef74a1fe2a58998d110b3633e0" args="() const " -->
-const char *__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00102.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="a00102.html#6b5988ef74a1fe2a58998d110b3633e0">what()</a> method. <br></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="a00138.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="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::captured_exception::destroy           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%">  throw ()<code> [virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Destroys objects created by the <a class="el" href="a00102.html#df6bbb78a362fe862a341e81e2999810">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="a00138.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>.
-</div>
-</div><p>
-<a class="anchor" name="df6bbb78a362fe862a341e81e2999810"></a><!-- doxytag: member="tbb::captured_exception::move" ref="df6bbb78a362fe862a341e81e2999810" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="a00102.html">captured_exception</a>* tbb::captured_exception::move           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%">  throw ()<code> [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>
-Implements <a class="el" href="a00138.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="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::captured_exception::throw_self           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline, 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>
-Implements <a class="el" href="a00138.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="a00289.html">tbb_exception.h</a></ul>
-<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/a00103.html b/doc/html/a00103.html
deleted file mode 100644
index 8036515..0000000
--- a/doc/html/a00103.html
+++ /dev/null
@@ -1,573 +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::concurrent_hash_map< Key, T, HashCompare, A > Class Template 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00103.html">concurrent_hash_map</a></div>
-<h1>tbb::concurrent_hash_map< Key, T, HashCompare, A > Class Template Reference<br>
-<small>
-[<a class="el" href="a00184.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="a00205.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>
-<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1d038ec60c1c2ceed0c72b17cbe0bea9"></a><!-- doxytag: member="tbb::concurrent_hash_map::key_type" ref="1d038ec60c1c2ceed0c72b17cbe0bea9" args="" -->
-typedef Key </td><td class="memItemRight" valign="bottom"><b>key_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6fbae1d8b51f862e56dc56091256eed"></a><!-- doxytag: member="tbb::concurrent_hash_map::mapped_type" ref="a6fbae1d8b51f862e56dc56091256eed" args="" -->
-typedef T </td><td class="memItemRight" valign="bottom"><b>mapped_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b252d006d9ece4104b3c95b633471881"></a><!-- doxytag: member="tbb::concurrent_hash_map::value_type" ref="b252d006d9ece4104b3c95b633471881" args="" -->
-typedef std::pair< const Key,<br>
- T > </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="f598b6335e5bab3e48a30216476f62d0"></a><!-- doxytag: member="tbb::concurrent_hash_map::size_type" ref="f598b6335e5bab3e48a30216476f62d0" 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="df1e3c8848b8d59152f083bc5b00e567"></a><!-- doxytag: member="tbb::concurrent_hash_map::difference_type" ref="df1e3c8848b8d59152f083bc5b00e567" 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="9c05a3e247f0cee405d4b805a1e6a882"></a><!-- doxytag: member="tbb::concurrent_hash_map::pointer" ref="9c05a3e247f0cee405d4b805a1e6a882" 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="4c9f52df29f1d27ade53567eb77b1677"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_pointer" ref="4c9f52df29f1d27ade53567eb77b1677" 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="ab5233c4b1dc7b7002f1316002a85c7c"></a><!-- doxytag: member="tbb::concurrent_hash_map::reference" ref="ab5233c4b1dc7b7002f1316002a85c7c" 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="8bfa9d924148cba008d6a18cebee391e"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_reference" ref="8bfa9d924148cba008d6a18cebee391e" 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="3dcd58d51c60c9c63a652aa0ce6230bb"></a><!-- doxytag: member="tbb::concurrent_hash_map::iterator" ref="3dcd58d51c60c9c63a652aa0ce6230bb" args="" -->
-typedef internal::hash_map_iterator<<br>
- <a class="el" href="a00103.html">concurrent_hash_map</a>, value_type > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="48abcd52da831debc5ece5c4cbd48acd"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_iterator" ref="48abcd52da831debc5ece5c4cbd48acd" args="" -->
-typedef internal::hash_map_iterator<<br>
- <a class="el" href="a00103.html">concurrent_hash_map</a>, const <br>
-value_type > </td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="31e78c64b24e4d917f4ac7097a2f6f15"></a><!-- doxytag: member="tbb::concurrent_hash_map::range_type" ref="31e78c64b24e4d917f4ac7097a2f6f15" args="" -->
-typedef internal::hash_map_range<<br>
- iterator > </td><td class="memItemRight" valign="bottom"><b>range_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d16b749ebee9da332aa40122de0378ba"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_range_type" ref="d16b749ebee9da332aa40122de0378ba" args="" -->
-typedef internal::hash_map_range<<br>
- const_iterator > </td><td class="memItemRight" valign="bottom"><b>const_range_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="110fe1ce2586d68bf7366ee525f9306b"></a><!-- doxytag: member="tbb::concurrent_hash_map::allocator_type" ref="110fe1ce2586d68bf7366ee525f9306b" args="" -->
-typedef A </td><td class="memItemRight" valign="bottom"><b>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="6a65733441a84e3581491eb49e305cf8"></a><!-- doxytag: member="tbb::concurrent_hash_map::concurrent_hash_map" ref="6a65733441a84e3581491eb49e305cf8" args="(const allocator_type &a=allocator_type())" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#6a65733441a84e3581491eb49e305cf8">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="6af4e2b7d2434bc72a645b7e5eb3959f"></a><!-- doxytag: member="tbb::concurrent_hash_map::concurrent_hash_map" ref="6af4e2b7d2434bc72a645b7e5eb3959f" args="(const concurrent_hash_map &table, const allocator_type &a=allocator_type())" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#6af4e2b7d2434bc72a645b7e5eb3959f">concurrent_hash_map</a> (const <a class="el" href="a00103.html">concurrent_hash_map</a> &table, const allocator_type &a=allocator_type())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="51cccc7b42e83884462dcadede034822"></a><!-- doxytag: member="tbb::concurrent_hash_map::concurrent_hash_map" ref="51cccc7b42e83884462dcadede034822" args="(I first, I last, const allocator_type &a=allocator_type())" -->
-template<typename I> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00103.html#51cccc7b42e83884462dcadede034822">concurrent_hash_map</a> (I first, I last, const allocator_type &a=allocator_type())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construction with copying iteration range and given allocator instance. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d70ad33f97ce38d004620580bb1b09ba"></a><!-- doxytag: member="tbb::concurrent_hash_map::operator=" ref="d70ad33f97ce38d004620580bb1b09ba" args="(const concurrent_hash_map &table)" -->
-<a class="el" href="a00103.html">concurrent_hash_map</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#d70ad33f97ce38d004620580bb1b09ba">operator=</a> (const <a class="el" href="a00103.html">concurrent_hash_map</a> &table)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36bcd50fd5383f3682032323b2d74333"></a><!-- doxytag: member="tbb::concurrent_hash_map::clear" ref="36bcd50fd5383f3682032323b2d74333" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#36bcd50fd5383f3682032323b2d74333">clear</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear table. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a683e8db50438b9976e46e7d4f60e65"></a><!-- doxytag: member="tbb::concurrent_hash_map::~concurrent_hash_map" ref="5a683e8db50438b9976e46e7d4f60e65" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#5a683e8db50438b9976e46e7d4f60e65">~concurrent_hash_map</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear table and destroy it. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b1fe150921b1fca793626f9d3c1e7ae6"></a><!-- doxytag: member="tbb::concurrent_hash_map::range" ref="b1fe150921b1fca793626f9d3c1e7ae6" args="(size_type grainsize=1)" -->
-range_type </td><td class="memItemRight" valign="bottom"><b>range</b> (size_type grainsize=1)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4020e7960c644259dd48d0348b83333f"></a><!-- doxytag: member="tbb::concurrent_hash_map::range" ref="4020e7960c644259dd48d0348b83333f" args="(size_type grainsize=1) const " -->
-const_range_type </td><td class="memItemRight" valign="bottom"><b>range</b> (size_type grainsize=1) const </td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb5754d1e138dfe66c6aaf9bce744c9d"></a><!-- doxytag: member="tbb::concurrent_hash_map::begin" ref="fb5754d1e138dfe66c6aaf9bce744c9d" args="()" -->
-iterator </td><td class="memItemRight" valign="bottom"><b>begin</b> ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cf655ff36a5aab4c4d2f26f89394ef0d"></a><!-- doxytag: member="tbb::concurrent_hash_map::end" ref="cf655ff36a5aab4c4d2f26f89394ef0d" args="()" -->
-iterator </td><td class="memItemRight" valign="bottom"><b>end</b> ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8e1ea009f96b7034598caca4fe09103"></a><!-- doxytag: member="tbb::concurrent_hash_map::begin" ref="a8e1ea009f96b7034598caca4fe09103" args="() const " -->
-const_iterator </td><td class="memItemRight" valign="bottom"><b>begin</b> () const </td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1128d0cc01e85ea56ca7ef99ef4a28db"></a><!-- doxytag: member="tbb::concurrent_hash_map::end" ref="1128d0cc01e85ea56ca7ef99ef4a28db" args="() const " -->
-const_iterator </td><td class="memItemRight" valign="bottom"><b>end</b> () const </td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0ee2e81844e9afc18f91f11609fe9a2b"></a><!-- doxytag: member="tbb::concurrent_hash_map::equal_range" ref="0ee2e81844e9afc18f91f11609fe9a2b" args="(const Key &key)" -->
-std::pair< iterator, iterator > </td><td class="memItemRight" valign="bottom"><b>equal_range</b> (const Key &key)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a017126fdc03ad42e37f80f1c68c5a7"></a><!-- doxytag: member="tbb::concurrent_hash_map::equal_range" ref="2a017126fdc03ad42e37f80f1c68c5a7" args="(const Key &key) const " -->
-std::pair< const_iterator,<br>
- const_iterator > </td><td class="memItemRight" valign="bottom"><b>equal_range</b> (const Key &key) const </td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#75bb57a153952ffadfcf2e4c73deabb1">size</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Number of items in table.  <a href="#75bb57a153952ffadfcf2e4c73deabb1"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b9599dd587892366ed31dea23e5c5837"></a><!-- doxytag: member="tbb::concurrent_hash_map::empty" ref="b9599dd587892366ed31dea23e5c5837" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#b9599dd587892366ed31dea23e5c5837">empty</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">True if <a class="el" href="a00103.html#75bb57a153952ffadfcf2e4c73deabb1">size()</a>==0. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62d1fdc2c4d37d84b0dca1cd45f1cf1f"></a><!-- doxytag: member="tbb::concurrent_hash_map::max_size" ref="62d1fdc2c4d37d84b0dca1cd45f1cf1f" args="() const " -->
-size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#62d1fdc2c4d37d84b0dca1cd45f1cf1f">max_size</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Upper bound on size. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="14255f38f7b10bb892b233fce283fbce"></a><!-- doxytag: member="tbb::concurrent_hash_map::get_allocator" ref="14255f38f7b10bb892b233fce283fbce" args="() const " -->
-allocator_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#14255f38f7b10bb892b233fce283fbce">get_allocator</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">return allocator object <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="74990f452286f35ad6aa08cab6c5a8cd"></a><!-- doxytag: member="tbb::concurrent_hash_map::swap" ref="74990f452286f35ad6aa08cab6c5a8cd" args="(concurrent_hash_map &table)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#74990f452286f35ad6aa08cab6c5a8cd">swap</a> (<a class="el" href="a00103.html">concurrent_hash_map</a> &table)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">swap two instances <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="345daf26f2f7e2b4d93382fea80b3a7f"></a><!-- doxytag: member="tbb::concurrent_hash_map::count" ref="345daf26f2f7e2b4d93382fea80b3a7f" args="(const Key &key) const " -->
-size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#345daf26f2f7e2b4d93382fea80b3a7f">count</a> (const Key &key) const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return count of items (0 or 1). <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#ae4b9cb9aa025de8251f90f5f21e9e95">find</a> (<a class="el" href="a00105.html">const_accessor</a> &result, const Key &key) const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Find item and acquire a read lock on the item.  <a href="#ae4b9cb9aa025de8251f90f5f21e9e95"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#68a6bd5b8a0bc2d5066e5eb175fd5ba9">find</a> (<a class="el" href="a00104.html">accessor</a> &result, const Key &key)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Find item and acquire a write lock on the item.  <a href="#68a6bd5b8a0bc2d5066e5eb175fd5ba9"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#2c10a645a8b40c6438c2bb119a61e93b">insert</a> (<a class="el" href="a00105.html">const_accessor</a> &result, const Key &key)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item (if not already present) and acquire a read lock on the item.  <a href="#2c10a645a8b40c6438c2bb119a61e93b"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#da381dd244a7dbad494e1e60743b5afa">insert</a> (<a class="el" href="a00104.html">accessor</a> &result, const Key &key)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item (if not already present) and acquire a write lock on the item.  <a href="#da381dd244a7dbad494e1e60743b5afa"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#7fa987ae247a894ce9f1ca097a919fd4">insert</a> (<a class="el" href="a00105.html">const_accessor</a> &result, const value_type &value)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item by copying if there is no such key present already and acquire a read lock on the item.  <a href="#7fa987ae247a894ce9f1ca097a919fd4"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#2182c693d5898106675b76b443812b47">insert</a> (<a class="el" href="a00104.html">accessor</a> &result, const value_type &value)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item by copying if there is no such key present already and acquire a write lock on the item.  <a href="#2182c693d5898106675b76b443812b47"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#70017dbe0ebbe8c83b9740cd54a6b7e0">insert</a> (const value_type &value)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item by copying if there is no such key present already.  <a href="#70017dbe0ebbe8c83b9740cd54a6b7e0"></a><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="06a95a56a40fcbdf3897051d22aaab19"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="06a95a56a40fcbdf3897051d22aaab19" args="(I first, I last)" -->
-template<typename I> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00103.html#06a95a56a40fcbdf3897051d22aaab19">insert</a> (I first, I last)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert range [first, last). <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#58df7a1e4373c55eb4c2fa9dc69516b1">erase</a> (const Key &key)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Erase item.  <a href="#58df7a1e4373c55eb4c2fa9dc69516b1"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#cc090be8a6c0a3765360ec363cf2474e">erase</a> (<a class="el" href="a00105.html">const_accessor</a> &item_accessor)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Erase item by <a class="el" href="a00105.html">const_accessor</a>.  <a href="#cc090be8a6c0a3765360ec363cf2474e"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00103.html#b5bd8c8f49f8d0e72afedca53caa6b15">erase</a> (<a class="el" href="a00104.html">accessor</a> &item_accessor)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Erase item by accessor.  <a href="#b5bd8c8f49f8d0e72afedca53caa6b15"></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="e24acd2f6849db3377a3942807639758"></a><!-- doxytag: member="tbb::concurrent_hash_map::internal::hash_map_iterator" ref="e24acd2f6849db3377a3942807639758" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::hash_map_iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c94f21746c8902f7e0b5115a8d4da1d2"></a><!-- doxytag: member="tbb::concurrent_hash_map::internal::hash_map_range" ref="c94f21746c8902f7e0b5115a8d4da1d2" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::hash_map_range</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9dc77e04783fa7a1f011a855aaef4b4d"></a><!-- doxytag: member="tbb::concurrent_hash_map::node" ref="9dc77e04783fa7a1f011a855aaef4b4d" args="" -->
-struct </td><td class="memItemRight" valign="bottom"><b>node</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c0028dfa75a6baa14007355ab1ef7fc"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor" ref="2c0028dfa75a6baa14007355ab1ef7fc" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>const_accessor</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b5c8768cb80985347e4880fd00e50995"></a><!-- doxytag: member="tbb::concurrent_hash_map::chain" ref="b5c8768cb80985347e4880fd00e50995" args="" -->
-struct </td><td class="memItemRight" valign="bottom"><b>chain</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cf6a83ad8a91ce6aafcdf46300746c09"></a><!-- doxytag: member="tbb::concurrent_hash_map::segment" ref="cf6a83ad8a91ce6aafcdf46300746c09" args="" -->
-struct </td><td class="memItemRight" valign="bottom"><b>segment</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="a00104.html">accessor</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Allows write access to elements and combines data access, locking, and garbage collection.  <a href="a00104.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>chain</b></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A linked-list of nodes. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00105.html">const_accessor</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Combines data access, locking, and garbage collection.  <a href="a00105.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>node</b></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Basic unit of storage used in chain. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>segment</b></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Segment of the table. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename Key, typename T, typename HashCompare, typename A><br>
- class tbb::concurrent_hash_map< Key, T, HashCompare, A ></h3>
-
-Unordered map from Key to T. 
-<p>
-<a class="el" href="a00103.html">concurrent_hash_map</a> is associative container with concurrent access.<p>
-<dl compact><dt><b>Compatibility</b></dt><dd>The class meets all Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1).</dd></dl>
-<dl compact><dt><b>Exception Safety</b></dt><dd><ul>
-<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="a00103.html#2c10a645a8b40c6438c2bb119a61e93b">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="a00103.html#d70ad33f97ce38d004620580bb1b09ba">operator=()</a> operati [...]
-</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="a00103.html#2c10a645a8b40c6438c2bb119a61e93b">insert()</a> methods</li><li>Added <a class="el" href="a00103.html#14255f38f7b10bb892b233fce283fbce">get_allocator()</a></li><li>Added <a class="el" href="a00103.html#74990f452286f35ad6aa08cab6c5a8cd">swap()</a></li [...]
-</dd></dl>
-
-<p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="b5bd8c8f49f8d0e72afedca53caa6b15"></a><!-- doxytag: member="tbb::concurrent_hash_map::erase" ref="b5bd8c8f49f8d0e72afedca53caa6b15" args="(accessor &item_accessor)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::erase           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00104.html">accessor</a> & </td>
-          <td class="paramname"> <em>item_accessor</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Erase item by accessor. 
-<p>
-Return true if item was erased by particularly this call. 
-</div>
-</div><p>
-<a class="anchor" name="cc090be8a6c0a3765360ec363cf2474e"></a><!-- doxytag: member="tbb::concurrent_hash_map::erase" ref="cc090be8a6c0a3765360ec363cf2474e" args="(const_accessor &item_accessor)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::erase           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00105.html">const_accessor</a> & </td>
-          <td class="paramname"> <em>item_accessor</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Erase item by <a class="el" href="a00105.html">const_accessor</a>. 
-<p>
-Return true if item was erased by particularly this call. 
-</div>
-</div><p>
-<a class="anchor" name="58df7a1e4373c55eb4c2fa9dc69516b1"></a><!-- doxytag: member="tbb::concurrent_hash_map::erase" ref="58df7a1e4373c55eb4c2fa9dc69516b1" args="(const Key &key)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::erase           </td>
-          <td>(</td>
-          <td class="paramtype">const Key & </td>
-          <td class="paramname"> <em>key</em>          </td>
-          <td> ) </td>
-          <td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Erase item. 
-<p>
-Return true if item was erased by particularly this call. 
-</div>
-</div><p>
-<a class="anchor" name="68a6bd5b8a0bc2d5066e5eb175fd5ba9"></a><!-- doxytag: member="tbb::concurrent_hash_map::find" ref="68a6bd5b8a0bc2d5066e5eb175fd5ba9" args="(accessor &result, const Key &key)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::find           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00104.html">accessor</a> & </td>
-          <td class="paramname"> <em>result</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Key & </td>
-          <td class="paramname"> <em>key</em></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>
-Find item and acquire a write lock on the item. 
-<p>
-Return true if item is found, false otherwise. 
-</div>
-</div><p>
-<a class="anchor" name="ae4b9cb9aa025de8251f90f5f21e9e95"></a><!-- doxytag: member="tbb::concurrent_hash_map::find" ref="ae4b9cb9aa025de8251f90f5f21e9e95" args="(const_accessor &result, const Key &key) const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::find           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00105.html">const_accessor</a> & </td>
-          <td class="paramname"> <em>result</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Key & </td>
-          <td class="paramname"> <em>key</em></td><td> </td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td width="100%"> const<code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Find item and acquire a read lock on the item. 
-<p>
-Return true if item is found, false otherwise. 
-</div>
-</div><p>
-<a class="anchor" name="70017dbe0ebbe8c83b9740cd54a6b7e0"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="70017dbe0ebbe8c83b9740cd54a6b7e0" args="(const value_type &value)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
-          <td>(</td>
-          <td class="paramtype">const value_type & </td>
-          <td class="paramname"> <em>value</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Insert item by copying if there is no such key present already. 
-<p>
-Returns true if item is inserted. 
-</div>
-</div><p>
-<a class="anchor" name="2182c693d5898106675b76b443812b47"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="2182c693d5898106675b76b443812b47" args="(accessor &result, const value_type &value)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00104.html">accessor</a> & </td>
-          <td class="paramname"> <em>result</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const value_type & </td>
-          <td class="paramname"> <em>value</em></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>
-Insert item by copying if there is no such key present already and acquire a write lock on the item. 
-<p>
-Returns true if item is new. 
-</div>
-</div><p>
-<a class="anchor" name="7fa987ae247a894ce9f1ca097a919fd4"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="7fa987ae247a894ce9f1ca097a919fd4" args="(const_accessor &result, const value_type &value)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00105.html">const_accessor</a> & </td>
-          <td class="paramname"> <em>result</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const value_type & </td>
-          <td class="paramname"> <em>value</em></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>
-Insert item by copying if there is no such key present already and acquire a read lock on the item. 
-<p>
-Returns true if item is new. 
-</div>
-</div><p>
-<a class="anchor" name="da381dd244a7dbad494e1e60743b5afa"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="da381dd244a7dbad494e1e60743b5afa" args="(accessor &result, const Key &key)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00104.html">accessor</a> & </td>
-          <td class="paramname"> <em>result</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Key & </td>
-          <td class="paramname"> <em>key</em></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>
-Insert item (if not already present) and acquire a write lock on the item. 
-<p>
-Returns true if item is new. 
-</div>
-</div><p>
-<a class="anchor" name="2c10a645a8b40c6438c2bb119a61e93b"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="2c10a645a8b40c6438c2bb119a61e93b" args="(const_accessor &result, const Key &key)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00105.html">const_accessor</a> & </td>
-          <td class="paramname"> <em>result</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Key & </td>
-          <td class="paramname"> <em>key</em></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>
-Insert item (if not already present) and acquire a read lock on the item. 
-<p>
-Returns true if item is new. 
-</div>
-</div><p>
-<a class="anchor" name="75bb57a153952ffadfcf2e4c73deabb1"></a><!-- doxytag: member="tbb::concurrent_hash_map::size" ref="75bb57a153952ffadfcf2e4c73deabb1" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Key, typename T, typename HashCompare, typename A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="a00103.html">concurrent_hash_map</a>< Key, T, HashCompare, A >::size_type <a class="el" href="a00103.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::size           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"> const</td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Number of items in table. 
-<p>
-Be aware that this method is relatively slow compared to the typical <a class="el" href="a00103.html#75bb57a153952ffadfcf2e4c73deabb1">size()</a> method for an STL container. 
-</div>
-</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00205.html">concurrent_hash_map.h</a></ul>
-<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/a00104.html b/doc/html/a00104.html
deleted file mode 100644
index b094f61..0000000
--- a/doc/html/a00104.html
+++ /dev/null
@@ -1,66 +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::concurrent_hash_map< Key, T, HashCompare, A >::accessor Class 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00103.html">concurrent_hash_map</a>::<a class="el" href="a00104.html">accessor</a></div>
-<h1>tbb::concurrent_hash_map< Key, T, HashCompare, A >::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="a00205.html">concurrent_hash_map.h</a>></code>
-<p>
-Inherits <a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>.
-<p>
-Inheritance diagram for tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00015.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="8bc15c9c07f3e21583ab1a4ad0901ce5"></a><!-- doxytag: member="tbb::concurrent_hash_map::accessor::value_type" ref="8bc15c9c07f3e21583ab1a4ad0901ce5" args="" -->
-typedef std::pair< const Key,<br>
- T > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00104.html#8bc15c9c07f3e21583ab1a4ad0901ce5">value_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of value. <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="52334dd5411e7b95635b90527d7d6062"></a><!-- doxytag: member="tbb::concurrent_hash_map::accessor::operator *" ref="52334dd5411e7b95635b90527d7d6062" args="() const " -->
-reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00104.html#52334dd5411e7b95635b90527d7d6062">operator *</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return reference to associated value in hash table. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0fae0495144540e2b011a6530f68f1cb"></a><!-- doxytag: member="tbb::concurrent_hash_map::accessor::operator->" ref="0fae0495144540e2b011a6530f68f1cb" args="() const " -->
-pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00104.html#0fae0495144540e2b011a6530f68f1cb">operator-></a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return pointer to associated value in hash table. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename Key, typename T, typename HashCompare, typename A><br>
- class tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</h3>
-
-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="a00205.html">concurrent_hash_map.h</a></ul>
-<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/a00105.html b/doc/html/a00105.html
deleted file mode 100644
index f4b9498..0000000
--- a/doc/html/a00105.html
+++ /dev/null
@@ -1,89 +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::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor Class 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00103.html">concurrent_hash_map</a>::<a class="el" href="a00105.html">const_accessor</a></div>
-<h1>tbb::concurrent_hash_map< Key, T, HashCompare, A >::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="a00205.html">concurrent_hash_map.h</a>></code>
-<p>
-Inherited by <a class="el" href="a00104.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>.
-<p>
-Inheritance diagram for tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00014.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="b5fe45b58ccc252b8ce70ac6c896c648"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::value_type" ref="b5fe45b58ccc252b8ce70ac6c896c648" args="" -->
-typedef const std::pair< const <br>
-Key, T > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00105.html#b5fe45b58ccc252b8ce70ac6c896c648">value_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of value. <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="38712b9809d23d2fba5e4780bb3c4f18"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::empty" ref="38712b9809d23d2fba5e4780bb3c4f18" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00105.html#38712b9809d23d2fba5e4780bb3c4f18">empty</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">True if result is empty. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c7f3f43eb5f98d8451b2b1d456a4ccd4"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::release" ref="c7f3f43eb5f98d8451b2b1d456a4ccd4" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00105.html#c7f3f43eb5f98d8451b2b1d456a4ccd4">release</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Set to null. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ea4d48e45dd039a2be10178df9336001"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::operator *" ref="ea4d48e45dd039a2be10178df9336001" args="() const " -->
-const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00105.html#ea4d48e45dd039a2be10178df9336001">operator *</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return reference to associated value in hash table. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="def170ba3b18905cd4e9d90f8a9a9cd9"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::operator->" ref="def170ba3b18905cd4e9d90f8a9a9cd9" args="() const " -->
-const_pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00105.html#def170ba3b18905cd4e9d90f8a9a9cd9">operator-></a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return pointer to associated value in hash table. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a73cc49914e218e579eb77d3d9d6551"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::const_accessor" ref="2a73cc49914e218e579eb77d3d9d6551" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00105.html#2a73cc49914e218e579eb77d3d9d6551">const_accessor</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Create empty result. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9b3fdcb8850d6f6dc749b72dbf2d593d"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::~const_accessor" ref="9b3fdcb8850d6f6dc749b72dbf2d593d" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00105.html#9b3fdcb8850d6f6dc749b72dbf2d593d">~const_accessor</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy result after releasing the underlying reference. <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="0a63847bec72abbfedfb62f306e97eb0"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::concurrent_hash_map< Key, T, HashCompare, A >" ref="0a63847bec72abbfedfb62f306e97eb0" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>concurrent_hash_map< Key, T, HashCompare, A ></b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ddd77aff56c12366acc02d0f1588a706"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::accessor" ref="ddd77aff56c12366acc02d0f1588a706" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>accessor</b></td></tr>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename Key, typename T, typename HashCompare, typename A><br>
- class tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</h3>
-
-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="a00205.html">concurrent_hash_map.h</a></ul>
-<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/a00106.html b/doc/html/a00106.html
deleted file mode 100644
index dcda501..0000000
--- a/doc/html/a00106.html
+++ /dev/null
@@ -1,299 +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::concurrent_queue< T, A > Class Template 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00106.html">concurrent_queue</a></div>
-<h1>tbb::concurrent_queue< T, A > Class Template Reference<br>
-<small>
-[<a class="el" href="a00184.html">Containers</a>]</small>
-</h1><!-- doxytag: class="tbb::concurrent_queue" -->A high-performance thread-safe queue.  
-<a href="#_details">More...</a>
-<p>
-<code>#include <<a class="el" href="a00213.html">concurrent_queue.h</a>></code>
-<p>
-<a href="a00019.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="ec587adbe0da968d828c0178b2d863b0"></a><!-- doxytag: member="tbb::concurrent_queue::value_type" ref="ec587adbe0da968d828c0178b2d863b0" args="" -->
-typedef T </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#ec587adbe0da968d828c0178b2d863b0">value_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Element type in the queue. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="94ef8d1e9a05c53e3b637ea5eb553a6d"></a><!-- doxytag: member="tbb::concurrent_queue::allocator_type" ref="94ef8d1e9a05c53e3b637ea5eb553a6d" args="" -->
-typedef A </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocator type. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ea0fab9094080138fef0802125160739"></a><!-- doxytag: member="tbb::concurrent_queue::reference" ref="ea0fab9094080138fef0802125160739" args="" -->
-typedef T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#ea0fab9094080138fef0802125160739">reference</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Reference type. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="981c7c13a4aef3d03f35797ebe214d59"></a><!-- doxytag: member="tbb::concurrent_queue::const_reference" ref="981c7c13a4aef3d03f35797ebe214d59" args="" -->
-typedef const T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#981c7c13a4aef3d03f35797ebe214d59">const_reference</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Const reference type. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Integral type for representing size of the queue.  <a href="#75868c28b0e431caa3ac36404adff4cf"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3c0b5f19b820719ab4f69eeb9bf75afc"></a><!-- doxytag: member="tbb::concurrent_queue::difference_type" ref="3c0b5f19b820719ab4f69eeb9bf75afc" args="" -->
-typedef std::ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#3c0b5f19b820719ab4f69eeb9bf75afc">difference_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Difference type for iterator. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd8de6209faed1f85ccddaeb0967c969"></a><!-- doxytag: member="tbb::concurrent_queue::iterator" ref="bd8de6209faed1f85ccddaeb0967c969" args="" -->
-typedef internal::concurrent_queue_iterator<<br>
- <a class="el" href="a00106.html">concurrent_queue</a>, T > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f9be6cf8c0aea7e7330a6d7c89dec52e"></a><!-- doxytag: member="tbb::concurrent_queue::const_iterator" ref="f9be6cf8c0aea7e7330a6d7c89dec52e" args="" -->
-typedef internal::concurrent_queue_iterator<<br>
- <a class="el" href="a00106.html">concurrent_queue</a>, const T > </td><td class="memItemRight" valign="bottom"><b>const_iterator</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="6a4f9b451ceb08ae82709eef4c8a1a6b"></a><!-- doxytag: member="tbb::concurrent_queue::concurrent_queue" ref="6a4f9b451ceb08ae82709eef4c8a1a6b" args="(const allocator_type &a=allocator_type())" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#6a4f9b451ceb08ae82709eef4c8a1a6b">concurrent_queue</a> (const <a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a> &a=<a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a>())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty queue. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="43480ba7f4ba2401d1213ee23248e4cd"></a><!-- doxytag: member="tbb::concurrent_queue::~concurrent_queue" ref="43480ba7f4ba2401d1213ee23248e4cd" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#43480ba7f4ba2401d1213ee23248e4cd">~concurrent_queue</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy queue. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="28259b68d5ba6cc77abf72b8d7d22e69"></a><!-- doxytag: member="tbb::concurrent_queue::push" ref="28259b68d5ba6cc77abf72b8d7d22e69" args="(const T &source)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#28259b68d5ba6cc77abf72b8d7d22e69">push</a> (const T &source)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Enqueue an item at tail of queue. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#170ab4b57a20f0ff00fb8642d4f55e5c">pop</a> (T &destination)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Dequeue item from head of queue.  <a href="#170ab4b57a20f0ff00fb8642d4f55e5c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#0a91166177c0ceb5a1ddd22827509345">push_if_not_full</a> (const T &source)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Enqueue an item at tail of queue if queue is not already full.  <a href="#0a91166177c0ceb5a1ddd22827509345"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#7088b06d6c226c44a07a310c12176a0c">pop_if_present</a> (T &destination)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Attempt to dequeue an item from head of queue.  <a href="#7088b06d6c226c44a07a310c12176a0c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#94499bca8d540a1927f9368b386dabea">size</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return number of pushes minus number of pops.  <a href="#94499bca8d540a1927f9368b386dabea"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="313c369998b69de6e039b9afb9ca3237"></a><!-- doxytag: member="tbb::concurrent_queue::empty" ref="313c369998b69de6e039b9afb9ca3237" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#313c369998b69de6e039b9afb9ca3237">empty</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Equivalent to <a class="el" href="a00106.html#94499bca8d540a1927f9368b386dabea">size()</a><=0. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="95796a6ad29ea6fe102ac1663a776d07"></a><!-- doxytag: member="tbb::concurrent_queue::capacity" ref="95796a6ad29ea6fe102ac1663a776d07" args="() const " -->
-<a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#95796a6ad29ea6fe102ac1663a776d07">capacity</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum number of allowed elements. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#92977e1eb9af259f3aef69f0181476c1">set_capacity</a> (<a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a> capacity)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the capacity.  <a href="#92977e1eb9af259f3aef69f0181476c1"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="11a088eee45cc1cb0c0b32adadbff92e"></a><!-- doxytag: member="tbb::concurrent_queue::get_allocator" ref="11a088eee45cc1cb0c0b32adadbff92e" args="() const " -->
-<a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#11a088eee45cc1cb0c0b32adadbff92e">get_allocator</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">return allocator object <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8a6a8a7a8d977d86ae8bd254b9794af1"></a><!-- doxytag: member="tbb::concurrent_queue::clear" ref="8a6a8a7a8d977d86ae8bd254b9794af1" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#8a6a8a7a8d977d86ae8bd254b9794af1">clear</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">clear the queue. not thread-safe. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="56807256d19ad4648e6bdc0d824fd7f5"></a><!-- doxytag: member="tbb::concurrent_queue::begin" ref="56807256d19ad4648e6bdc0d824fd7f5" args="()" -->
-iterator </td><td class="memItemRight" valign="bottom"><b>begin</b> ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2a380d0b79ad5c3d4e5926d20a91b07"></a><!-- doxytag: member="tbb::concurrent_queue::end" ref="d2a380d0b79ad5c3d4e5926d20a91b07" args="()" -->
-iterator </td><td class="memItemRight" valign="bottom"><b>end</b> ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f9a10ea93abfae33fc027b6687af05ee"></a><!-- doxytag: member="tbb::concurrent_queue::begin" ref="f9a10ea93abfae33fc027b6687af05ee" args="() const " -->
-const_iterator </td><td class="memItemRight" valign="bottom"><b>begin</b> () const </td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ea317915c17cdb3ff708321364f0ad1f"></a><!-- doxytag: member="tbb::concurrent_queue::end" ref="ea317915c17cdb3ff708321364f0ad1f" args="() const " -->
-const_iterator </td><td class="memItemRight" valign="bottom"><b>end</b> () const </td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a919fd9a3d593dc4c8205a4636a8062e"></a><!-- doxytag: member="tbb::concurrent_queue::concurrent_queue" ref="a919fd9a3d593dc4c8205a4636a8062e" args="(const concurrent_queue &src, const allocator_type &a=allocator_type())" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00106.html#a919fd9a3d593dc4c8205a4636a8062e">concurrent_queue</a> (const <a class="el" href="a00106.html">concurrent_queue</a> &src, const <a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a> &a=<a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a>())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="d3ec1af9c793007ec2ecbdcf637f8ec5"></a><!-- doxytag: member="tbb::concurrent_queue::concurrent_queue" ref="d3ec1af9c793007ec2ecbdcf637f8ec5" args="(InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())" -->
-template<typename InputIterator> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00106.html#d3ec1af9c793007ec2ecbdcf637f8ec5">concurrent_queue</a> (InputIterator begin, InputIterator end, const <a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a> &a=<a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a>())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">[begin,end) 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="05bffad9626d51abbd4bb82ae2a1cceb"></a><!-- doxytag: member="tbb::concurrent_queue::internal::concurrent_queue_iterator" ref="05bffad9626d51abbd4bb82ae2a1cceb" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::concurrent_queue_iterator</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>destroyer</b></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Class used to ensure exception-safety of method "pop". <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename T, class A><br>
- class tbb::concurrent_queue< T, A ></h3>
-
-A high-performance thread-safe queue. 
-<p>
-Multiple threads may each push and pop concurrently. Assignment construction is not allowed. 
-<p>
-<hr><h2>Member Typedef Documentation</h2>
-<a class="anchor" name="75868c28b0e431caa3ac36404adff4cf"></a><!-- doxytag: member="tbb::concurrent_queue::size_type" ref="75868c28b0e431caa3ac36404adff4cf" args="" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef std::ptrdiff_t <a class="el" href="a00106.html">tbb::concurrent_queue</a>< T, A >::<a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Integral type for representing size of the queue. 
-<p>
-Notice that the size_type is a signed integral type. This is because the size can be negative if there are pending pops without corresponding pushes. 
-</div>
-</div><p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="170ab4b57a20f0ff00fb8642d4f55e5c"></a><!-- doxytag: member="tbb::concurrent_queue::pop" ref="170ab4b57a20f0ff00fb8642d4f55e5c" args="(T &destination)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">void <a class="el" href="a00106.html">tbb::concurrent_queue</a>< T, A >::pop           </td>
-          <td>(</td>
-          <td class="paramtype">T & </td>
-          <td class="paramname"> <em>destination</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Dequeue item from head of queue. 
-<p>
-Block until an item becomes available, and then dequeue it. 
-</div>
-</div><p>
-<a class="anchor" name="7088b06d6c226c44a07a310c12176a0c"></a><!-- doxytag: member="tbb::concurrent_queue::pop_if_present" ref="7088b06d6c226c44a07a310c12176a0c" args="(T &destination)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00106.html">tbb::concurrent_queue</a>< T, A >::pop_if_present           </td>
-          <td>(</td>
-          <td class="paramtype">T & </td>
-          <td class="paramname"> <em>destination</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Attempt to dequeue an item from head of queue. 
-<p>
-Does not wait for item to become available. Returns true if successful; false otherwise. 
-</div>
-</div><p>
-<a class="anchor" name="0a91166177c0ceb5a1ddd22827509345"></a><!-- doxytag: member="tbb::concurrent_queue::push_if_not_full" ref="0a91166177c0ceb5a1ddd22827509345" args="(const T &source)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">bool <a class="el" href="a00106.html">tbb::concurrent_queue</a>< T, A >::push_if_not_full           </td>
-          <td>(</td>
-          <td class="paramtype">const T & </td>
-          <td class="paramname"> <em>source</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Enqueue an item at tail of queue if queue is not already full. 
-<p>
-Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full. 
-</div>
-</div><p>
-<a class="anchor" name="92977e1eb9af259f3aef69f0181476c1"></a><!-- doxytag: member="tbb::concurrent_queue::set_capacity" ref="92977e1eb9af259f3aef69f0181476c1" args="(size_type capacity)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">void <a class="el" href="a00106.html">tbb::concurrent_queue</a>< T, A >::set_capacity           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a> </td>
-          <td class="paramname"> <em>capacity</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Set the capacity. 
-<p>
-Setting the capacity to 0 causes subsequent push_if_not_full operations to always fail, and subsequent push operations to block forever. 
-</div>
-</div><p>
-<a class="anchor" name="94499bca8d540a1927f9368b386dabea"></a><!-- doxytag: member="tbb::concurrent_queue::size" ref="94499bca8d540a1927f9368b386dabea" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a> <a class="el" href="a00106.html">tbb::concurrent_queue</a>< T, A >::size           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"> const<code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Return number of pushes minus number of pops. 
-<p>
-Note that the result can be negative if there are pops waiting for the corresponding pushes. The result can also exceed <a class="el" href="a00106.html#95796a6ad29ea6fe102ac1663a776d07">capacity()</a> if there are push operations in flight. 
-</div>
-</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00213.html">concurrent_queue.h</a></ul>
-<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/a00107.html b/doc/html/a00107.html
deleted file mode 100644
index d114890..0000000
--- a/doc/html/a00107.html
+++ /dev/null
@@ -1,438 +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::concurrent_vector< T, A > Class Template 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00107.html">concurrent_vector</a></div>
-<h1>tbb::concurrent_vector< T, A > Class Template Reference<br>
-<small>
-[<a class="el" href="a00184.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="a00219.html">concurrent_vector.h</a>></code>
-<p>
-<a href="a00021.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="bc85684238d4bb5e422cb8ea0bdc438f"></a><!-- doxytag: member="tbb::concurrent_vector::size_type" ref="bc85684238d4bb5e422cb8ea0bdc438f" args="" -->
-typedef internal::concurrent_vector_base_v3::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="ac7083635ab59834e9afc15e6c168df5"></a><!-- doxytag: member="tbb::concurrent_vector::allocator_type" ref="ac7083635ab59834e9afc15e6c168df5" args="" -->
-typedef internal::allocator_base<<br>
- T, A >::allocator_type </td><td class="memItemRight" valign="bottom"><b>allocator_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4543d7d45b2e461d3f8ef416974ec1f1"></a><!-- doxytag: member="tbb::concurrent_vector::value_type" ref="4543d7d45b2e461d3f8ef416974ec1f1" args="" -->
-typedef T </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="e655e67dd14ed6d0cbfe7981d5fa350e"></a><!-- doxytag: member="tbb::concurrent_vector::difference_type" ref="e655e67dd14ed6d0cbfe7981d5fa350e" 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="8c29033785d76e240ea96ae40610275d"></a><!-- doxytag: member="tbb::concurrent_vector::reference" ref="8c29033785d76e240ea96ae40610275d" args="" -->
-typedef T & </td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0b2a6241ab3fa9ab4f4074893fecd47"></a><!-- doxytag: member="tbb::concurrent_vector::const_reference" ref="b0b2a6241ab3fa9ab4f4074893fecd47" args="" -->
-typedef const T & </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="74319c908a32d5dcdc6a080f9c2b8803"></a><!-- doxytag: member="tbb::concurrent_vector::pointer" ref="74319c908a32d5dcdc6a080f9c2b8803" args="" -->
-typedef T * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd80729019220cdb80872ea6b905ffb1"></a><!-- doxytag: member="tbb::concurrent_vector::const_pointer" ref="dd80729019220cdb80872ea6b905ffb1" args="" -->
-typedef const T * </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="a049674e7f386de3ea09ff2ed6d6bbbe"></a><!-- doxytag: member="tbb::concurrent_vector::iterator" ref="a049674e7f386de3ea09ff2ed6d6bbbe" args="" -->
-typedef internal::vector_iterator<<br>
- <a class="el" href="a00107.html">concurrent_vector</a>, T > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b51a1baa7da67e283806c0d4f2fe9c69"></a><!-- doxytag: member="tbb::concurrent_vector::const_iterator" ref="b51a1baa7da67e283806c0d4f2fe9c69" args="" -->
-typedef internal::vector_iterator<<br>
- <a class="el" href="a00107.html">concurrent_vector</a>, const <br>
-T > </td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c7e4d252bef7af22286041c39c62abe"></a><!-- doxytag: member="tbb::concurrent_vector::reverse_iterator" ref="2c7e4d252bef7af22286041c39c62abe" args="" -->
-typedef std::reverse_iterator<<br>
- iterator > </td><td class="memItemRight" valign="bottom"><b>reverse_iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c59c3f9412b666a31a9052b789fb58bc"></a><!-- doxytag: member="tbb::concurrent_vector::const_reverse_iterator" ref="c59c3f9412b666a31a9052b789fb58bc" args="" -->
-typedef std::reverse_iterator<<br>
- const_iterator > </td><td class="memItemRight" valign="bottom"><b>const_reverse_iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c3901b092e9e8185bdc3cae5913e625"></a><!-- doxytag: member="tbb::concurrent_vector::reverse_iterator" ref="0c3901b092e9e8185bdc3cae5913e625" args="" -->
-typedef std::reverse_iterator<<br>
- iterator, T, T &, T * > </td><td class="memItemRight" valign="bottom"><b>reverse_iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="426145d7bd5913bc08e701c14b221046"></a><!-- doxytag: member="tbb::concurrent_vector::const_reverse_iterator" ref="426145d7bd5913bc08e701c14b221046" args="" -->
-typedef std::reverse_iterator<<br>
- const_iterator, T, const <br>
-T &, const T * > </td><td class="memItemRight" valign="bottom"><b>const_reverse_iterator</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="61fd90288dba6f8808d6dafe9a249ec5"></a><!-- doxytag: member="tbb::concurrent_vector::range_type" ref="61fd90288dba6f8808d6dafe9a249ec5" args="" -->
-typedef generic_range_type<<br>
- iterator > </td><td class="memItemRight" valign="bottom"><b>range_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d6ddf0312a820a98efd9a5f394cb9dbd"></a><!-- doxytag: member="tbb::concurrent_vector::const_range_type" ref="d6ddf0312a820a98efd9a5f394cb9dbd" args="" -->
-typedef generic_range_type<<br>
- const_iterator > </td><td class="memItemRight" valign="bottom"><b>const_range_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="2c8ca9cabfcd30ad5943324c853664b5"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="2c8ca9cabfcd30ad5943324c853664b5" args="(const allocator_type &a=allocator_type())" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#2c8ca9cabfcd30ad5943324c853664b5">concurrent_vector</a> (const allocator_type &a=allocator_type())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty vector. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd8a200b99a8088435a37934b58fe335"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="dd8a200b99a8088435a37934b58fe335" args="(const concurrent_vector &vector, const allocator_type &a=allocator_type())" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#dd8a200b99a8088435a37934b58fe335">concurrent_vector</a> (const <a class="el" href="a00107.html">concurrent_vector</a> &vector, const allocator_type &a=allocator_type())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Copying constructor. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="64432f13f7b29bfe4acfb5568f34f3a8"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="64432f13f7b29bfe4acfb5568f34f3a8" args="(const concurrent_vector< T, M > &vector, const allocator_type &a=allocator_type())" -->
-template<class M> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00107.html#64432f13f7b29bfe4acfb5568f34f3a8">concurrent_vector</a> (const <a class="el" href="a00107.html">concurrent_vector</a>< T, M > &vector, const allocator_type &a=allocator_type())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Copying constructor for vector with different allocator type. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a2e261dfe1cab3f73f7b1a94137cfca"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="2a2e261dfe1cab3f73f7b1a94137cfca" args="(size_type n)" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#2a2e261dfe1cab3f73f7b1a94137cfca">concurrent_vector</a> (size_type n)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construction with initial size specified by argument n. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3883a8a908b44e249a57f454de3f55d8"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="3883a8a908b44e249a57f454de3f55d8" args="(size_type n, const_reference t, const allocator_type &a=allocator_type())" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#3883a8a908b44e249a57f454de3f55d8">concurrent_vector</a> (size_type n, const_reference t, const allocator_type &a=allocator_type())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="4450de83c5862ea4bcd9443fd7e67419"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="4450de83c5862ea4bcd9443fd7e67419" args="(I first, I last, const allocator_type &a=allocator_type())" -->
-template<class I> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00107.html#4450de83c5862ea4bcd9443fd7e67419">concurrent_vector</a> (I first, I last, const allocator_type &a=allocator_type())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construction with copying iteration range and given allocator instance. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="691f0f3cda3e489c37a657016e375eaf"></a><!-- doxytag: member="tbb::concurrent_vector::operator=" ref="691f0f3cda3e489c37a657016e375eaf" args="(const concurrent_vector &vector)" -->
-<a class="el" href="a00107.html">concurrent_vector</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#691f0f3cda3e489c37a657016e375eaf">operator=</a> (const <a class="el" href="a00107.html">concurrent_vector</a> &vector)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="19f4ab88a01b0fd056af3bba463e7bd6"></a><!-- doxytag: member="tbb::concurrent_vector::operator=" ref="19f4ab88a01b0fd056af3bba463e7bd6" args="(const concurrent_vector< T, M > &vector)" -->
-template<class M> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00107.html">concurrent_vector</a> & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00107.html#19f4ab88a01b0fd056af3bba463e7bd6">operator=</a> (const <a class="el" href="a00107.html">concurrent_vector</a>< T, M > &vector)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment for vector with different allocator type. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#30484e3959892fd5392fa93c873c31f0">grow_by</a> (size_type delta)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Grow by "delta" elements.  <a href="#30484e3959892fd5392fa93c873c31f0"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#38274ab3f772ecba600c7daca7690102">grow_by</a> (size_type delta, const_reference t)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Grow by "delta" elements using copying constuctor.  <a href="#38274ab3f772ecba600c7daca7690102"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="47fe588214dd5fa06ab6e8ab78d83874"></a><!-- doxytag: member="tbb::concurrent_vector::grow_to_at_least" ref="47fe588214dd5fa06ab6e8ab78d83874" args="(size_type n)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#47fe588214dd5fa06ab6e8ab78d83874">grow_to_at_least</a> (size_type n)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Grow array until it has at least n elements. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0087c0f58b49e43b6322ff1ec0bc98d"></a><!-- doxytag: member="tbb::concurrent_vector::push_back" ref="e0087c0f58b49e43b6322ff1ec0bc98d" args="(const_reference item)" -->
-size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#e0087c0f58b49e43b6322ff1ec0bc98d">push_back</a> (const_reference item)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Push item. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#4c52f2950bb1832886bd4458eb09d7eb">operator[]</a> (size_type index)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Get reference to element at given index.  <a href="#4c52f2950bb1832886bd4458eb09d7eb"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6fade5c732cc95274d1d8277ea619d1"></a><!-- doxytag: member="tbb::concurrent_vector::operator[]" ref="c6fade5c732cc95274d1d8277ea619d1" args="(size_type index) const " -->
-const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#c6fade5c732cc95274d1d8277ea619d1">operator[]</a> (size_type index) const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Get const reference to element at given index. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c073ca43e787c7cbf7b0e26d2221748"></a><!-- doxytag: member="tbb::concurrent_vector::at" ref="0c073ca43e787c7cbf7b0e26d2221748" args="(size_type index)" -->
-reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#0c073ca43e787c7cbf7b0e26d2221748">at</a> (size_type index)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Get reference to element at given index. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="23e14a38af748edff96a7adc3a0f1c58"></a><!-- doxytag: member="tbb::concurrent_vector::at" ref="23e14a38af748edff96a7adc3a0f1c58" args="(size_type index) const " -->
-const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#23e14a38af748edff96a7adc3a0f1c58">at</a> (size_type index) const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Get const reference to element at given index. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4c6ffff3bf08b92939aa2fc516edfba"></a><!-- doxytag: member="tbb::concurrent_vector::range" ref="a4c6ffff3bf08b92939aa2fc516edfba" args="(size_t grainsize=1)" -->
-range_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#a4c6ffff3bf08b92939aa2fc516edfba">range</a> (size_t grainsize=1)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Get range for iterating with parallel algorithms. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d09ccfb581b879ae64203741035e193"></a><!-- doxytag: member="tbb::concurrent_vector::range" ref="3d09ccfb581b879ae64203741035e193" args="(size_t grainsize=1) const " -->
-const_range_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#3d09ccfb581b879ae64203741035e193">range</a> (size_t grainsize=1) const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Get const range for iterating with parallel algorithms. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="715fe313c4a9c22731cc404dd80c9ec9"></a><!-- doxytag: member="tbb::concurrent_vector::size" ref="715fe313c4a9c22731cc404dd80c9ec9" args="() const " -->
-size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#715fe313c4a9c22731cc404dd80c9ec9">size</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return size of vector. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6426cb93cf20d3af40f3c90f1f0481a"></a><!-- doxytag: member="tbb::concurrent_vector::empty" ref="c6426cb93cf20d3af40f3c90f1f0481a" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#c6426cb93cf20d3af40f3c90f1f0481a">empty</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return size of vector. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ed6b9ae7217af5103d974045b6f5cd5"></a><!-- doxytag: member="tbb::concurrent_vector::capacity" ref="3ed6b9ae7217af5103d974045b6f5cd5" args="() const " -->
-size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#3ed6b9ae7217af5103d974045b6f5cd5">capacity</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum size to which array can grow without allocating more memory. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#5a0ce05026994b010018f72cfdeb72c1">reserve</a> (size_type n)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate enough space to grow to size n without having to allocate more memory later.  <a href="#5a0ce05026994b010018f72cfdeb72c1"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1693d1da41b1a8235871be9c6633be35"></a><!-- doxytag: member="tbb::concurrent_vector::compact" ref="1693d1da41b1a8235871be9c6633be35" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#1693d1da41b1a8235871be9c6633be35">compact</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Optimize memory usage and fragmentation. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c248a017f0576df3e7cd99627836fd6"></a><!-- doxytag: member="tbb::concurrent_vector::max_size" ref="2c248a017f0576df3e7cd99627836fd6" args="() const " -->
-size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#2c248a017f0576df3e7cd99627836fd6">max_size</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Upper bound on argument to reserve. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="730b23a251ecb6d37f692fb22f38e029"></a><!-- doxytag: member="tbb::concurrent_vector::begin" ref="730b23a251ecb6d37f692fb22f38e029" args="()" -->
-iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#730b23a251ecb6d37f692fb22f38e029">begin</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">start iterator <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c0b51160e5a764982ec97a455f94f2c6"></a><!-- doxytag: member="tbb::concurrent_vector::end" ref="c0b51160e5a764982ec97a455f94f2c6" args="()" -->
-iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#c0b51160e5a764982ec97a455f94f2c6">end</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">end iterator <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="78a06182276ff758788d4c0623ae0d71"></a><!-- doxytag: member="tbb::concurrent_vector::begin" ref="78a06182276ff758788d4c0623ae0d71" args="() const " -->
-const_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#78a06182276ff758788d4c0623ae0d71">begin</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">start const iterator <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1e6aa764ce5a1cbd24526f68bc0a2f6b"></a><!-- doxytag: member="tbb::concurrent_vector::end" ref="1e6aa764ce5a1cbd24526f68bc0a2f6b" args="() const " -->
-const_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">end</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">end const iterator <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5e220926d09236d98f04fe0721e5f9a1"></a><!-- doxytag: member="tbb::concurrent_vector::rbegin" ref="5e220926d09236d98f04fe0721e5f9a1" args="()" -->
-reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#5e220926d09236d98f04fe0721e5f9a1">rbegin</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse start iterator <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="290119a4eb43cd6a9e98fa17016ba3c2"></a><!-- doxytag: member="tbb::concurrent_vector::rend" ref="290119a4eb43cd6a9e98fa17016ba3c2" args="()" -->
-reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#290119a4eb43cd6a9e98fa17016ba3c2">rend</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse end iterator <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9f9c103e18d5f212703805354074ad44"></a><!-- doxytag: member="tbb::concurrent_vector::rbegin" ref="9f9c103e18d5f212703805354074ad44" args="() const " -->
-const_reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#9f9c103e18d5f212703805354074ad44">rbegin</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse start const iterator <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d438b9b32ea3a8ffb703015b6dce055b"></a><!-- doxytag: member="tbb::concurrent_vector::rend" ref="d438b9b32ea3a8ffb703015b6dce055b" args="() const " -->
-const_reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#d438b9b32ea3a8ffb703015b6dce055b">rend</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse end const iterator <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="15181759c0bfa2ddce5d10c7550e0002"></a><!-- doxytag: member="tbb::concurrent_vector::front" ref="15181759c0bfa2ddce5d10c7550e0002" args="()" -->
-reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#15181759c0bfa2ddce5d10c7550e0002">front</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">the first item <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="502615a858eb9fa0390ee59169065e90"></a><!-- doxytag: member="tbb::concurrent_vector::front" ref="502615a858eb9fa0390ee59169065e90" args="() const " -->
-const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#502615a858eb9fa0390ee59169065e90">front</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">the first item const <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="41ce48d6015a1a2812d41cf620ec3476"></a><!-- doxytag: member="tbb::concurrent_vector::back" ref="41ce48d6015a1a2812d41cf620ec3476" args="()" -->
-reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#41ce48d6015a1a2812d41cf620ec3476">back</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">the last item <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd518e204107d07fd08d0ec5bdfd383d"></a><!-- doxytag: member="tbb::concurrent_vector::back" ref="bd518e204107d07fd08d0ec5bdfd383d" args="() const " -->
-const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#bd518e204107d07fd08d0ec5bdfd383d">back</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">the last item const <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2fdba8e90de6a4d2300222236d46758e"></a><!-- doxytag: member="tbb::concurrent_vector::get_allocator" ref="2fdba8e90de6a4d2300222236d46758e" args="() const " -->
-allocator_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#2fdba8e90de6a4d2300222236d46758e">get_allocator</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">return allocator object <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="423e5aa15e0e3309ad86d026fd85f6f6"></a><!-- doxytag: member="tbb::concurrent_vector::assign" ref="423e5aa15e0e3309ad86d026fd85f6f6" args="(size_type n, const_reference t)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#423e5aa15e0e3309ad86d026fd85f6f6">assign</a> (size_type n, const_reference t)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">assign n items by copying t item <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="93a06b3112cb804f42f40efb5e7387b4"></a><!-- doxytag: member="tbb::concurrent_vector::assign" ref="93a06b3112cb804f42f40efb5e7387b4" args="(I first, I last)" -->
-template<class I> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00107.html#93a06b3112cb804f42f40efb5e7387b4">assign</a> (I first, I last)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">assign range [first, last) <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="96c9c4bd968ed3edb8dd276854d2dae0"></a><!-- doxytag: member="tbb::concurrent_vector::swap" ref="96c9c4bd968ed3edb8dd276854d2dae0" args="(concurrent_vector &vector)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#96c9c4bd968ed3edb8dd276854d2dae0">swap</a> (<a class="el" href="a00107.html">concurrent_vector</a> &vector)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">swap two instances <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#26f937a359a66b6aae904c3cd9a3c444">clear</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear container while keeping memory allocated.  <a href="#26f937a359a66b6aae904c3cd9a3c444"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="da2444b28bb840d38f60d0030333a5fc"></a><!-- doxytag: member="tbb::concurrent_vector::~concurrent_vector" ref="da2444b28bb840d38f60d0030333a5fc" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#da2444b28bb840d38f60d0030333a5fc">~concurrent_vector</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear and destroy vector. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb5ae659871478f1f5c68039e1273e12"></a><!-- doxytag: member="tbb::concurrent_vector::internal_vector_base" ref="bb5ae659871478f1f5c68039e1273e12" args="() const " -->
-const internal::concurrent_vector_base_v3 & </td><td class="memItemRight" valign="bottom"><b>internal_vector_base</b> () const </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="30086a58bff79a91103723be20916b96"></a><!-- doxytag: member="tbb::concurrent_vector::internal::vector_iterator" ref="30086a58bff79a91103723be20916b96" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::vector_iterator</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>generic_range_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>internal_loop_guide</b></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Exception-aware helper class for filling a segment by exception-danger operators of user class. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename T, class A><br>
- class tbb::concurrent_vector< T, A ></h3>
-
-Concurrent vector container. 
-<p>
-<a class="el" href="a00107.html">concurrent_vector</a> is a container having the following main properties:<ul>
-<li>It provides random indexed access to its elements. The index of the first element is 0.</li><li>It ensures safe concurrent growing its size (different threads can safely append new elements).</li><li>Adding new elements does not invalidate existing iterators and does not change indices of existing items.</li></ul>
-<p>
-<dl compact><dt><b>Compatibility</b></dt><dd>The class meets all Container Requirements and Reversible Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). But it doesn't meet Sequence Requirements due to absence of insert() and erase() methods.</dd></dl>
-<dl compact><dt><b>Exception Safety</b></dt><dd>Methods working with memory allocation and/or new elements construction can throw an exception if allocator fails to allocate memory or element's default constructor throws one. Concurrent vector's element of type T must conform to the following requirements:<ul>
-<li>Throwing an exception is forbidden for destructor of T.</li><li>Default constructor of T must not throw an exception OR its non-virtual destructor must safely work when its object memory is zero-initialized.</li></ul>
-Otherwise, the program's behavior is undefined. </dd></dl>
-<dl compact><dt><b></b></dt><dd>If an exception happens inside growth or assignment operation, an instance of the vector becomes invalid unless it is stated otherwise in the method documentation. Invalid state means:<ul>
-<li>There are no guaranties that all items were initialized by a constructor. The rest of items is zero-filled, including item where exception happens.</li><li>An invalid vector instance cannot be repaired; it is unable to grow anymore.</li><li>Size and capacity reported by the vector are incorrect, and calculated as if the failed operation were successful.</li><li>Attempt to access not allocated elements using operator[] or iterators results in access violation or segmentation fault exc [...]
-If a concurrent grow operation successfully completes, all the elements it has added to the vector will remain valid and accessible even if one of subsequent grow operations fails.</dd></dl>
-<dl compact><dt><b>Fragmentation</b></dt><dd>Unlike an STL vector, a <a class="el" href="a00107.html">concurrent_vector</a> does not move existing elements if it needs to allocate more memory. The container is divided into a series of contiguous arrays of elements. The first reservation, growth, or assignment operation determines the size of the first array. Using small number of elements as initial size incurs fragmentation that may increase element access time. Internal layout can be o [...]
-<dl compact><dt><b>Changes since TBB 2.0</b></dt><dd><ul>
-<li>Implemented exception-safety guaranties</li><li>Added template argument for allocator</li><li>Added allocator argument in constructors</li><li>Faster index calculation</li><li>First growth call specifies a number of segments to be merged in the first allocation.</li><li>Fixed memory blow up for swarm of vector's instances of small size</li><li>Added <a class="el" href="a00107.html#38274ab3f772ecba600c7daca7690102">grow_by(size_type n, const_reference t)</a> growth using copying const [...]
-</dd></dl>
-
-<p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="26f937a359a66b6aae904c3cd9a3c444"></a><!-- doxytag: member="tbb::concurrent_vector::clear" ref="26f937a359a66b6aae904c3cd9a3c444" args="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">void <a class="el" href="a00107.html">tbb::concurrent_vector</a>< T, A >::clear           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Clear container while keeping memory allocated. 
-<p>
-To free up the memory, use in conjunction with method <a class="el" href="a00107.html#1693d1da41b1a8235871be9c6633be35">compact()</a>. Not thread safe 
-</div>
-</div><p>
-<a class="anchor" name="38274ab3f772ecba600c7daca7690102"></a><!-- doxytag: member="tbb::concurrent_vector::grow_by" ref="38274ab3f772ecba600c7daca7690102" args="(size_type delta, const_reference t)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">size_type <a class="el" href="a00107.html">tbb::concurrent_vector</a>< T, A >::grow_by           </td>
-          <td>(</td>
-          <td class="paramtype">size_type </td>
-          <td class="paramname"> <em>delta</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const_reference </td>
-          <td class="paramname"> <em>t</em></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>
-Grow by "delta" elements using copying constuctor. 
-<p>
-Returns old size. 
-</div>
-</div><p>
-<a class="anchor" name="30484e3959892fd5392fa93c873c31f0"></a><!-- doxytag: member="tbb::concurrent_vector::grow_by" ref="30484e3959892fd5392fa93c873c31f0" args="(size_type delta)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">size_type <a class="el" href="a00107.html">tbb::concurrent_vector</a>< T, A >::grow_by           </td>
-          <td>(</td>
-          <td class="paramtype">size_type </td>
-          <td class="paramname"> <em>delta</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Grow by "delta" elements. 
-<p>
-Returns old size. 
-</div>
-</div><p>
-<a class="anchor" name="4c52f2950bb1832886bd4458eb09d7eb"></a><!-- doxytag: member="tbb::concurrent_vector::operator[]" ref="4c52f2950bb1832886bd4458eb09d7eb" args="(size_type index)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">reference <a class="el" href="a00107.html">tbb::concurrent_vector</a>< T, A >::operator[]           </td>
-          <td>(</td>
-          <td class="paramtype">size_type </td>
-          <td class="paramname"> <em>index</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Get reference to element at given index. 
-<p>
-This method is thread-safe for concurrent reads, and also while growing the vector, as long as the calling thread has checked that index<<a class="el" href="a00107.html#715fe313c4a9c22731cc404dd80c9ec9">size()</a>. 
-</div>
-</div><p>
-<a class="anchor" name="5a0ce05026994b010018f72cfdeb72c1"></a><!-- doxytag: member="tbb::concurrent_vector::reserve" ref="5a0ce05026994b010018f72cfdeb72c1" args="(size_type n)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename T, class A> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">void <a class="el" href="a00107.html">tbb::concurrent_vector</a>< T, A >::reserve           </td>
-          <td>(</td>
-          <td class="paramtype">size_type </td>
-          <td class="paramname"> <em>n</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Allocate enough space to grow to size n without having to allocate more memory later. 
-<p>
-Like most of the methods provided for STL compatibility, this method is *not* thread safe. The capacity afterwards may be bigger than the requested reservation. 
-</div>
-</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00219.html">concurrent_vector.h</a></ul>
-<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/a00108.html b/doc/html/a00108.html
deleted file mode 100644
index 1779085..0000000
--- a/doc/html/a00108.html
+++ /dev/null
@@ -1,51 +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::empty_task Class 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00108.html">empty_task</a></div>
-<h1>tbb::empty_task Class Reference<br>
-<small>
-[<a class="el" href="a00188.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="a00276.html">task.h</a>></code>
-<p>
-Inherits <a class="el" href="a00132.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="a00058.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-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="a00276.html">task.h</a></ul>
-<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/a00109.html b/doc/html/a00109.html
deleted file mode 100644
index 3ff60af..0000000
--- a/doc/html/a00109.html
+++ /dev/null
@@ -1,194 +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::filter Class 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00109.html">filter</a></div>
-<h1>tbb::filter Class Reference<br>
-<small>
-[<a class="el" href="a00183.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="a00269.html">pipeline.h</a>></code>
-<p>
-<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 Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a> = current_version | filter_is_out_of_order</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">processes multiple items in parallel and in no particular order  <a href="#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">serial_in_order</a> = current_version | filter_is_serial</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">processes items one at a time; all such filters process items in the same order  <a href="#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">serial_out_of_order</a> = current_version | filter_is_serial | filter_is_out_of_order</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">processes items one at a time and in no particular order  <a href="#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> = serial_in_order</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> { <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a> =  current_version | filter_is_out_of_order, 
-<a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">serial_in_order</a> =  current_version | filter_is_serial, 
-<a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">serial_out_of_order</a> =  current_version | filter_is_serial | filter_is_out_of_order, 
-<a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> =  serial_in_order
- }</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="fcfec27656a69ff2072802ac001e936f"></a><!-- doxytag: member="tbb::filter::is_serial" ref="fcfec27656a69ff2072802ac001e936f" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00109.html#fcfec27656a69ff2072802ac001e936f">is_serial</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">True if filter is serial. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cd53206c4795ef2df5df26b795caf692"></a><!-- doxytag: member="tbb::filter::is_ordered" ref="cd53206c4795ef2df5df26b795caf692" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><b>is_ordered</b> () const </td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00109.html#fa1b3dc1f4f47563ccab7f4d92f5b543">operator()</a> (void *item)=0</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Operate on an item from the input stream, and return item for output stream.  <a href="#fa1b3dc1f4f47563ccab7f4d92f5b543"></a><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="a00109.html#66d159f362293e3964ba3da8bc1d2604">~filter</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy filter.  <a href="#66d159f362293e3964ba3da8bc1d2604"></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="a00109.html#56275eb889c77c4807967133e21401bd">finalize</a> (void *)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys item if pipeline is cancelled.  <a href="#56275eb889c77c4807967133e21401bd"></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="f1111979b4afbde1a6c1873577a005ae"></a><!-- doxytag: member="tbb::filter::filter" ref="f1111979b4afbde1a6c1873577a005ae" args="(bool is_serial_)" -->
- </td><td class="memItemRight" valign="bottom"><b>filter</b> (bool is_serial_)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3f49df3c34a3e5a8884001c30230a94"></a><!-- doxytag: member="tbb::filter::filter" ref="a3f49df3c34a3e5a8884001c30230a94" args="(mode filter_mode)" -->
- </td><td class="memItemRight" valign="bottom"><b>filter</b> (<a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> filter_mode)</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::filter::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="b211ee58bada099e24280d478017cbff"></a><!-- doxytag: member="tbb::filter::pipeline" ref="b211ee58bada099e24280d478017cbff" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>pipeline</b></td></tr>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-A stage in a pipeline. 
-<p>
-<hr><h2>Member Enumeration Documentation</h2>
-<a class="anchor" name="d3b6ed2c517144199d0c39c62ddfd8cf"></a><!-- doxytag: member="tbb::filter::mode" ref="d3b6ed2c517144199d0c39c62ddfd8cf" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">enum <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf">tbb::filter::mode</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<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="d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe"></a><!-- doxytag: member="parallel" ref="d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe" args="" -->parallel</em> </td><td>
-processes multiple items in parallel and in no particular order </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93"></a><!-- doxytag: member="serial_in_order" ref="d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93" args="" -->serial_in_order</em> </td><td>
-processes items one at a time; all such filters process items in the same order </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9"></a><!-- doxytag: member="serial_out_of_order" ref="d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9" args="" -->serial_out_of_order</em> </td><td>
-processes items one at a time and in no particular order </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237"></a><!-- doxytag: member="serial" ref="d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237" args="" -->serial</em> </td><td>
-<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>use serial_in_order instead </dd></dl>
-</td></tr>
-</table>
-</dl>
-
-</div>
-</div><p>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="66d159f362293e3964ba3da8bc1d2604"></a><!-- doxytag: member="tbb::filter::~filter" ref="66d159f362293e3964ba3da8bc1d2604" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual __TBB_EXPORTED_METHOD tbb::filter::~filter           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Destroy filter. 
-<p>
-If the filter was added to a pipeline, the pipeline must be destroyed first. 
-</div>
-</div><p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="56275eb889c77c4807967133e21401bd"></a><!-- doxytag: member="tbb::filter::finalize" ref="56275eb889c77c4807967133e21401bd" args="(void *)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual void tbb::filter::finalize           </td>
-          <td>(</td>
-          <td class="paramtype">void * </td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline, virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Destroys item if pipeline is cancelled. 
-<p>
-Required to prevent memory leaks Note it can be called concurrently even for serial filters. 
-</div>
-</div><p>
-<a class="anchor" name="fa1b3dc1f4f47563ccab7f4d92f5b543"></a><!-- doxytag: member="tbb::filter::operator()" ref="fa1b3dc1f4f47563ccab7f4d92f5b543" args="(void *item)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual void* tbb::filter::operator()           </td>
-          <td>(</td>
-          <td class="paramtype">void * </td>
-          <td class="paramname"> <em>item</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Operate on an item from the input stream, and return item for output stream. 
-<p>
-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="a00269.html">pipeline.h</a></ul>
-<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/a00111.html b/doc/html/a00111.html
deleted file mode 100644
index df61658..0000000
--- a/doc/html/a00111.html
+++ /dev/null
@@ -1,168 +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::movable_exception< ExceptionData > Class Template 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><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>
-<div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00111.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="a00289.html">tbb_exception.h</a>></code>
-<p>
-Inherits <a class="el" href="a00138.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="a00069.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="bd3a1f2580e18cad8453a429a52d04b2"></a><!-- doxytag: member="tbb::movable_exception::movable_exception" ref="bd3a1f2580e18cad8453a429a52d04b2" args="(const ExceptionData &data)" -->
- </td><td class="memItemRight" valign="bottom"><b>movable_exception</b> (const ExceptionData &data)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="48f97fbf1e5d66c5977891f4375ee4d9"></a><!-- doxytag: member="tbb::movable_exception::movable_exception" ref="48f97fbf1e5d66c5977891f4375ee4d9" args="(const movable_exception &src)" -->
- </td><td class="memItemRight" valign="bottom"><b>movable_exception</b> (const <a class="el" href="a00111.html">movable_exception</a> &src)  throw ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dfafefe27f2afaa7c7894ca9c71cc568"></a><!-- doxytag: member="tbb::movable_exception::operator=" ref="dfafefe27f2afaa7c7894ca9c71cc568" args="(const movable_exception &src)" -->
-const <a class="el" href="a00111.html">movable_exception</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00111.html">movable_exception</a> &src)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="47114cbc20c8e13cac3108749a3e085d"></a><!-- doxytag: member="tbb::movable_exception::data" ref="47114cbc20c8e13cac3108749a3e085d" args="()" -->
-ExceptionData & </td><td class="memItemRight" valign="bottom"><b>data</b> ()  throw ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7d93c000d862d2558efd9a34817adbce"></a><!-- doxytag: member="tbb::movable_exception::data" ref="7d93c000d862d2558efd9a34817adbce" args="() const " -->
-const ExceptionData & </td><td class="memItemRight" valign="bottom"><b>data</b> () const   throw ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bc5f5c4739b17ac5211ac58226c2f5a5"></a><!-- doxytag: member="tbb::movable_exception::name" ref="bc5f5c4739b17ac5211ac58226c2f5a5" args="() const " -->
-const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#bc5f5c4739b17ac5211ac58226c2f5a5">name</a> () const   throw ()</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="b33a89bccf0c63106f1270c7bfaaf54f"></a><!-- doxytag: member="tbb::movable_exception::what" ref="b33a89bccf0c63106f1270c7bfaaf54f" args="() const " -->
-const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#b33a89bccf0c63106f1270c7bfaaf54f">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="a00111.html#b33a89bccf0c63106f1270c7bfaaf54f">what()</a> method. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00111.html">movable_exception</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#1aea0ad179d6f0481fe7f3495f66adf9">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="#1aea0ad179d6f0481fe7f3495f66adf9"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#7a46873119d9f85a7b0009c13e41a258">destroy</a> ()  throw ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys objects created by the <a class="el" href="a00111.html#1aea0ad179d6f0481fe7f3495f66adf9">move()</a> method.  <a href="#7a46873119d9f85a7b0009c13e41a258"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#17cffba35811c92b7e65d63506b69602">throw_self</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Throws this exception object.  <a href="#17cffba35811c92b7e65d63506b69602"></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="a8c0ae2089ae784b28907cf748b89416"></a><!-- doxytag: member="tbb::movable_exception::my_exception_data" ref="a8c0ae2089ae784b28907cf748b89416" args="" -->
-ExceptionData </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">User data. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename ExceptionData><br>
- class tbb::movable_exception< ExceptionData ></h3>
-
-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="a00138.html">tbb::tbb_exception</a> </dd></dl>
-
-<p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="7a46873119d9f85a7b0009c13e41a258"></a><!-- doxytag: member="tbb::movable_exception::destroy" ref="7a46873119d9f85a7b0009c13e41a258" args="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename ExceptionData> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">void <a class="el" href="a00111.html">tbb::movable_exception</a>< ExceptionData >::destroy           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%">  throw ()<code> [inline, virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Destroys objects created by the <a class="el" href="a00111.html#1aea0ad179d6f0481fe7f3495f66adf9">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="a00138.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>.
-</div>
-</div><p>
-<a class="anchor" name="1aea0ad179d6f0481fe7f3495f66adf9"></a><!-- doxytag: member="tbb::movable_exception::move" ref="1aea0ad179d6f0481fe7f3495f66adf9" args="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename ExceptionData> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="a00111.html">movable_exception</a>* <a class="el" href="a00111.html">tbb::movable_exception</a>< ExceptionData >::move           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%">  throw ()<code> [inline, 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>
-Implements <a class="el" href="a00138.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="()" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename ExceptionData> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">void <a class="el" href="a00111.html">tbb::movable_exception</a>< ExceptionData >::throw_self           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline, 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>
-Implements <a class="el" href="a00138.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="a00289.html">tbb_exception.h</a></ul>
-<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/a00115.html b/doc/html/a00115.html
index de1351e..1d13c2a 100644
--- a/doc/html/a00115.html
+++ b/doc/html/a00115.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::affinity_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,114 +21,36 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00115.html">parallel_while</a></div>
-<h1>tbb::parallel_while< Body > Class Template Reference<br>
-<small>
-[<a class="el" href="a00183.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="a00224.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="a00260.html">parallel_while.h</a>></code>
+<code>#include <<a class="el" href="a00339.html">partitioner.h</a>></code>
 <p>
-<a href="a00033.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00043.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="a00115.html#fa297e53d3af2a101e712bc200233e9c">value_type</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::affinity_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">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="a00115.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e8f710e431b62c2a48914bd99d0fe034"></a><!-- doxytag: member="tbb::affinity_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">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="a00115.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="181db51277e9b15dd0ec4a0617ab1f92"></a><!-- doxytag: member="tbb::affinity_partitioner::internal::start_reduce_with_affinity" ref="181db51277e9b15dd0ec4a0617ab1f92" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::start_reduce_with_affinity</b></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="a00115.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a> (Stream &stream, const Body &body)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="76d97ae6ad98db0acfc8ed8cb7c76705"></a><!-- doxytag: member="tbb::affinity_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">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="a00115.html#e131c560057a58229992b61eb8dba4c6">add</a> (const <a class="el" href="a00115.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> &item)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e9575467e391b90e0703fadf573dbad7"></a><!-- doxytag: member="tbb::affinity_partitioner::internal::affinity_partition_type" ref="e9575467e391b90e0703fadf573dbad7" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::affinity_partition_type</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="a00115.html">tbb::parallel_while</a>< Body >::add           </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="a00115.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="a00115.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. 
+An affinity partitioner. 
 <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="a00260.html">parallel_while.h</a></ul>
+<li><a class="el" href="a00339.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 83c43c2..da49523 100644
--- a/doc/html/a00116.html
+++ b/doc/html/a00116.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::aligned_space< T, N > 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,73 +21,37 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00116.html">pipeline</a></div>
-<h1>tbb::pipeline Class Reference<br>
+<a class="el" href="a00224.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="a00183.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::pipeline" -->A processing pipeling that applies filters to items.  
+[<a class="el" href="a00230.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="a00269.html">pipeline.h</a>></code>
+<code>#include <<a class="el" href="a00252.html">aligned_space.h</a>></code>
 <p>
-<a href="a00040.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00001.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="a00116.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d702fc6b9e9d061ace3501b3c861cdf"></a><!-- doxytag: member="tbb::aligned_space::begin" ref="0d702fc6b9e9d061ace3501b3c861cdf" args="()" -->
+T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</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="a00116.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a> ()</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="a00116.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a> (<a class="el" href="a00109.html">filter</a> &filter_)</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="a00116.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="a00116.html#93d7fec8cd607b803dd2d79fb46bd260">run</a> (size_t max_number_of_live_tokens, <a class="el" href="a00133.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="a00116.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="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="mdescLeft"> </td><td class="mdescRight">Pointer to beginning of array. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="024be075c23c0394c9a2518d993bcd9e"></a><!-- doxytag: member="tbb::aligned_space::end" ref="024be075c23c0394c9a2518d993bcd9e" args="()" -->
+T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#024be075c23c0394c9a2518d993bcd9e">end</a> ()</td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Pointer to one past last element in array. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-A processing pipeling that applies filters to items. 
-<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">
+<h3>template<typename T, size_t N><br>
+ class tbb::aligned_space< T, N ></h3>
 
+Block of space aligned sufficiently to construct an array T with N elements. 
+<p>
+The elements are not constructed or destroyed by this class. 
 <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="a00269.html">pipeline.h</a></ul>
+<li><a class="el" href="a00252.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 5cc630d..59b36dc 100644
--- a/doc/html/a00117.html
+++ b/doc/html/a00117.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::atomic< 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,27 +21,35 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00117.html">pre_scan_tag</a></div>
-<h1>tbb::pre_scan_tag Struct Reference<br>
+<a class="el" href="a00224.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="a00183.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="a00231.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="a00251.html">parallel_scan.h</a>></code>
+<code>#include <<a class="el" href="a00253.html">atomic.h</a>></code>
 <p>
-<a href="a00031.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00002.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="1e29e03a31436bad5eb1aa5a9d46a2da"></a><!-- doxytag: member="tbb::atomic::operator=" ref="1e29e03a31436bad5eb1aa5a9d46a2da" args="(T rhs)" -->
+T </td><td class="memItemRight" valign="bottom"><b>operator=</b> (T rhs)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="90791297d59b1659cfaf0d93c7cc59ae"></a><!-- doxytag: member="tbb::atomic::operator=" ref="90791297d59b1659cfaf0d93c7cc59ae" args="(const atomic< T > &rhs)" -->
+<a class="el" href="a00117.html">atomic</a>< T > & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00117.html">atomic</a>< T > &rhs)</td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Used to indicate that the initial scan is being performed. 
+<h3>template<typename T><br>
+ struct tbb::atomic< T ></h3>
+
+Primary template for atomic. 
+<p>
+See the Reference for details. 
 <p>
 <hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00251.html">parallel_scan.h</a></ul>
+<li><a class="el" href="a00253.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 331f25a..d41f740 100644
--- a/doc/html/a00118.html
+++ b/doc/html/a00118.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::atomic< void * > 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,49 +21,30 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00118.html">queuing_mutex</a></div>
-<h1>tbb::queuing_mutex Class Reference<br>
-<small>
-[<a class="el" href="a00186.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::queuing_mutex" -->Queuing lock with local-only spinning.  
+<a class="el" href="a00224.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="a00270.html">queuing_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00253.html">atomic.h</a>></code>
 <p>
-<a href="a00041.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00003.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="a00118.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba6e74163e255b88c497c40db64c5dad"></a><!-- doxytag: member="tbb::atomic< void * >::operator=" ref="ba6e74163e255b88c497c40db64c5dad" args="(void *rhs)" -->
+void * </td><td class="memItemRight" valign="bottom"><b>operator=</b> (void *rhs)</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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="37979e62d1f88eb45bd3ad7df5a140f8"></a><!-- doxytag: member="tbb::atomic< void * >::operator=" ref="37979e62d1f88eb45bd3ad7df5a140f8" args="(const atomic< void * > &rhs)" -->
+<a class="el" href="a00117.html">atomic</a>< void * > & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00117.html">atomic</a>< void * > &rhs)</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 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 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="a00119.html">scoped_lock</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00119.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<><br>
+ struct tbb::atomic< void * ></h3>
+
+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 class was generated from the following file:<ul>
-<li><a class="el" href="a00270.html">queuing_mutex.h</a></ul>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00253.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 d448c98..29cafc0 100644
--- a/doc/html/a00119.html
+++ b/doc/html/a00119.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::internal::atomic_backoff Class 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,33 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00118.html">queuing_mutex</a>::<a class="el" href="a00119.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="a00224.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="a00270.html">queuing_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00378.html">tbb_machine.h</a>></code>
 <p>
-<a href="a00042.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00088.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="a00119.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a174ea93e3bd3d5cce82389c2f28d037"></a><!-- doxytag: member="tbb::internal::atomic_backoff::pause" ref="a174ea93e3bd3d5cce82389c2f28d037" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</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="a00119.html#9b51ef972f5618ac17caadb58841ab6d">scoped_lock</a> (<a class="el" href="a00118.html">queuing_mutex</a> &m)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Pause for a while. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6179b19e2e8dedd73a36d523af2fe12"></a><!-- doxytag: member="tbb::internal::atomic_backoff::bounded_pause" ref="c6179b19e2e8dedd73a36d523af2fe12" args="()" -->
+bool </td><td class="memItemRight" valign="bottom"><b>bounded_pause</b> ()</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="a00119.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="45edb535489eb0e76ecc59a19fd952de"></a><!-- doxytag: member="tbb::internal::atomic_backoff::reset" ref="45edb535489eb0e76ecc59a19fd952de" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><b>reset</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="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="a00119.html#533e4fc8355ee321206a0609c42d909d">acquire</a> (<a class="el" href="a00118.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="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="a00119.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a> (<a class="el" href="a00118.html">queuing_mutex</a> &m)</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="a00119.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <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="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="a00118.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">
-
+Class that implements exponential backoff. 
 <p>
-Acquire lock on given mutex. 
+See implementation of spin_wait_while_eq for an example. 
 <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="a00270.html">queuing_mutex.h</a></ul>
+<li><a class="el" href="a00378.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 3a4dd7b..6f053f5 100644
--- a/doc/html/a00120.html
+++ b/doc/html/a00120.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::auto_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,55 +21,38 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00120.html">queuing_rw_mutex</a></div>
-<h1>tbb::queuing_rw_mutex Class Reference<br>
+<a class="el" href="a00224.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="a00186.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::queuing_rw_mutex" -->Reader-writer lock with local-only spinning.  
+[<a class="el" href="a00228.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="a00271.html">queuing_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00339.html">partitioner.h</a>></code>
 <p>
-<a href="a00043.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00041.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="a00120.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_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="1ba73e3d95cfdf8323880bc623af9099"></a><!-- doxytag: member="tbb::queuing_rw_mutex::~queuing_rw_mutex" ref="1ba73e3d95cfdf8323880bc623af9099" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</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 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="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 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::auto_partitioner::internal::start_for" ref="a47f7e0208a2bf68f35b51b27d2ddf2a" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::start_for</b></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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e8f710e431b62c2a48914bd99d0fe034"></a><!-- doxytag: member="tbb::auto_partitioner::internal::start_reduce" ref="e8f710e431b62c2a48914bd99d0fe034" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::start_reduce</b></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="76d97ae6ad98db0acfc8ed8cb7c76705"></a><!-- doxytag: member="tbb::auto_partitioner::internal::start_scan" ref="76d97ae6ad98db0acfc8ed8cb7c76705" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::start_scan</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="a00121.html">scoped_lock</a></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">The scoped locking pattern.  <a href="a00121.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Reader-writer lock with local-only spinning. 
+An auto partitioner. 
 <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> 
+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="a00271.html">queuing_rw_mutex.h</a></ul>
+<li><a class="el" href="a00339.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 c4a3d89..b0ecb85 100644
--- a/doc/html/a00121.html
+++ b/doc/html/a00121.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::bad_last_alloc 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,24 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00120.html">queuing_rw_mutex</a>::<a class="el" href="a00121.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="a00224.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="a00271.html">queuing_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
 <p>
-<a href="a00044.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00083.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="a00121.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6f7d876e9190498a13795a5b0ca3e313"></a><!-- doxytag: member="tbb::bad_last_alloc::what" ref="6f7d876e9190498a13795a5b0ca3e313" args="() const " -->
+virtual const char * </td><td class="memItemRight" valign="bottom"><b>what</b> () const   throw ()</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="a00121.html#fbb8798792d3aebb136c46fc63d2529e">scoped_lock</a> (<a class="el" href="a00120.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="a00121.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="a00121.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a> (<a class="el" href="a00120.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="a00121.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a> (<a class="el" href="a00120.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="a00121.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="a00121.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="a00121.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="a00120.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. 
+Exception for concurrent containers. 
 <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="a00271.html">queuing_rw_mutex.h</a></ul>
+<li><a class="el" href="a00377.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 f9c5cd0..638cb05 100644
--- a/doc/html/a00122.html
+++ b/doc/html/a00122.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::blocked_range< Value > 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,48 +21,198 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00122.html">recursive_mutex</a></div>
-<h1>tbb::recursive_mutex Class Reference<br>
+<a class="el" href="a00224.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="a00186.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::recursive_mutex" -->Mutex that allows recursive mutex acquisition.  
+[<a class="el" href="a00228.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="a00272.html">recursive_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00261.html">blocked_range.h</a>></code>
 <p>
-<a href="a00045.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00004.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 Value </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of a value.  <a href="#1a8d05842c2b3dfc177bc4d347e4cef7"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f5707bffea38eee5c9680f37358afb8e"></a><!-- doxytag: member="tbb::blocked_range::size_type" ref="f5707bffea38eee5c9680f37358afb8e" args="" -->
+typedef std::size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type for size of a range. <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="d2fceb7f95c24a8cd1457d4527e4b8c6"></a><!-- doxytag: member="tbb::recursive_mutex::recursive_mutex" ref="d2fceb7f95c24a8cd1457d4527e4b8c6" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#94607755c5110d199202234d58d022ac">blocked_range</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct range with default-constructed values for begin and end.  <a href="#94607755c5110d199202234d58d022ac"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="14795a36ead1414b4371dbe1a4656359"></a><!-- doxytag: member="tbb::blocked_range::blocked_range" ref="14795a36ead1414b4371dbe1a4656359" args="(Value begin_, Value end_, size_type grainsize_=1)" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#14795a36ead1414b4371dbe1a4656359">blocked_range</a> (Value begin_, Value end_, <a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> grainsize_=1)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct range over half-open interval [begin,end), with the given grainsize. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="18d2258400756ac1446dac7676b18df3"></a><!-- doxytag: member="tbb::blocked_range::begin" ref="18d2258400756ac1446dac7676b18df3" args="() const " -->
+<a class="el" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Beginning of range. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8b929d93ddc13f148b11bceef3a3bdf8"></a><!-- doxytag: member="tbb::blocked_range::end" ref="8b929d93ddc13f148b11bceef3a3bdf8" args="() const " -->
+<a class="el" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">One past last value in range. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a> () const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired <a class="el" href="a00122.html">recursive_mutex</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="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="mdescLeft"> </td><td class="mdescRight">Size of the range.  <a href="#9eaa0b6beff1420f688570bbf6b8c462"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fcd2e5b8b6c11fd3f20fc0aa9f11bbc2"></a><!-- doxytag: member="tbb::blocked_range::grainsize" ref="fcd2e5b8b6c11fd3f20fc0aa9f11bbc2" args="() const " -->
+<a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a> () const </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="mdescLeft"> </td><td class="mdescRight">The grain size for this range. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8f4f02f530eb3f2e7ea26e06f76aef9d"></a><!-- doxytag: member="tbb::blocked_range::empty" ref="8f4f02f530eb3f2e7ea26e06f76aef9d" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a> () const </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="mdescLeft"> </td><td class="mdescRight">True if range is empty. <br></td></tr>
+<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="mdescLeft"> </td><td class="mdescRight">Split range.  <a href="#4c0efd2be3f96a0ab3ba5085e8b3fcc7"></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="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 class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="395a514a55017e36d571809f1223389b"></a><!-- doxytag: member="tbb::blocked_range::blocked_range2d" ref="395a514a55017e36d571809f1223389b" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</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="a00123.html">scoped_lock</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="13d172a4da9be197033e64516fff1f4b"></a><!-- doxytag: member="tbb::blocked_range::blocked_range3d" ref="13d172a4da9be197033e64516fff1f4b" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00123.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Mutex that allows recursive mutex acquisition. 
+<h3>template<typename Value><br>
+ class tbb::blocked_range< Value ></h3>
+
+A range over which to iterate. 
+<p>
+<hr><h2>Member Typedef Documentation</h2>
+<a class="anchor" name="1a8d05842c2b3dfc177bc4d347e4cef7"></a><!-- doxytag: member="tbb::blocked_range::const_iterator" ref="1a8d05842c2b3dfc177bc4d347e4cef7" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename Value> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef Value <a class="el" href="a00122.html">tbb::blocked_range</a>< Value >::<a class="el" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a>          </td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Type of a value. 
+<p>
+Called a const_iterator for sake of algorithms that need to treat a <a class="el" href="a00122.html">blocked_range</a> as an STL container. 
+</div>
+</div><p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="94607755c5110d199202234d58d022ac"></a><!-- doxytag: member="tbb::blocked_range::blocked_range" ref="94607755c5110d199202234d58d022ac" args="()" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename Value> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="a00122.html">tbb::blocked_range</a>< Value >::<a class="el" href="a00122.html">blocked_range</a>           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Construct range with default-constructed values for begin and end. 
+<p>
+Requires that Value have a default constructor. 
+</div>
+</div><p>
+<a class="anchor" name="4c0efd2be3f96a0ab3ba5085e8b3fcc7"></a><!-- doxytag: member="tbb::blocked_range::blocked_range" ref="4c0efd2be3f96a0ab3ba5085e8b3fcc7" args="(blocked_range &r, split)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename Value> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="a00122.html">tbb::blocked_range</a>< Value >::<a class="el" href="a00122.html">blocked_range</a>           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00122.html">blocked_range</a>< Value > & </td>
+          <td class="paramname"> <em>r</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="a00161.html">split</a> </td>
+          <td class="paramname"></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>
+Split range. 
+<p>
+The new Range *this has the second half, the old range r has the first half. Unspecified if <a class="el" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end()</a><<a class="el" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin()</a> or !is_divisible(). 
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="41a58b703d574b6e1ca155df3576f578"></a><!-- doxytag: member="tbb::blocked_range::is_divisible" ref="41a58b703d574b6e1ca155df3576f578" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename Value> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">bool <a class="el" href="a00122.html">tbb::blocked_range</a>< Value >::is_divisible           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+True if range is divisible. 
+<p>
+Unspecified if <a class="el" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end()</a><<a class="el" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin()</a>. 
+</div>
+</div><p>
+<a class="anchor" name="9eaa0b6beff1420f688570bbf6b8c462"></a><!-- doxytag: member="tbb::blocked_range::size" ref="9eaa0b6beff1420f688570bbf6b8c462" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename Value> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> <a class="el" href="a00122.html">tbb::blocked_range</a>< Value >::size           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
 <p>
-Mutex that allows recursive mutex acquisition. 
+Size of the range. 
 <p>
+Unspecified if <a class="el" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end()</a><<a class="el" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin()</a>. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00272.html">recursive_mutex.h</a></ul>
+<li><a class="el" href="a00261.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 ef65507..ae80032 100644
--- a/doc/html/a00123.html
+++ b/doc/html/a00123.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::blocked_range2d< RowValue, ColValue > 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,69 +21,60 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00122.html">recursive_mutex</a>::<a class="el" href="a00123.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="a00224.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>
+</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="a00272.html">recursive_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00262.html">blocked_range2d.h</a>></code>
 <p>
-<a href="a00046.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00005.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="a807a22fe658ec38b8edfd69521d0383"></a><!-- doxytag: member="tbb::blocked_range2d::row_range_type" ref="a807a22fe658ec38b8edfd69521d0383" args="" -->
+typedef <a class="el" href="a00122.html">blocked_range</a>< RowValue > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html#a807a22fe658ec38b8edfd69521d0383">row_range_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type for size of an iteation range. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="750d5c6ac9915443df477a30031c07fd"></a><!-- doxytag: member="tbb::blocked_range2d::col_range_type" ref="750d5c6ac9915443df477a30031c07fd" args="" -->
+typedef <a class="el" href="a00122.html">blocked_range</a>< ColValue > </td><td class="memItemRight" valign="bottom"><b>col_range_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="d82d4d36fbf9727a493d26ae50855fe7"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::scoped_lock" ref="d82d4d36fbf9727a493d26ae50855fe7" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4180bc35d4f8ed9f20045dba4f2a1bdc"></a><!-- doxytag: member="tbb::blocked_range2d::blocked_range2d" ref="4180bc35d4f8ed9f20045dba4f2a1bdc" args="(RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize)" -->
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</b> (RowValue row_begin, RowValue row_end, typename <a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">row_range_type::size_type</a> row_grainsize, ColValue col_begin, ColValue col_end, typename <a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">col_range_type::size_type</a> col_grainsize)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="485434db1609b2074d86cb604f3c674e"></a><!-- doxytag: member="tbb::blocked_range2d::blocked_range2d" ref="485434db1609b2074d86cb604f3c674e" args="(RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)" -->
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</b> (RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a <a class="el" href="a00122.html">recursive_mutex</a>. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html#dec17713c4c1321ac8fec66816d0c602">scoped_lock</a> (<a class="el" href="a00122.html">recursive_mutex</a> &<a class="el" href="a00112.html">mutex</a>)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d144cb2d88cef553420311aca8667a44"></a><!-- doxytag: member="tbb::blocked_range2d::empty" ref="d144cb2d88cef553420311aca8667a44" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html#d144cb2d88cef553420311aca8667a44">empty</a> () const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#dec17713c4c1321ac8fec66816d0c602"></a><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="a00123.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if range is empty. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ad36a9b38e4fef26d376f99552ce2d92"></a><!-- doxytag: member="tbb::blocked_range2d::is_divisible" ref="ad36a9b38e4fef26d376f99552ce2d92" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html#ad36a9b38e4fef26d376f99552ce2d92">is_divisible</a> () const </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="a00123.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a> (<a class="el" href="a00122.html">recursive_mutex</a> &<a class="el" href="a00112.html">mutex</a>)</td></tr>
+<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>
 
-<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="a00123.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a> (<a class="el" href="a00122.html">recursive_mutex</a> &<a class="el" href="a00112.html">mutex</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>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given <a class="el" href="a00122.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="a00123.html#ac480ea0e9d5ea0345a67d57008b6263">release</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The rows of the iteration space. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="392a46759af2c884957115771affa7f4"></a><!-- doxytag: member="tbb::blocked_range2d::cols" ref="392a46759af2c884957115771affa7f4" args="() const " -->
+const <a class="el" href="a00122.html">col_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html#392a46759af2c884957115771affa7f4">cols</a> () const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The columns of the iteration space. <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="dec17713c4c1321ac8fec66816d0c602"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::scoped_lock" ref="dec17713c4c1321ac8fec66816d0c602" args="(recursive_mutex &mutex)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">tbb::recursive_mutex::scoped_lock::scoped_lock           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00122.html">recursive_mutex</a> & </td>
-          <td class="paramname"> <em>mutex</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
+<h3>template<typename RowValue, typename ColValue = RowValue><br>
+ class tbb::blocked_range2d< RowValue, ColValue ></h3>
 
+A 2-dimensional range that models the Range concept. 
 <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="a00272.html">recursive_mutex.h</a></ul>
+<li><a class="el" href="a00262.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 10d43da..010da81 100644
--- a/doc/html/a00124.html
+++ b/doc/html/a00124.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::blocked_range3d< PageValue, RowValue, ColValue > 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,86 +21,67 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00124.html">scalable_allocator</a></div>
-<h1>tbb::scalable_allocator< T > Class Template Reference<br>
+<a class="el" href="a00224.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="a00185.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="a00228.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="a00273.html">scalable_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00263.html">blocked_range3d.h</a>></code>
 <p>
-<a href="a00047.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00006.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="b8ebf17a552ba47825e9b3887855b719"></a><!-- doxytag: member="tbb::blocked_range3d::page_range_type" ref="b8ebf17a552ba47825e9b3887855b719" args="" -->
+typedef <a class="el" href="a00122.html">blocked_range</a>< PageValue > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#b8ebf17a552ba47825e9b3887855b719">page_range_type</a></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="mdescLeft"> </td><td class="mdescRight">Type for size of an iteation range. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4edc39b1a76c84c8f43ea8bff3e88007"></a><!-- doxytag: member="tbb::blocked_range3d::row_range_type" ref="4edc39b1a76c84c8f43ea8bff3e88007" args="" -->
+typedef <a class="el" href="a00122.html">blocked_range</a>< RowValue > </td><td class="memItemRight" valign="bottom"><b>row_range_type</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 class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="02229b59d4dc5437bf5fbe72acca7f66"></a><!-- doxytag: member="tbb::blocked_range3d::col_range_type" ref="02229b59d4dc5437bf5fbe72acca7f66" args="" -->
+typedef <a class="el" href="a00122.html">blocked_range</a>< ColValue > </td><td class="memItemRight" valign="bottom"><b>col_range_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="a00124.html">scalable_allocator</a> &)  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a762f420ed83a887967cb7dfe337582c"></a><!-- doxytag: member="tbb::blocked_range3d::blocked_range3d" ref="a762f420ed83a887967cb7dfe337582c" args="(PageValue page_begin, PageValue page_end, RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)" -->
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b> (PageValue page_begin, PageValue page_end, RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)</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="a00124.html">scalable_allocator</a>< U > &)  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b4dcf5b059634b95c1671086bf6d4ff"></a><!-- doxytag: member="tbb::blocked_range3d::blocked_range3d" ref="0b4dcf5b059634b95c1671086bf6d4ff" args="(PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize, RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_gr [...]
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b> (PageValue page_begin, PageValue page_end, typename <a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">page_range_type::size_type</a> page_grainsize, RowValue row_begin, RowValue row_end, typename <a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">row_range_type::size_type</a> row_grainsize, ColValue col_begin, ColValue col_end, typename <a class="el" href="a00122.html#f5707bffea38eee [...]
 
-<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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="356860e1c977d91711e8216bd55c0b25"></a><!-- doxytag: member="tbb::blocked_range3d::empty" ref="356860e1c977d91711e8216bd55c0b25" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#356860e1c977d91711e8216bd55c0b25">empty</a> () const </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">True if range is empty. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="39d69191721c488e737ae5d9c5336b9c"></a><!-- doxytag: member="tbb::blocked_range3d::is_divisible" ref="39d69191721c488e737ae5d9c5336b9c" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#39d69191721c488e737ae5d9c5336b9c">is_divisible</a> () const </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="a00124.html#726b1586d05d44665a36e1c7b2699bfd">allocate</a> (size_type n, const void *=0)</td></tr>
+<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>
 
-<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="a00124.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a> (pointer p, size_type)</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>
 
-<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="a00124.html#880e766f1d913988c21973dbdd874fd5">max_size</a> () const   throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The pages of the iteration space. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1584623e59ff32a8aa82006827508be4"></a><!-- doxytag: member="tbb::blocked_range3d::rows" ref="1584623e59ff32a8aa82006827508be4" args="() const " -->
+const <a class="el" href="a00122.html">row_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#1584623e59ff32a8aa82006827508be4">rows</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="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>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">The rows of the iteration space. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3336ba9480fd6c43e158f9beb024c050"></a><!-- doxytag: member="tbb::blocked_range3d::cols" ref="3336ba9480fd6c43e158f9beb024c050" args="() const " -->
+const <a class="el" href="a00122.html">col_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#3336ba9480fd6c43e158f9beb024c050">cols</a> () const </td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The columns of the iteration space. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename T><br>
- class tbb::scalable_allocator< T ></h3>
+<h3>template<typename PageValue, typename RowValue = PageValue, typename ColValue = RowValue><br>
+ class tbb::blocked_range3d< PageValue, RowValue, ColValue ></h3>
 
-Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. 
-<p>
-The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. 
+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="a00273.html">scalable_allocator.h</a></ul>
+<li><a class="el" href="a00263.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 ba1b4c6..ae23823 100644
--- a/doc/html/a00125.html
+++ b/doc/html/a00125.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::cache_aligned_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,39 +21,88 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00125.html">scalable_allocator< void ></a></div>
-<h1>tbb::scalable_allocator< void > Class Template Reference<br>
+<a class="el" href="a00224.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="a00185.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="a00230.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="a00273.html">scalable_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00264.html">cache_aligned_allocator.h</a>></code>
 <p>
-<a href="a00049.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00007.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 class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8f7128452e3c43b5bf1801b61d971d17"></a><!-- doxytag: member="tbb::cache_aligned_allocator::value_type" ref="8f7128452e3c43b5bf1801b61d971d17" 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="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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b23ef1d76c34fe1c2ebbb2f3df5b5676"></a><!-- doxytag: member="tbb::cache_aligned_allocator::pointer" ref="b23ef1d76c34fe1c2ebbb2f3df5b5676" 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="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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d15affd67eafcabbd12bd1cd07372994"></a><!-- doxytag: member="tbb::cache_aligned_allocator::const_pointer" ref="d15affd67eafcabbd12bd1cd07372994" 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="e8c4e0d5867a07b1cea21d4fca2998c8"></a><!-- doxytag: member="tbb::cache_aligned_allocator::reference" ref="e8c4e0d5867a07b1cea21d4fca2998c8" 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="d3d77a39f0852c42f80c6505843f450c"></a><!-- doxytag: member="tbb::cache_aligned_allocator::const_reference" ref="d3d77a39f0852c42f80c6505843f450c" 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="90ca6a2979ebee466be771f4c2f9337e"></a><!-- doxytag: member="tbb::cache_aligned_allocator::size_type" ref="90ca6a2979ebee466be771f4c2f9337e" 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="b73eba293d042333f343d025c26751a4"></a><!-- doxytag: member="tbb::cache_aligned_allocator::difference_type" ref="b73eba293d042333f343d025c26751a4" 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="74ccd00a29171ddd61a4ea88cfa49c32"></a><!-- doxytag: member="tbb::cache_aligned_allocator::cache_aligned_allocator" ref="74ccd00a29171ddd61a4ea88cfa49c32" args="(const cache_aligned_allocator &)" -->
+ </td><td class="memItemRight" valign="bottom"><b>cache_aligned_allocator</b> (const <a class="el" href="a00125.html">cache_aligned_allocator</a> &)  throw ()</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="de57e731c36a51bf39b458c9b8adee58"></a><!-- doxytag: member="tbb::cache_aligned_allocator::cache_aligned_allocator" ref="de57e731c36a51bf39b458c9b8adee58" args="(const cache_aligned_allocator< U > &)" -->
+template<typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>cache_aligned_allocator</b> (const <a class="el" href="a00125.html">cache_aligned_allocator</a>< U > &)  throw ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="023e0cc7cf6ebde69e1f2c12182eb12b"></a><!-- doxytag: member="tbb::cache_aligned_allocator::address" ref="023e0cc7cf6ebde69e1f2c12182eb12b" 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="db4f7613b1de12d1e79285c15636cf3b"></a><!-- doxytag: member="tbb::cache_aligned_allocator::address" ref="db4f7613b1de12d1e79285c15636cf3b" 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="4cdeea67af6c1fcd8f1d5e9c4cab61e8"></a><!-- doxytag: member="tbb::cache_aligned_allocator::allocate" ref="4cdeea67af6c1fcd8f1d5e9c4cab61e8" args="(size_type n, const void *hint=0)" -->
+pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">allocate</a> (size_type n, const void *hint=0)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate space for n objects, starting on a cache/sector line. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d4eadf188f7d85d3805ae534e0b8e1c"></a><!-- doxytag: member="tbb::cache_aligned_allocator::deallocate" ref="3d4eadf188f7d85d3805ae534e0b8e1c" args="(pointer p, size_type)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a> (pointer p, size_type)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Free block of memory that starts on a cache line. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb23b687b4c0429dab4c7f8017266cf0"></a><!-- doxytag: member="tbb::cache_aligned_allocator::max_size" ref="fb23b687b4c0429dab4c7f8017266cf0" args="() const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html#fb23b687b4c0429dab4c7f8017266cf0">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="958ee8745c86c275bfc9533af565e017"></a><!-- doxytag: member="tbb::cache_aligned_allocator::construct" ref="958ee8745c86c275bfc9533af565e017" args="(pointer p, const value_type &value)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html#958ee8745c86c275bfc9533af565e017">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="cd298895a4f1654b5149ec84b591ecb5"></a><!-- doxytag: member="tbb::cache_aligned_allocator::destroy" ref="cd298895a4f1654b5149ec84b591ecb5" args="(pointer p)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html#cd298895a4f1654b5149ec84b591ecb5">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>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<><br>
- class tbb::scalable_allocator< void ></h3>
+<h3>template<typename T><br>
+ class tbb::cache_aligned_allocator< T ></h3>
 
-Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. 
+Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. 
+<p>
+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="a00273.html">scalable_allocator.h</a></ul>
+<li><a class="el" href="a00264.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 03bab04..a76bd67 100644
--- a/doc/html/a00126.html
+++ b/doc/html/a00126.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::cache_aligned_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,38 +21,39 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00126.html">simple_partitioner</a></div>
-<h1>tbb::simple_partitioner Class Reference<br>
+<a class="el" href="a00224.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="a00183.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::simple_partitioner" -->A simple partitioner.  
+[<a class="el" href="a00230.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">partitioner.h</a>></code>
+<code>#include <<a class="el" href="a00264.html">cache_aligned_allocator.h</a>></code>
 <p>
-<a href="a00034.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00009.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 Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ce89776145998f0685a767b4f195272d"></a><!-- doxytag: member="tbb::cache_aligned_allocator< void >::pointer" ref="ce89776145998f0685a767b4f195272d" 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="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="4431fbbe1a8cfeb19c48ad0072078f45"></a><!-- doxytag: member="tbb::cache_aligned_allocator< void >::const_pointer" ref="4431fbbe1a8cfeb19c48ad0072078f45" 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="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="2ab296f4ecdd75f8e193ff92004a697d"></a><!-- doxytag: member="tbb::cache_aligned_allocator< void >::value_type" ref="2ab296f4ecdd75f8e193ff92004a697d" 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"><b>partition_type</b></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 simple partitioner. 
-<p>
-Divides the range until the range is not divisible. 
+<h3>template<><br>
+ class tbb::cache_aligned_allocator< void ></h3>
+
+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">partitioner.h</a></ul>
+<li><a class="el" href="a00264.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 4b05c55..66c4f35 100644
--- a/doc/html/a00127.html
+++ b/doc/html/a00127.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::captured_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,72 +21,122 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00127.html">spin_mutex</a></div>
-<h1>tbb::spin_mutex Class Reference<br>
-<small>
-[<a class="el" href="a00186.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::spin_mutex" -->A lock that occupies a single byte.  
+<a class="el" href="a00224.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="a00274.html">spin_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
 <p>
-<a href="a00051.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherits <a class="el" href="a00168.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>
 <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="a00127.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b50d9716bcdd281df574ec758a3952f9"></a><!-- doxytag: member="tbb::captured_exception::captured_exception" ref="b50d9716bcdd281df574ec758a3952f9" args="(const captured_exception &src)" -->
+ </td><td class="memItemRight" valign="bottom"><b>captured_exception</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="anchor" name="2ac89d457be837a19a3d505050f3a4e8"></a><!-- doxytag: member="tbb::captured_exception::captured_exception" ref="2ac89d457be837a19a3d505050f3a4e8" args="(const char *name, const char *info)" -->
+ </td><td class="memItemRight" valign="bottom"><b>captured_exception</b> (const char *name, const char *info)</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="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 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="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="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="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="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">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="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 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 class="mdescLeft"> </td><td class="mdescRight">Throws this exception object.  <a href="#2dd1be66ab32fa27e0ddef5707fa67ef"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5af82fd677449c5ca727fa1d7e16f9f5"></a><!-- doxytag: member="tbb::captured_exception::name" ref="5af82fd677449c5ca727fa1d7e16f9f5" args="() const " -->
+const char *__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a> () const   throw ()</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">scoped_lock</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="6b5988ef74a1fe2a58998d110b3633e0"></a><!-- doxytag: member="tbb::captured_exception::what" ref="6b5988ef74a1fe2a58998d110b3633e0" args="() const " -->
+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">Represents acquisition of a mutex.  <a href="a00128.html#_details">More...</a><br></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>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-A lock that occupies a single byte. 
+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>
+
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="667812a82f1525e968c52593dea0ef4c"></a><!-- doxytag: member="tbb::captured_exception::destroy" ref="667812a82f1525e968c52593dea0ef4c" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::captured_exception::destroy           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%">  throw ()<code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Destroys objects created by the <a class="el" href="a00127.html#df6bbb78a362fe862a341e81e2999810">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>
-A <a class="el" href="a00127.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. 
+Implements <a class="el" href="a00168.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>.
+</div>
+</div><p>
+<a class="anchor" name="df6bbb78a362fe862a341e81e2999810"></a><!-- doxytag: member="tbb::captured_exception::move" ref="df6bbb78a362fe862a341e81e2999810" 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>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%">  throw ()<code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Creates and returns pointer to the deep copy of this exception object. 
 <p>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="3d8fb44644fd8d41ada1fbeba7409be3"></a><!-- doxytag: member="tbb::spin_mutex::spin_mutex" ref="3d8fb44644fd8d41ada1fbeba7409be3" args="()" -->
+Move semantics is allowed. 
+<p>
+Implements <a class="el" href="a00168.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="()" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">tbb::spin_mutex::spin_mutex           </td>
+          <td class="memname">void tbb::captured_exception::throw_self           </td>
           <td>(</td>
           <td class="paramname">          </td>
           <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
+          <td width="100%"><code> [inline, virtual]</code></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
 <p>
-Construct unacquired lock. 
+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>
-Equivalent to zero-initialization of *this. 
+Implements <a class="el" href="a00168.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="a00274.html">spin_mutex.h</a></ul>
+<li><a class="el" href="a00377.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 1f7dbc3..0e1d69b 100644
--- a/doc/html/a00128.html
+++ b/doc/html/a00128.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::combinable< 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,45 +21,58 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00127.html">spin_mutex</a>::<a class="el" href="a00128.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="a00224.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>
+</h1><!-- doxytag: class="tbb::combinable" -->Thread-local storage with optional reduction.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00274.html">spin_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00266.html">combinable.h</a>></code>
 <p>
-<a href="a00052.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00011.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="29ae680ae7f5e685c2e15535b9c855b3"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::scoped_lock" ref="29ae680ae7f5e685c2e15535b9c855b3" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00128.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a> ()</td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="d03619e90e62555aa5634fcc8adadcc9"></a><!-- doxytag: member="tbb::combinable::combinable" ref="d03619e90e62555aa5634fcc8adadcc9" args="(finit _finit)" -->
+template<typename finit> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>combinable</b> (finit _finit)</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="a00128.html#5ce6807050a9e8f87bcb4a65dccb12ef">scoped_lock</a> (<a class="el" href="a00127.html">spin_mutex</a> &m)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c87e79ae98588a5780f708773388843"></a><!-- doxytag: member="tbb::combinable::~combinable" ref="2c87e79ae98588a5780f708773388843" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00128.html#2c87e79ae98588a5780f708773388843">~combinable</a> ()</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="a00128.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a> (<a class="el" href="a00127.html">spin_mutex</a> &m)</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="57012803b7bc7416452cb930121ff210"></a><!-- doxytag: member="tbb::combinable::combinable" ref="57012803b7bc7416452cb930121ff210" args="(const combinable &other)" -->
+ </td><td class="memItemRight" valign="bottom"><b>combinable</b> (const <a class="el" href="a00128.html">combinable</a> &other)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9297ec188534b45dc0ca48f2f39a0501"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::try_acquire" ref="9297ec188534b45dc0ca48f2f39a0501" args="(spin_mutex &m)" -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00128.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a> (<a class="el" href="a00127.html">spin_mutex</a> &m)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c9650d59f65b1042afa232ede57dfca9"></a><!-- doxytag: member="tbb::combinable::operator=" ref="c9650d59f65b1042afa232ede57dfca9" args="(const combinable &other)" -->
+<a class="el" href="a00128.html">combinable</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00128.html">combinable</a> &other)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring lock (non-blocking). <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="a00128.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f09233cccb9b5e8a58874e43a703cac2"></a><!-- doxytag: member="tbb::combinable::clear" ref="f09233cccb9b5e8a58874e43a703cac2" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><b>clear</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="ac6fa425d1f06c56d8b70abc51aac844"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::~scoped_lock" ref="ac6fa425d1f06c56d8b70abc51aac844" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00128.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2d7550204bcb88fa8810b5a39e9cad24"></a><!-- doxytag: member="tbb::combinable::local" ref="2d7550204bcb88fa8810b5a39e9cad24" args="()" -->
+T & </td><td class="memItemRight" valign="bottom"><b>local</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="93a42052881ecccdd8ddff16a1b1cca1"></a><!-- doxytag: member="tbb::combinable::local" ref="93a42052881ecccdd8ddff16a1b1cca1" args="(bool &exists)" -->
+T & </td><td class="memItemRight" valign="bottom"><b>local</b> (bool &exists)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="fb0ebff0036225d81917591355c0e5b6"></a><!-- doxytag: member="tbb::combinable::combine" ref="fb0ebff0036225d81917591355c0e5b6" args="(FCombine fcombine)" -->
+template<typename FCombine> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>combine</b> (FCombine fcombine)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="2b76467e3c6657878e681b916aa40f86"></a><!-- doxytag: member="tbb::combinable::combine_each" ref="2b76467e3c6657878e681b916aa40f86" args="(FCombine fcombine)" -->
+template<typename FCombine> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>combine_each</b> (FCombine fcombine)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy lock. If holding a lock, releases the lock first. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Represents acquisition of a mutex. 
+<h3>template<typename T><br>
+ class tbb::combinable< T ></h3>
+
+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="a00274.html">spin_mutex.h</a></ul>
+<li><a class="el" href="a00266.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 160177f..829b5da 100644
--- a/doc/html/a00129.html
+++ b/doc/html/a00129.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::concurrent_bounded_queue< T, A > 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,46 +21,277 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00129.html">spin_rw_mutex_v3</a></div>
-<h1>tbb::spin_rw_mutex_v3 Class Reference<br>
+<a class="el" href="a00224.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="a00186.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="a00229.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="a00275.html">spin_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00276.html">concurrent_queue.h</a>></code>
 <p>
-<a href="a00053.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherited by <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>.
+<p>
+Inheritance diagram for tbb::concurrent_bounded_queue< T, A >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00019.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="98245517a931e5893f6601e66c51fc75"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::value_type" ref="98245517a931e5893f6601e66c51fc75" args="" -->
+typedef T </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#98245517a931e5893f6601e66c51fc75">value_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Element type in the queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e2726fccf6d975dc1071608cc0bbf90"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::allocator_type" ref="2e2726fccf6d975dc1071608cc0bbf90" args="" -->
+typedef A </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocator type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dcd44ca6a88c0dc7a847a47a10811f0c"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::reference" ref="dcd44ca6a88c0dc7a847a47a10811f0c" args="" -->
+typedef T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#dcd44ca6a88c0dc7a847a47a10811f0c">reference</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Reference type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="796713d0b9ba93a4721cbe13e4474068"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::const_reference" ref="796713d0b9ba93a4721cbe13e4474068" args="" -->
+typedef const T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#796713d0b9ba93a4721cbe13e4474068">const_reference</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Const reference type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Integral type for representing size of the queue.  <a href="#a80e4c11dbb324e4b92a24a77bbcde68"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4b45c91297e69515d83d5eef85ae1f49"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::difference_type" ref="4b45c91297e69515d83d5eef85ae1f49" args="" -->
+typedef std::ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#4b45c91297e69515d83d5eef85ae1f49">difference_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Difference type for iterator. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aeea2ad38b7e7fc2866f063dfed24c52"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::iterator" ref="aeea2ad38b7e7fc2866f063dfed24c52" args="" -->
+typedef internal::concurrent_queue_iterator<<br>
+ <a class="el" href="a00129.html">concurrent_bounded_queue</a>,<br>
+ T > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0edd1a90e6ffa503bac1c4027116dbff"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::const_iterator" ref="0edd1a90e6ffa503bac1c4027116dbff" args="" -->
+typedef internal::concurrent_queue_iterator<<br>
+ <a class="el" href="a00129.html">concurrent_bounded_queue</a>,<br>
+ const T > </td><td class="memItemRight" valign="bottom"><b>const_iterator</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="a00129.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e3525226732963ff0f13e89d8e6dab5b"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::concurrent_bounded_queue" ref="e3525226732963ff0f13e89d8e6dab5b" args="(const allocator_type &a=allocator_type())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#e3525226732963ff0f13e89d8e6dab5b">concurrent_bounded_queue</a> (const <a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> &a=<a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7b7fb414d2eaa8a7f5d68fc4cd63ac50"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::concurrent_bounded_queue" ref="7b7fb414d2eaa8a7f5d68fc4cd63ac50" args="(const concurrent_bounded_queue &src, const allocator_type &a=allocator_type())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#7b7fb414d2eaa8a7f5d68fc4cd63ac50">concurrent_bounded_queue</a> (const <a class="el" href="a00129.html">concurrent_bounded_queue</a> &src, const <a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> &a=<a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a5e04dcd7db9fd9b583b4e7df832246a"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::concurrent_bounded_queue" ref="a5e04dcd7db9fd9b583b4e7df832246a" args="(InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())" -->
+template<typename InputIterator> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00129.html#a5e04dcd7db9fd9b583b4e7df832246a">concurrent_bounded_queue</a> (InputIterator begin, InputIterator end, const <a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> &a=<a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">[begin,end) constructor <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acaf5b510dc0dfc7780b8c956cf773cf"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::~concurrent_bounded_queue" ref="acaf5b510dc0dfc7780b8c956cf773cf" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#acaf5b510dc0dfc7780b8c956cf773cf">~concurrent_bounded_queue</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ceb08c743b11ba88c878e73fff8af20b"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::push" ref="ceb08c743b11ba88c878e73fff8af20b" args="(const T &source)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#ceb08c743b11ba88c878e73fff8af20b">push</a> (const T &source)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Enqueue an item at tail of queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#41f4c6bd7a82ab070e840bbf81b0b123">pop</a> (T &destination)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Dequeue item from head of queue.  <a href="#41f4c6bd7a82ab070e840bbf81b0b123"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#2bd6232531279fb3ccbd296bea23066b">try_push</a> (const T &source)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Enqueue an item at tail of queue if queue is not already full.  <a href="#2bd6232531279fb3ccbd296bea23066b"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#0ca487019bbb00a196442aff78a1e4f7">try_pop</a> (T &destination)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Attempt to dequeue an item from head of queue.  <a href="#0ca487019bbb00a196442aff78a1e4f7"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#7dc14d1a579a4cccda9f857585e1768d">size</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return number of pushes minus number of pops.  <a href="#7dc14d1a579a4cccda9f857585e1768d"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f64924f2ee9225c368a270fc3c394db9"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::empty" ref="f64924f2ee9225c368a270fc3c394db9" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">empty</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Equivalent to <a class="el" href="a00129.html#7dc14d1a579a4cccda9f857585e1768d">size()</a><=0. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2888b3e4e837d7e03f2c731963a402b"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::capacity" ref="b2888b3e4e837d7e03f2c731963a402b" args="() const " -->
+<a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#b2888b3e4e837d7e03f2c731963a402b">capacity</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum number of allowed elements. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#089f33dfd504e30a95f40ed2a5799367">set_capacity</a> (<a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> capacity)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the capacity.  <a href="#089f33dfd504e30a95f40ed2a5799367"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="415eb87e53b1c6a266de06ecbc490d16"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::get_allocator" ref="415eb87e53b1c6a266de06ecbc490d16" args="() const " -->
+<a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#415eb87e53b1c6a266de06ecbc490d16">get_allocator</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">return allocator object <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="90b31e2954c6e4596c7900435a5f4bc1"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::clear" ref="90b31e2954c6e4596c7900435a5f4bc1" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">clear</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="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="a00129.html#9a815fb2759e55072ed413f1b6970cf3">~spin_rw_mutex_v3</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">clear the queue. not thread-safe. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a2637188e104503ac2c0dff633014e8"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::unsafe_begin" ref="5a2637188e104503ac2c0dff633014e8" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_begin</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 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="c7267334ef11087c76c810abb9d5cbc2"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::unsafe_end" ref="c7267334ef11087c76c810abb9d5cbc2" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> ()</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="8be757841d0bbf7744508aaf6a141d08"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::unsafe_begin" ref="8be757841d0bbf7744508aaf6a141d08" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> () const </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="3aac91d288bf227d9d06717b44ef28f7"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::unsafe_end" ref="3aac91d288bf227d9d06717b44ef28f7" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> () const </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="05bffad9626d51abbd4bb82ae2a1cceb"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::internal::concurrent_queue_iterator" ref="05bffad9626d51abbd4bb82ae2a1cceb" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::concurrent_queue_iterator</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="a00130.html">scoped_lock</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>destroyer</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00130.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Class used to ensure exception-safety of method "pop". <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Fast, unfair, spinning reader-writer lock with backoff and writer-preference. 
+<h3>template<typename T, class A = cache_aligned_allocator<T>><br>
+ class tbb::concurrent_bounded_queue< T, A ></h3>
+
+A high-performance thread-safe blocking concurrent bounded queue. 
+<p>
+This is the pre-PPL TBB concurrent queue which supports boundedness and blocking semantics. Note that method names agree with the PPL-style concurrent queue. Multiple threads may each push and pop concurrently. Assignment construction is not allowed. 
+<p>
+<hr><h2>Member Typedef Documentation</h2>
+<a class="anchor" name="a80e4c11dbb324e4b92a24a77bbcde68"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::size_type" ref="a80e4c11dbb324e4b92a24a77bbcde68" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A = cache_aligned_allocator<T>> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef std::ptrdiff_t <a class="el" href="a00129.html">tbb::concurrent_bounded_queue</a>< T, A >::<a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a>          </td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Integral type for representing size of the queue. 
+<p>
+Notice that the size_type is a signed integral type. This is because the size can be negative if there are pending pops without corresponding pushes. 
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="41f4c6bd7a82ab070e840bbf81b0b123"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::pop" ref="41f4c6bd7a82ab070e840bbf81b0b123" args="(T &destination)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A = cache_aligned_allocator<T>> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">void <a class="el" href="a00129.html">tbb::concurrent_bounded_queue</a>< T, A >::pop           </td>
+          <td>(</td>
+          <td class="paramtype">T & </td>
+          <td class="paramname"> <em>destination</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Dequeue item from head of queue. 
+<p>
+Block until an item becomes available, and then dequeue it. 
+</div>
+</div><p>
+<a class="anchor" name="089f33dfd504e30a95f40ed2a5799367"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::set_capacity" ref="089f33dfd504e30a95f40ed2a5799367" args="(size_type capacity)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A = cache_aligned_allocator<T>> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">void <a class="el" href="a00129.html">tbb::concurrent_bounded_queue</a>< T, A >::set_capacity           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> </td>
+          <td class="paramname"> <em>capacity</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Set the capacity. 
+<p>
+Setting the capacity to 0 causes subsequent try_push operations to always fail, and subsequent push operations to block forever. 
+</div>
+</div><p>
+<a class="anchor" name="7dc14d1a579a4cccda9f857585e1768d"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::size" ref="7dc14d1a579a4cccda9f857585e1768d" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A = cache_aligned_allocator<T>> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> <a class="el" href="a00129.html">tbb::concurrent_bounded_queue</a>< T, A >::size           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return number of pushes minus number of pops. 
+<p>
+Note that the result can be negative if there are pops waiting for the corresponding pushes. The result can also exceed <a class="el" href="a00129.html#b2888b3e4e837d7e03f2c731963a402b">capacity()</a> if there are push operations in flight. 
+</div>
+</div><p>
+<a class="anchor" name="0ca487019bbb00a196442aff78a1e4f7"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::try_pop" ref="0ca487019bbb00a196442aff78a1e4f7" args="(T &destination)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A = cache_aligned_allocator<T>> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">bool <a class="el" href="a00129.html">tbb::concurrent_bounded_queue</a>< T, A >::try_pop           </td>
+          <td>(</td>
+          <td class="paramtype">T & </td>
+          <td class="paramname"> <em>destination</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Attempt to dequeue an item from head of queue. 
+<p>
+Does not wait for item to become available. Returns true if successful; false otherwise. 
+</div>
+</div><p>
+<a class="anchor" name="2bd6232531279fb3ccbd296bea23066b"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::try_push" ref="2bd6232531279fb3ccbd296bea23066b" args="(const T &source)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A = cache_aligned_allocator<T>> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">bool <a class="el" href="a00129.html">tbb::concurrent_bounded_queue</a>< T, A >::try_push           </td>
+          <td>(</td>
+          <td class="paramtype">const T & </td>
+          <td class="paramname"> <em>source</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Enqueue an item at tail of queue if queue is not already full. 
 <p>
+Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00275.html">spin_rw_mutex.h</a></ul>
+<li><a class="el" href="a00276.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 132cf3a..7070c71 100644
--- a/doc/html/a00130.html
+++ b/doc/html/a00130.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::concurrent_hash_map< Key, T, HashCompare, Allocator > 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,59 +21,277 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00129.html">spin_rw_mutex_v3</a>::<a class="el" href="a00130.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="a00224.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>
+</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="a00275.html">spin_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
 <p>
-<a href="a00054.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00013.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="a59325d5213bdbb32e66525364d9ca6e"></a><!-- doxytag: member="tbb::concurrent_hash_map::key_type" ref="a59325d5213bdbb32e66525364d9ca6e" args="" -->
+typedef Key </td><td class="memItemRight" valign="bottom"><b>key_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d30555ca958fcf4401d8c46e32b35832"></a><!-- doxytag: member="tbb::concurrent_hash_map::mapped_type" ref="d30555ca958fcf4401d8c46e32b35832" args="" -->
+typedef T </td><td class="memItemRight" valign="bottom"><b>mapped_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba7dfe412706706fc77eeb9ca106dd77"></a><!-- doxytag: member="tbb::concurrent_hash_map::value_type" ref="ba7dfe412706706fc77eeb9ca106dd77" args="" -->
+typedef std::pair< const Key,<br>
+ T > </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="3ca1134a52ba7d888f7b928adbded48e"></a><!-- doxytag: member="tbb::concurrent_hash_map::size_type" ref="3ca1134a52ba7d888f7b928adbded48e" args="" -->
+typedef internal::hash_map_base::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="156eff4cfda20255ab61594772322632"></a><!-- doxytag: member="tbb::concurrent_hash_map::difference_type" ref="156eff4cfda20255ab61594772322632" 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="9efc6155cc67220afe493d5ba86da474"></a><!-- doxytag: member="tbb::concurrent_hash_map::pointer" ref="9efc6155cc67220afe493d5ba86da474" 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="1de4baea4800c9422497160c2dc6ee88"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_pointer" ref="1de4baea4800c9422497160c2dc6ee88" 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="7f4e03ecea778f011ab7c3c0b61d2521"></a><!-- doxytag: member="tbb::concurrent_hash_map::reference" ref="7f4e03ecea778f011ab7c3c0b61d2521" 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="9fa6589f474a5b2f770ee12ab9965b35"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_reference" ref="9fa6589f474a5b2f770ee12ab9965b35" 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="e0a1323016e3475bf8a5ed8952f84b53"></a><!-- doxytag: member="tbb::concurrent_hash_map::iterator" ref="e0a1323016e3475bf8a5ed8952f84b53" args="" -->
+typedef internal::hash_map_iterator<<br>
+ <a class="el" href="a00130.html">concurrent_hash_map</a>, value_type > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2380701b85fb373abfe1c20d4044cc47"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_iterator" ref="2380701b85fb373abfe1c20d4044cc47" args="" -->
+typedef internal::hash_map_iterator<<br>
+ <a class="el" href="a00130.html">concurrent_hash_map</a>, const <br>
+value_type > </td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f251ff63b9ee8ef88bac1452de92618"></a><!-- doxytag: member="tbb::concurrent_hash_map::range_type" ref="0f251ff63b9ee8ef88bac1452de92618" args="" -->
+typedef internal::hash_map_range<<br>
+ iterator > </td><td class="memItemRight" valign="bottom"><b>range_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e91c41ef86638719f1e4fb44cc936ed2"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_range_type" ref="e91c41ef86638719f1e4fb44cc936ed2" args="" -->
+typedef internal::hash_map_range<<br>
+ const_iterator > </td><td class="memItemRight" valign="bottom"><b>const_range_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd223032ecd376e846b6724e168bdc56"></a><!-- doxytag: member="tbb::concurrent_hash_map::allocator_type" ref="dd223032ecd376e846b6724e168bdc56" args="" -->
+typedef Allocator </td><td class="memItemRight" valign="bottom"><b>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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#d6ea60dee5563f702379bf5e51aa8806">scoped_lock</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="342582ba05d9fb893ed80875d2b7a42f"></a><!-- doxytag: member="tbb::concurrent_hash_map::concurrent_hash_map" ref="342582ba05d9fb893ed80875d2b7a42f" args="(const allocator_type &a=allocator_type())" -->
+ </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="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>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="b5132202dff9ee3d619bef6b1d84edea"></a><!-- doxytag: member="tbb::concurrent_hash_map::concurrent_hash_map" ref="b5132202dff9ee3d619bef6b1d84edea" args="(I first, I last, const allocator_type &a=allocator_type())" -->
+template<typename I> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00130.html#b5132202dff9ee3d619bef6b1d84edea">concurrent_hash_map</a> (I first, I last, const allocator_type &a=allocator_type())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construction with copying iteration range and given allocator instance. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="adadeb9d1acb8c3b34517435666cf297"></a><!-- doxytag: member="tbb::concurrent_hash_map::operator=" ref="adadeb9d1acb8c3b34517435666cf297" args="(const concurrent_hash_map &table)" -->
+<a class="el" href="a00130.html">concurrent_hash_map</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#adadeb9d1acb8c3b34517435666cf297">operator=</a> (const <a class="el" href="a00130.html">concurrent_hash_map</a> &table)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36bcd50fd5383f3682032323b2d74333"></a><!-- doxytag: member="tbb::concurrent_hash_map::clear" ref="36bcd50fd5383f3682032323b2d74333" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#36bcd50fd5383f3682032323b2d74333">clear</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear table. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5e96649f71f68f3b6bf3b1eee6b441a7"></a><!-- doxytag: member="tbb::concurrent_hash_map::~concurrent_hash_map" ref="5e96649f71f68f3b6bf3b1eee6b441a7" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#5e96649f71f68f3b6bf3b1eee6b441a7">~concurrent_hash_map</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear table and destroy it. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0f51b807e124c2bee274c5f86a2a817"></a><!-- doxytag: member="tbb::concurrent_hash_map::range" ref="e0f51b807e124c2bee274c5f86a2a817" args="(size_type grainsize=1)" -->
+range_type </td><td class="memItemRight" valign="bottom"><b>range</b> (size_type grainsize=1)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="78989fb98b211ab5f8437798d490e004"></a><!-- doxytag: member="tbb::concurrent_hash_map::range" ref="78989fb98b211ab5f8437798d490e004" args="(size_type grainsize=1) const " -->
+const_range_type </td><td class="memItemRight" valign="bottom"><b>range</b> (size_type grainsize=1) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dfb7ab010b46fc194673256479c2ea48"></a><!-- doxytag: member="tbb::concurrent_hash_map::begin" ref="dfb7ab010b46fc194673256479c2ea48" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><b>begin</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e2dd7c8b3d37a93ba551e4de33bb73d"></a><!-- doxytag: member="tbb::concurrent_hash_map::end" ref="7e2dd7c8b3d37a93ba551e4de33bb73d" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><b>end</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="be53487f364b5744187af9f7627c3190"></a><!-- doxytag: member="tbb::concurrent_hash_map::begin" ref="be53487f364b5744187af9f7627c3190" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><b>begin</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6b947898d1a60b680d8c4f915442e1a8"></a><!-- doxytag: member="tbb::concurrent_hash_map::end" ref="6b947898d1a60b680d8c4f915442e1a8" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><b>end</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3b6f066f9b1e51eaefa67c37928a6d5f"></a><!-- doxytag: member="tbb::concurrent_hash_map::equal_range" ref="3b6f066f9b1e51eaefa67c37928a6d5f" args="(const Key &key)" -->
+std::pair< iterator, iterator > </td><td class="memItemRight" valign="bottom"><b>equal_range</b> (const Key &key)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d1d5f33f2babb6780794c9ed6193174"></a><!-- doxytag: member="tbb::concurrent_hash_map::equal_range" ref="9d1d5f33f2babb6780794c9ed6193174" args="(const Key &key) const " -->
+std::pair< const_iterator,<br>
+ const_iterator > </td><td class="memItemRight" valign="bottom"><b>equal_range</b> (const Key &key) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="25b0e3881038877604c5efc1c14c4afd"></a><!-- doxytag: member="tbb::concurrent_hash_map::size" ref="25b0e3881038877604c5efc1c14c4afd" args="() const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#25b0e3881038877604c5efc1c14c4afd">size</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Number of items in table. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3e5d085375320cd3f34faeedc5bba8f6"></a><!-- doxytag: member="tbb::concurrent_hash_map::empty" ref="3e5d085375320cd3f34faeedc5bba8f6" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#3e5d085375320cd3f34faeedc5bba8f6">empty</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if <a class="el" href="a00130.html#25b0e3881038877604c5efc1c14c4afd">size()</a>==0. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ed260e217fb310050928d7bd03f1b5e"></a><!-- doxytag: member="tbb::concurrent_hash_map::max_size" ref="6ed260e217fb310050928d7bd03f1b5e" args="() const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#6ed260e217fb310050928d7bd03f1b5e">max_size</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Upper bound on size. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="79d1e5c3b975dbd38b43138266fe4c0e"></a><!-- doxytag: member="tbb::concurrent_hash_map::get_allocator" ref="79d1e5c3b975dbd38b43138266fe4c0e" args="() const " -->
+allocator_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#79d1e5c3b975dbd38b43138266fe4c0e">get_allocator</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">return allocator object <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd73f70aa6602021ea2c56bac9715353"></a><!-- doxytag: member="tbb::concurrent_hash_map::swap" ref="dd73f70aa6602021ea2c56bac9715353" args="(concurrent_hash_map &table)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#dd73f70aa6602021ea2c56bac9715353">swap</a> (<a class="el" href="a00130.html">concurrent_hash_map</a> &table)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">swap two instances. Iterators are invalidated <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3e97a1f3cb66e81a2336b013ef1ae7d"></a><!-- doxytag: member="tbb::concurrent_hash_map::count" ref="a3e97a1f3cb66e81a2336b013ef1ae7d" args="(const Key &key) const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#a3e97a1f3cb66e81a2336b013ef1ae7d">count</a> (const Key &key) const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return count of items (0 or 1). <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#9fa1ca60af4ef761a100617b27718585">find</a> (<a class="el" href="a00133.html">const_accessor</a> &result, const Key &key) const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Find item and acquire a read lock on the item.  <a href="#9fa1ca60af4ef761a100617b27718585"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#4f7cc0aab2d8216c0a6e681f32dd48c8">find</a> (<a class="el" href="a00131.html">accessor</a> &result, const Key &key)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Find item and acquire a write lock on the item.  <a href="#4f7cc0aab2d8216c0a6e681f32dd48c8"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#67d8c254b1666d89267c8a4a33c864f3">insert</a> (<a class="el" href="a00133.html">const_accessor</a> &result, const Key &key)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item (if not already present) and acquire a read lock on the item.  <a href="#67d8c254b1666d89267c8a4a33c864f3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#8ea81ff7fea044f859273b354c91c185">insert</a> (<a class="el" href="a00131.html">accessor</a> &result, const Key &key)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item (if not already present) and acquire a write lock on the item.  <a href="#8ea81ff7fea044f859273b354c91c185"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#68a46a26bd4308c1780d021ca7e8fc15">insert</a> (<a class="el" href="a00133.html">const_accessor</a> &result, const value_type &value)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item by copying if there is no such key present already and acquire a read lock on the item.  <a href="#68a46a26bd4308c1780d021ca7e8fc15"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#7bd4dcf6ea74a32299fd57d8d7fc7ed8">insert</a> (<a class="el" href="a00131.html">accessor</a> &result, const value_type &value)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item by copying if there is no such key present already and acquire a write lock on the item.  <a href="#7bd4dcf6ea74a32299fd57d8d7fc7ed8"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#3034a308bc839695a5714a107380c4b9">insert</a> (const value_type &value)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert item by copying if there is no such key present already.  <a href="#3034a308bc839695a5714a107380c4b9"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="7b42dba04d71e1367f0d542087906178"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="7b42dba04d71e1367f0d542087906178" args="(I first, I last)" -->
+template<typename I> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00130.html#7b42dba04d71e1367f0d542087906178">insert</a> (I first, I last)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert range [first, last). <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#58df7a1e4373c55eb4c2fa9dc69516b1">erase</a> (const Key &key)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Erase item.  <a href="#58df7a1e4373c55eb4c2fa9dc69516b1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#fc64086f9f518cef8c368c9429d0064e">erase</a> (<a class="el" href="a00133.html">const_accessor</a> &item_accessor)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Erase item by <a class="el" href="a00133.html">const_accessor</a>.  <a href="#fc64086f9f518cef8c368c9429d0064e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#b65abfa291da566617dd58dfb349630a">erase</a> (<a class="el" href="a00131.html">accessor</a> &item_accessor)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Erase item by accessor.  <a href="#b65abfa291da566617dd58dfb349630a"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Protected Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4a66e22918752bb0d7c22333bec7e0d6"></a><!-- doxytag: member="tbb::concurrent_hash_map::node_allocator_type" ref="4a66e22918752bb0d7c22333bec7e0d6" args="" -->
+typedef Allocator::template <br>
+rebind< node >::other </td><td class="memItemRight" valign="bottom"><b>node_allocator_type</b></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="572fec6cb2b0d70b8a3a12c5be4df6d4"></a><!-- doxytag: member="tbb::concurrent_hash_map::delete_node" ref="572fec6cb2b0d70b8a3a12c5be4df6d4" args="(node_base *n)" -->
+void </td><td class="memItemRight" valign="bottom"><b>delete_node</b> (node_base *n)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="058f1d5e2075d11c9b2ac00f1f0ae60e"></a><!-- doxytag: member="tbb::concurrent_hash_map::search_bucket" ref="058f1d5e2075d11c9b2ac00f1f0ae60e" args="(const key_type &key, bucket *b) const " -->
+node * </td><td class="memItemRight" valign="bottom"><b>search_bucket</b> (const key_type &key, bucket *b) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f2fe44bde2158a2f2a315c6457ebd030"></a><!-- doxytag: member="tbb::concurrent_hash_map::rehash_bucket" ref="f2fe44bde2158a2f2a315c6457ebd030" args="(bucket *b_new, const hashcode_t h)" -->
+void </td><td class="memItemRight" valign="bottom"><b>rehash_bucket</b> (bucket *b_new, const hashcode_t h)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f0ba43d9cb783f12dd01bf5677da097"></a><!-- doxytag: member="tbb::concurrent_hash_map::lookup" ref="0f0ba43d9cb783f12dd01bf5677da097" args="(bool op_insert, const Key &key, const T *t, const_accessor *result, bool write)" -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#0f0ba43d9cb783f12dd01bf5677da097">lookup</a> (bool op_insert, const Key &key, const T *t, <a class="el" href="a00133.html">const_accessor</a> *result, bool write)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert or find item and optionally acquire a lock on the item. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="671965989ffb5f6084c776cb0bb6cdab"></a><!-- doxytag: member="tbb::concurrent_hash_map::exclude" ref="671965989ffb5f6084c776cb0bb6cdab" args="(const_accessor &item_accessor, bool readonly)" -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#671965989ffb5f6084c776cb0bb6cdab">exclude</a> (<a class="el" href="a00133.html">const_accessor</a> &item_accessor, bool readonly)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">delete item by accessor <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="308ec5ad19fdd1be4d345f8013070150"></a><!-- doxytag: member="tbb::concurrent_hash_map::internal_equal_range" ref="308ec5ad19fdd1be4d345f8013070150" args="(const Key &key, I end) const " -->
+template<typename I> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">std::pair< I, I > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00130.html#308ec5ad19fdd1be4d345f8013070150">internal_equal_range</a> (const Key &key, I end) const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns an iterator for an item defined by the key, or for the next item after it (if upper==true). <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7973cd92f57dcb092ab757f8d9e089f9"></a><!-- doxytag: member="tbb::concurrent_hash_map::internal_copy" ref="7973cd92f57dcb092ab757f8d9e089f9" args="(const concurrent_hash_map &source)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#7973cd92f57dcb092ab757f8d9e089f9">internal_copy</a> (const <a class="el" href="a00130.html">concurrent_hash_map</a> &source)</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="a00130.html#42a92d4f8fdde425b111cfa8a9228071">scoped_lock</a> (<a class="el" href="a00129.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy "source" to *this, where *this must start out empty. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="35372431aedfcc88b890d895933cebc2"></a><!-- doxytag: member="tbb::concurrent_hash_map::internal_copy" ref="35372431aedfcc88b890d895933cebc2" args="(I first, I last)" -->
+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="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="a00130.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">~scoped_lock</a> ()</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="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="a00130.html#b0b646ec5be02a127d159bbb7ca65353">acquire</a> (<a class="el" href="a00129.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">fast find when no concurrent erasure is used <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>
 
-<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="a00130.html#3f0b1e3f2efab63336400348bd070226">upgrade_to_writer</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1d13c1f34b3826f9235b82ea90818169"></a><!-- doxytag: member="tbb::concurrent_hash_map::my_hash_compare" ref="1d13c1f34b3826f9235b82ea90818169" args="" -->
+HashCompare </td><td class="memItemRight" valign="bottom"><b>my_hash_compare</b></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="a00130.html#61b14d00a78185c9b2d206ebfc379124">release</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="e24acd2f6849db3377a3942807639758"></a><!-- doxytag: member="tbb::concurrent_hash_map::internal::hash_map_iterator" ref="e24acd2f6849db3377a3942807639758" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::hash_map_iterator</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="a00130.html#c2c2c38a08cb9080e87099fac3e5bc94">downgrade_to_reader</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c94f21746c8902f7e0b5115a8d4da1d2"></a><!-- doxytag: member="tbb::concurrent_hash_map::internal::hash_map_range" ref="c94f21746c8902f7e0b5115a8d4da1d2" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::hash_map_range</b></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="a00130.html#9879626968d9b9a04cd2ec0fb2e84ae1">try_acquire</a> (<a class="el" href="a00129.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c0028dfa75a6baa14007355ab1ef7fc"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor" ref="2c0028dfa75a6baa14007355ab1ef7fc" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>const_accessor</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="a00131.html">accessor</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allows write access to elements and combines data access, locking, and garbage collection.  <a href="a00131.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="a00132.html">bucket_accessor</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">bucket accessor is to find, rehash, acquire a lock, and access a bucket  <a href="a00132.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="a00133.html">const_accessor</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Combines data access, locking, and garbage collection.  <a href="a00133.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>node</b></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. 
+<h3>template<typename Key, typename T, typename HashCompare, typename Allocator><br>
+ class tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></h3>
+
+Unordered map from Key to T. 
 <p>
-It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. 
+<a class="el" href="a00130.html">concurrent_hash_map</a> is associative container with concurrent access.<p>
+<dl compact><dt><b>Compatibility</b></dt><dd>The class meets all Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1).</dd></dl>
+<dl compact><dt><b>Exception Safety</b></dt><dd><ul>
+<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>
+</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 [...]
+</dd></dl>
+
 <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="()" -->
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="b65abfa291da566617dd58dfb349630a"></a><!-- doxytag: member="tbb::concurrent_hash_map::erase" ref="b65abfa291da566617dd58dfb349630a" args="(accessor &item_accessor)" -->
 <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">tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock           </td>
+          <td class="memname">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::erase           </td>
           <td>(</td>
-          <td class="paramname">          </td>
+          <td class="paramtype"><a class="el" href="a00131.html">accessor</a> & </td>
+          <td class="paramname"> <em>item_accessor</em>          </td>
           <td> ) </td>
           <td width="100%"><code> [inline]</code></td>
         </tr>
@@ -82,26 +300,76 @@ It helps to avoid the common problem of forgetting to release lock. It also nice
 <div class="memdoc">
 
 <p>
-Construct lock that has not acquired a mutex. 
+Erase item by accessor. 
 <p>
-Equivalent to zero-initialization of *this. 
+Return true if item was erased by particularly this call. 
 </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)" -->
+<a class="anchor" name="fc64086f9f518cef8c368c9429d0064e"></a><!-- doxytag: member="tbb::concurrent_hash_map::erase" ref="fc64086f9f518cef8c368c9429d0064e" args="(const_accessor &item_accessor)" -->
 <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">tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock           </td>
+          <td class="memname">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::erase           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00129.html">spin_rw_mutex</a> & </td>
-          <td class="paramname"> <em>m</em>, </td>
+          <td class="paramtype"><a class="el" href="a00133.html">const_accessor</a> & </td>
+          <td class="paramname"> <em>item_accessor</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Erase item by <a class="el" href="a00133.html">const_accessor</a>. 
+<p>
+Return true if item was erased by particularly this call. 
+</div>
+</div><p>
+<a class="anchor" name="58df7a1e4373c55eb4c2fa9dc69516b1"></a><!-- doxytag: member="tbb::concurrent_hash_map::erase" ref="58df7a1e4373c55eb4c2fa9dc69516b1" args="(const Key &key)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename Key, typename T, typename HashCompare, typename A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::erase           </td>
+          <td>(</td>
+          <td class="paramtype">const Key & </td>
+          <td class="paramname"> <em>key</em>          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Erase item. 
+<p>
+Return true if item was erased by particularly this call. 
+</div>
+</div><p>
+<a class="anchor" name="4f7cc0aab2d8216c0a6e681f32dd48c8"></a><!-- doxytag: member="tbb::concurrent_hash_map::find" ref="4f7cc0aab2d8216c0a6e681f32dd48c8" args="(accessor &result, const Key &key)" -->
+<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">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::find           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00131.html">accessor</a> & </td>
+          <td class="paramname"> <em>result</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>
+          <td class="paramtype">const Key & </td>
+          <td class="paramname"> <em>key</em></td><td> </td>
         </tr>
         <tr>
           <td></td>
@@ -113,20 +381,55 @@ Equivalent to zero-initialization of *this.
 <div class="memdoc">
 
 <p>
-Acquire lock on given mutex. 
+Find item and acquire a write lock on the item. 
 <p>
-Upon entry, *this should not be in the "have acquired a mutex" state. 
+Return true if item is found, false otherwise. 
 </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="()" -->
+<a class="anchor" name="9fa1ca60af4ef761a100617b27718585"></a><!-- doxytag: member="tbb::concurrent_hash_map::find" ref="9fa1ca60af4ef761a100617b27718585" args="(const_accessor &result, 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">bool tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer           </td>
+          <td class="memname">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::find           </td>
           <td>(</td>
-          <td class="paramname">          </td>
+          <td class="paramtype"><a class="el" href="a00133.html">const_accessor</a> & </td>
+          <td class="paramname"> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const Key & </td>
+          <td class="paramname"> <em>key</em></td><td> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Find item and acquire a read lock on the item. 
+<p>
+Return true if item is found, false otherwise. 
+</div>
+</div><p>
+<a class="anchor" name="3034a308bc839695a5714a107380c4b9"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="3034a308bc839695a5714a107380c4b9" args="(const value_type &value)" -->
+<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">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::insert           </td>
+          <td>(</td>
+          <td class="paramtype">const value_type & </td>
+          <td class="paramname"> <em>value</em>          </td>
           <td> ) </td>
           <td width="100%"><code> [inline]</code></td>
         </tr>
@@ -135,13 +438,145 @@ Upon entry, *this should not be in the "have acquired a mutex" state.
 <div class="memdoc">
 
 <p>
-Upgrade reader to become a writer. 
+Insert item by copying if there is no such key present already. 
+<p>
+Returns true if item is inserted. 
+</div>
+</div><p>
+<a class="anchor" name="7bd4dcf6ea74a32299fd57d8d7fc7ed8"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="7bd4dcf6ea74a32299fd57d8d7fc7ed8" args="(accessor &result, const value_type &value)" -->
+<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">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::insert           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00131.html">accessor</a> & </td>
+          <td class="paramname"> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const value_type & </td>
+          <td class="paramname"> <em>value</em></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>
+Insert item by copying if there is no such key present already and acquire a write lock on the item. 
+<p>
+Returns true if item is new. 
+</div>
+</div><p>
+<a class="anchor" name="68a46a26bd4308c1780d021ca7e8fc15"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="68a46a26bd4308c1780d021ca7e8fc15" args="(const_accessor &result, const value_type &value)" -->
+<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">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::insert           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00133.html">const_accessor</a> & </td>
+          <td class="paramname"> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const value_type & </td>
+          <td class="paramname"> <em>value</em></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>
+Insert item by copying if there is no such key present already and acquire a read lock on the item. 
+<p>
+Returns true if item is new. 
+</div>
+</div><p>
+<a class="anchor" name="8ea81ff7fea044f859273b354c91c185"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="8ea81ff7fea044f859273b354c91c185" args="(accessor &result, const Key &key)" -->
+<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">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::insert           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00131.html">accessor</a> & </td>
+          <td class="paramname"> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const Key & </td>
+          <td class="paramname"> <em>key</em></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>
+Insert item (if not already present) and acquire a write lock on the item. 
+<p>
+Returns true if item is new. 
+</div>
+</div><p>
+<a class="anchor" name="67d8c254b1666d89267c8a4a33c864f3"></a><!-- doxytag: member="tbb::concurrent_hash_map::insert" ref="67d8c254b1666d89267c8a4a33c864f3" args="(const_accessor &result, const Key &key)" -->
+<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">bool <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::insert           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00133.html">const_accessor</a> & </td>
+          <td class="paramname"> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const Key & </td>
+          <td class="paramname"> <em>key</em></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>
+Insert item (if not already present) and acquire a read lock on the item. 
 <p>
-Returns true if the upgrade happened without re-acquiring the lock and false if opposite 
+Returns true if item is new. 
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00275.html">spin_rw_mutex.h</a></ul>
+<li><a class="el" href="a00267.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 8123bcd..ca9bafb 100644
--- a/doc/html/a00131.html
+++ b/doc/html/a00131.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::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor 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,39 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00131.html">split</a></div>
-<h1>tbb::split Class Reference<br>
-<small>
-[<a class="el" href="a00183.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::split" -->Dummy type that distinguishes splitting constructor from copy constructor.  
+<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>
+<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="a00294.html">tbb_stddef.h</a>></code>
+<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
 <p>
-<table border="0" cellpadding="0" cellspacing="0">
+Inherits <a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a>.
+<p>
+Inheritance diagram for tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00017.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="34035ddb9e2a27f2f0a1f6a2a16730cf"></a><!-- doxytag: member="tbb::concurrent_hash_map::accessor::value_type" ref="34035ddb9e2a27f2f0a1f6a2a16730cf" args="" -->
+typedef concurrent_hash_map::value_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#34035ddb9e2a27f2f0a1f6a2a16730cf">value_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of value. <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="03a091f7355a3c0c03f839893695f372"></a><!-- doxytag: member="tbb::concurrent_hash_map::accessor::operator *" ref="03a091f7355a3c0c03f839893695f372" args="() const " -->
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#03a091f7355a3c0c03f839893695f372">operator *</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return reference to associated value in hash table. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="302f02e5deec0a67b872e9cfb08d9e60"></a><!-- doxytag: member="tbb::concurrent_hash_map::accessor::operator->" ref="302f02e5deec0a67b872e9cfb08d9e60" args="() const " -->
+pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#302f02e5deec0a67b872e9cfb08d9e60">operator-></a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return pointer to associated value in hash table. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Dummy type that distinguishes splitting constructor from copy constructor. 
-<p>
-See description of parallel_for and parallel_reduce for example usages. 
+<h3>template<typename Key, typename T, typename HashCompare, typename Allocator><br>
+ class tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</h3>
+
+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="a00294.html">tbb_stddef.h</a></ul>
+<li><a class="el" href="a00267.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 23c5744..e6bdd2d 100644
--- a/doc/html/a00132.html
+++ b/doc/html/a00132.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::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,609 +21,42 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00132.html">task</a></div>
-<h1>tbb::task Class Reference<br>
-<small>
-[<a class="el" href="a00188.html">Task Scheduling</a>]</small>
-</h1><!-- doxytag: class="tbb::task" -->Base class for user-defined tasks.  
+<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>
+<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="a00276.html">task.h</a>></code>
+<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
 <p>
-Inherited by <a class="el" href="a00108.html">tbb::empty_task</a>.
-<p>
-Inheritance diagram for tbb::task:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00057.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00015.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="a00132.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="a00132.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="a00132.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="a00132.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="a00132.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="a00132.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="a00132.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="a00132.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="a00132.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="a00132.html#4a3c415562d17905390ea5b49d12293e">state_type</a> { <br>
-  <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a>, 
-<a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a>, 
-<a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a>, 
-<a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a>, 
-<br>
-  <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a>, 
-<a class="el" href="a00132.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="a00132.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="a00132.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="a00132.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.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="a00132.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="a00132.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="a00132.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a> (<a class="el" href="a00132.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="a00132.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a> (<a class="el" href="a00132.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="a00132.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="a00132.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="a00132.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a> (<a class="el" href="a00132.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="a00132.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="a00132.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="5be823a972b3c3b9901c5963eeb050fd"></a><!-- doxytag: member="tbb::task::depth" ref="5be823a972b3c3b9901c5963eeb050fd" args="() const " -->
-<a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.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="a00132.html#fc4d4e61a56823aa1efdbb5d59e42973">set_depth</a> (<a class="el" href="a00132.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="a00132.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="a00132.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="a00132.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a> (<a class="el" href="a00132.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="a00132.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a> (<a class="el" href="a00134.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="a00132.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a> (<a class="el" href="a00132.html">task</a> &child)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="53584e6b0cf6cda95f31fcbfabb311fe"></a><!-- doxytag: member="tbb::concurrent_hash_map::bucket_accessor::bucket_accessor" ref="53584e6b0cf6cda95f31fcbfabb311fe" args="(concurrent_hash_map *base, const hashcode_t h, bool writer=false)" -->
+ </td><td class="memItemRight" valign="bottom"><b>bucket_accessor</b> (<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">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="a00132.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a> (<a class="el" href="a00134.html">task_list</a> &list)</td></tr>
+<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">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="a00132.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a> ()</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="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>
 
-<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="a00132.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#314e98ee4347ccec83efcb9ee22e8596">parent</a> () const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">check whether bucket is locked for write <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e98ad1b46ed35fb4a92d65c16c6982d"></a><!-- doxytag: member="tbb::concurrent_hash_map::bucket_accessor::operator()" ref="7e98ad1b46ed35fb4a92d65c16c6982d" args="()" -->
+bucket * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#7e98ad1b46ed35fb4a92d65c16c6982d">operator()</a> ()</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="f9169402702f56bf519448aaf34450aa"></a><!-- doxytag: member="tbb::task::is_stolen_task" ref="f9169402702f56bf519448aaf34450aa" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.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="a00132.html#4a3c415562d17905390ea5b49d12293e">state_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.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="a00132.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="a00132.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="a00132.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a> (<a class="el" href="a00132.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="a00132.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.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="a00132.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a> (<a class="el" href="a00132.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="a00132.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="a00132.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="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="a00132.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="a00132.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a> (<a class="el" href="a00133.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="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a> (<a class="el" href="a00132.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="a00132.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a> (<a class="el" href="a00134.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="a00132.html">task</a> &__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.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="a00132.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="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="mdescLeft"> </td><td class="mdescRight">get bucket pointer <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="32b2b1c83ca85859bc5276022821152d"></a><!-- doxytag: member="tbb::concurrent_hash_map::bucket_accessor::upgrade_to_writer" ref="32b2b1c83ca85859bc5276022821152d" args="()" -->
+bool </td><td class="memItemRight" valign="bottom"><b>upgrade_to_writer</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="a00132.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>
-<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="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">tbb::task::depth_type</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
+<h3>template<typename Key, typename T, typename HashCompare, typename Allocator><br>
+ class tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</h3>
 
+bucket accessor is to find, rehash, acquire a lock, and access a bucket 
 <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="a00132.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="a00132.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="a00132.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="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="a00132.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="a00132.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="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="a00132.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="a00132.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="a00132.html#22c298cd40937a431a06777423f002f6">execute()</a> returns. Typically, this is done by having method <a class="el" href="a00132.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="a00132.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="a00132.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="a00134.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="a00132.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="a00132.html#22c298cd40937a431a06777423f002f6">task::execute</a>, their parent's method <a class="el" href="a00132.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="a00134.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="a00132.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">
-
-<p>
-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="a00276.html">task.h</a></ul>
+<li><a class="el" href="a00267.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 f54131d..ac46151 100644
--- a/doc/html/a00133.html
+++ b/doc/html/a00133.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::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,156 +21,62 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00133.html">task_group_context</a></div>
-<h1>tbb::task_group_context Class Reference<br>
-<small>
-[<a class="el" href="a00188.html">Task Scheduling</a>]</small>
-</h1><!-- doxytag: class="tbb::task_group_context" -->Used to form groups of tasks.  
+<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>
+<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="a00276.html">task.h</a>></code>
+<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
 <p>
-<a href="a00055.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherited by <a class="el" href="a00131.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>.
+<p>
+Inheritance diagram for tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00016.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">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"><a class="anchor" name="b5de4197079009b1cfd8bdeb594c6428"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::value_type" ref="b5de4197079009b1cfd8bdeb594c6428" args="" -->
+typedef const concurrent_hash_map::value_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#b5de4197079009b1cfd8bdeb594c6428">value_type</a></td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of value. <br></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="a00133.html#6fc0ba6f3abcdb4d43277c05bd67bdd4">task_group_context</a> (kind_type relation_with_parent=bound)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e55c7c3f0acd7fd823a07957e71a7462"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::empty" ref="e55c7c3f0acd7fd823a07957e71a7462" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#e55c7c3f0acd7fd823a07957e71a7462">empty</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if result is empty. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09575d1a2dfeb8cd896c27cdd3770517"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::release" ref="09575d1a2dfeb8cd896c27cdd3770517" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Default & binding constructor.  <a href="#6fc0ba6f3abcdb4d43277c05bd67bdd4"></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="a00133.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Set to null. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d95b7a39a08b7ab256dfff2ca37cdb75"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::operator *" ref="d95b7a39a08b7ab256dfff2ca37cdb75" args="() const " -->
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#d95b7a39a08b7ab256dfff2ca37cdb75">operator *</a> () const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Forcefully reinitializes context object after an algorithm it was used with finished.  <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="a00133.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return reference to associated value in hash table. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6fc0491f6420ffe38c48786e7b9ab042"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::operator->" ref="6fc0491f6420ffe38c48786e7b9ab042" args="() const " -->
+const_pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#6fc0491f6420ffe38c48786e7b9ab042">operator-></a> () const </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="a00133.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a> () const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return pointer to associated value in hash table. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6eedb35a3ca397dd289ed5ca6fb4d95d"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::const_accessor" ref="6eedb35a3ca397dd289ed5ca6fb4d95d" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#6eedb35a3ca397dd289ed5ca6fb4d95d">const_accessor</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>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="a00133.html#49a55352084fd44b8863d182e839e6dc">init</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Create empty result. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e002771760f510e06c03e0a198286172"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::~const_accessor" ref="e002771760f510e06c03e0a198286172" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#e002771760f510e06c03e0a198286172">~const_accessor</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 class="mdescLeft"> </td><td class="mdescRight">Destroy result after releasing the underlying reference. <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="d062d8ecb243a6ec62fa30bca52a1bcf"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::concurrent_hash_map< Key, T, HashCompare, Allocator >" ref="d062d8ecb243a6ec62fa30bca52a1bcf" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>concurrent_hash_map< Key, T, HashCompare, Allocator ></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>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ddd77aff56c12366acc02d0f1588a706"></a><!-- doxytag: member="tbb::concurrent_hash_map::const_accessor::accessor" ref="ddd77aff56c12366acc02d0f1588a706" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>accessor</b></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="a00132.html#23acb0da0afd690da797f9f882027d34">task::allocate_root()</a> method. See <a class="el" href="a00133.html#6fc0ba6f3abcdb4d43277c05bd67bdd4">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>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="6fc0ba6f3abcdb4d43277c05bd67bdd4"></a><!-- doxytag: member="tbb::task_group_context::task_group_context" ref="6fc0ba6f3abcdb4d43277c05bd67bdd4" args="(kind_type relation_with_parent=bound)" -->
-<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>
-          <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 context is involves much less overhead, but they have limited utility. Normally when an exception occur in an algorithm that has nested algorithms running one would want all the nested ones canceled as well. Such 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. 
-</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 called on the same context, true may be returned by at most 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">
+<h3>template<typename Key, typename T, typename HashCompare, typename Allocator><br>
+ class tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</h3>
 
+Combines data access, locking, and garbage collection. 
 <p>
-Out-of-line part of the constructor. 
-<p>
-Separated to facilitate future support for backward binary compatibility. 
-</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 context object after an algorithm it was used with finished. 
-<p>
-Because the method assumes that the all the tasks that used to be associated with this context have already finished, you must be extremely careful to not invalidate the context while it is still in use somewhere in the task hierarchy.<p>
-IMPORTANT: It is assumed that this method is not used concurrently!<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="a00276.html">task.h</a></ul>
+<li><a class="el" href="a00267.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 5b59cea..4eded08 100644
--- a/doc/html/a00134.html
+++ b/doc/html/a00134.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::strict_ppl::concurrent_queue< T, A > 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,54 +21,143 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00134.html">task_list</a></div>
-<h1>tbb::task_list Class Reference<br>
+<a class="el" href="a00224.html">tbb</a>::<b>strict_ppl</b>::<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="a00188.html">Task Scheduling</a>]</small>
-</h1><!-- doxytag: class="tbb::task_list" -->A list of children.  
+[<a class="el" href="a00229.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">task.h</a>></code>
+<code>#include <<a class="el" href="a00276.html">concurrent_queue.h</a>></code>
 <p>
-<a href="a00059.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00018.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="682c3978d5cb0620000994f11c44a476"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::value_type" ref="682c3978d5cb0620000994f11c44a476" args="" -->
+typedef T </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#682c3978d5cb0620000994f11c44a476">value_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Element type in the queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8d725c50a9834bb7af5b67c0aff92b8"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::reference" ref="a8d725c50a9834bb7af5b67c0aff92b8" args="" -->
+typedef T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#a8d725c50a9834bb7af5b67c0aff92b8">reference</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Reference type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4d48e7ff93f81636bca2c74f7da34750"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::const_reference" ref="4d48e7ff93f81636bca2c74f7da34750" args="" -->
+typedef const T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#4d48e7ff93f81636bca2c74f7da34750">const_reference</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Const reference type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8fc30e93f8342a1960357f71e4fe8a2b"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::size_type" ref="8fc30e93f8342a1960357f71e4fe8a2b" args="" -->
+typedef size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#8fc30e93f8342a1960357f71e4fe8a2b">size_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Integral type for representing size of the queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="068576d16c7e4e05d52f9db7a45b5b65"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::difference_type" ref="068576d16c7e4e05d52f9db7a45b5b65" args="" -->
+typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#068576d16c7e4e05d52f9db7a45b5b65">difference_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Difference type for iterator. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a3956341728eaa558d8827063718cac"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::allocator_type" ref="5a3956341728eaa558d8827063718cac" args="" -->
+typedef A </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocator type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9736ac047d6da3363895c7e5b121d0c4"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::iterator" ref="9736ac047d6da3363895c7e5b121d0c4" args="" -->
+typedef internal::concurrent_queue_iterator<<br>
+ <a class="el" href="a00134.html">concurrent_queue</a>, T > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9cd76d19af8c78be1bafc6ca0123ac0d"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::const_iterator" ref="9cd76d19af8c78be1bafc6ca0123ac0d" args="" -->
+typedef internal::concurrent_queue_iterator<<br>
+ <a class="el" href="a00134.html">concurrent_queue</a>, const T > </td><td class="memItemRight" valign="bottom"><b>const_iterator</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="416341c2047eaef50417b41eaf7e9de6"></a><!-- doxytag: member="tbb::task_list::task_list" ref="416341c2047eaef50417b41eaf7e9de6" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#416341c2047eaef50417b41eaf7e9de6">task_list</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c48a05a94a1f4f98fdfadfbef98ecf6"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::concurrent_queue" ref="7c48a05a94a1f4f98fdfadfbef98ecf6" args="(const allocator_type &a=allocator_type())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#7c48a05a94a1f4f98fdfadfbef98ecf6">concurrent_queue</a> (const <a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a> &a=<a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a>())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty queue. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="25209656c84f2f9b030e2f9162713341"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::concurrent_queue" ref="25209656c84f2f9b030e2f9162713341" args="(InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())" -->
+template<typename InputIterator> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00134.html#25209656c84f2f9b030e2f9162713341">concurrent_queue</a> (InputIterator begin, InputIterator end, const <a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a> &a=<a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a>())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">[begin,end) constructor <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8a6b98ea11a867db8ac868f0113ca429"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::concurrent_queue" ref="8a6b98ea11a867db8ac868f0113ca429" args="(const concurrent_queue &src, const allocator_type &a=allocator_type())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#8a6b98ea11a867db8ac868f0113ca429">concurrent_queue</a> (const <a class="el" href="a00134.html">concurrent_queue</a> &src, const <a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a> &a=<a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</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="a00134.html#6d438f1499a02db1e59c24ab6043e5ba">~task_list</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="830b33753d6b149c366344e29b2edd8c"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::~concurrent_queue" ref="830b33753d6b149c366344e29b2edd8c" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#830b33753d6b149c366344e29b2edd8c">~concurrent_queue</a> ()</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="a00134.html#f3ac31e092814b90929f81bb30441959">empty</a> () const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="73c47563ffcc4c2f6452f25a04ebe2e2"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::push" ref="73c47563ffcc4c2f6452f25a04ebe2e2" args="(const T &source)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#73c47563ffcc4c2f6452f25a04ebe2e2">push</a> (const T &source)</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="a00134.html#4cd34756bc4763dafb8c84838a0124ff">push_back</a> (<a class="el" href="a00132.html">task</a> &<a class="el" href="a00132.html">task</a>)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Enqueue an item at tail of queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#ae31ca0db34ef96ef1e74aa0d28c95f8">try_pop</a> (T &result)</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="a00132.html">task</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#5fe85df5ed524418389d34051750347d">pop_front</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Attempt to dequeue an item from head of queue.  <a href="#ae31ca0db34ef96ef1e74aa0d28c95f8"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eaa35a5274606779802e9a669a706260"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_size" ref="eaa35a5274606779802e9a669a706260" args="() const " -->
+<a class="el" href="a00134.html#8fc30e93f8342a1960357f71e4fe8a2b">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#eaa35a5274606779802e9a669a706260">unsafe_size</a> () const </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="a00134.html#fce446ee13e025969945328f3ff59b95">clear</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of items in the queue; thread unsafe. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3f6fce0cfa2d581d6f3b47e0613ad64"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::empty" ref="f3f6fce0cfa2d581d6f3b47e0613ad64" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#f3f6fce0cfa2d581d6f3b47e0613ad64">empty</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Equivalent to size()==0. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c32e8e84c0524155133b4aae32d2a827"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::clear" ref="c32e8e84c0524155133b4aae32d2a827" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#c32e8e84c0524155133b4aae32d2a827">clear</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the queue. not thread-safe. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f034f70caef445fe8abc9113ec926a8d"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::get_allocator" ref="f034f70caef445fe8abc9113ec926a8d" args="() const " -->
+<a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#f034f70caef445fe8abc9113ec926a8d">get_allocator</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return allocator object. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6297f48808dd7c14e6c2fe81559ca190"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_begin" ref="6297f48808dd7c14e6c2fe81559ca190" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1569f70e70521fe71944a5b0138c6ef5"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_end" ref="1569f70e70521fe71944a5b0138c6ef5" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e3e6746f7b6ecfbc16f781665ac51112"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_begin" ref="e3e6746f7b6ecfbc16f781665ac51112" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="83bf90849c08f44d25dd7a3b207a8956"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::unsafe_end" ref="83bf90849c08f44d25dd7a3b207a8956" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> () const </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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05bffad9626d51abbd4bb82ae2a1cceb"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::internal::concurrent_queue_iterator" ref="05bffad9626d51abbd4bb82ae2a1cceb" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::concurrent_queue_iterator</b></td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-A list of children. 
+<h3>template<typename T, typename A = cache_aligned_allocator<T>><br>
+ class tbb::strict_ppl::concurrent_queue< T, A ></h3>
+
+A high-performance thread-safe non-blocking concurrent queue. 
+<p>
+Multiple threads may each push and pop concurrently. Assignment construction is not allowed. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="ae31ca0db34ef96ef1e74aa0d28c95f8"></a><!-- doxytag: member="tbb::strict_ppl::concurrent_queue::try_pop" ref="ae31ca0db34ef96ef1e74aa0d28c95f8" args="(T &result)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, typename A = cache_aligned_allocator<T>> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">bool <a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue</a>< T, A >::try_pop           </td>
+          <td>(</td>
+          <td class="paramtype">T & </td>
+          <td class="paramname"> <em>result</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
 <p>
-Used for method task::spawn_children 
+Attempt to dequeue an item from head of queue. 
 <p>
+Does not wait for item to become available. Returns true if successful; false otherwise. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00276.html">task.h</a></ul>
+<li><a class="el" href="a00276.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 6339c08..8801477 100644
--- a/doc/html/a00135.html
+++ b/doc/html/a00135.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::deprecated::concurrent_queue< T, A > 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,138 +21,125 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00135.html">task_scheduler_init</a></div>
-<h1>tbb::task_scheduler_init Class Reference<br>
+<a class="el" href="a00224.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="a00188.html">Task Scheduling</a>]</small>
-</h1><!-- doxytag: class="tbb::task_scheduler_init" -->Class representing reference to tbb scheduler.  
+[<a class="el" href="a00229.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="a00285.html">task_scheduler_init.h</a>></code>
+<code>#include <<a class="el" href="a00276.html">concurrent_queue.h</a>></code>
 <p>
-<a href="a00060.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherits <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A >< T, A ></a>.
+<p>
+Inheritance diagram for tbb::deprecated::concurrent_queue< T, A >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00021.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="8861a9cdf232a20b5f2569754a281871"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::iterator" ref="8861a9cdf232a20b5f2569754a281871" args="" -->
+typedef <a class="el" href="a00129.html">concurrent_bounded_queue</a><<br>
+ T, A >::iterator </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7117842ce3ed7c5147d3c886922e64d0"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::const_iterator" ref="7117842ce3ed7c5147d3c886922e64d0" args="" -->
+typedef <a class="el" href="a00129.html">concurrent_bounded_queue</a><<br>
+ T, A >::const_iterator </td><td class="memItemRight" valign="bottom"><b>const_iterator</b></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="a00135.html#d476053cc712e572554823492a5229ce">initialize</a> (int number_of_threads=<a class="el" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aaf19bd7337b72f3131ece60f7315ef7"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::concurrent_queue" ref="aaf19bd7337b72f3131ece60f7315ef7" args="(const A &a=A())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00135.html#aaf19bd7337b72f3131ece60f7315ef7">concurrent_queue</a> (const A &a=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="a00135.html#d5ed214a8bb53b0466ed91ff4734b9a3">initialize</a> (int number_of_threads, stack_size_type thread_stack_size)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fc092b9082f233482f3513fc3bb670f7"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::concurrent_queue" ref="fc092b9082f233482f3513fc3bb670f7" args="(const concurrent_queue &src, const A &a=A())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00135.html#fc092b9082f233482f3513fc3bb670f7">concurrent_queue</a> (const <a class="el" href="a00135.html">concurrent_queue</a> &src, const A &a=A())</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="a00135.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="383187b910f8c3ca27a39c1638566f15"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::concurrent_queue" ref="383187b910f8c3ca27a39c1638566f15" args="(InputIterator begin, InputIterator end, const A &a=A())" -->
+template<typename InputIterator> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00135.html#383187b910f8c3ca27a39c1638566f15">concurrent_queue</a> (InputIterator begin, InputIterator end, const A &a=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="a00135.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a> (int number_of_threads=<a class="el" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>, stack_size_type thread_stack_size=0)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">[begin,end) constructor <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00135.html#7c45561bafe71107d09b2bc1b8f4e681">push_if_not_full</a> (const T &source)</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="a00135.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Enqueue an item at tail of queue if queue is not already full.  <a href="#7c45561bafe71107d09b2bc1b8f4e681"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00135.html#48da3536245318af6cb5fd58bac78039">pop_if_present</a> (T &destination)</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="a00135.html#12752282977029f23416642bc03e8b74">is_active</a> () const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Attempt to dequeue an item from head of queue.  <a href="#48da3536245318af6cb5fd58bac78039"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ed7202cd273ae36463e6ac57e9472670"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::begin" ref="ed7202cd273ae36463e6ac57e9472670" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><b>begin</b> ()</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="a00135.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35fbb0d7e135545eb1daec2b4ae894cd"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::end" ref="35fbb0d7e135545eb1daec2b4ae894cd" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><b>end</b> ()</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="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> = -1</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62f31fe653e1158e64ddb0e163d0335c"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::begin" ref="62f31fe653e1158e64ddb0e163d0335c" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><b>begin</b> () const </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="a00135.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a> = -2</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d42ddc4a6fe42350750a930302863d1"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::end" ref="3d42ddc4a6fe42350750a930302863d1" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><b>end</b> () const </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="05bffad9626d51abbd4bb82ae2a1cceb"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::internal::concurrent_queue_iterator" ref="05bffad9626d51abbd4bb82ae2a1cceb" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::concurrent_queue_iterator</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Argument to <a class="el" href="a00135.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. 
+<h3>template<typename T, class A = cache_aligned_allocator<T>><br>
+ class tbb::deprecated::concurrent_queue< T, A ></h3>
+
+A high-performance thread-safe blocking concurrent bounded queue. 
 <p>
-A thread must construct a <a class="el" href="a00135.html">task_scheduler_init</a>, and keep it alive, during the time that it uses the services of class task. 
+This is the pre-PPL TBB concurrent queue which support boundedness and blocking semantics. Note that method names agree with the PPL-style concurrent queue. Multiple threads may each push and pop concurrently. Assignment construction is not allowed. 
 <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="()" -->
+<a class="anchor" name="48da3536245318af6cb5fd58bac78039"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::pop_if_present" ref="48da3536245318af6cb5fd58bac78039" args="(T &destination)" -->
 <div class="memitem">
 <div class="memproto">
+<div class="memtemplate">
+template<typename T, class A = cache_aligned_allocator<T>> </div>
       <table class="memname">
         <tr>
-          <td class="memname">static int __TBB_EXPORTED_FUNC tbb::task_scheduler_init::default_num_threads           </td>
+          <td class="memname">bool <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue</a>< T, A >::pop_if_present           </td>
           <td>(</td>
-          <td class="paramname">          </td>
+          <td class="paramtype">T & </td>
+          <td class="paramname"> <em>destination</em>          </td>
           <td> ) </td>
-          <td width="100%"><code> [static]</code></td>
+          <td width="100%"><code> [inline]</code></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
 <p>
-Returns the number of threads tbb scheduler would create if initialized by default. 
+Attempt to dequeue an item from head of queue. 
 <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">
+Does not wait for item to become available. Returns true if successful; false otherwise. <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>Use <a class="el" href="a00129.html#0ca487019bbb00a196442aff78a1e4f7">try_pop()</a> </dd></dl>
 
-<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)" -->
+<a class="anchor" name="7c45561bafe71107d09b2bc1b8f4e681"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::push_if_not_full" ref="7c45561bafe71107d09b2bc1b8f4e681" args="(const T &source)" -->
 <div class="memitem">
 <div class="memproto">
+<div class="memtemplate">
+template<typename T, class A = cache_aligned_allocator<T>> </div>
       <table class="memname">
         <tr>
-          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_scheduler_init::initialize           </td>
+          <td class="memname">bool <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue</a>< T, A >::push_if_not_full           </td>
           <td>(</td>
-          <td class="paramtype">int </td>
-          <td class="paramname"> <em>number_of_threads</em> = <code><a class="el" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a></code>          </td>
+          <td class="paramtype">const T & </td>
+          <td class="paramname"> <em>source</em>          </td>
           <td> ) </td>
-          <td width="100%"></td>
+          <td width="100%"><code> [inline]</code></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
 <p>
-Ensure that scheduler exists for this thread. 
+Enqueue an item at tail of queue if queue is not already full. 
 <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. 
+Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full. 
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00285.html">task_scheduler_init.h</a></ul>
+<li><a class="el" href="a00276.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 7166aae..09f7585 100644
--- a/doc/html/a00136.html
+++ b/doc/html/a00136.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::concurrent_vector< T, A > 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,104 +21,570 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00136.html">tbb_allocator</a></div>
-<h1>tbb::tbb_allocator< T > Class Template Reference<br>
+<a class="el" href="a00224.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="a00185.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="a00229.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="a00288.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00277.html">concurrent_vector.h</a>></code>
 <p>
-<a href="a00062.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00022.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="bc85684238d4bb5e422cb8ea0bdc438f"></a><!-- doxytag: member="tbb::concurrent_vector::size_type" ref="bc85684238d4bb5e422cb8ea0bdc438f" args="" -->
+typedef internal::concurrent_vector_base_v3::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="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="ac7083635ab59834e9afc15e6c168df5"></a><!-- doxytag: member="tbb::concurrent_vector::allocator_type" ref="ac7083635ab59834e9afc15e6c168df5" args="" -->
+typedef internal::allocator_base<<br>
+ T, A >::allocator_type </td><td class="memItemRight" valign="bottom"><b>allocator_type</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="4543d7d45b2e461d3f8ef416974ec1f1"></a><!-- doxytag: member="tbb::concurrent_vector::value_type" ref="4543d7d45b2e461d3f8ef416974ec1f1" args="" -->
+typedef T </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="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="e655e67dd14ed6d0cbfe7981d5fa350e"></a><!-- doxytag: member="tbb::concurrent_vector::difference_type" ref="e655e67dd14ed6d0cbfe7981d5fa350e" 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="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="8c29033785d76e240ea96ae40610275d"></a><!-- doxytag: member="tbb::concurrent_vector::reference" ref="8c29033785d76e240ea96ae40610275d" args="" -->
+typedef T & </td><td class="memItemRight" valign="bottom"><b>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="b0b2a6241ab3fa9ab4f4074893fecd47"></a><!-- doxytag: member="tbb::concurrent_vector::const_reference" ref="b0b2a6241ab3fa9ab4f4074893fecd47" args="" -->
+typedef const T & </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="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="74319c908a32d5dcdc6a080f9c2b8803"></a><!-- doxytag: member="tbb::concurrent_vector::pointer" ref="74319c908a32d5dcdc6a080f9c2b8803" args="" -->
+typedef T * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd80729019220cdb80872ea6b905ffb1"></a><!-- doxytag: member="tbb::concurrent_vector::const_pointer" ref="dd80729019220cdb80872ea6b905ffb1" args="" -->
+typedef const T * </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="a049674e7f386de3ea09ff2ed6d6bbbe"></a><!-- doxytag: member="tbb::concurrent_vector::iterator" ref="a049674e7f386de3ea09ff2ed6d6bbbe" args="" -->
+typedef internal::vector_iterator<<br>
+ <a class="el" href="a00136.html">concurrent_vector</a>, T > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b51a1baa7da67e283806c0d4f2fe9c69"></a><!-- doxytag: member="tbb::concurrent_vector::const_iterator" ref="b51a1baa7da67e283806c0d4f2fe9c69" args="" -->
+typedef internal::vector_iterator<<br>
+ <a class="el" href="a00136.html">concurrent_vector</a>, const <br>
+T > </td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c7e4d252bef7af22286041c39c62abe"></a><!-- doxytag: member="tbb::concurrent_vector::reverse_iterator" ref="2c7e4d252bef7af22286041c39c62abe" args="" -->
+typedef std::reverse_iterator<<br>
+ iterator > </td><td class="memItemRight" valign="bottom"><b>reverse_iterator</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="c59c3f9412b666a31a9052b789fb58bc"></a><!-- doxytag: member="tbb::concurrent_vector::const_reverse_iterator" ref="c59c3f9412b666a31a9052b789fb58bc" args="" -->
+typedef std::reverse_iterator<<br>
+ const_iterator > </td><td class="memItemRight" valign="bottom"><b>const_reverse_iterator</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"><a class="anchor" name="0c3901b092e9e8185bdc3cae5913e625"></a><!-- doxytag: member="tbb::concurrent_vector::reverse_iterator" ref="0c3901b092e9e8185bdc3cae5913e625" args="" -->
+typedef std::reverse_iterator<<br>
+ iterator, T, T &, T * > </td><td class="memItemRight" valign="bottom"><b>reverse_iterator</b></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> { <b>scalable</b>, 
-<b>standard</b>
- }</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="426145d7bd5913bc08e701c14b221046"></a><!-- doxytag: member="tbb::concurrent_vector::const_reverse_iterator" ref="426145d7bd5913bc08e701c14b221046" args="" -->
+typedef std::reverse_iterator<<br>
+ const_iterator, T, const <br>
+T &, const T * > </td><td class="memItemRight" valign="bottom"><b>const_reverse_iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="61fd90288dba6f8808d6dafe9a249ec5"></a><!-- doxytag: member="tbb::concurrent_vector::range_type" ref="61fd90288dba6f8808d6dafe9a249ec5" args="" -->
+typedef generic_range_type<<br>
+ iterator > </td><td class="memItemRight" valign="bottom"><b>range_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d6ddf0312a820a98efd9a5f394cb9dbd"></a><!-- doxytag: member="tbb::concurrent_vector::const_range_type" ref="d6ddf0312a820a98efd9a5f394cb9dbd" args="" -->
+typedef generic_range_type<<br>
+ const_iterator > </td><td class="memItemRight" valign="bottom"><b>const_range_type</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="a00136.html">tbb_allocator</a> &)  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c8ca9cabfcd30ad5943324c853664b5"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="2c8ca9cabfcd30ad5943324c853664b5" args="(const allocator_type &a=allocator_type())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#2c8ca9cabfcd30ad5943324c853664b5">concurrent_vector</a> (const allocator_type &a=allocator_type())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty vector. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd8a200b99a8088435a37934b58fe335"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="dd8a200b99a8088435a37934b58fe335" args="(const concurrent_vector &vector, const allocator_type &a=allocator_type())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#dd8a200b99a8088435a37934b58fe335">concurrent_vector</a> (const <a class="el" href="a00136.html">concurrent_vector</a> &vector, const allocator_type &a=allocator_type())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Copying constructor. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="64432f13f7b29bfe4acfb5568f34f3a8"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="64432f13f7b29bfe4acfb5568f34f3a8" args="(const concurrent_vector< T, M > &vector, const allocator_type &a=allocator_type())" -->
+template<class M> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00136.html#64432f13f7b29bfe4acfb5568f34f3a8">concurrent_vector</a> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, M > &vector, const allocator_type &a=allocator_type())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Copying constructor for vector with different allocator type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a2e261dfe1cab3f73f7b1a94137cfca"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="2a2e261dfe1cab3f73f7b1a94137cfca" args="(size_type n)" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#2a2e261dfe1cab3f73f7b1a94137cfca">concurrent_vector</a> (size_type n)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construction with initial size specified by argument n. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3883a8a908b44e249a57f454de3f55d8"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="3883a8a908b44e249a57f454de3f55d8" args="(size_type n, const_reference t, const allocator_type &a=allocator_type())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#3883a8a908b44e249a57f454de3f55d8">concurrent_vector</a> (size_type n, const_reference t, const allocator_type &a=allocator_type())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="4450de83c5862ea4bcd9443fd7e67419"></a><!-- doxytag: member="tbb::concurrent_vector::concurrent_vector" ref="4450de83c5862ea4bcd9443fd7e67419" args="(I first, I last, const allocator_type &a=allocator_type())" -->
+template<class I> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00136.html#4450de83c5862ea4bcd9443fd7e67419">concurrent_vector</a> (I first, I last, const allocator_type &a=allocator_type())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construction with copying iteration range and given allocator instance. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="691f0f3cda3e489c37a657016e375eaf"></a><!-- doxytag: member="tbb::concurrent_vector::operator=" ref="691f0f3cda3e489c37a657016e375eaf" args="(const concurrent_vector &vector)" -->
+<a class="el" href="a00136.html">concurrent_vector</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#691f0f3cda3e489c37a657016e375eaf">operator=</a> (const <a class="el" href="a00136.html">concurrent_vector</a> &vector)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="19f4ab88a01b0fd056af3bba463e7bd6"></a><!-- doxytag: member="tbb::concurrent_vector::operator=" ref="19f4ab88a01b0fd056af3bba463e7bd6" args="(const concurrent_vector< T, M > &vector)" -->
+template<class M> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00136.html">concurrent_vector</a> & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00136.html#19f4ab88a01b0fd056af3bba463e7bd6">operator=</a> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, M > &vector)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment for vector with different allocator type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#30484e3959892fd5392fa93c873c31f0">grow_by</a> (size_type delta)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Grow by "delta" elements.  <a href="#30484e3959892fd5392fa93c873c31f0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#c8177b1865270ea68aa1ab9148e5e35e">grow_by</a> (size_type delta)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#38274ab3f772ecba600c7daca7690102">grow_by</a> (size_type delta, const_reference t)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Grow by "delta" elements using copying constuctor.  <a href="#38274ab3f772ecba600c7daca7690102"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#473a59a4c9308b93411b898b3110d26c">grow_by</a> (size_type delta, const_reference t)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#47fe588214dd5fa06ab6e8ab78d83874">grow_to_at_least</a> (size_type n)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Append minimal sequence of elements such that <a class="el" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size()</a>>=n.  <a href="#47fe588214dd5fa06ab6e8ab78d83874"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#a7e3b67c8ccab16d0aecc80899ae799d">grow_to_at_least</a> (size_type n)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a> (const_reference item) iterator push_back(const _reference item)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Push item.  <a href="#e94e038f915c0268fdf2d3d7f87d81b8"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#4c52f2950bb1832886bd4458eb09d7eb">operator[]</a> (size_type index)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get reference to element at given index.  <a href="#4c52f2950bb1832886bd4458eb09d7eb"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6fade5c732cc95274d1d8277ea619d1"></a><!-- doxytag: member="tbb::concurrent_vector::operator[]" ref="c6fade5c732cc95274d1d8277ea619d1" args="(size_type index) const " -->
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#c6fade5c732cc95274d1d8277ea619d1">operator[]</a> (size_type index) const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get const reference to element at given index. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c073ca43e787c7cbf7b0e26d2221748"></a><!-- doxytag: member="tbb::concurrent_vector::at" ref="0c073ca43e787c7cbf7b0e26d2221748" args="(size_type index)" -->
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#0c073ca43e787c7cbf7b0e26d2221748">at</a> (size_type index)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get reference to element at given index. Throws exceptions on errors. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="23e14a38af748edff96a7adc3a0f1c58"></a><!-- doxytag: member="tbb::concurrent_vector::at" ref="23e14a38af748edff96a7adc3a0f1c58" args="(size_type index) const " -->
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#23e14a38af748edff96a7adc3a0f1c58">at</a> (size_type index) const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get const reference to element at given index. Throws exceptions on errors. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4c6ffff3bf08b92939aa2fc516edfba"></a><!-- doxytag: member="tbb::concurrent_vector::range" ref="a4c6ffff3bf08b92939aa2fc516edfba" args="(size_t grainsize=1)" -->
+range_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#a4c6ffff3bf08b92939aa2fc516edfba">range</a> (size_t grainsize=1)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get range for iterating with parallel algorithms. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d09ccfb581b879ae64203741035e193"></a><!-- doxytag: member="tbb::concurrent_vector::range" ref="3d09ccfb581b879ae64203741035e193" args="(size_t grainsize=1) const " -->
+const_range_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#3d09ccfb581b879ae64203741035e193">range</a> (size_t grainsize=1) const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get const range for iterating with parallel algorithms. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="715fe313c4a9c22731cc404dd80c9ec9"></a><!-- doxytag: member="tbb::concurrent_vector::size" ref="715fe313c4a9c22731cc404dd80c9ec9" args="() const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return size of vector. It may include elements under construction. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6426cb93cf20d3af40f3c90f1f0481a"></a><!-- doxytag: member="tbb::concurrent_vector::empty" ref="c6426cb93cf20d3af40f3c90f1f0481a" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">empty</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return true if vector is not empty or has elements under construction at least. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ed6b9ae7217af5103d974045b6f5cd5"></a><!-- doxytag: member="tbb::concurrent_vector::capacity" ref="3ed6b9ae7217af5103d974045b6f5cd5" args="() const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#3ed6b9ae7217af5103d974045b6f5cd5">capacity</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum size to which array can grow without allocating more memory. Concurrent allocations are not included in the value. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#5a0ce05026994b010018f72cfdeb72c1">reserve</a> (size_type n)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate enough space to grow to size n without having to allocate more memory later.  <a href="#5a0ce05026994b010018f72cfdeb72c1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8dfb0cb0eef96d440b4dcf801807a718"></a><!-- doxytag: member="tbb::concurrent_vector::resize" ref="8dfb0cb0eef96d440b4dcf801807a718" args="(size_type n)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#8dfb0cb0eef96d440b4dcf801807a718">resize</a> (size_type n)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Resize the vector. Not thread-safe. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="98ce6b2c6d2622f0c030b46dfac3880c"></a><!-- doxytag: member="tbb::concurrent_vector::resize" ref="98ce6b2c6d2622f0c030b46dfac3880c" args="(size_type n, const_reference t)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#98ce6b2c6d2622f0c030b46dfac3880c">resize</a> (size_type n, const_reference t)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Resize the vector, copy t for new elements. Not thread-safe. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1693d1da41b1a8235871be9c6633be35"></a><!-- doxytag: member="tbb::concurrent_vector::compact" ref="1693d1da41b1a8235871be9c6633be35" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#1693d1da41b1a8235871be9c6633be35">compact</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An alias for <a class="el" href="a00136.html#03c6f4cf66532bf4cc907ee738a9a186">shrink_to_fit()</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="03c6f4cf66532bf4cc907ee738a9a186"></a><!-- doxytag: member="tbb::concurrent_vector::shrink_to_fit" ref="03c6f4cf66532bf4cc907ee738a9a186" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#03c6f4cf66532bf4cc907ee738a9a186">shrink_to_fit</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Optimize memory usage and fragmentation. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c248a017f0576df3e7cd99627836fd6"></a><!-- doxytag: member="tbb::concurrent_vector::max_size" ref="2c248a017f0576df3e7cd99627836fd6" args="() const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">max_size</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Upper bound on argument to reserve. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="730b23a251ecb6d37f692fb22f38e029"></a><!-- doxytag: member="tbb::concurrent_vector::begin" ref="730b23a251ecb6d37f692fb22f38e029" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">start iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c0b51160e5a764982ec97a455f94f2c6"></a><!-- doxytag: member="tbb::concurrent_vector::end" ref="c0b51160e5a764982ec97a455f94f2c6" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#c0b51160e5a764982ec97a455f94f2c6">end</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">end iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="78a06182276ff758788d4c0623ae0d71"></a><!-- doxytag: member="tbb::concurrent_vector::begin" ref="78a06182276ff758788d4c0623ae0d71" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#78a06182276ff758788d4c0623ae0d71">begin</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">start const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1e6aa764ce5a1cbd24526f68bc0a2f6b"></a><!-- doxytag: member="tbb::concurrent_vector::end" ref="1e6aa764ce5a1cbd24526f68bc0a2f6b" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">end</a> () const </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="a00136.html">tbb_allocator</a>< U > &)  throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">end const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f88fcf1c920693c39bd9709db33c199f"></a><!-- doxytag: member="tbb::concurrent_vector::cbegin" ref="f88fcf1c920693c39bd9709db33c199f" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#f88fcf1c920693c39bd9709db33c199f">cbegin</a> () const </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">start const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c15a5d0f1cf75d687dabba07da1d46b"></a><!-- doxytag: member="tbb::concurrent_vector::cend" ref="0c15a5d0f1cf75d687dabba07da1d46b" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#0c15a5d0f1cf75d687dabba07da1d46b">cend</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">end const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5e220926d09236d98f04fe0721e5f9a1"></a><!-- doxytag: member="tbb::concurrent_vector::rbegin" ref="5e220926d09236d98f04fe0721e5f9a1" args="()" -->
+reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#5e220926d09236d98f04fe0721e5f9a1">rbegin</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="a00136.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a> (size_type n, const void *=0)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse start iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="290119a4eb43cd6a9e98fa17016ba3c2"></a><!-- doxytag: member="tbb::concurrent_vector::rend" ref="290119a4eb43cd6a9e98fa17016ba3c2" args="()" -->
+reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#290119a4eb43cd6a9e98fa17016ba3c2">rend</a> ()</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="a00136.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a> (pointer p, size_type)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse end iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9f9c103e18d5f212703805354074ad44"></a><!-- doxytag: member="tbb::concurrent_vector::rbegin" ref="9f9c103e18d5f212703805354074ad44" args="() const " -->
+const_reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#9f9c103e18d5f212703805354074ad44">rbegin</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="a00136.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a> () const   throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse start const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d438b9b32ea3a8ffb703015b6dce055b"></a><!-- doxytag: member="tbb::concurrent_vector::rend" ref="d438b9b32ea3a8ffb703015b6dce055b" args="() const " -->
+const_reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#d438b9b32ea3a8ffb703015b6dce055b">rend</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="a00136.html#ab228ab9e324ed041c2226e1d717df5f">construct</a> (pointer p, const value_type &value)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse end const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="db78a1d28c9c966050e8a2926d834a33"></a><!-- doxytag: member="tbb::concurrent_vector::crbegin" ref="db78a1d28c9c966050e8a2926d834a33" args="() const " -->
+const_reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#db78a1d28c9c966050e8a2926d834a33">crbegin</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="a00136.html#ef133522bf55f05a605bee0763208281">destroy</a> (pointer p)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse start const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fff9cece89438587997ebedf93c5e962"></a><!-- doxytag: member="tbb::concurrent_vector::crend" ref="fff9cece89438587997ebedf93c5e962" args="() const " -->
+const_reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#fff9cece89438587997ebedf93c5e962">crend</a> () const </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="78701e7454ef8e1a25b5acd364367080"></a><!-- doxytag: member="tbb::tbb_allocator::allocator_type" ref="78701e7454ef8e1a25b5acd364367080" args="()" -->
-static <a class="el" href="a00136.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">reverse end const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="15181759c0bfa2ddce5d10c7550e0002"></a><!-- doxytag: member="tbb::concurrent_vector::front" ref="15181759c0bfa2ddce5d10c7550e0002" args="()" -->
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#15181759c0bfa2ddce5d10c7550e0002">front</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">the first item <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="502615a858eb9fa0390ee59169065e90"></a><!-- doxytag: member="tbb::concurrent_vector::front" ref="502615a858eb9fa0390ee59169065e90" args="() const " -->
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#502615a858eb9fa0390ee59169065e90">front</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">the first item const <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="41ce48d6015a1a2812d41cf620ec3476"></a><!-- doxytag: member="tbb::concurrent_vector::back" ref="41ce48d6015a1a2812d41cf620ec3476" args="()" -->
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#41ce48d6015a1a2812d41cf620ec3476">back</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">the last item <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd518e204107d07fd08d0ec5bdfd383d"></a><!-- doxytag: member="tbb::concurrent_vector::back" ref="bd518e204107d07fd08d0ec5bdfd383d" args="() const " -->
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#bd518e204107d07fd08d0ec5bdfd383d">back</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">the last item const <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2fdba8e90de6a4d2300222236d46758e"></a><!-- doxytag: member="tbb::concurrent_vector::get_allocator" ref="2fdba8e90de6a4d2300222236d46758e" args="() const " -->
+allocator_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#2fdba8e90de6a4d2300222236d46758e">get_allocator</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">return allocator object <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="423e5aa15e0e3309ad86d026fd85f6f6"></a><!-- doxytag: member="tbb::concurrent_vector::assign" ref="423e5aa15e0e3309ad86d026fd85f6f6" args="(size_type n, const_reference t)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#423e5aa15e0e3309ad86d026fd85f6f6">assign</a> (size_type n, const_reference t)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">assign n items by copying t item <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="93a06b3112cb804f42f40efb5e7387b4"></a><!-- doxytag: member="tbb::concurrent_vector::assign" ref="93a06b3112cb804f42f40efb5e7387b4" args="(I first, I last)" -->
+template<class I> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00136.html#93a06b3112cb804f42f40efb5e7387b4">assign</a> (I first, I last)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">assign range [first, last) <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="96c9c4bd968ed3edb8dd276854d2dae0"></a><!-- doxytag: member="tbb::concurrent_vector::swap" ref="96c9c4bd968ed3edb8dd276854d2dae0" args="(concurrent_vector &vector)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#96c9c4bd968ed3edb8dd276854d2dae0">swap</a> (<a class="el" href="a00136.html">concurrent_vector</a> &vector)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">swap two instances <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">clear</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear container while keeping memory allocated.  <a href="#26f937a359a66b6aae904c3cd9a3c444"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="da2444b28bb840d38f60d0030333a5fc"></a><!-- doxytag: member="tbb::concurrent_vector::~concurrent_vector" ref="da2444b28bb840d38f60d0030333a5fc" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#da2444b28bb840d38f60d0030333a5fc">~concurrent_vector</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear and destroy vector. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb5ae659871478f1f5c68039e1273e12"></a><!-- doxytag: member="tbb::concurrent_vector::internal_vector_base" ref="bb5ae659871478f1f5c68039e1273e12" args="() const " -->
+const internal::concurrent_vector_base_v3 & </td><td class="memItemRight" valign="bottom"><b>internal_vector_base</b> () const </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="30086a58bff79a91103723be20916b96"></a><!-- doxytag: member="tbb::concurrent_vector::internal::vector_iterator" ref="30086a58bff79a91103723be20916b96" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::vector_iterator</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">class  </td><td class="memItemRight" valign="bottom"><b>generic_range_type</b></td></tr>
 
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>internal_loop_guide</b></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Exception-aware helper class for filling a segment by exception-danger operators of user class. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename T><br>
- class tbb::tbb_allocator< T ></h3>
+<h3>template<typename T, class A><br>
+ class tbb::concurrent_vector< T, A ></h3>
+
+Concurrent vector container. 
+<p>
+<a class="el" href="a00136.html">concurrent_vector</a> is a container having the following main properties:<ul>
+<li>It provides random indexed access to its elements. The index of the first element is 0.</li><li>It ensures safe concurrent growing its size (different threads can safely append new elements).</li><li>Adding new elements does not invalidate existing iterators and does not change indices of existing items.</li></ul>
+<p>
+<dl compact><dt><b>Compatibility</b></dt><dd>The class meets all Container Requirements and Reversible Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). But it doesn't meet Sequence Requirements due to absence of insert() and erase() methods.</dd></dl>
+<dl compact><dt><b>Exception Safety</b></dt><dd>Methods working with memory allocation and/or new elements construction can throw an exception if allocator fails to allocate memory or element's default constructor throws one. Concurrent vector's element of type T must conform to the following requirements:<ul>
+<li>Throwing an exception is forbidden for destructor of T.</li><li>Default constructor of T must not throw an exception OR its non-virtual destructor must safely work when its object memory is zero-initialized.</li></ul>
+Otherwise, the program's behavior is undefined. </dd></dl>
+<dl compact><dt><b></b></dt><dd>If an exception happens inside growth or assignment operation, an instance of the vector becomes invalid unless it is stated otherwise in the method documentation. Invalid state means:<ul>
+<li>There are no guaranties that all items were initialized by a constructor. The rest of items is zero-filled, including item where exception happens.</li><li>An invalid vector instance cannot be repaired; it is unable to grow anymore.</li><li>Size and capacity reported by the vector are incorrect, and calculated as if the failed operation were successful.</li><li>Attempt to access not allocated elements using operator[] or iterators results in access violation or segmentation fault exc [...]
+If a concurrent grow operation successfully completes, all the elements it has added to the vector will remain valid and accessible even if one of subsequent grow operations fails.</dd></dl>
+<dl compact><dt><b>Fragmentation</b></dt><dd>Unlike an STL vector, a <a class="el" href="a00136.html">concurrent_vector</a> does not move existing elements if it needs to allocate more memory. The container is divided into a series of contiguous arrays of elements. The first reservation, growth, or assignment operation determines the size of the first array. Using small number of elements as initial size incurs fragmentation that may increase element access time. Internal layout can be o [...]
+<dl compact><dt><b>Changes since TBB 2.1</b></dt><dd><ul>
+<li>Fixed guarantees of <a class="el" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">concurrent_vector::size()</a> and <a class="el" href="a00136.html#47fe588214dd5fa06ab6e8ab78d83874">grow_to_at_least()</a> methods to assure elements are allocated.</li><li>Methods <a class="el" href="a00136.html#c0b51160e5a764982ec97a455f94f2c6">end()</a>/rbegin()/back() are partly thread-safe since they use <a class="el" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size()</a> to get the end [...]
+</dd></dl>
+<dl compact><dt><b>Changes since TBB 2.0</b></dt><dd><ul>
+<li>Implemented exception-safety guaranties</li><li>Added template argument for allocator</li><li>Added allocator argument in constructors</li><li>Faster index calculation</li><li>First growth call specifies a number of segments to be merged in the first allocation.</li><li>Fixed memory blow up for swarm of vector's instances of small size</li><li>Added <a class="el" href="a00136.html#38274ab3f772ecba600c7daca7690102">grow_by(size_type n, const_reference t)</a> growth using copying const [...]
+</dd></dl>
+
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="26f937a359a66b6aae904c3cd9a3c444"></a><!-- doxytag: member="tbb::concurrent_vector::clear" ref="26f937a359a66b6aae904c3cd9a3c444" args="()" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">void <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::clear           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Clear container while keeping memory allocated. 
+<p>
+To free up the memory, use in conjunction with method <a class="el" href="a00136.html#1693d1da41b1a8235871be9c6633be35">compact()</a>. Not thread safe 
+</div>
+</div><p>
+<a class="anchor" name="473a59a4c9308b93411b898b3110d26c"></a><!-- doxytag: member="tbb::concurrent_vector::grow_by" ref="473a59a4c9308b93411b898b3110d26c" args="(size_type delta, const_reference t)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">iterator <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::grow_by           </td>
+          <td>(</td>
+          <td class="paramtype">size_type </td>
+          <td class="paramname"> <em>delta</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const_reference </td>
+          <td class="paramname"> <em>t</em></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>
+Returns iterator pointing to the first new element. 
+</div>
+</div><p>
+<a class="anchor" name="38274ab3f772ecba600c7daca7690102"></a><!-- doxytag: member="tbb::concurrent_vector::grow_by" ref="38274ab3f772ecba600c7daca7690102" args="(size_type delta, const_reference t)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">size_type <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::grow_by           </td>
+          <td>(</td>
+          <td class="paramtype">size_type </td>
+          <td class="paramname"> <em>delta</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const_reference </td>
+          <td class="paramname"> <em>t</em></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>
+Grow by "delta" elements using copying constuctor. 
+<p>
+Returns old size. 
+</div>
+</div><p>
+<a class="anchor" name="c8177b1865270ea68aa1ab9148e5e35e"></a><!-- doxytag: member="tbb::concurrent_vector::grow_by" ref="c8177b1865270ea68aa1ab9148e5e35e" args="(size_type delta)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">iterator <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::grow_by           </td>
+          <td>(</td>
+          <td class="paramtype">size_type </td>
+          <td class="paramname"> <em>delta</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Returns iterator pointing to the first new element. 
+</div>
+</div><p>
+<a class="anchor" name="30484e3959892fd5392fa93c873c31f0"></a><!-- doxytag: member="tbb::concurrent_vector::grow_by" ref="30484e3959892fd5392fa93c873c31f0" args="(size_type delta)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">size_type <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::grow_by           </td>
+          <td>(</td>
+          <td class="paramtype">size_type </td>
+          <td class="paramname"> <em>delta</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Grow by "delta" elements. 
+<p>
+Returns old size. 
+</div>
+</div><p>
+<a class="anchor" name="a7e3b67c8ccab16d0aecc80899ae799d"></a><!-- doxytag: member="tbb::concurrent_vector::grow_to_at_least" ref="a7e3b67c8ccab16d0aecc80899ae799d" args="(size_type n)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">iterator <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::grow_to_at_least           </td>
+          <td>(</td>
+          <td class="paramtype">size_type </td>
+          <td class="paramname"> <em>n</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+The new elements are default constructed. Blocks until all elements in range [0..n) are allocated. May return while other elements are being constructed by other threads. Returns iterator that points to beginning of appended sequence. If no elements were appended, returns iterator pointing to nth element. 
+</div>
+</div><p>
+<a class="anchor" name="47fe588214dd5fa06ab6e8ab78d83874"></a><!-- doxytag: member="tbb::concurrent_vector::grow_to_at_least" ref="47fe588214dd5fa06ab6e8ab78d83874" args="(size_type n)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">void <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::grow_to_at_least           </td>
+          <td>(</td>
+          <td class="paramtype">size_type </td>
+          <td class="paramname"> <em>n</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Append minimal sequence of elements such that <a class="el" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size()</a>>=n. 
+<p>
+The new elements are default constructed. Blocks until all elements in range [0..n) are allocated. May return while other elements are being constructed by other threads. 
+</div>
+</div><p>
+<a class="anchor" name="4c52f2950bb1832886bd4458eb09d7eb"></a><!-- doxytag: member="tbb::concurrent_vector::operator[]" ref="4c52f2950bb1832886bd4458eb09d7eb" args="(size_type index)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">reference <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::operator[]           </td>
+          <td>(</td>
+          <td class="paramtype">size_type </td>
+          <td class="paramname"> <em>index</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Get reference to element at given index. 
+<p>
+This method is thread-safe for concurrent reads, and also while growing the vector, as long as the calling thread has checked that index<<a class="el" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size()</a>. 
+</div>
+</div><p>
+<a class="anchor" name="e94e038f915c0268fdf2d3d7f87d81b8"></a><!-- doxytag: member="tbb::concurrent_vector::push_back" ref="e94e038f915c0268fdf2d3d7f87d81b8" args="(const_reference item) iterator push_back(const _reference item)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">size_type <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::push_back           </td>
+          <td>(</td>
+          <td class="paramtype">const_reference </td>
+          <td class="paramname"> <em>item</em>          </td>
+          <td> ) </td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Push item. 
+<p>
+Returns iterator pointing to the new element. 
+</div>
+</div><p>
+<a class="anchor" name="5a0ce05026994b010018f72cfdeb72c1"></a><!-- doxytag: member="tbb::concurrent_vector::reserve" ref="5a0ce05026994b010018f72cfdeb72c1" args="(size_type n)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename T, class A> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">void <a class="el" href="a00136.html">tbb::concurrent_vector</a>< T, A >::reserve           </td>
+          <td>(</td>
+          <td class="paramtype">size_type </td>
+          <td class="paramname"> <em>n</em>          </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. 
+Allocate enough space to grow to size n without having to allocate more memory later. 
 <p>
+Like most of the methods provided for STL compatibility, this method is *not* thread safe. The capacity afterwards may be bigger than the requested reservation. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00288.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00277.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 06ac73c..8a31e8c 100644
--- a/doc/html/a00137.html
+++ b/doc/html/a00137.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::empty_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,39 +21,25 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00137.html">tbb_allocator< void ></a></div>
-<h1>tbb::tbb_allocator< void > Class Template Reference<br>
+<a class="el" href="a00224.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="a00185.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="a00233.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="a00288.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00351.html">task.h</a>></code>
 <p>
-<a href="a00064.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherits <a class="el" href="a00162.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>
-<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="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="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 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<><br>
- class tbb::tbb_allocator< void ></h3>
-
-Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. 
+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="a00288.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00351.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 6f3bd9c..c683308 100644
--- a/doc/html/a00138.html
+++ b/doc/html/a00138.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::enumerable_thread_specific< T, Allocator, ETS_key_type > 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,115 +21,162 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00138.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="a00224.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="a00289.html">tbb_exception.h</a>></code>
+<code>#include <<a class="el" href="a00286.html">enumerable_thread_specific.h</a>></code>
 <p>
-Inherited by <a class="el" href="a00102.html">tbb::captured_exception</a>, and <a class="el" href="a00111.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="a00067.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00025.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="60047d25605a1ef993c49234e9ac5c2d"></a><!-- doxytag: member="tbb::enumerable_thread_specific::allocator_type" ref="60047d25605a1ef993c49234e9ac5c2d" args="" -->
+typedef Allocator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">allocator_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Basic types. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="14b5967a627853440608619a07c9281a"></a><!-- doxytag: member="tbb::enumerable_thread_specific::value_type" ref="14b5967a627853440608619a07c9281a" args="" -->
+typedef T </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="06ff8c90338e3f76201e56ac2e8bd566"></a><!-- doxytag: member="tbb::enumerable_thread_specific::reference" ref="06ff8c90338e3f76201e56ac2e8bd566" args="" -->
+typedef T & </td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cc538a9b0919cba06e9807984a840710"></a><!-- doxytag: member="tbb::enumerable_thread_specific::const_reference" ref="cc538a9b0919cba06e9807984a840710" args="" -->
+typedef const T & </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="de58e04a639ecadf5e021b27c430cd32"></a><!-- doxytag: member="tbb::enumerable_thread_specific::pointer" ref="de58e04a639ecadf5e021b27c430cd32" args="" -->
+typedef T * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ee05b7e9b137913fc2f946d7edb6325"></a><!-- doxytag: member="tbb::enumerable_thread_specific::const_pointer" ref="3ee05b7e9b137913fc2f946d7edb6325" args="" -->
+typedef const T * </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="f7104b09f6dc1f8035ea978f56f9a090"></a><!-- doxytag: member="tbb::enumerable_thread_specific::size_type" ref="f7104b09f6dc1f8035ea978f56f9a090" args="" -->
+typedef internal_collection_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="631ed3389c35ba4b90b7d1be0e291d86"></a><!-- doxytag: member="tbb::enumerable_thread_specific::difference_type" ref="631ed3389c35ba4b90b7d1be0e291d86" args="" -->
+typedef internal_collection_type::difference_type </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="006bd5182f81d6d01cbb558c0b500a29"></a><!-- doxytag: member="tbb::enumerable_thread_specific::iterator" ref="006bd5182f81d6d01cbb558c0b500a29" args="" -->
+typedef internal::enumerable_thread_specific_iterator<<br>
+ <a class="el" href="a00136.html">internal_collection_type</a>,<br>
+ value_type > </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a59d5bae106a5e631fe164be9a261b72"></a><!-- doxytag: member="tbb::enumerable_thread_specific::const_iterator" ref="a59d5bae106a5e631fe164be9a261b72" args="" -->
+typedef internal::enumerable_thread_specific_iterator<<br>
+ <a class="el" href="a00136.html">internal_collection_type</a>,<br>
+ const value_type > </td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8d695d7c22817587116f27089cd190d8"></a><!-- doxytag: member="tbb::enumerable_thread_specific::range_type" ref="8d695d7c22817587116f27089cd190d8" args="" -->
+typedef generic_range_type<<br>
+ iterator > </td><td class="memItemRight" valign="bottom"><b>range_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="73dc6b3dd06c14942c641a5ae924e355"></a><!-- doxytag: member="tbb::enumerable_thread_specific::const_range_type" ref="73dc6b3dd06c14942c641a5ae924e355" args="" -->
+typedef generic_range_type<<br>
+ const_iterator > </td><td class="memItemRight" valign="bottom"><b>const_range_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">virtual <a class="el" href="a00138.html">tbb_exception</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#3e3482bf264d4ca4dde046cd9c02c766">move</a> ()=0  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="632e351d5269ac609b08dba19282f3a3"></a><!-- doxytag: member="tbb::enumerable_thread_specific::enumerable_thread_specific" ref="632e351d5269ac609b08dba19282f3a3" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</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="a00138.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a> ()=0  throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor, which leads to default construction of local copies. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="e5698930b84c098bb6d87175b8b50306"></a><!-- doxytag: member="tbb::enumerable_thread_specific::enumerable_thread_specific" ref="e5698930b84c098bb6d87175b8b50306" args="(Finit _finit)" -->
+template<typename Finit> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00138.html#e5698930b84c098bb6d87175b8b50306">enumerable_thread_specific</a> (Finit _finit)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys objects created by the <a class="el" href="a00138.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="a00138.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a> ()=0</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">construction with initializer method <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0466c43272d8458185e980fc2dc4abe2"></a><!-- doxytag: member="tbb::enumerable_thread_specific::enumerable_thread_specific" ref="0466c43272d8458185e980fc2dc4abe2" args="(const T &_exemplar)" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#0466c43272d8458185e980fc2dc4abe2">enumerable_thread_specific</a> (const T &_exemplar)</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="a00138.html#d00f6497e552fee978a02bfcbebf46e2">name</a> () const =0  throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Constuction with exemplar, which leads to copy construction of local copies. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="41176526161d6fef1bdd19c2db7ded4d"></a><!-- doxytag: member="tbb::enumerable_thread_specific::~enumerable_thread_specific" ref="41176526161d6fef1bdd19c2db7ded4d" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#41176526161d6fef1bdd19c2db7ded4d">~enumerable_thread_specific</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="a00138.html#e8157689ecb66bc6c72d3618bf3cc371">what</a> () const =0  throw ()</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="ceb691814a0001241c43595d309cf615"></a><!-- doxytag: member="tbb::enumerable_thread_specific::local" ref="ceb691814a0001241c43595d309cf615" args="()" -->
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the result of originally intercepted exception's <a class="el" href="a00138.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="a00138.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="a00133.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="a00102.html">tbb::captured_exception</a> and template class <a class="el" href="a00111.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">returns reference to local, discarding exists <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9505351eace34ed7130257adcae91706"></a><!-- doxytag: member="tbb::enumerable_thread_specific::local" ref="9505351eace34ed7130257adcae91706" args="(bool &exists)" -->
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#9505351eace34ed7130257adcae91706">local</a> (bool &exists)</td></tr>
 
-<p>
-Destroys objects created by the <a class="el" href="a00138.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="a00102.html#667812a82f1525e968c52593dea0ef4c">tbb::captured_exception</a>, and <a class="el" href="a00111.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="a00138.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">Returns reference to calling thread's local copy, creating one if necessary. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="302a4d6f55f852d5b7a6679e0e00316e"></a><!-- doxytag: member="tbb::enumerable_thread_specific::size" ref="302a4d6f55f852d5b7a6679e0e00316e" args="() const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#302a4d6f55f852d5b7a6679e0e00316e">size</a> () const </td></tr>
 
-<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="a00102.html#df6bbb78a362fe862a341e81e2999810">tbb::captured_exception</a>, and <a class="el" href="a00111.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">
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the number of local copies. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ad23345a722622199deaa4dfd243d9f8"></a><!-- doxytag: member="tbb::enumerable_thread_specific::empty" ref="ad23345a722622199deaa4dfd243d9f8" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#ad23345a722622199deaa4dfd243d9f8">empty</a> () const </td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">true if there have been no local copies created <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="225f945c810397c6a54d5b8317dc5843"></a><!-- doxytag: member="tbb::enumerable_thread_specific::begin" ref="225f945c810397c6a54d5b8317dc5843" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">begin iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="44c0b67ebb56b2ae1fa260d9e2bd1e99"></a><!-- doxytag: member="tbb::enumerable_thread_specific::end" ref="44c0b67ebb56b2ae1fa260d9e2bd1e99" args="()" -->
+iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">end iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba6674c6102a6faf8f96d131497654b3"></a><!-- doxytag: member="tbb::enumerable_thread_specific::begin" ref="ba6674c6102a6faf8f96d131497654b3" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#ba6674c6102a6faf8f96d131497654b3">begin</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">begin const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="89811890e6a77f1e0cfc6c24ed35d09b"></a><!-- doxytag: member="tbb::enumerable_thread_specific::end" ref="89811890e6a77f1e0cfc6c24ed35d09b" args="() const " -->
+const_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#89811890e6a77f1e0cfc6c24ed35d09b">end</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">end const iterator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="56f6124f5870e26433a5bb2b71e4b7e9"></a><!-- doxytag: member="tbb::enumerable_thread_specific::range" ref="56f6124f5870e26433a5bb2b71e4b7e9" args="(size_t grainsize=1)" -->
+range_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#56f6124f5870e26433a5bb2b71e4b7e9">range</a> (size_t grainsize=1)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get range for parallel algorithms. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a32dd1d88e42dc1faccceca244b12b6c"></a><!-- doxytag: member="tbb::enumerable_thread_specific::range" ref="a32dd1d88e42dc1faccceca244b12b6c" args="(size_t grainsize=1) const " -->
+const_range_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#a32dd1d88e42dc1faccceca244b12b6c">range</a> (size_t grainsize=1) const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get const range for parallel algorithms. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c890601a45273ef759e64ac2fe75cb6a"></a><!-- doxytag: member="tbb::enumerable_thread_specific::clear" ref="c890601a45273ef759e64ac2fe75cb6a" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">clear</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys local copies. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="f109a2bbe9ce390f78363a2d17a88ed5"></a><!-- doxytag: member="tbb::enumerable_thread_specific::enumerable_thread_specific" ref="f109a2bbe9ce390f78363a2d17a88ed5" args="(const enumerable_thread_specific< U, Alloc, Cachetype > &other)" -->
+template<typename U, typename Alloc, ets_key_usage_type Cachetype> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>enumerable_thread_specific</b> (const <a class="el" href="a00138.html">enumerable_thread_specific</a>< U, Alloc, Cachetype > &other)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c3be03082943460305b8022693c04b4a"></a><!-- doxytag: member="tbb::enumerable_thread_specific::enumerable_thread_specific" ref="c3be03082943460305b8022693c04b4a" args="(const enumerable_thread_specific &other)" -->
+ </td><td class="memItemRight" valign="bottom"><b>enumerable_thread_specific</b> (const <a class="el" href="a00138.html">enumerable_thread_specific</a> &other)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8226b10dbb71cfe467eb85ac37b91ff0"></a><!-- doxytag: member="tbb::enumerable_thread_specific::operator=" ref="8226b10dbb71cfe467eb85ac37b91ff0" args="(const enumerable_thread_specific &other)" -->
+<a class="el" href="a00138.html">enumerable_thread_specific</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00138.html">enumerable_thread_specific</a> &other)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="b124465416967c23b12841170a7f0263"></a><!-- doxytag: member="tbb::enumerable_thread_specific::operator=" ref="b124465416967c23b12841170a7f0263" args="(const enumerable_thread_specific< U, Alloc, Cachetype > &other)" -->
+template<typename U, typename Alloc, ets_key_usage_type Cachetype> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00138.html">enumerable_thread_specific</a> & </td><td class="memTemplItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00138.html">enumerable_thread_specific</a>< U, Alloc, Cachetype > &other)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="dd6b27d9c98297220b08732d9087a5a8"></a><!-- doxytag: member="tbb::enumerable_thread_specific::combine" ref="dd6b27d9c98297220b08732d9087a5a8" args="(combine_func_t f_combine)" -->
+template<typename combine_func_t> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>combine</b> (combine_func_t f_combine)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="4abce9638ef2693d813d820af59bb6e2"></a><!-- doxytag: member="tbb::enumerable_thread_specific::combine_each" ref="4abce9638ef2693d813d820af59bb6e2" args="(combine_func_t f_combine)" -->
+template<typename combine_func_t> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>combine_each</b> (combine_func_t f_combine)</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="45364b2f249ceb935cff05c29fcfcf5c"></a><!-- doxytag: member="tbb::enumerable_thread_specific::enumerable_thread_specific" ref="45364b2f249ceb935cff05c29fcfcf5c" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>enumerable_thread_specific</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>generic_range_type</b></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A generic range, used to create range objects from the iterators. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>padded_element</b></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The padded elements; padded to avoid false sharing. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename T, typename Allocator = cache_aligned_allocator<T>, ets_key_usage_type ETS_key_type = ets_no_key><br>
+ class tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></h3>
+
+The thread local class template. 
 <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="a00102.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, and <a class="el" href="a00111.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="a00289.html">tbb_exception.h</a></ul>
+<li><a class="el" href="a00286.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 bcc8d1a..f183e2f 100644
--- a/doc/html/a00139.html
+++ b/doc/html/a00139.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::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,30 +21,181 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00139.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="a00224.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>
+</h1><!-- doxytag: class="tbb::filter" -->A stage in a pipeline.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00205.html">concurrent_hash_map.h</a>></code>
+<code>#include <<a class="el" href="a00344.html">pipeline.h</a>></code>
 <p>
-<a href="a00012.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherited by <a class="el" href="a00171.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>
-<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="f49bb57008f05e1db7d1e80ead996193"></a><!-- doxytag: member="tbb::tbb_hash_compare::hash" ref="f49bb57008f05e1db7d1e80ead996193" args="(const T &t)" -->
-static internal::hashcode_t </td><td class="memItemRight" valign="bottom"><b>hash</b> (const T &t)</td></tr>
+<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a> = current_version | filter_is_out_of_order</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">processes multiple items in parallel and in no particular order  <a href="#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">serial_in_order</a> = current_version | filter_is_serial</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">processes items one at a time; all such filters process items in the same order  <a href="#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">serial_out_of_order</a> = current_version | filter_is_serial | filter_is_out_of_order</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">processes items one at a time and in no particular order  <a href="#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> = serial_in_order</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> { <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a> =  current_version | filter_is_out_of_order, 
+<a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">serial_in_order</a> =  current_version | filter_is_serial, 
+<a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">serial_out_of_order</a> =  current_version | filter_is_serial | filter_is_out_of_order, 
+<a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> =  serial_in_order
+ }</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="fcfec27656a69ff2072802ac001e936f"></a><!-- doxytag: member="tbb::filter::is_serial" ref="fcfec27656a69ff2072802ac001e936f" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html#fcfec27656a69ff2072802ac001e936f">is_serial</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if filter is serial. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cd53206c4795ef2df5df26b795caf692"></a><!-- doxytag: member="tbb::filter::is_ordered" ref="cd53206c4795ef2df5df26b795caf692" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html#cd53206c4795ef2df5df26b795caf692">is_ordered</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if filter must receive stream in order. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="15c29cae5d237e6d63dbfe5c94af89d5"></a><!-- doxytag: member="tbb::filter::is_bound" ref="15c29cae5d237e6d63dbfe5c94af89d5" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html#15c29cae5d237e6d63dbfe5c94af89d5">is_bound</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if filter is thread-bound. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html#fa1b3dc1f4f47563ccab7f4d92f5b543">operator()</a> (void *item)=0</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Operate on an item from the input stream, and return item for output stream.  <a href="#fa1b3dc1f4f47563ccab7f4d92f5b543"></a><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="a00139.html#66d159f362293e3964ba3da8bc1d2604">~filter</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy filter.  <a href="#66d159f362293e3964ba3da8bc1d2604"></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="a00139.html#56275eb889c77c4807967133e21401bd">finalize</a> (void *)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys item if pipeline was cancelled.  <a href="#56275eb889c77c4807967133e21401bd"></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="f1111979b4afbde1a6c1873577a005ae"></a><!-- doxytag: member="tbb::filter::filter" ref="f1111979b4afbde1a6c1873577a005ae" args="(bool is_serial_)" -->
+ </td><td class="memItemRight" valign="bottom"><b>filter</b> (bool is_serial_)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3f49df3c34a3e5a8884001c30230a94"></a><!-- doxytag: member="tbb::filter::filter" ref="a3f49df3c34a3e5a8884001c30230a94" args="(mode filter_mode)" -->
+ </td><td class="memItemRight" valign="bottom"><b>filter</b> (<a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> filter_mode)</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::filter::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="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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05d67150ca324698ba852553e223d3eb"></a><!-- doxytag: member="tbb::filter::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="b211ee58bada099e24280d478017cbff"></a><!-- doxytag: member="tbb::filter::pipeline" ref="b211ee58bada099e24280d478017cbff" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>pipeline</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e43b69a482df8e053cb199af69eb5139"></a><!-- doxytag: member="tbb::filter::thread_bound_filter" ref="e43b69a482df8e053cb199af69eb5139" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>thread_bound_filter</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>
+A stage in a pipeline. 
+<p>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="d3b6ed2c517144199d0c39c62ddfd8cf"></a><!-- doxytag: member="tbb::filter::mode" ref="d3b6ed2c517144199d0c39c62ddfd8cf" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">tbb::filter::mode</a>          </td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<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="d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe"></a><!-- doxytag: member="parallel" ref="d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe" args="" -->parallel</em> </td><td>
+processes multiple items in parallel and in no particular order </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93"></a><!-- doxytag: member="serial_in_order" ref="d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93" args="" -->serial_in_order</em> </td><td>
+processes items one at a time; all such filters process items in the same order </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9"></a><!-- doxytag: member="serial_out_of_order" ref="d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9" args="" -->serial_out_of_order</em> </td><td>
+processes items one at a time and in no particular order </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237"></a><!-- doxytag: member="serial" ref="d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237" args="" -->serial</em> </td><td>
+<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>use serial_in_order instead </dd></dl>
+</td></tr>
+</table>
+</dl>
+
+</div>
+</div><p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="66d159f362293e3964ba3da8bc1d2604"></a><!-- doxytag: member="tbb::filter::~filter" ref="66d159f362293e3964ba3da8bc1d2604" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual __TBB_EXPORTED_METHOD tbb::filter::~filter           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
 
-hash_compare - default argument 
 <p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00205.html">concurrent_hash_map.h</a></ul>
+Destroy filter. 
+<p>
+If the filter was added to a pipeline, the pipeline must be destroyed first. 
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="56275eb889c77c4807967133e21401bd"></a><!-- doxytag: member="tbb::filter::finalize" ref="56275eb889c77c4807967133e21401bd" args="(void *)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void tbb::filter::finalize           </td>
+          <td>(</td>
+          <td class="paramtype">void * </td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline, virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Destroys item if pipeline was cancelled. 
+<p>
+Required to prevent memory leaks. Note it can be called concurrently even for serial filters. 
+</div>
+</div><p>
+<a class="anchor" name="fa1b3dc1f4f47563ccab7f4d92f5b543"></a><!-- doxytag: member="tbb::filter::operator()" ref="fa1b3dc1f4f47563ccab7f4d92f5b543" args="(void *item)=0" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void* tbb::filter::operator()           </td>
+          <td>(</td>
+          <td class="paramtype">void * </td>
+          <td class="paramname"> <em>item</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [pure virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Operate on an item from the input stream, and return item for output stream. 
+<p>
+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>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00140.html b/doc/html/a00140.html
index 17e74e3..6827625 100644
--- a/doc/html/a00140.html
+++ b/doc/html/a00140.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::final_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,42 +21,27 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00140.html">tick_count</a></div>
-<h1>tbb::tick_count Class Reference<br>
+<a class="el" href="a00224.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="a00187.html">Timing</a>]</small>
-</h1><!-- doxytag: class="tbb::tick_count" -->Absolute timestamp.  
+[<a class="el" href="a00228.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="a00307.html">tick_count.h</a>></code>
+<code>#include <<a class="el" href="a00326.html">parallel_scan.h</a>></code>
 <p>
-<a href="a00079.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00037.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="a00140.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a> ()</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="a00140.html">tick_count</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00140.html#fb7f78ca61cf28398645ace66e284473">now</a> ()</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="a00141.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00140.html#09dde78a4100800c11bb883d6204b586">operator-</a> (const <a class="el" href="a00140.html">tick_count</a> &t1, const <a class="el" href="a00140.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">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html">interval_t</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06888e4a548788fcb2c15542d428d8c9"></a><!-- doxytag: member="tbb::final_scan_tag::is_final_scan" ref="06888e4a548788fcb2c15542d428d8c9" args="()" -->
+static bool </td><td class="memItemRight" valign="bottom"><b>is_final_scan</b> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Relative time interval.  <a href="a00141.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Absolute timestamp. 
+Used to indicate that the final scan is being performed. 
 <p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00307.html">tick_count.h</a></ul>
+<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>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00141.html b/doc/html/a00141.html
index 37f6678..43619ab 100644
--- a/doc/html/a00141.html
+++ b/doc/html/a00141.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::movable_exception< ExceptionData > 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,57 +21,142 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00140.html">tick_count</a>::<a class="el" href="a00141.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="a00224.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="a00307.html">tick_count.h</a>></code>
+<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
 <p>
-<a href="a00080.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherits <a class="el" href="a00168.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>
 <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="a00141.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd3a1f2580e18cad8453a429a52d04b2"></a><!-- doxytag: member="tbb::movable_exception::movable_exception" ref="bd3a1f2580e18cad8453a429a52d04b2" args="(const ExceptionData &data)" -->
+ </td><td class="memItemRight" valign="bottom"><b>movable_exception</b> (const ExceptionData &data)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="48f97fbf1e5d66c5977891f4375ee4d9"></a><!-- doxytag: member="tbb::movable_exception::movable_exception" ref="48f97fbf1e5d66c5977891f4375ee4d9" args="(const movable_exception &src)" -->
+ </td><td class="memItemRight" valign="bottom"><b>movable_exception</b> (const <a class="el" href="a00141.html">movable_exception</a> &src)  throw ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dfafefe27f2afaa7c7894ca9c71cc568"></a><!-- doxytag: member="tbb::movable_exception::operator=" ref="dfafefe27f2afaa7c7894ca9c71cc568" args="(const movable_exception &src)" -->
+const <a class="el" href="a00141.html">movable_exception</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00141.html">movable_exception</a> &src)</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="a00141.html#1a21a428e00cced2e6a49e0f5f2258bf">interval_t</a> (double sec)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="47114cbc20c8e13cac3108749a3e085d"></a><!-- doxytag: member="tbb::movable_exception::data" ref="47114cbc20c8e13cac3108749a3e085d" args="()" -->
+ExceptionData & </td><td class="memItemRight" valign="bottom"><b>data</b> ()  throw ()</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="a00141.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a> () const </td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7d93c000d862d2558efd9a34817adbce"></a><!-- doxytag: member="tbb::movable_exception::data" ref="7d93c000d862d2558efd9a34817adbce" args="() const " -->
+const ExceptionData & </td><td class="memItemRight" valign="bottom"><b>data</b> () const   throw ()</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="a00141.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#cd9814947902e26463a69a111530f81b">operator+=</a> (const <a class="el" href="a00141.html">interval_t</a> &i)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bc5f5c4739b17ac5211ac58226c2f5a5"></a><!-- doxytag: member="tbb::movable_exception::name" ref="bc5f5c4739b17ac5211ac58226c2f5a5" args="() const " -->
+const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">name</a> () const   throw ()</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="a00141.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a> (const <a class="el" href="a00141.html">interval_t</a> &i)</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="b33a89bccf0c63106f1270c7bfaaf54f"></a><!-- doxytag: member="tbb::movable_exception::what" ref="b33a89bccf0c63106f1270c7bfaaf54f" args="() const " -->
+const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">what</a> () const   throw ()</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="a00141.html#cc3a7ad7000317951ce61f706163efe8">tbb::tick_count</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the result of originally intercepted exception's <a class="el" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">what()</a> method. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00141.html">movable_exception</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">move</a> ()  throw ()</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="a00141.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#09dde78a4100800c11bb883d6204b586">operator-</a> (const <a class="el" href="a00140.html">tick_count</a> &t1, const <a class="el" href="a00140.html">tick_count</a> &t0)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates and returns pointer to the deep copy of this exception object.  <a href="#1aea0ad179d6f0481fe7f3495f66adf9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">destroy</a> ()  throw ()</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="a00141.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#5871ead1ca230efbe52a5008470e6428">operator+</a> (const <a class="el" href="a00141.html">interval_t</a> &i, const <a class="el" href="a00141.html">interval_t</a> &j)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys objects created by the <a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">move()</a> method.  <a href="#7a46873119d9f85a7b0009c13e41a258"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#17cffba35811c92b7e65d63506b69602">throw_self</a> ()</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="a00141.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#fa509691e1d689830931e36edd274f76">operator-</a> (const <a class="el" href="a00141.html">interval_t</a> &i, const <a class="el" href="a00141.html">interval_t</a> &j)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Throws this exception object.  <a href="#17cffba35811c92b7e65d63506b69602"></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="a8c0ae2089ae784b28907cf748b89416"></a><!-- doxytag: member="tbb::movable_exception::my_exception_data" ref="a8c0ae2089ae784b28907cf748b89416" args="" -->
+ExceptionData </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract two intervals. <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">User data. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Relative time interval. 
+<h3>template<typename ExceptionData><br>
+ class tbb::movable_exception< ExceptionData ></h3>
+
+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>
+
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="7a46873119d9f85a7b0009c13e41a258"></a><!-- doxytag: member="tbb::movable_exception::destroy" ref="7a46873119d9f85a7b0009c13e41a258" args="()" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename ExceptionData> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">void <a class="el" href="a00141.html">tbb::movable_exception</a>< ExceptionData >::destroy           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%">  throw ()<code> [inline, virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Destroys objects created by the <a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">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>.
+</div>
+</div><p>
+<a class="anchor" name="1aea0ad179d6f0481fe7f3495f66adf9"></a><!-- doxytag: member="tbb::movable_exception::move" ref="1aea0ad179d6f0481fe7f3495f66adf9" args="()" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename ExceptionData> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="a00141.html">movable_exception</a>* <a class="el" href="a00141.html">tbb::movable_exception</a>< ExceptionData >::move           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%">  throw ()<code> [inline, 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>
+Implements <a class="el" href="a00168.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="()" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename ExceptionData> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">void <a class="el" href="a00141.html">tbb::movable_exception</a>< ExceptionData >::throw_self           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline, 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>
+Implements <a class="el" href="a00168.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="a00307.html">tick_count.h</a></ul>
+<li><a class="el" href="a00377.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 f8acd79..b179b1d 100644
--- a/doc/html/a00142.html
+++ b/doc/html/a00142.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::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,29 +21,81 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<b>internal</b>::<a class="el" href="a00142.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="a00224.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>
+</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="a00290.html">tbb_machine.h</a>></code>
+<code>#include <<a class="el" href="a00294.html">mutex.h</a>></code>
 <p>
-<a href="a00077.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00029.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="05313cb77d4f85213103d4dab74ed454"></a><!-- doxytag: member="tbb::mutex::mutex" ref="05313cb77d4f85213103d4dab74ed454" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#05313cb77d4f85213103d4dab74ed454">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="4470e61c24c129a0299ca6c17240adbb"></a><!-- doxytag: member="tbb::mutex::lock" ref="4470e61c24c129a0299ca6c17240adbb" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#4470e61c24c129a0299ca6c17240adbb">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="a00142.html#4331652c79dea1c1131bd59ab161b234">try_lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring lock (non-blocking).  <a href="#4331652c79dea1c1131bd59ab161b234"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5fc9ef443ae75d966695546be399cc6b"></a><!-- doxytag: member="tbb::mutex::unlock" ref="5fc9ef443ae75d966695546be399cc6b" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#5fc9ef443ae75d966695546be399cc6b">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="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 class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="17b78176054e2bac1ff35b9535d1ea0c"></a><!-- doxytag: member="tbb::mutex::is_rw_mutex" ref="17b78176054e2bac1ff35b9535d1ea0c" 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="d4558e5a7c5b8d8e158ec7a1079669bd"></a><!-- doxytag: member="tbb::mutex::is_recursive_mutex" ref="d4558e5a7c5b8d8e158ec7a1079669bd" 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="f023a29c61451d02359095cbff0f3d45"></a><!-- doxytag: member="tbb::mutex::is_fair_mutex" ref="f023a29c61451d02359095cbff0f3d45" 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::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="a00143.html">scoped_lock</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00143.html#_details">More...</a><br></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>
+Wrapper around the platform's native reader-writer lock. 
+<p>
+For testing purposes only. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="4331652c79dea1c1131bd59ab161b234"></a><!-- doxytag: member="tbb::mutex::try_lock" ref="4331652c79dea1c1131bd59ab161b234" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool tbb::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">
 
-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). 
+Try acquiring lock (non-blocking). 
 <p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00290.html">tbb_machine.h</a></ul>
+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>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00113.html b/doc/html/a00143.html
similarity index 78%
rename from doc/html/a00113.html
rename to doc/html/a00143.html
index 27c8535..2f62f18 100644
--- a/doc/html/a00113.html
+++ b/doc/html/a00143.html
@@ -21,38 +21,42 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00112.html">mutex</a>::<a class="el" href="a00113.html">scoped_lock</a></div>
+<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>
 <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="a00228.html">mutex.h</a>></code>
+<code>#include <<a class="el" href="a00294.html">mutex.h</a>></code>
 <p>
-<a href="a00025.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00030.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="1d403ae51b484df5d86d85ae38f11e6e"></a><!-- doxytag: member="tbb::mutex::scoped_lock::scoped_lock" ref="1d403ae51b484df5d86d85ae38f11e6e" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#1d403ae51b484df5d86d85ae38f11e6e">scoped_lock</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#1d403ae51b484df5d86d85ae38f11e6e">scoped_lock</a> ()</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#605a6b9af0f8cdabdf81825e0de99600">scoped_lock</a> (<a class="el" href="a00112.html">mutex</a> &<a class="el" href="a00112.html">mutex</a>)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#605a6b9af0f8cdabdf81825e0de99600">scoped_lock</a> (<a class="el" href="a00142.html">mutex</a> &<a class="el" href="a00142.html">mutex</a>)</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#605a6b9af0f8cdabdf81825e0de99600"></a><br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0ebbbecaf4311e9df7362cb76ceaa368"></a><!-- doxytag: member="tbb::mutex::scoped_lock::~scoped_lock" ref="0ebbbecaf4311e9df7362cb76ceaa368" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#0ebbbecaf4311e9df7362cb76ceaa368">~scoped_lock</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#0ebbbecaf4311e9df7362cb76ceaa368">~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="862e022841cdc522e4296a5533b22efd"></a><!-- doxytag: member="tbb::mutex::scoped_lock::acquire" ref="862e022841cdc522e4296a5533b22efd" args="(mutex &mutex)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#862e022841cdc522e4296a5533b22efd">acquire</a> (<a class="el" href="a00112.html">mutex</a> &<a class="el" href="a00112.html">mutex</a>)</td></tr>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#862e022841cdc522e4296a5533b22efd">acquire</a> (<a class="el" href="a00142.html">mutex</a> &<a class="el" href="a00142.html">mutex</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="591e0c49b82bcedffcbe0923f1b915ec"></a><!-- doxytag: member="tbb::mutex::scoped_lock::try_acquire" ref="591e0c49b82bcedffcbe0923f1b915ec" args="(mutex &mutex)" -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#591e0c49b82bcedffcbe0923f1b915ec">try_acquire</a> (<a class="el" href="a00112.html">mutex</a> &<a class="el" href="a00112.html">mutex</a>)</td></tr>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#591e0c49b82bcedffcbe0923f1b915ec">try_acquire</a> (<a class="el" href="a00142.html">mutex</a> &<a class="el" href="a00142.html">mutex</a>)</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="0d51d18cd99df3b2e93bf07378d0992c"></a><!-- doxytag: member="tbb::mutex::scoped_lock::release" ref="0d51d18cd99df3b2e93bf07378d0992c" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#0d51d18cd99df3b2e93bf07378d0992c">release</a> ()</td></tr>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#0d51d18cd99df3b2e93bf07378d0992c">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="93062a14ad2e50e2b7b485b913170779"></a><!-- doxytag: member="tbb::mutex::scoped_lock::mutex" ref="93062a14ad2e50e2b7b485b913170779" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>mutex</b></td></tr>
+
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
 The scoped locking pattern. 
@@ -67,7 +71,7 @@ It helps to avoid the common problem of forgetting to release lock. It also nice
         <tr>
           <td class="memname">tbb::mutex::scoped_lock::scoped_lock           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00112.html">mutex</a> & </td>
+          <td class="paramtype"><a class="el" href="a00142.html">mutex</a> & </td>
           <td class="paramname"> <em>mutex</em>          </td>
           <td> ) </td>
           <td width="100%"><code> [inline]</code></td>
@@ -83,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="a00228.html">mutex.h</a></ul>
+<li><a class="el" href="a00294.html">mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00114.html b/doc/html/a00144.html
similarity index 90%
rename from doc/html/a00114.html
rename to doc/html/a00144.html
index aa444fb..260cd99 100644
--- a/doc/html/a00114.html
+++ b/doc/html/a00144.html
@@ -21,17 +21,17 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00114.html">parallel_do_feeder</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00234.html">parallel_do.h</a>></code>
+<code>#include <<a class="el" href="a00301.html">parallel_do.h</a>></code>
 <p>
-<a href="a00030.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="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="a00114.html#40baaf0f6856f4491dd0adf896c93516">add</a> (const Item &item)</td></tr>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.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>
@@ -53,7 +53,7 @@ Class the user supplied algorithm body uses to add new tasks.
 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00234.html">parallel_do.h</a></ul>
+<li><a class="el" href="a00301.html">parallel_do.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00115.html b/doc/html/a00145.html
similarity index 87%
copy from doc/html/a00115.html
copy to doc/html/a00145.html
index de1351e..2d98ef1 100644
--- a/doc/html/a00115.html
+++ b/doc/html/a00145.html
@@ -21,36 +21,36 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00115.html">parallel_while</a></div>
+<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="a00183.html">Algorithms</a>]</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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00260.html">parallel_while.h</a>></code>
+<code>#include <<a class="el" href="a00335.html">parallel_while.h</a>></code>
 <p>
-<a href="a00033.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 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="a00115.html#fa297e53d3af2a101e712bc200233e9c">value_type</a></td></tr>
+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="a00115.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</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="a00115.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</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="a00115.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a> (Stream &stream, const Body &body)</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="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="a00115.html#e131c560057a58229992b61eb8dba4c6">add</a> (const <a class="el" href="a00115.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> &item)</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="mdescLeft"> </td><td class="mdescRight">Add a work item while running.  <a href="#e131c560057a58229992b61eb8dba4c6"></a><br></td></tr>
 </table>
@@ -73,9 +73,9 @@ The Body b has the requirement: <br>
 template<typename Body> </div>
       <table class="memname">
         <tr>
-          <td class="memname">void <a class="el" href="a00115.html">tbb::parallel_while</a>< Body >::add           </td>
+          <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="a00115.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> & </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>
@@ -99,7 +99,7 @@ template<typename Body> </div>
 template<typename Stream> </div>
       <table class="memname">
         <tr>
-          <td class="memname">void <a class="el" href="a00115.html">tbb::parallel_while</a>< Body >::run           </td>
+          <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>
@@ -128,7 +128,7 @@ A Stream s has the requirements <br>
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00260.html">parallel_while.h</a></ul>
+<li><a class="el" href="a00335.html">parallel_while.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00116.html b/doc/html/a00146.html
similarity index 76%
copy from doc/html/a00116.html
copy to doc/html/a00146.html
index 83c43c2..3ad289a 100644
--- a/doc/html/a00116.html
+++ b/doc/html/a00146.html
@@ -21,47 +21,56 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00116.html">pipeline</a></div>
+<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00146.html">pipeline</a></div>
 <h1>tbb::pipeline Class Reference<br>
 <small>
-[<a class="el" href="a00183.html">Algorithms</a>]</small>
+[<a class="el" href="a00228.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="a00269.html">pipeline.h</a>></code>
+<code>#include <<a class="el" href="a00344.html">pipeline.h</a>></code>
 <p>
-<a href="a00040.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="596dc3beba27099c4c8581cb419e1a59"></a><!-- doxytag: member="tbb::pipeline::pipeline" ref="596dc3beba27099c4c8581cb419e1a59" args="()" -->
-__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a> ()</td></tr>
+__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#596dc3beba27099c4c8581cb419e1a59">pipeline</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="a00116.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a> ()</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="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="a00116.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a> (<a class="el" href="a00109.html">filter</a> &filter_)</td></tr>
+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="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="a00116.html#f627616049b3fe36801f37ee40403ef8">run</a> (size_t max_number_of_live_tokens)</td></tr>
+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="a00116.html#93d7fec8cd607b803dd2d79fb46bd260">run</a> (size_t max_number_of_live_tokens, <a class="el" href="a00133.html">tbb::task_group_context</a> &context)</td></tr>
+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="a00116.html#2c84aef5b834b555ee220b176e25931e">clear</a> ()</td></tr>
+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>
+
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
 A processing pipeling that applies filters to items. 
@@ -87,7 +96,7 @@ Though the current implementation declares the destructor virtual, do not rely o
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00269.html">pipeline.h</a></ul>
+<li><a class="el" href="a00344.html">pipeline.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00110.html b/doc/html/a00147.html
similarity index 70%
rename from doc/html/a00110.html
rename to doc/html/a00147.html
index 380999d..55461a9 100644
--- a/doc/html/a00110.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::final_scan_tag Struct 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,27 +21,27 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00110.html">final_scan_tag</a></div>
-<h1>tbb::final_scan_tag Struct Reference<br>
+<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="a00183.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::final_scan_tag" -->Used to indicate that the final scan is being performed.  
+[<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00251.html">parallel_scan.h</a>></code>
+<code>#include <<a class="el" href="a00326.html">parallel_scan.h</a>></code>
 <p>
-<a href="a00032.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>Static Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06888e4a548788fcb2c15542d428d8c9"></a><!-- doxytag: member="tbb::final_scan_tag::is_final_scan" ref="06888e4a548788fcb2c15542d428d8c9" args="()" -->
+<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>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Used to indicate that the final scan is being performed. 
+Used to indicate that the initial scan is being performed. 
 <p>
 <hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00251.html">parallel_scan.h</a></ul>
+<li><a class="el" href="a00326.html">parallel_scan.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00112.html b/doc/html/a00148.html
similarity index 60%
rename from doc/html/a00112.html
rename to doc/html/a00148.html
index 9f85537..bf60f84 100644
--- a/doc/html/a00112.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::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,48 +21,49 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00112.html">mutex</a></div>
-<h1>tbb::mutex Class Reference<br>
+<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="a00186.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::mutex" -->Wrapper around the platform's native reader-writer lock.  
+[<a class="el" href="a00231.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="a00228.html">mutex.h</a>></code>
+<code>#include <<a class="el" href="a00345.html">queuing_mutex.h</a>></code>
 <p>
-<a href="a00024.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="05313cb77d4f85213103d4dab74ed454"></a><!-- doxytag: member="tbb::mutex::mutex" ref="05313cb77d4f85213103d4dab74ed454" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00112.html#05313cb77d4f85213103d4dab74ed454">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="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="17b78176054e2bac1ff35b9535d1ea0c"></a><!-- doxytag: member="tbb::mutex::is_rw_mutex" ref="17b78176054e2bac1ff35b9535d1ea0c" 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="d4558e5a7c5b8d8e158ec7a1079669bd"></a><!-- doxytag: member="tbb::mutex::is_recursive_mutex" ref="d4558e5a7c5b8d8e158ec7a1079669bd" args="" -->
+<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="f023a29c61451d02359095cbff0f3d45"></a><!-- doxytag: member="tbb::mutex::is_fair_mutex" ref="f023a29c61451d02359095cbff0f3d45" 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::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>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html">scoped_lock</a></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="a00113.html#_details">More...</a><br></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>
-Wrapper around the platform's native reader-writer lock. 
-<p>
-For testing purposes only. 
+Queuing lock with local-only spinning. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00228.html">mutex.h</a></ul>
+<li><a class="el" href="a00345.html">queuing_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00119.html b/doc/html/a00149.html
similarity index 86%
copy from doc/html/a00119.html
copy to doc/html/a00149.html
index d448c98..42af21c 100644
--- a/doc/html/a00119.html
+++ b/doc/html/a00149.html
@@ -21,35 +21,35 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00118.html">queuing_mutex</a>::<a class="el" href="a00119.html">scoped_lock</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00270.html">queuing_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00345.html">queuing_mutex.h</a>></code>
 <p>
-<a href="a00042.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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00119.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a> ()</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="a00119.html#9b51ef972f5618ac17caadb58841ab6d">scoped_lock</a> (<a class="el" href="a00118.html">queuing_mutex</a> &m)</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 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="a00119.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a> ()</td></tr>
+ </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">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="a00119.html#533e4fc8355ee321206a0609c42d909d">acquire</a> (<a class="el" href="a00118.html">queuing_mutex</a> &m)</td></tr>
+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">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="a00119.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a> (<a class="el" href="a00118.html">queuing_mutex</a> &m)</td></tr>
+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">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="a00119.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a> ()</td></tr>
+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">Release lock. <br></td></tr>
 </table>
@@ -87,7 +87,7 @@ Equivalent to zero-initialization of *this.
         <tr>
           <td class="memname">tbb::queuing_mutex::scoped_lock::scoped_lock           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00118.html">queuing_mutex</a> & </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>
@@ -103,7 +103,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="a00270.html">queuing_mutex.h</a></ul>
+<li><a class="el" href="a00345.html">queuing_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00120.html b/doc/html/a00150.html
similarity index 89%
copy from doc/html/a00120.html
copy to doc/html/a00150.html
index 3a4dd7b..9cfffa8 100644
--- a/doc/html/a00120.html
+++ b/doc/html/a00150.html
@@ -21,24 +21,24 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00120.html">queuing_rw_mutex</a></div>
+<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>
 <small>
-[<a class="el" href="a00186.html">Synchronization</a>]</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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00271.html">queuing_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00346.html">queuing_rw_mutex.h</a>></code>
 <p>
-<a href="a00043.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 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="a00120.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_mutex</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_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="1ba73e3d95cfdf8323880bc623af9099"></a><!-- doxytag: member="tbb::queuing_rw_mutex::~queuing_rw_mutex" ref="1ba73e3d95cfdf8323880bc623af9099" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</a> ()</td></tr>
+ </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">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="()" -->
@@ -59,9 +59,9 @@ static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_
 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="a00121.html">scoped_lock</a></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="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00121.html#_details">More...</a><br></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. 
@@ -69,7 +69,7 @@ Reader-writer lock with local-only spinning.
 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="a00271.html">queuing_rw_mutex.h</a></ul>
+<li><a class="el" href="a00346.html">queuing_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00121.html b/doc/html/a00151.html
similarity index 87%
copy from doc/html/a00121.html
copy to doc/html/a00151.html
index c4a3d89..7d84757 100644
--- a/doc/html/a00121.html
+++ b/doc/html/a00151.html
@@ -21,42 +21,42 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00120.html">queuing_rw_mutex</a>::<a class="el" href="a00121.html">scoped_lock</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00271.html">queuing_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00346.html">queuing_rw_mutex.h</a>></code>
 <p>
-<a href="a00044.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 Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00121.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a> ()</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 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="a00121.html#fbb8798792d3aebb136c46fc63d2529e">scoped_lock</a> (<a class="el" href="a00120.html">queuing_rw_mutex</a> &m, bool write=true)</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="a00121.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a> ()</td></tr>
+ </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="a00121.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a> (<a class="el" href="a00120.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
+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="a00121.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a> (<a class="el" href="a00120.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
+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="a00121.html#67ae221109ddc69510ab593874e435d4">release</a> ()</td></tr>
+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="a00121.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a> ()</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="a00121.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a> ()</td></tr>
+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>
@@ -94,7 +94,7 @@ Equivalent to zero-initialization of *this.
         <tr>
           <td class="memname">tbb::queuing_rw_mutex::scoped_lock::scoped_lock           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00120.html">queuing_rw_mutex</a> & </td>
+          <td class="paramtype"><a class="el" href="a00150.html">queuing_rw_mutex</a> & </td>
           <td class="paramname"> <em>m</em>, </td>
         </tr>
         <tr>
@@ -141,7 +141,7 @@ Returns true if the upgrade happened without re-acquiring the lock and false if
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00271.html">queuing_rw_mutex.h</a></ul>
+<li><a class="el" href="a00346.html">queuing_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00122.html b/doc/html/a00152.html
similarity index 61%
copy from doc/html/a00122.html
copy to doc/html/a00152.html
index f9c5cd0..ddd62c3 100644
--- a/doc/html/a00122.html
+++ b/doc/html/a00152.html
@@ -21,22 +21,33 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00122.html">recursive_mutex</a></div>
+<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>
 <small>
-[<a class="el" href="a00186.html">Synchronization</a>]</small>
+[<a class="el" href="a00231.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="a00272.html">recursive_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00347.html">recursive_mutex.h</a>></code>
 <p>
-<a href="a00045.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>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="a00122.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired <a class="el" href="a00122.html">recursive_mutex</a>. <br></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">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="" -->
 static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = false</td></tr>
@@ -52,17 +63,39 @@ static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_
 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="a00123.html">scoped_lock</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html">scoped_lock</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00123.html#_details">More...</a><br></td></tr>
+<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). 
+<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="a00272.html">recursive_mutex.h</a></ul>
+<li><a class="el" href="a00347.html">recursive_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00123.html b/doc/html/a00153.html
similarity index 65%
copy from doc/html/a00123.html
copy to doc/html/a00153.html
index ef65507..8eeff49 100644
--- a/doc/html/a00123.html
+++ b/doc/html/a00153.html
@@ -21,69 +21,51 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00122.html">recursive_mutex</a>::<a class="el" href="a00123.html">scoped_lock</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00272.html">recursive_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00347.html">recursive_mutex.h</a>></code>
 <p>
-<a href="a00046.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"><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="a00123.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a <a class="el" href="a00122.html">recursive_mutex</a>. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html#dec17713c4c1321ac8fec66816d0c602">scoped_lock</a> (<a class="el" href="a00122.html">recursive_mutex</a> &<a class="el" href="a00112.html">mutex</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">Acquire lock on given mutex.  <a href="#dec17713c4c1321ac8fec66816d0c602"></a><br></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="a00123.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a> ()</td></tr>
+ </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">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="a00123.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a> (<a class="el" href="a00122.html">recursive_mutex</a> &<a class="el" href="a00112.html">mutex</a>)</td></tr>
+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="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="a00123.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a> (<a class="el" href="a00122.html">recursive_mutex</a> &<a class="el" href="a00112.html">mutex</a>)</td></tr>
+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="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given <a class="el" href="a00122.html">recursive_mutex</a>. <br></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="a00123.html#ac480ea0e9d5ea0345a67d57008b6263">release</a> ()</td></tr>
+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">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="dec17713c4c1321ac8fec66816d0c602"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::scoped_lock" ref="dec17713c4c1321ac8fec66816d0c602" args="(recursive_mutex &mutex)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">tbb::recursive_mutex::scoped_lock::scoped_lock           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00122.html">recursive_mutex</a> & </td>
-          <td class="paramname"> <em>mutex</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="a00272.html">recursive_mutex.h</a></ul>
+<li><a class="el" href="a00347.html">recursive_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00124.html b/doc/html/a00154.html
similarity index 92%
copy from doc/html/a00124.html
copy to doc/html/a00154.html
index 10d43da..b924660 100644
--- a/doc/html/a00124.html
+++ b/doc/html/a00154.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="a00181.html">tbb</a>::<a class="el" href="a00124.html">scalable_allocator</a></div>
+<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>
 <small>
-[<a class="el" href="a00185.html">Memory Allocation</a>]</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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00273.html">scalable_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00348.html">scalable_allocator.h</a>></code>
 <p>
-<a href="a00047.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="" -->
@@ -57,11 +57,11 @@ typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><b>differen
 
 <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="a00124.html">scalable_allocator</a> &)  throw ()</td></tr>
+ </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="a00124.html">scalable_allocator</a>< U > &)  throw ()</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="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>
@@ -70,15 +70,15 @@ pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (refer
 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="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="a00124.html#726b1586d05d44665a36e1c7b2699bfd">allocate</a> (size_type n, const void *=0)</td></tr>
+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 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="a00124.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a> (pointer p, size_type)</td></tr>
+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="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="a00124.html#880e766f1d913988c21973dbdd874fd5">max_size</a> () const   throw ()</td></tr>
+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="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)" -->
@@ -100,7 +100,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="a00273.html">scalable_allocator.h</a></ul>
+<li><a class="el" href="a00348.html">scalable_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00101.html b/doc/html/a00155.html
similarity index 64%
rename from doc/html/a00101.html
rename to doc/html/a00155.html
index d3c1281..8978a31 100644
--- a/doc/html/a00101.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::cache_aligned_allocator< void > Class Template 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,25 +21,25 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00101.html">cache_aligned_allocator< void ></a></div>
-<h1>tbb::cache_aligned_allocator< void > Class Template Reference<br>
+<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="a00185.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 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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00203.html">cache_aligned_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00348.html">scalable_allocator.h</a>></code>
 <p>
-<a href="a00010.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 Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ce89776145998f0685a767b4f195272d"></a><!-- doxytag: member="tbb::cache_aligned_allocator< void >::pointer" ref="ce89776145998f0685a767b4f195272d" args="" -->
+<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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4431fbbe1a8cfeb19c48ad0072078f45"></a><!-- doxytag: member="tbb::cache_aligned_allocator< void >::const_pointer" ref="4431fbbe1a8cfeb19c48ad0072078f45" args="" -->
+<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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2ab296f4ecdd75f8e193ff92004a697d"></a><!-- doxytag: member="tbb::cache_aligned_allocator< void >::value_type" ref="2ab296f4ecdd75f8e193ff92004a697d" args="" -->
+<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>
@@ -48,12 +48,12 @@ typedef void </td><td class="memItemRight" valign="bottom"><b>value_type</b
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
 <h3>template<><br>
- class tbb::cache_aligned_allocator< void ></h3>
+ class tbb::scalable_allocator< void ></h3>
 
 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="a00203.html">cache_aligned_allocator.h</a></ul>
+<li><a class="el" href="a00348.html">scalable_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00091.html b/doc/html/a00156.html
similarity index 62%
rename from doc/html/a00091.html
rename to doc/html/a00156.html
index f902cc4..f6c3249 100644
--- a/doc/html/a00091.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::affinity_partitioner 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,33 +21,38 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00091.html">affinity_partitioner</a></div>
-<h1>tbb::affinity_partitioner Class Reference</h1><!-- doxytag: class="tbb::affinity_partitioner" -->An affinity partitioner.  
+<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>
+<small>
+[<a class="el" href="a00228.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="a00264.html">partitioner.h</a>></code>
+<code>#include <<a class="el" href="a00339.html">partitioner.h</a>></code>
 <p>
-<a href="a00038.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>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a47f7e0208a2bf68f35b51b27d2ddf2a"></a><!-- doxytag: member="tbb::affinity_partitioner::internal::start_for" ref="a47f7e0208a2bf68f35b51b27d2ddf2a" args="" -->
+<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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="181db51277e9b15dd0ec4a0617ab1f92"></a><!-- doxytag: member="tbb::affinity_partitioner::internal::start_reduce_with_affinity" ref="181db51277e9b15dd0ec4a0617ab1f92" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::start_reduce_with_affinity</b></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="76d97ae6ad98db0acfc8ed8cb7c76705"></a><!-- doxytag: member="tbb::affinity_partitioner::internal::start_scan" ref="76d97ae6ad98db0acfc8ed8cb7c76705" args="" -->
+<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="e9575467e391b90e0703fadf573dbad7"></a><!-- doxytag: member="tbb::affinity_partitioner::internal::affinity_partition_type" ref="e9575467e391b90e0703fadf573dbad7" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::affinity_partition_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"><b>partition_type</b></td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-An affinity partitioner. 
+A simple partitioner. 
+<p>
+Divides the range until the range is not divisible. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00264.html">partitioner.h</a></ul>
+<li><a class="el" href="a00339.html">partitioner.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00127.html b/doc/html/a00157.html
similarity index 66%
copy from doc/html/a00127.html
copy to doc/html/a00157.html
index 4b05c55..9ee7a73 100644
--- a/doc/html/a00127.html
+++ b/doc/html/a00157.html
@@ -21,24 +21,35 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00127.html">spin_mutex</a></div>
+<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="a00186.html">Synchronization</a>]</small>
+[<a class="el" href="a00231.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="a00274.html">spin_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00349.html">spin_mutex.h</a>></code>
 <p>
-<a href="a00051.html">List of all members.</a><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="a00127.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a> ()</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="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="a00157.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="a00157.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="a00157.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>
@@ -54,14 +65,14 @@ static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_
 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="a00128.html">scoped_lock</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">scoped_lock</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Represents acquisition of a mutex.  <a href="a00128.html#_details">More...</a><br></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="a00127.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. 
+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="()" -->
@@ -85,8 +96,30 @@ Construct unacquired lock.
 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="a00274.html">spin_mutex.h</a></ul>
+<li><a class="el" href="a00349.html">spin_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00128.html b/doc/html/a00158.html
similarity index 65%
copy from doc/html/a00128.html
copy to doc/html/a00158.html
index 1f7dbc3..aac0c6b 100644
--- a/doc/html/a00128.html
+++ b/doc/html/a00158.html
@@ -21,45 +21,71 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00127.html">spin_mutex</a>::<a class="el" href="a00128.html">scoped_lock</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00274.html">spin_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00349.html">spin_mutex.h</a>></code>
 <p>
-<a href="a00052.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 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="a00128.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</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="a00128.html#5ce6807050a9e8f87bcb4a65dccb12ef">scoped_lock</a> (<a class="el" href="a00127.html">spin_mutex</a> &m)</td></tr>
+ </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="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="a00128.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a> (<a class="el" href="a00127.html">spin_mutex</a> &m)</td></tr>
+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="mdescLeft"> </td><td class="mdescRight">Acquire lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9297ec188534b45dc0ca48f2f39a0501"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::try_acquire" ref="9297ec188534b45dc0ca48f2f39a0501" args="(spin_mutex &m)" -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00128.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a> (<a class="el" href="a00127.html">spin_mutex</a> &m)</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">Try acquiring lock (non-blocking). <br></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="a00128.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a> ()</td></tr>
+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">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="a00128.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a> ()</td></tr>
+ </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">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>
+
 </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">
+
+<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="a00274.html">spin_mutex.h</a></ul>
+<li><a class="el" href="a00349.html">spin_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00129.html b/doc/html/a00159.html
similarity index 50%
copy from doc/html/a00129.html
copy to doc/html/a00159.html
index 160177f..f1a8df9 100644
--- a/doc/html/a00129.html
+++ b/doc/html/a00159.html
@@ -21,26 +21,44 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00129.html">spin_rw_mutex_v3</a></div>
+<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>
 <small>
-[<a class="el" href="a00186.html">Synchronization</a>]</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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00275.html">spin_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00350.html">spin_rw_mutex.h</a>></code>
 <p>
-<a href="a00053.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 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="a00129.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</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="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="a00129.html#9a815fb2759e55072ed413f1b6970cf3">~spin_rw_mutex_v3</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html#9a815fb2759e55072ed413f1b6970cf3">~spin_rw_mutex_v3</a> ()</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>
@@ -52,15 +70,58 @@ static const bool </td><td class="memItemRight" valign="bottom"><b>is_recur
 static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = false</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="a00130.html">scoped_lock</a></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="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00130.html#_details">More...</a><br></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">
+
+<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="a00275.html">spin_rw_mutex.h</a></ul>
+<li><a class="el" href="a00350.html">spin_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00130.html b/doc/html/a00160.html
similarity index 87%
copy from doc/html/a00130.html
copy to doc/html/a00160.html
index 132cf3a..ffcddcb 100644
--- a/doc/html/a00130.html
+++ b/doc/html/a00160.html
@@ -21,42 +21,42 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00129.html">spin_rw_mutex_v3</a>::<a class="el" href="a00130.html">scoped_lock</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00275.html">spin_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00350.html">spin_rw_mutex.h</a>></code>
 <p>
-<a href="a00054.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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#d6ea60dee5563f702379bf5e51aa8806">scoped_lock</a> ()</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 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="a00130.html#42a92d4f8fdde425b111cfa8a9228071">scoped_lock</a> (<a class="el" href="a00129.html">spin_rw_mutex</a> &m, bool write=true)</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="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="a00130.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">~scoped_lock</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">~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="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="a00130.html#b0b646ec5be02a127d159bbb7ca65353">acquire</a> (<a class="el" href="a00129.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
+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 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="a00130.html#3f0b1e3f2efab63336400348bd070226">upgrade_to_writer</a> ()</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="a00130.html#61b14d00a78185c9b2d206ebfc379124">release</a> ()</td></tr>
+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="a00130.html#c2c2c38a08cb9080e87099fac3e5bc94">downgrade_to_reader</a> ()</td></tr>
+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="a00130.html#9879626968d9b9a04cd2ec0fb2e84ae1">try_acquire</a> (<a class="el" href="a00129.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
+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>
@@ -94,7 +94,7 @@ Equivalent to zero-initialization of *this.
         <tr>
           <td class="memname">tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00129.html">spin_rw_mutex</a> & </td>
+          <td class="paramtype"><a class="el" href="a00159.html">spin_rw_mutex</a> & </td>
           <td class="paramname"> <em>m</em>, </td>
         </tr>
         <tr>
@@ -141,7 +141,7 @@ Returns true if the upgrade happened without re-acquiring the lock and false if
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00275.html">spin_rw_mutex.h</a></ul>
+<li><a class="el" href="a00350.html">spin_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00093.html b/doc/html/a00161.html
similarity index 68%
rename from doc/html/a00093.html
rename to doc/html/a00161.html
index 98dc3c9..e442c12 100644
--- a/doc/html/a00093.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::atomic< T > Struct Template 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,28 +21,25 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00093.html">atomic</a></div>
-<h1>tbb::atomic< T > Struct Template Reference<br>
+<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00161.html">split</a></div>
+<h1>tbb::split Class Reference<br>
 <small>
-[<a class="el" href="a00186.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::atomic" -->Primary template for atomic.  
+[<a class="el" href="a00228.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="a00193.html">atomic.h</a>></code>
+<code>#include <<a class="el" href="a00382.html">tbb_stddef.h</a>></code>
 <p>
 <table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename T><br>
- struct tbb::atomic< T ></h3>
-
-Primary template for atomic. 
+Dummy type that distinguishes splitting constructor from copy constructor. 
 <p>
-See the Reference for details. 
+See description of parallel_for and parallel_reduce for example usages. 
 <p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00193.html">atomic.h</a></ul>
+<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>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00132.html b/doc/html/a00162.html
similarity index 78%
copy from doc/html/a00132.html
copy to doc/html/a00162.html
index 23c5744..4bda324 100644
--- a/doc/html/a00132.html
+++ b/doc/html/a00162.html
@@ -21,182 +21,201 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00132.html">task</a></div>
+<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="a00188.html">Task Scheduling</a>]</small>
+[<a class="el" href="a00233.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="a00276.html">task.h</a>></code>
+<code>#include <<a class="el" href="a00351.html">task.h</a>></code>
 <p>
-Inherited by <a class="el" href="a00108.html">tbb::empty_task</a>.
+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="a00057.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+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">typedef internal::intptr </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a></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="a00132.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a></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="a00132.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a></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="a00132.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="a00132.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</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="a00132.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a></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="a00132.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a></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="a00132.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a></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="a00132.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a></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="a00132.html#4a3c415562d17905390ea5b49d12293e">state_type</a> { <br>
-  <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a>, 
-<a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a>, 
-<a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a>, 
-<a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a>, 
+<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="a00132.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a>, 
-<a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a>
+  <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="a00132.html#4a3c415562d17905390ea5b49d12293e">More...</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="a00132.html#98245ee0473f84cb19dbbf8c81134908">~task</a> ()</td></tr>
+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="a00132.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#22c298cd40937a431a06777423f002f6">execute</a> ()=0</td></tr>
+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="a00132.html#1434c79a5138993269d034008bff7329">allocate_continuation</a> ()</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="a00132.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a> ()</td></tr>
+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="a00132.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a> (<a class="el" href="a00132.html">task</a> &t)</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="a00132.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a> (<a class="el" href="a00132.html">task</a> &victim)</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="a00132.html#a67a79e18f62b43a623a00cfbd76db4c">recycle_as_continuation</a> ()</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="a00132.html#3b290d14109704e2b69dc1ac980a7a76">recycle_as_safe_continuation</a> ()</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="a00132.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a> (<a class="el" href="a00132.html">task</a> &new_parent)</td></tr>
+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="a00132.html#4f1be9bbcdb487830dbe298b68d85144">recycle_to_reexecute</a> ()</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="mdescLeft"> </td><td class="mdescRight">Schedule this for reexecution after current <a class="el" href="a00132.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="5be823a972b3c3b9901c5963eeb050fd"></a><!-- doxytag: member="tbb::task::depth" ref="5be823a972b3c3b9901c5963eeb050fd" args="() const " -->
-<a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#5be823a972b3c3b9901c5963eeb050fd">depth</a> () const </td></tr>
+<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="a00132.html#fc4d4e61a56823aa1efdbb5d59e42973">set_depth</a> (<a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> new_depth)</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="a00132.html#b0f98c633647fc73b978fe4cd2277ac4">add_to_depth</a> (int delta)</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="a00132.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a> (int count)</td></tr>
+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="a00132.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a> (<a class="el" href="a00132.html">task</a> &child)</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="a00132.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a> (<a class="el" href="a00134.html">task_list</a> &list)</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="a00132.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a> (<a class="el" href="a00132.html">task</a> &child)</td></tr>
+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="a00132.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a> (<a class="el" href="a00134.html">task_list</a> &list)</td></tr>
+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="a00132.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a> ()</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="a00132.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#314e98ee4347ccec83efcb9ee22e8596">parent</a> () const </td></tr>
+<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="a00132.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a> () const </td></tr>
+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="a00132.html#4a3c415562d17905390ea5b49d12293e">state_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#0af7b2d7e6e8b4333b2accfce3dfb374">state</a> () const </td></tr>
+<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="a00132.html#ad774f55eaec008ae02b236423209ced">ref_count</a> () const </td></tr>
+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="a00132.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a> () const </td></tr>
+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="a00132.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a> (<a class="el" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> id)</td></tr>
+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="a00132.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#3a920a56b0bcf2801518fb45b2c9d2be">affinity</a> () const </td></tr>
+<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="a00132.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a> (<a class="el" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> id)</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="a00132.html#0f3fb4aac549ab642022450a4bd13326">cancel_group_execution</a> ()</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="a00132.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a> () const </td></tr>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.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="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="a00132.html#23acb0da0afd690da797f9f882027d34">allocate_root</a> ()</td></tr>
+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">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="a00132.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a> (<a class="el" href="a00133.html">task_group_context</a> &ctx)</td></tr>
+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">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="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a> (<a class="el" href="a00132.html">task</a> &root)</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">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="a00132.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a> (<a class="el" href="a00134.html">task_list</a> &root_list)</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">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="a00132.html">task</a> &__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#bd43e8d6249738efafd12d6a4c72c5e3">self</a> ()</td></tr>
+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">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="a00132.html#2bce8ec6e44706e70128f5cf91b76e67">task</a> ()</td></tr>
+ </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 colspan="2"><br><h2>Friends</h2></td></tr>
@@ -221,6 +240,9 @@ class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_c
 <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>
 Base class for user-defined tasks. 
@@ -231,7 +253,7 @@ Base class for user-defined tasks.
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">typedef internal::affinity_id <a class="el" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">tbb::task::affinity_id</a>          </td>
+          <td class="memname">typedef internal::affinity_id <a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">tbb::task::affinity_id</a>          </td>
         </tr>
       </table>
 </div>
@@ -248,7 +270,7 @@ Guaranteed to be integral type. Value of 0 means no affinity.
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">typedef internal::intptr <a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">tbb::task::depth_type</a>          </td>
+          <td class="memname">typedef internal::intptr <a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">tbb::task::depth_type</a>          </td>
         </tr>
       </table>
 </div>
@@ -266,7 +288,7 @@ Guaranteed to be a signed integral type.
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">enum <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e">tbb::task::state_type</a>          </td>
+          <td class="memname">enum <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e">tbb::task::state_type</a>          </td>
         </tr>
       </table>
 </div>
@@ -278,7 +300,7 @@ Enumeration of task states that the scheduler considers.
 <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="a00132.html#22c298cd40937a431a06777423f002f6">execute()</a> completes. </td></tr>
+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>
@@ -324,7 +346,7 @@ The resulting depth must be non-negative.
         <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="a00132.html">task</a> & </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>
@@ -382,6 +404,27 @@ Initiates cancellation of all tasks in this cancellation group and its subordina
 
 </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">
@@ -389,7 +432,7 @@ Initiates cancellation of all tasks in this cancellation group and its subordina
         <tr>
           <td class="memname">void __TBB_EXPORTED_METHOD tbb::task::destroy           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00132.html">task</a> & </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>
@@ -401,7 +444,28 @@ Initiates cancellation of all tasks in this cancellation group and its subordina
 <p>
 Destroy a task. 
 <p>
-Usually, calling this method is unnecessary, because a task is implicitly deleted after its <a class="el" href="a00132.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. 
+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)" -->
@@ -411,7 +475,7 @@ Usually, calling this method is unnecessary, because a task is implicitly delete
         <tr>
           <td class="memname">virtual void __TBB_EXPORTED_METHOD tbb::task::note_affinity           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> </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>
@@ -423,7 +487,7 @@ Usually, calling this method is unnecessary, because a task is implicitly delete
 <p>
 Invoked by scheduler to notify task that it ran on unexpected thread. 
 <p>
-Invoked before method <a class="el" href="a00132.html#22c298cd40937a431a06777423f002f6">execute()</a> runs, if task is stolen, or task has affinity but will be executed on another 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>
@@ -445,7 +509,7 @@ The default action does nothing.
 <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="a00132.html#22c298cd40937a431a06777423f002f6">execute()</a> returns. Typically, this is done by having method <a class="el" href="a00132.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>
+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>
@@ -486,7 +550,7 @@ For safety, it requires additional increment of ref_count.
 <div class="memdoc">
 
 <p>
-Schedule this for reexecution after current <a class="el" href="a00132.html#22c298cd40937a431a06777423f002f6">execute()</a> returns. 
+Schedule this for reexecution after current <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute()</a> returns. 
 <p>
 Requires that this.execute() be running. 
 </div>
@@ -498,7 +562,7 @@ Requires that this.execute() be running.
         <tr>
           <td class="memname">void tbb::task::set_depth           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> </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>
@@ -520,7 +584,7 @@ The depth must be non-negative
         <tr>
           <td class="memname">void tbb::task::spawn           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00134.html">task_list</a> & </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>
@@ -542,7 +606,7 @@ All of the tasks must be at the same depth.
         <tr>
           <td class="memname">void tbb::task::spawn           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00132.html">task</a> & </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>
@@ -554,7 +618,7 @@ All of the tasks must be at the same depth.
 <p>
 Schedule task for execution when a worker becomes available. 
 <p>
-After all children spawned so far finish their method <a class="el" href="a00132.html#22c298cd40937a431a06777423f002f6">task::execute</a>, their parent's method <a class="el" href="a00132.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. 
+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)" -->
@@ -564,7 +628,7 @@ After all children spawned so far finish their method <a class="el" href="a00132
         <tr>
           <td class="memname">void tbb::task::spawn_root_and_wait           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00134.html">task_list</a> & </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>
@@ -586,7 +650,7 @@ If there are more tasks than worker threads, the tasks are spawned in order of f
         <tr>
           <td class="memname">static void tbb::task::spawn_root_and_wait           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00132.html">task</a> & </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>
@@ -623,7 +687,7 @@ 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="a00276.html">task.h</a></ul>
+<li><a class="el" href="a00351.html">task.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00133.html b/doc/html/a00163.html
similarity index 59%
copy from doc/html/a00133.html
copy to doc/html/a00163.html
index f54131d..744de7f 100644
--- a/doc/html/a00133.html
+++ b/doc/html/a00163.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="a00181.html">tbb</a>::<a class="el" href="a00133.html">task_group_context</a></div>
+<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>
 <small>
-[<a class="el" href="a00188.html">Task Scheduling</a>]</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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00276.html">task.h</a>></code>
+<code>#include <<a class="el" href="a00351.html">task.h</a>></code>
 <p>
-<a href="a00055.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="d5af85179a348162d4ddd66b6fc0d60fb4fda16c4f77defd3d0f6aad87fceed4"></a><!-- doxytag: member="tbb::task_group_context::isolated" ref="d5af85179a348162d4ddd66b6fc0d60fb4fda16c4f77defd3d0f6aad87fceed4" args="" -->
@@ -39,26 +39,46 @@
 <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 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="a00133.html#6fc0ba6f3abcdb4d43277c05bd67bdd4">task_group_context</a> (kind_type relation_with_parent=bound)</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">Default & binding constructor.  <a href="#6fc0ba6f3abcdb4d43277c05bd67bdd4"></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="a00133.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</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">Forcefully reinitializes context object after an algorithm it was used with finished.  <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="a00133.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</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">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="a00133.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a> () const </td></tr>
+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">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">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="a00133.html#49a55352084fd44b8863d182e839e6dc">init</a> ()</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="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>
@@ -73,11 +93,12 @@ class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_r
 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="a00132.html#23acb0da0afd690da797f9f882027d34">task::allocate_root()</a> method. See <a class="el" href="a00133.html#6fc0ba6f3abcdb4d43277c05bd67bdd4">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. 
+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. 
 <p>
 <hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="6fc0ba6f3abcdb4d43277c05bd67bdd4"></a><!-- doxytag: member="tbb::task_group_context::task_group_context" ref="6fc0ba6f3abcdb4d43277c05bd67bdd4" args="(kind_type relation_with_parent=bound)" -->
+<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">
@@ -85,9 +106,18 @@ The context can be bound to another one, and other contexts can be bound to it,
           <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>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></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>
@@ -98,8 +128,10 @@ 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 context is involves much less overhead, but they have limited utility. Normally when an exception occur in an algorithm that has nested algorithms running one would want all the nested ones canceled as well. Such 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. 
+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>
@@ -122,7 +154,7 @@ There is one good place where using isolated algorithms is beneficial. It is a m
 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 called on the same context, true may be returned by at most one invocation. 
+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="()" -->
@@ -143,7 +175,28 @@ Note that canceling never fails. When false is returned, it just means that anot
 <p>
 Out-of-line part of the constructor. 
 <p>
-Separated to facilitate future support for backward binary compatibility. 
+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="()" -->
@@ -162,15 +215,15 @@ Separated to facilitate future support for backward binary compatibility.
 <div class="memdoc">
 
 <p>
-Forcefully reinitializes context object after an algorithm it was used with finished. 
+Forcefully reinitializes the context after the task tree it was associated with is completed. 
 <p>
-Because the method assumes that the all the tasks that used to be associated with this context have already finished, you must be extremely careful to not invalidate the context while it is still in use somewhere in the task hierarchy.<p>
-IMPORTANT: It is assumed that this method is not used concurrently!<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="a00276.html">task.h</a></ul>
+<li><a class="el" href="a00351.html">task.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00134.html b/doc/html/a00164.html
similarity index 84%
copy from doc/html/a00134.html
copy to doc/html/a00164.html
index 5b59cea..e12606f 100644
--- a/doc/html/a00134.html
+++ b/doc/html/a00164.html
@@ -21,40 +21,40 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00134.html">task_list</a></div>
+<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="a00188.html">Task Scheduling</a>]</small>
+[<a class="el" href="a00233.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="a00276.html">task.h</a>></code>
+<code>#include <<a class="el" href="a00351.html">task.h</a>></code>
 <p>
-<a href="a00059.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"><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="a00134.html#416341c2047eaef50417b41eaf7e9de6">task_list</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#416341c2047eaef50417b41eaf7e9de6">task_list</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="a00134.html#6d438f1499a02db1e59c24ab6043e5ba">~task_list</a> ()</td></tr>
+ </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">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="a00134.html#f3ac31e092814b90929f81bb30441959">empty</a> () const </td></tr>
+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">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="a00134.html#4cd34756bc4763dafb8c84838a0124ff">push_back</a> (<a class="el" href="a00132.html">task</a> &<a class="el" href="a00132.html">task</a>)</td></tr>
+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">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="a00132.html">task</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html#5fe85df5ed524418389d34051750347d">pop_front</a> ()</td></tr>
+<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">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="a00134.html#fce446ee13e025969945328f3ff59b95">clear</a> ()</td></tr>
+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">Clear the list. <br></td></tr>
 <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
@@ -68,7 +68,7 @@ A list of children.
 Used for method task::spawn_children 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00276.html">task.h</a></ul>
+<li><a class="el" href="a00351.html">task.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00135.html b/doc/html/a00165.html
similarity index 88%
copy from doc/html/a00135.html
copy to doc/html/a00165.html
index 6339c08..15e1c04 100644
--- a/doc/html/a00135.html
+++ b/doc/html/a00165.html
@@ -21,58 +21,58 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00135.html">task_scheduler_init</a></div>
+<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>
 <small>
-[<a class="el" href="a00188.html">Task Scheduling</a>]</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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00285.html">task_scheduler_init.h</a>></code>
+<code>#include <<a class="el" href="a00368.html">task_scheduler_init.h</a>></code>
 <p>
-<a href="a00060.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 __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00135.html#d476053cc712e572554823492a5229ce">initialize</a> (int number_of_threads=<a class="el" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>)</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="a00135.html#d5ed214a8bb53b0466ed91ff4734b9a3">initialize</a> (int number_of_threads, stack_size_type thread_stack_size)</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="a00135.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a> ()</td></tr>
+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="a00135.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a> (int number_of_threads=<a class="el" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>, stack_size_type thread_stack_size=0)</td></tr>
+ </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="a00135.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a> ()</td></tr>
+ </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="a00135.html#12752282977029f23416642bc03e8b74">is_active</a> () const </td></tr>
+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="a00135.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a> ()</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="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> = -1</td></tr>
+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="a00135.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a> = -2</td></tr>
+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="a00135.html#d476053cc712e572554823492a5229ce">initialize()</a> or constructor that causes initialization to be deferred. <br></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. 
 <p>
-A thread must construct a <a class="el" href="a00135.html">task_scheduler_init</a>, and keep it alive, during the time that it uses the services of class task. 
+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. 
 <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="()" -->
@@ -136,7 +136,7 @@ Overloading is necessary to preserve ABI compatibility
           <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="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a></code>          </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>
@@ -152,7 +152,7 @@ The number_of_threads is ignored if any other task_scheduler_inits currently exi
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00285.html">task_scheduler_init.h</a></ul>
+<li><a class="el" href="a00368.html">task_scheduler_init.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00136.html b/doc/html/a00166.html
similarity index 91%
copy from doc/html/a00136.html
copy to doc/html/a00166.html
index 7166aae..a177b7c 100644
--- a/doc/html/a00136.html
+++ b/doc/html/a00166.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="a00181.html">tbb</a>::<a class="el" href="a00136.html">tbb_allocator</a></div>
+<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>
 <small>
-[<a class="el" href="a00185.html">Memory Allocation</a>]</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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00288.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00372.html">tbb_allocator.h</a>></code>
 <p>
-<a href="a00062.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="" -->
@@ -61,18 +61,18 @@ typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><b>differen
 <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="a00136.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> { <b>scalable</b>, 
+<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>
  }</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="a00136.html">tbb_allocator</a> &)  throw ()</td></tr>
+ </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="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="a00136.html">tbb_allocator</a>< U > &)  throw ()</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="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>
@@ -81,28 +81,28 @@ pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (refer
 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="a00136.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a> (size_type n, const void *=0)</td></tr>
+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">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="a00136.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a> (pointer p, size_type)</td></tr>
+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">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="a00136.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a> () const   throw ()</td></tr>
+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">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="a00136.html#ab228ab9e324ed041c2226e1d717df5f">construct</a> (pointer p, const value_type &value)</td></tr>
+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">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="a00136.html#ef133522bf55f05a605bee0763208281">destroy</a> (pointer p)</td></tr>
+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">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="78701e7454ef8e1a25b5acd364367080"></a><!-- doxytag: member="tbb::tbb_allocator::allocator_type" ref="78701e7454ef8e1a25b5acd364367080" args="()" -->
-static <a class="el" href="a00136.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a> ()</td></tr>
+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="mdescLeft"> </td><td class="mdescRight">Returns current allocator. <br></td></tr>
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
@@ -118,7 +118,7 @@ Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.
 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 class was generated from the following file:<ul>
-<li><a class="el" href="a00288.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00372.html">tbb_allocator.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 90d96f0..cc5fab8 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>scalable_allocator.h File 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>
@@ -10,60 +10,50 @@
     <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 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="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
+    <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>scalable_allocator.h File Reference</h1>
+<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>
+<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 href="#_details">More...</a>
 <p>
-<a href="a00273.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
+<code>#include <<a class="el" href="a00372.html">tbb_allocator.h</a>></code>
+<p>
+<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>Namespaces</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.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="a00124.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="a00124.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="a00125.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="a00125.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="a00185.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="a00185.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a> (void *ptr)</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">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00185.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_realloc</a> (void *ptr, size_t size)</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">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00185.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_calloc</a> (size_t nobj, size_t size)</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">int __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00185.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="a00185.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="a00185.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="a00185.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</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>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>tbb::operator==</b> (const scalable_allocator< T > &, const scalable_allocator< U > &)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a92757aca0a69082eb8dc223eb257433"></a><!-- doxytag: member="scalable_allocator.h::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>tbb::operator!=</b> (const scalable_allocator< T > &, const scalable_allocator< U > &)</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<><br>
+ class tbb::tbb_allocator< void ></h3>
+
+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>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00138.html b/doc/html/a00168.html
similarity index 82%
copy from doc/html/a00138.html
copy to doc/html/a00168.html
index 6f3bd9c..08d49ec 100644
--- a/doc/html/a00138.html
+++ b/doc/html/a00168.html
@@ -21,42 +21,42 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00138.html">tbb_exception</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00289.html">tbb_exception.h</a>></code>
+<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
 <p>
-Inherited by <a class="el" href="a00102.html">tbb::captured_exception</a>, and <a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a>.
+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="a00067.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+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">virtual <a class="el" href="a00138.html">tbb_exception</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html#3e3482bf264d4ca4dde046cd9c02c766">move</a> ()=0  throw ()</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="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="a00138.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a> ()=0  throw ()</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">Destroys objects created by the <a class="el" href="a00138.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="a00138.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a> ()=0</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">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="a00138.html#d00f6497e552fee978a02bfcbebf46e2">name</a> () const =0  throw ()</td></tr>
+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">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="a00138.html#e8157689ecb66bc6c72d3618bf3cc371">what</a> () const =0  throw ()</td></tr>
+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">Returns the result of originally intercepted exception's <a class="el" href="a00138.html#e8157689ecb66bc6c72d3618bf3cc371">what()</a> method. <br></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="a00138.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="a00133.html">task_group_context</a> with the guilty algorithm/task (the one that threw the exception first).<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="a00102.html">tbb::captured_exception</a> and template class <a class="el" href="a00111.html">tbb::movable_exception</a>. See their declarations for more info. 
+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" -->
@@ -75,11 +75,11 @@ TBB provides two implementations of this interface: <a class="el" href="a00102.h
 <div class="memdoc">
 
 <p>
-Destroys objects created by the <a class="el" href="a00138.html#3e3482bf264d4ca4dde046cd9c02c766">move()</a> method. 
+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="a00102.html#667812a82f1525e968c52593dea0ef4c">tbb::captured_exception</a>, and <a class="el" href="a00111.html#7a46873119d9f85a7b0009c13e41a258">tbb::movable_exception< ExceptionData ></a>.
+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" -->
@@ -87,7 +87,7 @@ Implemented in <a class="el" href="a00102.html#667812a82f1525e968c52593dea0ef4c"
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">virtual <a class="el" href="a00138.html">tbb_exception</a>* tbb::tbb_exception::move           </td>
+          <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>
@@ -102,7 +102,7 @@ Creates and returns pointer to the deep copy of this exception object.
 <p>
 Move semantics is allowed. 
 <p>
-Implemented in <a class="el" href="a00102.html#df6bbb78a362fe862a341e81e2999810">tbb::captured_exception</a>, and <a class="el" href="a00111.html#1aea0ad179d6f0481fe7f3495f66adf9">tbb::movable_exception< ExceptionData ></a>.
+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" -->
@@ -125,11 +125,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>
-Implemented in <a class="el" href="a00102.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, and <a class="el" href="a00111.html#17cffba35811c92b7e65d63506b69602">tbb::movable_exception< ExceptionData ></a>.
+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="a00289.html">tbb_exception.h</a></ul>
+<li><a class="el" href="a00377.html">tbb_exception.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
new file mode 100644
index 0000000..9fd6dd6
--- /dev/null
+++ b/doc/html/a00169.html
@@ -0,0 +1,88 @@
+<!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>
+<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>
+<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 href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
+<p>
+<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">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#921875bbacd2c8a5f324c7da7a415262">destroy</a> ()  throw ()</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">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="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"><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="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>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+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="a00377.html">tbb_exception.h</a></ul>
+<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/a00139.html b/doc/html/a00170.html
similarity index 82%
copy from doc/html/a00139.html
copy to doc/html/a00170.html
index bcc8d1a..c077f85 100644
--- a/doc/html/a00139.html
+++ b/doc/html/a00170.html
@@ -21,17 +21,17 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00139.html">tbb_hash_compare</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00205.html">concurrent_hash_map.h</a>></code>
+<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
 <p>
 <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 Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f49bb57008f05e1db7d1e80ead996193"></a><!-- doxytag: member="tbb::tbb_hash_compare::hash" ref="f49bb57008f05e1db7d1e80ead996193" args="(const T &t)" -->
-static internal::hashcode_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="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>
@@ -44,7 +44,7 @@ static bool </td><td class="memItemRight" valign="bottom"><b>equal</b> (con
 hash_compare - default argument 
 <p>
 <hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00205.html">concurrent_hash_map.h</a></ul>
+<li><a class="el" href="a00267.html">concurrent_hash_map.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
new file mode 100644
index 0000000..ff879f6
--- /dev/null
+++ b/doc/html/a00171.html
@@ -0,0 +1,120 @@
+<!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>
+<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>
+<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>
+<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 href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00344.html">pipeline.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">
+<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">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">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="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>
+
+</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">
+
+<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>
+<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/a00140.html b/doc/html/a00172.html
similarity index 79%
copy from doc/html/a00140.html
copy to doc/html/a00172.html
index 17e74e3..35a2b6c 100644
--- a/doc/html/a00140.html
+++ b/doc/html/a00172.html
@@ -21,42 +21,42 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00140.html">tick_count</a></div>
+<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="a00187.html">Timing</a>]</small>
+[<a class="el" href="a00232.html">Timing</a>]</small>
 </h1><!-- doxytag: class="tbb::tick_count" -->Absolute timestamp.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00307.html">tick_count.h</a>></code>
+<code>#include <<a class="el" href="a00397.html">tick_count.h</a>></code>
 <p>
-<a href="a00079.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 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="a00140.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a> ()</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="a00140.html">tick_count</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00140.html#fb7f78ca61cf28398645ace66e284473">now</a> ()</td></tr>
+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">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="a00141.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00140.html#09dde78a4100800c11bb883d6204b586">operator-</a> (const <a class="el" href="a00140.html">tick_count</a> &t1, const <a class="el" href="a00140.html">tick_count</a> &t0)</td></tr>
+<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">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="a00141.html">interval_t</a></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">Relative time interval.  <a href="a00141.html#_details">More...</a><br></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. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00307.html">tick_count.h</a></ul>
+<li><a class="el" href="a00397.html">tick_count.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00141.html b/doc/html/a00173.html
similarity index 77%
copy from doc/html/a00141.html
copy to doc/html/a00173.html
index 37f6678..abbfd6b 100644
--- a/doc/html/a00141.html
+++ b/doc/html/a00173.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="a00181.html">tbb</a>::<a class="el" href="a00140.html">tick_count</a>::<a class="el" href="a00141.html">interval_t</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00307.html">tick_count.h</a>></code>
+<code>#include <<a class="el" href="a00397.html">tick_count.h</a>></code>
 <p>
-<a href="a00080.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<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="a00141.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.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="a00141.html#1a21a428e00cced2e6a49e0f5f2258bf">interval_t</a> (double sec)</td></tr>
+ </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">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="a00141.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a> () const </td></tr>
+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">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="a00141.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#cd9814947902e26463a69a111530f81b">operator+=</a> (const <a class="el" href="a00141.html">interval_t</a> &i)</td></tr>
+<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="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="a00141.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a> (const <a class="el" href="a00141.html">interval_t</a> &i)</td></tr>
+<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="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="a00141.html#cc3a7ad7000317951ce61f706163efe8">tbb::tick_count</a></td></tr>
+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="a00141.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#09dde78a4100800c11bb883d6204b586">operator-</a> (const <a class="el" href="a00140.html">tick_count</a> &t1, const <a class="el" href="a00140.html">tick_count</a> &t0)</td></tr>
+<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="a00141.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#5871ead1ca230efbe52a5008470e6428">operator+</a> (const <a class="el" href="a00141.html">interval_t</a> &i, const <a class="el" href="a00141.html">interval_t</a> &j)</td></tr>
+<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="a00141.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html#fa509691e1d689830931e36edd274f76">operator-</a> (const <a class="el" href="a00141.html">interval_t</a> &i, const <a class="el" href="a00141.html">interval_t</a> &j)</td></tr>
+<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>
 </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="a00307.html">tick_count.h</a></ul>
+<li><a class="el" href="a00397.html">tick_count.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00142.html b/doc/html/a00174.html
similarity index 89%
copy from doc/html/a00142.html
copy to doc/html/a00174.html
index f8acd79..a8615c5 100644
--- a/doc/html/a00142.html
+++ b/doc/html/a00174.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="a00181.html">tbb</a>::<b>internal</b>::<a class="el" href="a00142.html">work_around_alignment_bug</a></div>
+<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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00290.html">tbb_machine.h</a>></code>
+<code>#include <<a class="el" href="a00378.html">tbb_machine.h</a>></code>
 <p>
-<a href="a00077.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00095.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="" -->
@@ -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="a00290.html">tbb_machine.h</a></ul>
+<li><a class="el" href="a00378.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/a00175.html
new file mode 100644
index 0000000..600b1f6
--- /dev/null
+++ b/doc/html/a00175.html
@@ -0,0 +1,93 @@
+<!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>
+<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>
+<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>
+<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 href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00372.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>
+<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="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="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="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 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="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="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>
+
+</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>
+
+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. 
+<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>
+<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/a00137.html b/doc/html/a00176.html
similarity index 50%
copy from doc/html/a00137.html
copy to doc/html/a00176.html
index 06ac73c..633ae8f 100644
--- a/doc/html/a00137.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::tbb_allocator< void > Class Template Reference</title>
+<title>tbb::zero_allocator< void, Allocator > 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,39 +21,42 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00181.html">tbb</a>::<a class="el" href="a00137.html">tbb_allocator< void ></a></div>
-<h1>tbb::tbb_allocator< void > Class Template Reference<br>
+<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>
 <small>
-[<a class="el" href="a00185.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="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 href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00288.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00372.html">tbb_allocator.h</a>></code>
 <p>
-<a href="a00064.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00081.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="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 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="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="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="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 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<><br>
- class tbb::tbb_allocator< void ></h3>
+<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. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00288.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00372.html">tbb_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00183.html b/doc/html/a00183.html
deleted file mode 100644
index 85872af..0000000
--- a/doc/html/a00183.html
+++ /dev/null
@@ -1,236 +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="a00097.html">tbb::blocked_range< Value ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A range over which to iterate.  <a href="a00097.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="a00098.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="a00098.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="a00099.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="a00099.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">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="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="a00110.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="a00110.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">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="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="a00126.html">tbb::simple_partitioner</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A simple partitioner.  <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="a00095.html">tbb::auto_partitioner</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">An auto partitioner.  <a href="a00095.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="a00109.html">tbb::filter</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline.  <a href="a00109.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="a00116.html">tbb::pipeline</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A processing pipeling that applies filters to items.  <a href="a00116.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="a00131.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="a00131.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="a00183.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="a00183.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="g2e90dde1b5dfe6cb03e64c7d7cd0d778"></a><!-- doxytag: member="algorithms::parallel_for" ref="g2e90dde1b5dfe6cb03e64c7d7cd0d778" args="(const Range &range, const Body &body, const simple_partitioner &partitioner=simple_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="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">tbb::parallel_for</a> (const Range &range, const Body &body, const simple_partitioner &partitioner=simple_partitioner())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with simple partitioner, or default partitioner if no partitioner is specified. <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="a00183.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="a00095.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="a00183.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="a00091.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="a00183.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="a00183.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="a00095.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="a00183.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="a00091.html">affinity_partitioner</a> and user-supplied context. <br></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="gaf32af4ef8fe4261b10e9f6086ce54dc"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gaf32af4ef8fe4261b10e9f6086ce54dc" args="(const Range &range, Body &body, const simple_partitioner &partitioner=simple_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="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">tbb::parallel_reduce</a> (const Range &range, Body &body, const simple_partitioner &partitioner=simple_partitioner())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00126.html">simple_partitioner</a>, or no partitioner specified. <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="a00183.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="a00095.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="a00183.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="a00091.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="a00183.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="a00183.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="a00095.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="a00183.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="a00091.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gdddb4cb5d9de2f3d6bad3ffa6b64db07"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gdddb4cb5d9de2f3d6bad3ffa6b64db07" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner=simple_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="a00183.html#gdddb4cb5d9de2f3d6bad3ffa6b64db07">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner=simple_partitioner())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00126.html">simple_partitioner</a>, or no partitioner specified. <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="a00183.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="a00095.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="a00183.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="a00091.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="a00183.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="a00183.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="a00095.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="a00183.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="a00091.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="gdf44892aacffa7360018e96ebdaae2ba"></a><!-- doxytag: member="algorithms::parallel_scan" ref="gdf44892aacffa7360018e96ebdaae2ba" args="(const Range &range, Body &body, const simple_partitioner &partitioner=simple_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="a00183.html#gdf44892aacffa7360018e96ebdaae2ba">tbb::parallel_scan</a> (const Range &range, Body &body, const simple_partitioner &partitioner=simple_partitioner())</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00126.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="a00183.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="a00095.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="a00183.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="a00183.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="a00183.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/a00184.html b/doc/html/a00184.html
deleted file mode 100644
index aed2638..0000000
--- a/doc/html/a00184.html
+++ /dev/null
@@ -1,38 +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>Containers</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>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="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Unordered map from Key to T.  <a href="a00103.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="a00106.html">tbb::concurrent_queue< T, A ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A high-performance thread-safe queue.  <a href="a00106.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="a00107.html">tbb::concurrent_vector< T, A ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Concurrent vector container.  <a href="a00107.html#_details">More...</a><br></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/a00187.html b/doc/html/a00187.html
deleted file mode 100644
index 1def26c..0000000
--- a/doc/html/a00187.html
+++ /dev/null
@@ -1,32 +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>Timing</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>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="a00140.html">tbb::tick_count</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Absolute timestamp.  <a href="a00140.html#_details">More...</a><br></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/a00193.html b/doc/html/a00193.html
deleted file mode 100644
index 06eb648..0000000
--- a/doc/html/a00193.html
+++ /dev/null
@@ -1,457 +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>atomic.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>atomic.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_atomic_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_atomic_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 "tbb_stddef.h"</span>
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="preprocessor">#if _MSC_VER </span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_LONG_LONG __int64</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_LONG_LONG long long</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER */</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 defined(_MSC_VER) && !defined(__INTEL_COMPILER)</span>
-<a name="l00036"></a>00036 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warnings </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: 4244 4267)</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<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="a00181.html#a8686246bb5d3664bd07563749970fef">00044</a> <span class="keyword">enum</span> <a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fef">memory_semantics</a> {
-<a name="l00046"></a>00046     <a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>,
-<a name="l00048"></a>00048     <a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>,
-<a name="l00050"></a>00050     <a class="code" href="a00181.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 {
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056 <span class="keyword">template</span><size_t Size, memory_semantics M>
-<a name="l00057"></a>00057 <span class="keyword">struct </span>atomic_traits {       <span class="comment">// Primary template</span>
-<a name="l00058"></a>00058 };
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060 <span class="keyword">template</span><size_t Size>
-<a name="l00061"></a>00061 <span class="keyword">struct </span>atomic_word {             <span class="comment">// Primary template</span>
-<a name="l00062"></a>00062     <span class="keyword">typedef</span> intptr word;
-<a name="l00063"></a>00063 };
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065 <span class="keyword">template</span><<span class="keyword">typename</span> I>            <span class="comment">// Primary template</span>
-<a name="l00066"></a>00066 <span class="keyword">struct </span>atomic_base {
-<a name="l00067"></a>00067     I my_value;
-<a name="l00068"></a>00068 };
-<a name="l00069"></a>00069 
-<a name="l00070"></a>00070 <span class="preprocessor">#if __GNUC__ || __SUNPRO_CC</span>
-<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_DECL_ATOMIC_FIELD(t,f,a) t f  __attribute__ ((aligned(a)));</span>
-<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__INTEL_COMPILER)||_MSC_VER >= 1300</span>
-<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_DECL_ATOMIC_FIELD(t,f,a) __declspec(align(a)) t f;</span>
-<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#else </span>
-<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#error Do not know syntax for forcing alignment.</span>
-<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078 <span class="keyword">template</span><>
-<a name="l00079"></a>00079 <span class="keyword">struct </span>atomic_word<8> {          <span class="comment">// Specialization</span>
-<a name="l00080"></a>00080     <span class="keyword">typedef</span> int64_t word;
-<a name="l00081"></a>00081 };
-<a name="l00082"></a>00082 
-<a name="l00083"></a>00083 <span class="preprocessor">#if _WIN32 && __TBB_x86_64</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="comment">// ATTENTION: On 64-bit Windows, we currently have to specialize atomic_word</span>
-<a name="l00085"></a>00085 <span class="comment">// for every size to avoid type conversion warnings</span>
-<a name="l00086"></a>00086 <span class="comment">// See declarations of atomic primitives in machine/windows_em64t.h</span>
-<a name="l00087"></a>00087 <span class="keyword">template</span><>
-<a name="l00088"></a>00088 <span class="keyword">struct </span>atomic_word<1> {          <span class="comment">// Specialization</span>
-<a name="l00089"></a>00089     <span class="keyword">typedef</span> int8_t word;
-<a name="l00090"></a>00090 };
-<a name="l00091"></a>00091 <span class="keyword">template</span><>
-<a name="l00092"></a>00092 <span class="keyword">struct </span>atomic_word<2> {          <span class="comment">// Specialization</span>
-<a name="l00093"></a>00093     <span class="keyword">typedef</span> int16_t word;
-<a name="l00094"></a>00094 };
-<a name="l00095"></a>00095 <span class="keyword">template</span><>
-<a name="l00096"></a>00096 <span class="keyword">struct </span>atomic_word<4> {          <span class="comment">// Specialization</span>
-<a name="l00097"></a>00097     <span class="keyword">typedef</span> int32_t word;
-<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="keyword">template</span><>
-<a name="l00102"></a>00102 <span class="keyword">struct </span>atomic_base<uint64_t> {   <span class="comment">// Specialization</span>
-<a name="l00103"></a>00103     __TBB_DECL_ATOMIC_FIELD(uint64_t,my_value,8)
-<a name="l00104"></a>00104 };
-<a name="l00105"></a>00105 
-<a name="l00106"></a>00106 <span class="keyword">template</span><>
-<a name="l00107"></a>00107 <span class="keyword">struct </span>atomic_base<int64_t> {    <span class="comment">// Specialization</span>
-<a name="l00108"></a>00108     __TBB_DECL_ATOMIC_FIELD(int64_t,my_value,8)
-<a name="l00109"></a>00109 };
-<a name="l00110"></a>00110 
-<a name="l00111"></a>00111 <span class="preprocessor">#define __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(S,M)                         \</span>
-<a name="l00112"></a>00112 <span class="preprocessor">    template<> struct atomic_traits<S,M> {                               \</span>
-<a name="l00113"></a>00113 <span class="preprocessor">        typedef atomic_word<S>::word word;                               \</span>
-<a name="l00114"></a>00114 <span class="preprocessor">        inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\</span>
-<a name="l00115"></a>00115 <span class="preprocessor">            return __TBB_CompareAndSwap##S##M(location,new_value,comparand);    \</span>
-<a name="l00116"></a>00116 <span class="preprocessor">        }                                                                       \</span>
-<a name="l00117"></a>00117 <span class="preprocessor">        inline static word fetch_and_add( volatile void* location, word addend ) { \</span>
-<a name="l00118"></a>00118 <span class="preprocessor">            return __TBB_FetchAndAdd##S##M(location,addend);                    \</span>
-<a name="l00119"></a>00119 <span class="preprocessor">        }                                                                       \</span>
-<a name="l00120"></a>00120 <span class="preprocessor">        inline static word fetch_and_store( volatile void* location, word value ) {\</span>
-<a name="l00121"></a>00121 <span class="preprocessor">            return __TBB_FetchAndStore##S##M(location,value);                   \</span>
-<a name="l00122"></a>00122 <span class="preprocessor">        }                                                                       \</span>
-<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">#define __TBB_DECL_ATOMIC_PRIMITIVES(S)                                  \</span>
-<a name="l00126"></a>00126 <span class="preprocessor">    template<memory_semantics M>                                         \</span>
-<a name="l00127"></a>00127 <span class="preprocessor">    struct atomic_traits<S,M> {                                          \</span>
-<a name="l00128"></a>00128 <span class="preprocessor">        typedef atomic_word<S>::word word;                               \</span>
-<a name="l00129"></a>00129 <span class="preprocessor">        inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\</span>
-<a name="l00130"></a>00130 <span class="preprocessor">            return __TBB_CompareAndSwap##S(location,new_value,comparand);       \</span>
-<a name="l00131"></a>00131 <span class="preprocessor">        }                                                                       \</span>
-<a name="l00132"></a>00132 <span class="preprocessor">        inline static word fetch_and_add( volatile void* location, word addend ) { \</span>
-<a name="l00133"></a>00133 <span class="preprocessor">            return __TBB_FetchAndAdd##S(location,addend);                       \</span>
-<a name="l00134"></a>00134 <span class="preprocessor">        }                                                                       \</span>
-<a name="l00135"></a>00135 <span class="preprocessor">        inline static word fetch_and_store( volatile void* location, word value ) {\</span>
-<a name="l00136"></a>00136 <span class="preprocessor">            return __TBB_FetchAndStore##S(location,value);                      \</span>
-<a name="l00137"></a>00137 <span class="preprocessor">        }                                                                       \</span>
-<a name="l00138"></a>00138 <span class="preprocessor">    };</span>
-<a name="l00139"></a>00139 <span class="preprocessor"></span>
-<a name="l00140"></a>00140 <span class="preprocessor">#if __TBB_DECL_FENCED_ATOMICS</span>
-<a name="l00141"></a>00141 <span class="preprocessor"></span>__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
-<a name="l00142"></a>00142 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
-<a name="l00143"></a>00143 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
-<a name="l00144"></a>00144 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
-<a name="l00145"></a>00145 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
-<a name="l00146"></a>00146 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
-<a name="l00147"></a>00147 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
-<a name="l00148"></a>00148 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
-<a name="l00149"></a>00149 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
-<a name="l00150"></a>00150 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
-<a name="l00151"></a>00151 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
-<a name="l00152"></a>00152 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
-<a name="l00153"></a>00153 <span class="preprocessor">#else</span>
-<a name="l00154"></a>00154 <span class="preprocessor"></span>__TBB_DECL_ATOMIC_PRIMITIVES(1)
-<a name="l00155"></a>00155 __TBB_DECL_ATOMIC_PRIMITIVES(2)
-<a name="l00156"></a>00156 __TBB_DECL_ATOMIC_PRIMITIVES(4)
-<a name="l00157"></a>00157 __TBB_DECL_ATOMIC_PRIMITIVES(8)
-<a name="l00158"></a>00158 <span class="preprocessor">#endif</span>
-<a name="l00159"></a>00159 <span class="preprocessor"></span>
-<a name="l00161"></a>00161 
-<a name="l00163"></a>00163 <span class="preprocessor">#define __TBB_MINUS_ONE(T) (T(T(0)-T(1)))</span>
-<a name="l00164"></a>00164 <span class="preprocessor"></span>
-<a name="l00166"></a>00166 
-<a name="l00169"></a>00169 <span class="keyword">template</span><<span class="keyword">typename</span> I, <span class="keyword">typename</span> D, <span class="keyword">typename</span> StepType>
-<a name="l00170"></a>00170 <span class="keyword">struct </span>atomic_impl: <span class="keyword">private</span> atomic_base<I> {
-<a name="l00171"></a>00171 <span class="keyword">private</span>:
-<a name="l00172"></a>00172     <span class="keyword">typedef</span> <span class="keyword">typename</span> atomic_word<sizeof(I)>::word word;
-<a name="l00173"></a>00173 <span class="keyword">public</span>:
-<a name="l00174"></a>00174     <span class="keyword">typedef</span> I value_type;
-<a name="l00175"></a>00175 
-<a name="l00176"></a>00176     <span class="keyword">template</span><memory_semantics M>
-<a name="l00177"></a>00177     value_type fetch_and_add( D addend ) {
-<a name="l00178"></a>00178         <span class="keywordflow">return</span> value_type(internal::atomic_traits<<span class="keyword">sizeof</span>(value_type),M>::fetch_and_add( &this->my_value, addend*<span class="keyword">sizeof</span>(StepType) ));
-<a name="l00179"></a>00179     }
-<a name="l00180"></a>00180 
-<a name="l00181"></a>00181     value_type fetch_and_add( D addend ) {
-<a name="l00182"></a>00182         <span class="keywordflow">return</span> fetch_and_add<__TBB_full_fence>(addend);
-<a name="l00183"></a>00183     }
-<a name="l00184"></a>00184 
-<a name="l00185"></a>00185     <span class="keyword">template</span><memory_semantics M>
-<a name="l00186"></a>00186     value_type fetch_and_increment() {
-<a name="l00187"></a>00187         <span class="keywordflow">return</span> fetch_and_add<M>(1);
-<a name="l00188"></a>00188     }
-<a name="l00189"></a>00189 
-<a name="l00190"></a>00190     value_type fetch_and_increment() {
-<a name="l00191"></a>00191         <span class="keywordflow">return</span> fetch_and_add(1);
-<a name="l00192"></a>00192     }
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194     <span class="keyword">template</span><memory_semantics M>
-<a name="l00195"></a>00195     value_type fetch_and_decrement() {
-<a name="l00196"></a>00196         <span class="keywordflow">return</span> fetch_and_add<M>(__TBB_MINUS_ONE(D));
-<a name="l00197"></a>00197     }
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199     value_type fetch_and_decrement() {
-<a name="l00200"></a>00200         <span class="keywordflow">return</span> fetch_and_add(__TBB_MINUS_ONE(D));
-<a name="l00201"></a>00201     }
-<a name="l00202"></a>00202 
-<a name="l00203"></a>00203     <span class="keyword">template</span><memory_semantics M>
-<a name="l00204"></a>00204     value_type fetch_and_store( value_type value ) {
-<a name="l00205"></a>00205         <span class="keywordflow">return</span> value_type(internal::atomic_traits<<span class="keyword">sizeof</span>(value_type),M>::fetch_and_store(&this->my_value,word(value)));
-<a name="l00206"></a>00206     }
-<a name="l00207"></a>00207 
-<a name="l00208"></a>00208     value_type fetch_and_store( value_type value ) {
-<a name="l00209"></a>00209         <span class="keywordflow">return</span> fetch_and_store<__TBB_full_fence>(value);
-<a name="l00210"></a>00210     }
-<a name="l00211"></a>00211 
-<a name="l00212"></a>00212     <span class="keyword">template</span><memory_semantics M>
-<a name="l00213"></a>00213     value_type compare_and_swap( value_type value, value_type comparand ) {
-<a name="l00214"></a>00214         <span class="keywordflow">return</span> value_type(internal::atomic_traits<<span class="keyword">sizeof</span>(value_type),M>::compare_and_swap(&this->my_value,word(value),word(comparand)));
-<a name="l00215"></a>00215     }
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217     value_type compare_and_swap( value_type value, value_type comparand ) {
-<a name="l00218"></a>00218         <span class="keywordflow">return</span> compare_and_swap<__TBB_full_fence>(value,comparand);
-<a name="l00219"></a>00219     }
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221     operator value_type()<span class="keyword"> const volatile </span>{                <span class="comment">// volatile qualifier here for backwards compatibility </span>
-<a name="l00222"></a>00222         <span class="keywordflow">return</span> __TBB_load_with_acquire( this->my_value );
-<a name="l00223"></a>00223     }
-<a name="l00224"></a>00224 
-<a name="l00225"></a>00225 <span class="keyword">protected</span>:
-<a name="l00226"></a>00226     value_type store_with_release( value_type rhs ) {
-<a name="l00227"></a>00227         __TBB_store_with_release(this->my_value,rhs);
-<a name="l00228"></a>00228         <span class="keywordflow">return</span> rhs;
-<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     value_type operator+=( D addend ) {
-<a name="l00233"></a>00233         <span class="keywordflow">return</span> fetch_and_add(addend)+addend;
-<a name="l00234"></a>00234     }
-<a name="l00235"></a>00235 
-<a name="l00236"></a>00236     value_type operator-=( D addend ) {
-<a name="l00237"></a>00237         <span class="comment">// Additive inverse of addend computed using binary minus,</span>
-<a name="l00238"></a>00238         <span class="comment">// instead of unary minus, for sake of avoiding compiler warnings.</span>
-<a name="l00239"></a>00239         <span class="keywordflow">return</span> operator+=(D(0)-addend);    
-<a name="l00240"></a>00240     }
-<a name="l00241"></a>00241 
-<a name="l00242"></a>00242     value_type operator++() {
-<a name="l00243"></a>00243         <span class="keywordflow">return</span> fetch_and_add(1)+1;
-<a name="l00244"></a>00244     }
-<a name="l00245"></a>00245 
-<a name="l00246"></a>00246     value_type operator--() {
-<a name="l00247"></a>00247         <span class="keywordflow">return</span> fetch_and_add(__TBB_MINUS_ONE(D))-1;
-<a name="l00248"></a>00248     }
-<a name="l00249"></a>00249 
-<a name="l00250"></a>00250     value_type operator++(<span class="keywordtype">int</span>) {
-<a name="l00251"></a>00251         <span class="keywordflow">return</span> fetch_and_add(1);
-<a name="l00252"></a>00252     }
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254     value_type operator--(<span class="keywordtype">int</span>) {
-<a name="l00255"></a>00255         <span class="keywordflow">return</span> fetch_and_add(__TBB_MINUS_ONE(D));
-<a name="l00256"></a>00256     }
-<a name="l00257"></a>00257 };
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259 <span class="preprocessor">#if __TBB_WORDSIZE == 4</span>
-<a name="l00260"></a>00260 <span class="preprocessor"></span><span class="comment">// Plaforms with 32-bit hardware require special effort for 64-bit loads and stores.</span>
-<a name="l00261"></a>00261 <span class="preprocessor">#if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400</span>
-<a name="l00262"></a>00262 <span class="preprocessor"></span>
-<a name="l00263"></a>00263 <span class="keyword">template</span><>
-<a name="l00264"></a>00264 <span class="keyword">inline</span> atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,char>::operator atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,char>::value_type()<span class="keyword"> const volatile </span>{
-<a name="l00265"></a>00265     <span class="keywordflow">return</span> __TBB_Load8(&this->my_value);
-<a name="l00266"></a>00266 }
-<a name="l00267"></a>00267 
-<a name="l00268"></a>00268 <span class="keyword">template</span><>
-<a name="l00269"></a>00269 <span class="keyword">inline</span> atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,char>::operator atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,char>::value_type()<span class="keyword"> const volatile </span>{
-<a name="l00270"></a>00270     <span class="keywordflow">return</span> __TBB_Load8(&this->my_value);
-<a name="l00271"></a>00271 }
-<a name="l00272"></a>00272 
-<a name="l00273"></a>00273 <span class="keyword">template</span><>
-<a name="l00274"></a>00274 <span class="keyword">inline</span> atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,char>::value_type atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,char>::store_with_release( value_type rhs ) {
-<a name="l00275"></a>00275     __TBB_Store8(&this->my_value,rhs);
-<a name="l00276"></a>00276     <span class="keywordflow">return</span> rhs;
-<a name="l00277"></a>00277 }
-<a name="l00278"></a>00278 
-<a name="l00279"></a>00279 <span class="keyword">template</span><>
-<a name="l00280"></a>00280 <span class="keyword">inline</span> atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,char>::value_type atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,char>::store_with_release( value_type rhs ) {
-<a name="l00281"></a>00281     __TBB_Store8(&this->my_value,rhs);
-<a name="l00282"></a>00282     <span class="keywordflow">return</span> rhs;
-<a name="l00283"></a>00283 }
-<a name="l00284"></a>00284 
-<a name="l00285"></a>00285 <span class="preprocessor">#endif </span><span class="comment">/* defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */</span>
-<a name="l00286"></a>00286 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_WORDSIZE==4 */</span>
-<a name="l00287"></a>00287 
-<a name="l00288"></a>00288 } <span class="comment">/* Internal */</span>
-<a name="l00290"></a>00290 
-<a name="l00292"></a>00292 
-<a name="l00294"></a>00294 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00295"></a><a class="code" href="a00093.html">00295</a> <span class="keyword">struct </span><a class="code" href="a00093.html">atomic</a> {
-<a name="l00296"></a>00296 };
-<a name="l00297"></a>00297 
-<a name="l00298"></a>00298 <span class="preprocessor">#define __TBB_DECL_ATOMIC(T) \</span>
-<a name="l00299"></a>00299 <span class="preprocessor">    template<> struct atomic<T>: internal::atomic_impl<T,T,char> {  \</span>
-<a name="l00300"></a>00300 <span class="preprocessor">        T operator=( T rhs ) {return store_with_release(rhs);}  \</span>
-<a name="l00301"></a>00301 <span class="preprocessor">        atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;}  \</span>
-<a name="l00302"></a>00302 <span class="preprocessor">    };</span>
-<a name="l00303"></a>00303 <span class="preprocessor"></span>
-<a name="l00304"></a>00304 <span class="preprocessor">#if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400</span>
-<a name="l00305"></a>00305 <span class="preprocessor"></span>__TBB_DECL_ATOMIC(__TBB_LONG_LONG)
-<a name="l00306"></a>00306 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> __TBB_LONG_LONG)
-<a name="l00307"></a>00307 <span class="preprocessor">#else</span>
-<a name="l00308"></a>00308 <span class="preprocessor"></span><span class="comment">// Some old versions of MVSC cannot correctly compile templates with "long long".</span>
-<a name="l00309"></a>00309 <span class="preprocessor">#endif </span><span class="comment">/* defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */</span>
-<a name="l00310"></a>00310 
-<a name="l00311"></a>00311 __TBB_DECL_ATOMIC(<span class="keywordtype">long</span>)
-<a name="l00312"></a>00312 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)
-<a name="l00313"></a>00313 
-<a name="l00314"></a>00314 <span class="preprocessor">#if defined(_MSC_VER) && __TBB_WORDSIZE==4</span>
-<a name="l00315"></a>00315 <span class="preprocessor"></span><span class="comment">/* Special version of __TBB_DECL_ATOMIC that avoids gratuitous warnings from cl /Wp64 option. </span>
-<a name="l00316"></a>00316 <span class="comment">   It is identical to __TBB_DECL_ATOMIC(unsigned) except that it replaces operator=(T) </span>
-<a name="l00317"></a>00317 <span class="comment">   with an operator=(U) that explicitly converts the U to a T.  Types T and U should be</span>
-<a name="l00318"></a>00318 <span class="comment">   type synonyms on the platform.  Type U should be the wider variant of T from the</span>
-<a name="l00319"></a>00319 <span class="comment">   perspective of /Wp64. */</span>
-<a name="l00320"></a>00320 <span class="preprocessor">#define __TBB_DECL_ATOMIC_ALT(T,U) \</span>
-<a name="l00321"></a>00321 <span class="preprocessor">    template<> struct atomic<T>: internal::atomic_impl<T,T,char> {  \</span>
-<a name="l00322"></a>00322 <span class="preprocessor">        T operator=( U rhs ) {return store_with_release(T(rhs));}  \</span>
-<a name="l00323"></a>00323 <span class="preprocessor">        atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;}  \</span>
-<a name="l00324"></a>00324 <span class="preprocessor">    };</span>
-<a name="l00325"></a>00325 <span class="preprocessor"></span>__TBB_DECL_ATOMIC_ALT(<span class="keywordtype">unsigned</span>,size_t)
-<a name="l00326"></a>00326 __TBB_DECL_ATOMIC_ALT(<span class="keywordtype">int</span>,ptrdiff_t)
-<a name="l00327"></a>00327 <span class="preprocessor">#else</span>
-<a name="l00328"></a>00328 <span class="preprocessor"></span>__TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span>)
-<a name="l00329"></a>00329 __TBB_DECL_ATOMIC(<span class="keywordtype">int</span>)
-<a name="l00330"></a>00330 <span class="preprocessor">#endif </span><span class="comment">/* defined(_MSC_VER) && __TBB_WORDSIZE==4 */</span>
-<a name="l00331"></a>00331 
-<a name="l00332"></a>00332 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>)
-<a name="l00333"></a>00333 __TBB_DECL_ATOMIC(<span class="keywordtype">short</span>)
-<a name="l00334"></a>00334 __TBB_DECL_ATOMIC(<span class="keywordtype">char</span>)
-<a name="l00335"></a>00335 __TBB_DECL_ATOMIC(<span class="keywordtype">signed</span> <span class="keywordtype">char</span>)
-<a name="l00336"></a>00336 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)
-<a name="l00337"></a>00337 
-<a name="l00338"></a>00338 <span class="preprocessor">#if !defined(_MSC_VER)||defined(_NATIVE_WCHAR_T_DEFINED) </span>
-<a name="l00339"></a>00339 <span class="preprocessor"></span>__TBB_DECL_ATOMIC(<span class="keywordtype">wchar_t</span>)
-<a name="l00340"></a>00340 <span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER||!defined(_NATIVE_WCHAR_T_DEFINED) */</span>
-<a name="l00341"></a>00341 
-<a name="l00342"></a>00342 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">struct </span><a class="code" href="a00093.html">atomic</a><T*>: internal::atomic_impl<T*,ptrdiff_t,T> {
-<a name="l00343"></a>00343     T* operator=( T* rhs ) {
-<a name="l00344"></a>00344         <span class="comment">// "this" required here in strict ISO C++ because store_with_release is a dependent name</span>
-<a name="l00345"></a>00345         <span class="keywordflow">return</span> this->store_with_release(rhs);
-<a name="l00346"></a>00346     }
-<a name="l00347"></a>00347     atomic<T*>& operator=( <span class="keyword">const</span> atomic<T*>& rhs ) {this->store_with_release(rhs); <span class="keywordflow">return</span> *<span class="keyword">this</span>;}
-<a name="l00348"></a>00348     T* operator->()<span class="keyword"> const </span>{
-<a name="l00349"></a>00349         <span class="keywordflow">return</span> (*<span class="keyword">this</span>);
-<a name="l00350"></a>00350     }
-<a name="l00351"></a>00351 };
-<a name="l00352"></a>00352 
-<a name="l00353"></a>00353 <span class="keyword">template</span><>
-<a name="l00354"></a>00354 <span class="keyword">struct </span>atomic<void*> {
-<a name="l00355"></a>00355 <span class="keyword">private</span>:
-<a name="l00356"></a>00356     <span class="keywordtype">void</span>* my_value;
-<a name="l00357"></a>00357 
-<a name="l00358"></a>00358 <span class="keyword">public</span>:
-<a name="l00359"></a>00359     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* value_type;
-<a name="l00360"></a>00360 
-<a name="l00361"></a>00361     <span class="keyword">template</span><memory_semantics M>
-<a name="l00362"></a>00362     value_type compare_and_swap( value_type value, value_type comparand ) {
-<a name="l00363"></a>00363         <span class="keywordflow">return</span> value_type(internal::atomic_traits<<span class="keyword">sizeof</span>(value_type),M>::compare_and_swap(&my_value,internal::intptr(value),internal::intptr(comparand)));
-<a name="l00364"></a>00364     }
-<a name="l00365"></a>00365 
-<a name="l00366"></a>00366     value_type compare_and_swap( value_type value, value_type comparand ) {
-<a name="l00367"></a>00367         <span class="keywordflow">return</span> compare_and_swap<__TBB_full_fence>(value,comparand);
-<a name="l00368"></a>00368     }
-<a name="l00369"></a>00369 
-<a name="l00370"></a>00370     <span class="keyword">template</span><memory_semantics M>
-<a name="l00371"></a>00371     value_type fetch_and_store( value_type value ) {
-<a name="l00372"></a>00372         <span class="keywordflow">return</span> value_type(internal::atomic_traits<<span class="keyword">sizeof</span>(value_type),M>::fetch_and_store(&my_value,internal::intptr(value)));
-<a name="l00373"></a>00373     }
-<a name="l00374"></a>00374 
-<a name="l00375"></a>00375     value_type fetch_and_store( value_type value ) {
-<a name="l00376"></a>00376         <span class="keywordflow">return</span> fetch_and_store<__TBB_full_fence>(value);
-<a name="l00377"></a>00377     }
-<a name="l00378"></a>00378 
-<a name="l00379"></a>00379     operator value_type()<span class="keyword"> const </span>{
-<a name="l00380"></a>00380         <span class="keywordflow">return</span> __TBB_load_with_acquire(my_value);
-<a name="l00381"></a>00381     }
-<a name="l00382"></a>00382 
-<a name="l00383"></a>00383     value_type operator=( value_type rhs ) {
-<a name="l00384"></a>00384         __TBB_store_with_release(my_value,rhs);
-<a name="l00385"></a>00385         <span class="keywordflow">return</span> rhs;
-<a name="l00386"></a>00386     }
-<a name="l00387"></a>00387 
-<a name="l00388"></a>00388     atomic<void*>& operator=( <span class="keyword">const</span> atomic<void*>& rhs ) {
-<a name="l00389"></a>00389         __TBB_store_with_release(my_value,rhs);
-<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 
-<a name="l00394"></a>00394 <span class="keyword">template</span><>
-<a name="l00395"></a>00395 <span class="keyword">struct </span>atomic<bool> {
-<a name="l00396"></a>00396 <span class="keyword">private</span>:
-<a name="l00397"></a>00397     <span class="keywordtype">bool</span> my_value;
-<a name="l00398"></a>00398     <span class="keyword">typedef</span> internal::atomic_word<sizeof(bool)>::word word;
-<a name="l00399"></a>00399 <span class="keyword">public</span>:
-<a name="l00400"></a>00400     <span class="keyword">typedef</span> <span class="keywordtype">bool</span> value_type;
-<a name="l00401"></a>00401     <span class="keyword">template</span><memory_semantics M>
-<a name="l00402"></a>00402     value_type compare_and_swap( value_type value, value_type comparand ) {
-<a name="l00403"></a>00403         <span class="keywordflow">return</span> internal::atomic_traits<sizeof(value_type),M>::compare_and_swap(&my_value,word(value),word(comparand))!=0;
-<a name="l00404"></a>00404     }
-<a name="l00405"></a>00405 
-<a name="l00406"></a>00406     value_type compare_and_swap( value_type value, value_type comparand ) {
-<a name="l00407"></a>00407         <span class="keywordflow">return</span> compare_and_swap<__TBB_full_fence>(value,comparand);
-<a name="l00408"></a>00408     }
-<a name="l00409"></a>00409 
-<a name="l00410"></a>00410     <span class="keyword">template</span><memory_semantics M>
-<a name="l00411"></a>00411     value_type fetch_and_store( value_type value ) {
-<a name="l00412"></a>00412         <span class="keywordflow">return</span> internal::atomic_traits<sizeof(value_type),M>::fetch_and_store(&my_value,word(value))!=0;
-<a name="l00413"></a>00413     }
-<a name="l00414"></a>00414 
-<a name="l00415"></a>00415     value_type fetch_and_store( value_type value ) {
-<a name="l00416"></a>00416         <span class="keywordflow">return</span> fetch_and_store<__TBB_full_fence>(value);
-<a name="l00417"></a>00417     }
-<a name="l00418"></a>00418 
-<a name="l00419"></a>00419     operator value_type()<span class="keyword"> const </span>{
-<a name="l00420"></a>00420         <span class="keywordflow">return</span> __TBB_load_with_acquire(my_value);
-<a name="l00421"></a>00421     }
-<a name="l00422"></a>00422 
-<a name="l00423"></a>00423     value_type operator=( value_type rhs ) {
-<a name="l00424"></a>00424         __TBB_store_with_release(my_value,rhs);
-<a name="l00425"></a>00425         <span class="keywordflow">return</span> rhs;
-<a name="l00426"></a>00426     }
-<a name="l00427"></a>00427 
-<a name="l00428"></a>00428     atomic<bool>& operator=( <span class="keyword">const</span> atomic<bool>& rhs ) {
-<a name="l00429"></a>00429         __TBB_store_with_release(my_value,rhs);
-<a name="l00430"></a>00430         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00431"></a>00431     }
-<a name="l00432"></a>00432 };
-<a name="l00433"></a>00433 
-<a name="l00434"></a>00434 } <span class="comment">// namespace tbb</span>
-<a name="l00435"></a>00435 
-<a name="l00436"></a>00436 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)</span>
-<a name="l00437"></a>00437 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00438"></a>00438 <span class="preprocessor"></span><span class="preprocessor">#endif // warnings 4244, 4267 are back</span>
-<a name="l00439"></a>00439 <span class="preprocessor"></span>
-<a name="l00440"></a>00440 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_atomic_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/a00203.html b/doc/html/a00203.html
deleted file mode 100644
index 03ac18f..0000000
--- a/doc/html/a00203.html
+++ /dev/null
@@ -1,143 +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>cache_aligned_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>
-<!-- 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>cache_aligned_allocator.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_cache_aligned_allocator_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_cache_aligned_allocator_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 "tbb_stddef.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 <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="l00036"></a>00036 
-<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="a00100.html">00063</a> <span class="keyword">class </span><a class="code" href="a00100.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="a00100.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="a00100.html">cache_aligned_allocator</a>() <span class="keywordflow">throw</span>() {}
-<a name="l00077"></a>00077     <a class="code" href="a00100.html">cache_aligned_allocator</a>( <span class="keyword">const</span> <a class="code" href="a00100.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="a00100.html">cache_aligned_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00100.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="a00100.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">00084</a>     pointer <a class="code" href="a00100.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="a00100.html#3d4eadf188f7d85d3805ae534e0b8e1c">00090</a>     <span class="keywordtype">void</span> <a class="code" href="a00100.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="a00100.html#fb23b687b4c0429dab4c7f8017266cf0">00095</a>     size_type <a class="code" href="a00100.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="a00100.html#958ee8745c86c275bfc9533af565e017">00100</a>     <span class="keywordtype">void</span> <a class="code" href="a00100.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="a00100.html#cd298895a4f1654b5149ec84b591ecb5">00103</a>     <span class="keywordtype">void</span> <a class="code" href="a00100.html#cd298895a4f1654b5149ec84b591ecb5">destroy</a>( pointer p ) {p->~value_type();}
-<a name="l00104"></a>00104 };
-<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="a00101.html">00113</a> <span class="keyword">class </span><a class="code" href="a00100.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="a00100.html">cache_aligned_allocator<U></a> other;
-<a name="l00120"></a>00120     };
-<a name="l00121"></a>00121 };
-<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="a00100.html">cache_aligned_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00100.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>
-</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/a00205.html b/doc/html/a00205.html
deleted file mode 100644
index ed5d36b..0000000
--- a/doc/html/a00205.html
+++ /dev/null
@@ -1,945 +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_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">#if TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#include <typeinfo></span>
-<a name="l00036"></a>00036 <span class="preprocessor">#endif</span>
-<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="l00040"></a>00040 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">struct </span>tbb_hash_compare;
-<a name="l00041"></a>00041 <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="l00042"></a>00042 <span class="keyword">class </span>concurrent_hash_map;
-<a name="l00043"></a>00043 
-<a name="l00045"></a>00045 <span class="keyword">namespace </span>internal {
-<a name="l00047"></a>00047     <span class="keyword">typedef</span> size_t hashcode_t;
-<a name="l00049"></a>00049     <span class="keyword">class </span>hash_map_base {
-<a name="l00050"></a>00050     <span class="keyword">public</span>:
-<a name="l00051"></a>00051         <span class="comment">// Mutex types for each layer of the container</span>
-<a name="l00052"></a>00052         <span class="keyword">typedef</span> spin_rw_mutex node_mutex_t;
-<a name="l00053"></a>00053         <span class="keyword">typedef</span> spin_rw_mutex chain_mutex_t;
-<a name="l00054"></a>00054         <span class="keyword">typedef</span> spin_rw_mutex segment_mutex_t;
-<a name="l00055"></a>00055 
-<a name="l00057"></a>00057         <span class="keyword">typedef</span> internal::hashcode_t hashcode_t;
-<a name="l00059"></a>00059         <span class="keyword">static</span> <span class="keyword">const</span> size_t n_segment_bits = 6;
-<a name="l00061"></a>00061         <span class="keyword">static</span> <span class="keyword">const</span> size_t n_segment = size_t(1)<<n_segment_bits; 
-<a name="l00063"></a>00063         <span class="keyword">static</span> <span class="keyword">const</span> size_t max_physical_size = size_t(1)<<(8*<span class="keyword">sizeof</span>(hashcode_t)-n_segment_bits);
-<a name="l00064"></a>00064     };
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
-<a name="l00067"></a>00067     <span class="keyword">class </span>hash_map_range;
-<a name="l00068"></a>00068 
-<a name="l00069"></a>00069     <span class="keyword">struct </span>hash_map_segment_base {
-<a name="l00071"></a>00071         hash_map_base::segment_mutex_t my_mutex;
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073         <span class="comment">// Number of nodes</span>
-<a name="l00074"></a>00074         atomic<size_t> my_logical_size;
-<a name="l00075"></a>00075 
-<a name="l00076"></a>00076         <span class="comment">// Size of chains</span>
-<a name="l00078"></a>00078 <span class="comment"></span>        size_t my_physical_size;
-<a name="l00079"></a>00079 
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_grow_predicate() <span class="keyword">const</span>;
-<a name="l00083"></a>00083     };
-<a name="l00084"></a>00084 
-<a name="l00086"></a>00086 
-<a name="l00088"></a>00088     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00089"></a>00089     <span class="keyword">class </span>hash_map_iterator
-<a name="l00090"></a>00090         : <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value>
-<a name="l00091"></a>00091     {
-<a name="l00092"></a>00092         <span class="keyword">typedef</span> <span class="keyword">typename</span> Container::node node;
-<a name="l00093"></a>00093         <span class="keyword">typedef</span> <span class="keyword">typename</span> Container::chain chain;
-<a name="l00094"></a>00094         <span class="keyword">typedef</span> <span class="keyword">typename</span> Container::segment segment;
-<a name="l00095"></a>00095 
-<a name="l00097"></a>00097         Container* my_table;
-<a name="l00098"></a>00098 
-<a name="l00100"></a>00100         node* my_node;
-<a name="l00101"></a>00101 
-<a name="l00103"></a>00103         size_t my_array_index;
-<a name="l00104"></a>00104 
-<a name="l00106"></a>00106         size_t my_segment_index;
-<a name="l00107"></a>00107 
-<a name="l00108"></a>00108         <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="l00109"></a>00109         <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="l00110"></a>00110 
-<a name="l00111"></a>00111         <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="l00112"></a>00112         <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="l00113"></a>00113 
-<a name="l00114"></a>00114         <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="l00115"></a>00115         <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="l00116"></a>00116     
-<a name="l00117"></a>00117         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
-<a name="l00118"></a>00118         <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_iterator;
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120         <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00121"></a>00121         <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_range;
-<a name="l00122"></a>00122 
-<a name="l00123"></a>00123         <span class="keywordtype">void</span> advance_to_next_node() {
-<a name="l00124"></a>00124             size_t i = my_array_index+1;
-<a name="l00125"></a>00125             <span class="keywordflow">do</span> {
-<a name="l00126"></a>00126                 segment &s = my_table->my_segment[my_segment_index];
-<a name="l00127"></a>00127                 <span class="keywordflow">while</span>( i<s.my_physical_size ) {
-<a name="l00128"></a>00128                     my_node = s.my_array[i].node_list;
-<a name="l00129"></a>00129                     <span class="keywordflow">if</span>( my_node ) <span class="keywordflow">goto</span> done;
-<a name="l00130"></a>00130                     ++i;
-<a name="l00131"></a>00131                 }
-<a name="l00132"></a>00132                 i = 0;
-<a name="l00133"></a>00133             } <span class="keywordflow">while</span>( ++my_segment_index<my_table->n_segment );
-<a name="l00134"></a>00134         done:
-<a name="l00135"></a>00135             my_array_index = i;
-<a name="l00136"></a>00136         }
-<a name="l00137"></a>00137 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
-<a name="l00138"></a>00138 <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="l00139"></a>00139         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00103.html">tbb::concurrent_hash_map</a>;
-<a name="l00140"></a>00140 <span class="preprocessor">#else</span>
-<a name="l00141"></a>00141 <span class="preprocessor"></span>    <span class="keyword">public</span>: <span class="comment">// workaround</span>
-<a name="l00142"></a>00142 <span class="preprocessor">#endif</span>
-<a name="l00143"></a>00143 <span class="preprocessor"></span>        hash_map_iterator( <span class="keyword">const</span> Container& table, size_t segment_index, size_t array_index=0, node* b=NULL );
-<a name="l00144"></a>00144     <span class="keyword">public</span>:
-<a name="l00146"></a>00146         hash_map_iterator() {}
-<a name="l00147"></a>00147         hash_map_iterator( <span class="keyword">const</span> hash_map_iterator<Container,typename Container::value_type>& other ) :
-<a name="l00148"></a>00148             my_table(other.my_table),
-<a name="l00149"></a>00149             my_node(other.my_node),
-<a name="l00150"></a>00150             my_array_index(other.my_array_index),
-<a name="l00151"></a>00151             my_segment_index(other.my_segment_index)
-<a name="l00152"></a>00152         {}
-<a name="l00153"></a>00153         Value& operator*()<span class="keyword"> const </span>{
-<a name="l00154"></a>00154             __TBB_ASSERT( my_node, <span class="stringliteral">"iterator uninitialized or at end of container?"</span> );
-<a name="l00155"></a>00155             <span class="keywordflow">return</span> my_node->item;
-<a name="l00156"></a>00156         }
-<a name="l00157"></a>00157         Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
-<a name="l00158"></a>00158         hash_map_iterator& operator++();
-<a name="l00159"></a>00159         
-<a name="l00161"></a>00161         Value* operator++(<span class="keywordtype">int</span>) {
-<a name="l00162"></a>00162             Value* result = &operator*();
-<a name="l00163"></a>00163             operator++();
-<a name="l00164"></a>00164             <span class="keywordflow">return</span> result;
-<a name="l00165"></a>00165         }
-<a name="l00166"></a>00166     };
-<a name="l00167"></a>00167 
-<a name="l00168"></a>00168     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00169"></a>00169     hash_map_iterator<Container,Value>::hash_map_iterator( <span class="keyword">const</span> Container& table, size_t segment_index, size_t array_index, node* b ) : 
-<a name="l00170"></a>00170         my_table(const_cast<Container*>(&table)),
-<a name="l00171"></a>00171         my_node(b),
-<a name="l00172"></a>00172         my_array_index(array_index),
-<a name="l00173"></a>00173         my_segment_index(segment_index)
-<a name="l00174"></a>00174     {
-<a name="l00175"></a>00175         <span class="keywordflow">if</span>( segment_index<my_table->n_segment ) {
-<a name="l00176"></a>00176             <span class="keywordflow">if</span>( !my_node ) {
-<a name="l00177"></a>00177                 segment &s = my_table->my_segment[segment_index];
-<a name="l00178"></a>00178                 chain* first_chain = s.my_array;
-<a name="l00179"></a>00179                 <span class="keywordflow">if</span>( first_chain && my_array_index < s.my_physical_size)
-<a name="l00180"></a>00180                     my_node = first_chain[my_array_index].node_list;
-<a name="l00181"></a>00181             }
-<a name="l00182"></a>00182             <span class="keywordflow">if</span>( !my_node ) advance_to_next_node();
-<a name="l00183"></a>00183         }
-<a name="l00184"></a>00184     }
-<a name="l00185"></a>00185 
-<a name="l00186"></a>00186     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00187"></a>00187     hash_map_iterator<Container,Value>& hash_map_iterator<Container,Value>::operator++() {
-<a name="l00188"></a>00188         my_node=my_node->next;
-<a name="l00189"></a>00189         <span class="keywordflow">if</span>( !my_node ) advance_to_next_node();
-<a name="l00190"></a>00190         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00191"></a>00191     }
-<a name="l00192"></a>00192 
-<a name="l00193"></a>00193     <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="l00194"></a>00194     <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="l00195"></a>00195         <span class="keywordflow">return</span> i.my_node==j.my_node;
-<a name="l00196"></a>00196     }
-<a name="l00197"></a>00197 
-<a name="l00198"></a>00198     <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="l00199"></a>00199     <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="l00200"></a>00200         <span class="keywordflow">return</span> i.my_node!=j.my_node;
-<a name="l00201"></a>00201     }
-<a name="l00202"></a>00202 
-<a name="l00204"></a>00204 
-<a name="l00205"></a>00205     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
-<a name="l00206"></a>00206     <span class="keyword">class </span>hash_map_range {
-<a name="l00207"></a>00207     <span class="keyword">private</span>:
-<a name="l00208"></a>00208         Iterator my_begin;
-<a name="l00209"></a>00209         Iterator my_end;
-<a name="l00210"></a>00210         <span class="keyword">mutable</span> Iterator my_midpoint;
-<a name="l00211"></a>00211         size_t my_grainsize;
-<a name="l00213"></a>00213         <span class="keywordtype">void</span> set_midpoint() <span class="keyword">const</span>;
-<a name="l00214"></a>00214         <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="l00215"></a>00215     <span class="keyword">public</span>:
-<a name="l00217"></a>00217         <span class="keyword">typedef</span> std::size_t size_type;
-<a name="l00218"></a>00218         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::value_type value_type;
-<a name="l00219"></a>00219         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::reference reference;
-<a name="l00220"></a>00220         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::difference_type difference_type;
-<a name="l00221"></a>00221         <span class="keyword">typedef</span> Iterator iterator;
-<a name="l00222"></a>00222 
-<a name="l00224"></a>00224         <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin==my_end;}
-<a name="l00225"></a>00225 
-<a name="l00227"></a>00227         <span class="keywordtype">bool</span> is_divisible()<span class="keyword"> const </span>{
-<a name="l00228"></a>00228             <span class="keywordflow">return</span> my_midpoint!=my_end;
-<a name="l00229"></a>00229         }
-<a name="l00231"></a>00231         hash_map_range( hash_map_range& r, split ) : 
-<a name="l00232"></a>00232             my_end(r.my_end),
-<a name="l00233"></a>00233             my_grainsize(r.my_grainsize)
-<a name="l00234"></a>00234         {
-<a name="l00235"></a>00235             r.my_end = my_begin = r.my_midpoint;
-<a name="l00236"></a>00236             __TBB_ASSERT( my_begin!=my_end, <span class="stringliteral">"Splitting despite the range is not divisible"</span> );
-<a name="l00237"></a>00237             __TBB_ASSERT( r.my_begin!=r.my_end, <span class="stringliteral">"Splitting despite the range is not divisible"</span> );
-<a name="l00238"></a>00238             set_midpoint();
-<a name="l00239"></a>00239             r.set_midpoint();
-<a name="l00240"></a>00240         }
-<a name="l00242"></a>00242         <span class="keyword">template</span><<span class="keyword">typename</span> U>
-<a name="l00243"></a>00243         hash_map_range( hash_map_range<U>& r) : 
-<a name="l00244"></a>00244             my_begin(r.my_begin),
-<a name="l00245"></a>00245             my_end(r.my_end),
-<a name="l00246"></a>00246             my_midpoint(r.my_midpoint),
-<a name="l00247"></a>00247             my_grainsize(r.my_grainsize)
-<a name="l00248"></a>00248         {}
-<a name="l00250"></a>00250         hash_map_range( <span class="keyword">const</span> Iterator& begin_, <span class="keyword">const</span> Iterator& end_, size_type grainsize = 1 ) : 
-<a name="l00251"></a>00251             my_begin(begin_), 
-<a name="l00252"></a>00252             my_end(end_), 
-<a name="l00253"></a>00253             my_grainsize(grainsize) 
-<a name="l00254"></a>00254         {
-<a name="l00255"></a>00255             set_midpoint();
-<a name="l00256"></a>00256             __TBB_ASSERT( grainsize>0, <span class="stringliteral">"grainsize must be positive"</span> );
-<a name="l00257"></a>00257         }
-<a name="l00258"></a>00258         <span class="keyword">const</span> Iterator& begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin;}
-<a name="l00259"></a>00259         <span class="keyword">const</span> Iterator& end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_end;}
-<a name="l00261"></a>00261         size_type grainsize()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize;}
-<a name="l00262"></a>00262     };
-<a name="l00263"></a>00263 
-<a name="l00264"></a>00264     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
-<a name="l00265"></a>00265     <span class="keywordtype">void</span> hash_map_range<Iterator>::set_midpoint()<span class="keyword"> const </span>{
-<a name="l00266"></a>00266         size_t n = my_end.my_segment_index - my_begin.my_segment_index;
-<a name="l00267"></a>00267         <span class="keywordflow">if</span>( n > 1 || (n == 1 && my_end.my_array_index > my_grainsize/2) ) {
-<a name="l00268"></a>00268             <span class="comment">// Split by groups of segments</span>
-<a name="l00269"></a>00269             my_midpoint = Iterator(*my_begin.my_table,(my_end.my_segment_index+my_begin.my_segment_index+1)/2u);
-<a name="l00270"></a>00270         } <span class="keywordflow">else</span> {
-<a name="l00271"></a>00271             <span class="comment">// Split by groups of nodes</span>
-<a name="l00272"></a>00272             size_t m = my_end.my_array_index-my_begin.my_array_index;
-<a name="l00273"></a>00273             <span class="keywordflow">if</span>( n ) m += my_begin.my_table->my_segment[my_begin.my_segment_index].my_physical_size;
-<a name="l00274"></a>00274             <span class="keywordflow">if</span>( m > my_grainsize ) {
-<a name="l00275"></a>00275                 my_midpoint = Iterator(*my_begin.my_table,my_begin.my_segment_index,my_begin.my_array_index + m/2u);
-<a name="l00276"></a>00276             } <span class="keywordflow">else</span> {
-<a name="l00277"></a>00277                 my_midpoint = my_end;
-<a name="l00278"></a>00278             }
-<a name="l00279"></a>00279         }
-<a name="l00280"></a>00280         __TBB_ASSERT( my_begin.my_segment_index < my_midpoint.my_segment_index
-<a name="l00281"></a>00281             || (my_begin.my_segment_index == my_midpoint.my_segment_index
-<a name="l00282"></a>00282             && my_begin.my_array_index <= my_midpoint.my_array_index),
-<a name="l00283"></a>00283             <span class="stringliteral">"my_begin is after my_midpoint"</span> );
-<a name="l00284"></a>00284         __TBB_ASSERT( my_midpoint.my_segment_index < my_end.my_segment_index
-<a name="l00285"></a>00285             || (my_midpoint.my_segment_index == my_end.my_segment_index
-<a name="l00286"></a>00286             && my_midpoint.my_array_index <= my_end.my_array_index),
-<a name="l00287"></a>00287             <span class="stringliteral">"my_midpoint is after my_end"</span> );
-<a name="l00288"></a>00288         __TBB_ASSERT( my_begin != my_midpoint || my_begin == my_end,
-<a name="l00289"></a>00289             <span class="stringliteral">"[my_begin, my_midpoint) range should not be empty"</span> );
-<a name="l00290"></a>00290     }
-<a name="l00292"></a>00292     <span class="keyword">static</span> <span class="keyword">const</span> hashcode_t hash_multiplier = <span class="keyword">sizeof</span>(hashcode_t)==4? 2654435769U : 11400714819323198485ULL;
-<a name="l00294"></a>00294     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00295"></a>00295     <span class="keyword">inline</span> <span class="keyword">static</span> hashcode_t hasher( <span class="keyword">const</span> T& t ) {
-<a name="l00296"></a>00296         <span class="keywordflow">return</span> static_cast<hashcode_t>( t ) * hash_multiplier;
-<a name="l00297"></a>00297     }
-<a name="l00298"></a>00298     <span class="keyword">template</span><<span class="keyword">typename</span> P>
-<a name="l00299"></a>00299     <span class="keyword">inline</span> <span class="keyword">static</span> hashcode_t hasher( P* ptr ) {
-<a name="l00300"></a>00300         hashcode_t <span class="keyword">const</span> h = reinterpret_cast<hashcode_t>( ptr );
-<a name="l00301"></a>00301         <span class="keywordflow">return</span> (h >> 3) ^ h;
-<a name="l00302"></a>00302     }
-<a name="l00303"></a>00303     <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="l00304"></a>00304     <span class="keyword">inline</span> <span class="keyword">static</span> hashcode_t hasher( <span class="keyword">const</span> std::basic_string<E,S,A>& s ) {
-<a name="l00305"></a>00305         hashcode_t h = 0;
-<a name="l00306"></a>00306         <span class="keywordflow">for</span>( <span class="keyword">const</span> E* c = s.c_str(); *c; c++ )
-<a name="l00307"></a>00307             h = static_cast<hashcode_t>(*c) ^ (h * hash_multiplier);
-<a name="l00308"></a>00308         <span class="keywordflow">return</span> h;
-<a name="l00309"></a>00309     }
-<a name="l00310"></a>00310     <span class="keyword">template</span><<span class="keyword">typename</span> F, <span class="keyword">typename</span> S>
-<a name="l00311"></a>00311     <span class="keyword">inline</span> <span class="keyword">static</span> hashcode_t hasher( <span class="keyword">const</span> std::pair<F,S>& p ) {
-<a name="l00312"></a>00312         <span class="keywordflow">return</span> hasher(p.first) ^ hasher(p.second);
-<a name="l00313"></a>00313     }
-<a name="l00314"></a>00314 } <span class="comment">// namespace internal</span>
-<a name="l00316"></a>00316 <span class="comment"></span>
-<a name="l00318"></a>00318 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00319"></a><a class="code" href="a00139.html">00319</a> <span class="keyword">struct </span><a class="code" href="a00139.html">tbb_hash_compare</a> {
-<a name="l00320"></a>00320     <span class="keyword">static</span> internal::hashcode_t hash( <span class="keyword">const</span> T& t ) { <span class="keywordflow">return</span> internal::hasher(t); }
-<a name="l00321"></a>00321     <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="l00322"></a>00322 };
-<a name="l00323"></a>00323 
-<a name="l00325"></a>00325 
-<a name="l00350"></a>00350 <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="l00351"></a><a class="code" href="a00103.html">00351</a> <span class="keyword">class </span><a class="code" href="a00103.html">concurrent_hash_map</a> : <span class="keyword">protected</span> internal::hash_map_base {
-<a name="l00352"></a>00352     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00353"></a>00353     <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_iterator;
-<a name="l00354"></a>00354 
-<a name="l00355"></a>00355     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00356"></a>00356     <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_range;
-<a name="l00357"></a>00357 
-<a name="l00358"></a>00358     <span class="keyword">struct </span>node;
-<a name="l00359"></a>00359     <span class="keyword">friend</span> <span class="keyword">struct </span>node;
-<a name="l00360"></a>00360     <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template rebind<node>::other node_allocator_type;
-<a name="l00361"></a>00361 
-<a name="l00362"></a>00362 <span class="keyword">public</span>:
-<a name="l00363"></a>00363     <span class="keyword">class </span><a class="code" href="a00105.html">const_accessor</a>;
-<a name="l00364"></a>00364     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00105.html">const_accessor</a>;
-<a name="l00365"></a>00365     <span class="keyword">class </span><a class="code" href="a00104.html">accessor</a>;
-<a name="l00366"></a>00366 
-<a name="l00367"></a>00367     <span class="keyword">typedef</span> Key key_type;
-<a name="l00368"></a>00368     <span class="keyword">typedef</span> T mapped_type;
-<a name="l00369"></a>00369     <span class="keyword">typedef</span> std::pair<const Key,T> value_type;
-<a name="l00370"></a>00370     <span class="keyword">typedef</span> size_t size_type;
-<a name="l00371"></a>00371     <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00372"></a>00372     <span class="keyword">typedef</span> value_type *pointer;
-<a name="l00373"></a>00373     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type *const_pointer;
-<a name="l00374"></a>00374     <span class="keyword">typedef</span> value_type &reference;
-<a name="l00375"></a>00375     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type &const_reference;
-<a name="l00376"></a>00376     <span class="keyword">typedef</span> internal::hash_map_iterator<concurrent_hash_map,value_type> iterator;
-<a name="l00377"></a>00377     <span class="keyword">typedef</span> internal::hash_map_iterator<concurrent_hash_map,const value_type> const_iterator;
-<a name="l00378"></a>00378     <span class="keyword">typedef</span> internal::hash_map_range<iterator> range_type;
-<a name="l00379"></a>00379     <span class="keyword">typedef</span> internal::hash_map_range<const_iterator> const_range_type;
-<a name="l00380"></a>00380     <span class="keyword">typedef</span> A allocator_type;
-<a name="l00381"></a>00381 
-<a name="l00383"></a><a class="code" href="a00105.html">00383</a>     <span class="keyword">class </span><a class="code" href="a00105.html">const_accessor</a> {
-<a name="l00384"></a>00384         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00103.html">concurrent_hash_map</a><Key,T,HashCompare,A>;
-<a name="l00385"></a>00385         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00104.html">accessor</a>;
-<a name="l00386"></a>00386         <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="a00104.html">accessor</a>& ) <span class="keyword">const</span>; <span class="comment">// Deny access</span>
-<a name="l00387"></a>00387         <a class="code" href="a00105.html">const_accessor</a>( <span class="keyword">const</span> <a class="code" href="a00104.html">accessor</a>& );       <span class="comment">// Deny access</span>
-<a name="l00388"></a>00388     <span class="keyword">public</span>:
-<a name="l00390"></a><a class="code" href="a00105.html#b5fe45b58ccc252b8ce70ac6c896c648">00390</a>         <span class="keyword">typedef</span> <span class="keyword">const</span> std::pair<const Key,T> value_type;
-<a name="l00391"></a>00391 
-<a name="l00393"></a><a class="code" href="a00105.html#38712b9809d23d2fba5e4780bb3c4f18">00393</a>         <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !my_node;}
-<a name="l00394"></a>00394 
-<a name="l00396"></a><a class="code" href="a00105.html#c7f3f43eb5f98d8451b2b1d456a4ccd4">00396</a>         <span class="keywordtype">void</span> <a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {
-<a name="l00397"></a>00397             <span class="keywordflow">if</span>( my_node ) {
-<a name="l00398"></a>00398                 my_lock.release();
-<a name="l00399"></a>00399                 my_node = NULL;
-<a name="l00400"></a>00400             }
-<a name="l00401"></a>00401         }
-<a name="l00402"></a>00402 
-<a name="l00404"></a><a class="code" href="a00105.html#ea4d48e45dd039a2be10178df9336001">00404</a>         const_reference operator*()<span class="keyword"> const </span>{
-<a name="l00405"></a>00405             __TBB_ASSERT( my_node, <span class="stringliteral">"attempt to dereference empty accessor"</span> );
-<a name="l00406"></a>00406             <span class="keywordflow">return</span> my_node->item;
-<a name="l00407"></a>00407         }
-<a name="l00408"></a>00408 
-<a name="l00410"></a><a class="code" href="a00105.html#def170ba3b18905cd4e9d90f8a9a9cd9">00410</a>         const_pointer operator->()<span class="keyword"> const </span>{
-<a name="l00411"></a>00411             <span class="keywordflow">return</span> &operator*();
-<a name="l00412"></a>00412         }
-<a name="l00413"></a>00413 
-<a name="l00415"></a><a class="code" href="a00105.html#2a73cc49914e218e579eb77d3d9d6551">00415</a>         <a class="code" href="a00105.html">const_accessor</a>() : my_node(NULL) {}
-<a name="l00416"></a>00416 
-<a name="l00418"></a><a class="code" href="a00105.html#9b3fdcb8850d6f6dc749b72dbf2d593d">00418</a>         ~<a class="code" href="a00105.html">const_accessor</a>() {
-<a name="l00419"></a>00419             my_node = NULL; <span class="comment">// my_lock.release() is called in scoped_lock destructor</span>
-<a name="l00420"></a>00420         }
-<a name="l00421"></a>00421     <span class="keyword">private</span>:
-<a name="l00422"></a>00422         node* my_node;
-<a name="l00423"></a>00423         node_mutex_t::scoped_lock my_lock;
-<a name="l00424"></a>00424         hashcode_t my_hash;
-<a name="l00425"></a>00425     };
-<a name="l00426"></a>00426 
-<a name="l00428"></a><a class="code" href="a00104.html">00428</a>     <span class="keyword">class </span><a class="code" href="a00104.html">accessor</a>: <span class="keyword">public</span> <a class="code" href="a00105.html">const_accessor</a> {
-<a name="l00429"></a>00429     <span class="keyword">public</span>:
-<a name="l00431"></a><a class="code" href="a00104.html#8bc15c9c07f3e21583ab1a4ad0901ce5">00431</a>         <span class="keyword">typedef</span> std::pair<const Key,T> value_type;
-<a name="l00432"></a>00432 
-<a name="l00434"></a><a class="code" href="a00104.html#52334dd5411e7b95635b90527d7d6062">00434</a>         reference operator*()<span class="keyword"> const </span>{
-<a name="l00435"></a>00435             __TBB_ASSERT( this->my_node, <span class="stringliteral">"attempt to dereference empty accessor"</span> );
-<a name="l00436"></a>00436             <span class="keywordflow">return</span> this->my_node->item;
-<a name="l00437"></a>00437         }
-<a name="l00438"></a>00438 
-<a name="l00440"></a><a class="code" href="a00104.html#0fae0495144540e2b011a6530f68f1cb">00440</a>         pointer operator->()<span class="keyword"> const </span>{
-<a name="l00441"></a>00441             <span class="keywordflow">return</span> &operator*();
-<a name="l00442"></a>00442         }       
-<a name="l00443"></a>00443     };
-<a name="l00444"></a>00444 
-<a name="l00446"></a><a class="code" href="a00103.html#6a65733441a84e3581491eb49e305cf8">00446</a>     <a class="code" href="a00103.html">concurrent_hash_map</a>(<span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00447"></a>00447         : my_allocator(a)
-<a name="l00448"></a>00448 
-<a name="l00449"></a>00449     {
-<a name="l00450"></a>00450         initialize();
-<a name="l00451"></a>00451     }
-<a name="l00452"></a>00452 
-<a name="l00454"></a><a class="code" href="a00103.html#6af4e2b7d2434bc72a645b7e5eb3959f">00454</a>     <a class="code" href="a00103.html">concurrent_hash_map</a>( <span class="keyword">const</span> <a class="code" href="a00103.html">concurrent_hash_map</a>& table, <span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00455"></a>00455         : my_allocator(a)
-<a name="l00456"></a>00456     {
-<a name="l00457"></a>00457         initialize();
-<a name="l00458"></a>00458         internal_copy(table);
-<a name="l00459"></a>00459     }
-<a name="l00460"></a>00460 
-<a name="l00462"></a>00462     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00463"></a><a class="code" href="a00103.html#51cccc7b42e83884462dcadede034822">00463</a>     <a class="code" href="a00103.html">concurrent_hash_map</a>(I first, I last, <span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00464"></a>00464         : my_allocator(a)
-<a name="l00465"></a>00465     {
-<a name="l00466"></a>00466         initialize();
-<a name="l00467"></a>00467         internal_copy(first, last);
-<a name="l00468"></a>00468     }
-<a name="l00469"></a>00469 
-<a name="l00471"></a><a class="code" href="a00103.html#d70ad33f97ce38d004620580bb1b09ba">00471</a>     <a class="code" href="a00103.html">concurrent_hash_map</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00103.html">concurrent_hash_map</a>& table ) {
-<a name="l00472"></a>00472         <span class="keywordflow">if</span>( <span class="keyword">this</span>!=&table ) {
-<a name="l00473"></a>00473             clear();
-<a name="l00474"></a>00474             internal_copy(table);
-<a name="l00475"></a>00475         } 
-<a name="l00476"></a>00476         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00477"></a>00477     }
-<a name="l00478"></a>00478 
-<a name="l00479"></a>00479 
-<a name="l00481"></a>00481     <span class="keywordtype">void</span> clear();
-<a name="l00482"></a>00482 
-<a name="l00484"></a>00484     ~<a class="code" href="a00103.html">concurrent_hash_map</a>();
-<a name="l00485"></a>00485 
-<a name="l00486"></a>00486     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00487"></a>00487     <span class="comment">// Parallel algorithm support</span>
-<a name="l00488"></a>00488     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00489"></a>00489     range_type range( size_type grainsize=1 ) {
-<a name="l00490"></a>00490         <span class="keywordflow">return</span> range_type( begin(), end(), grainsize );
-<a name="l00491"></a>00491     }
-<a name="l00492"></a>00492     const_range_type range( size_type grainsize=1 )<span class="keyword"> const </span>{
-<a name="l00493"></a>00493         <span class="keywordflow">return</span> const_range_type( begin(), end(), grainsize );
-<a name="l00494"></a>00494     }
-<a name="l00495"></a>00495 
-<a name="l00496"></a>00496     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00497"></a>00497     <span class="comment">// STL support - not thread-safe methods</span>
-<a name="l00498"></a>00498     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00499"></a>00499     iterator begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,0);}
-<a name="l00500"></a>00500     iterator end() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,n_segment);}
-<a name="l00501"></a>00501     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0);}
-<a name="l00502"></a>00502     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,n_segment);}
-<a name="l00503"></a>00503     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="l00504"></a>00504     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="l00505"></a>00505     
-<a name="l00507"></a>00507 
-<a name="l00509"></a>00509     size_type size() <span class="keyword">const</span>;
-<a name="l00510"></a>00510 
-<a name="l00512"></a>00512     <span class="keywordtype">bool</span> empty() <span class="keyword">const</span>;
-<a name="l00513"></a>00513 
-<a name="l00515"></a><a class="code" href="a00103.html#62d1fdc2c4d37d84b0dca1cd45f1cf1f">00515</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="l00516"></a>00516 
-<a name="l00518"></a><a class="code" href="a00103.html#14255f38f7b10bb892b233fce283fbce">00518</a>     allocator_type get_allocator()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
-<a name="l00519"></a>00519 
-<a name="l00521"></a>00521     <span class="keywordtype">void</span> swap(<a class="code" href="a00103.html">concurrent_hash_map</a> &table);
-<a name="l00522"></a>00522 
-<a name="l00523"></a>00523     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00524"></a>00524     <span class="comment">// concurrent map operations</span>
-<a name="l00525"></a>00525     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00526"></a>00526 
-<a name="l00528"></a><a class="code" href="a00103.html#345daf26f2f7e2b4d93382fea80b3a7f">00528</a>     size_type count( <span class="keyword">const</span> Key& key )<span class="keyword"> const </span>{
-<a name="l00529"></a>00529         <span class="keywordflow">return</span> const_cast<concurrent_hash_map*>(<span class="keyword">this</span>)->lookup</*insert*/false>(NULL, key, <span class="comment">/*write=*/</span><span class="keyword">false</span>, NULL );
-<a name="l00530"></a>00530     }
-<a name="l00531"></a>00531 
-<a name="l00533"></a>00533 
-<a name="l00534"></a><a class="code" href="a00103.html#ae4b9cb9aa025de8251f90f5f21e9e95">00534</a>     <span class="keywordtype">bool</span> find( <a class="code" href="a00105.html">const_accessor</a>& result, <span class="keyword">const</span> Key& key )<span class="keyword"> const </span>{
-<a name="l00535"></a>00535         <span class="keywordflow">return</span> const_cast<concurrent_hash_map*>(<span class="keyword">this</span>)->lookup</*insert*/false>(&result, key, <span class="comment">/*write=*/</span><span class="keyword">false</span>, NULL );
-<a name="l00536"></a>00536     }
-<a name="l00537"></a>00537 
-<a name="l00539"></a>00539 
-<a name="l00540"></a><a class="code" href="a00103.html#68a6bd5b8a0bc2d5066e5eb175fd5ba9">00540</a>     <span class="keywordtype">bool</span> find( <a class="code" href="a00104.html">accessor</a>& result, <span class="keyword">const</span> Key& key ) {
-<a name="l00541"></a>00541         <span class="keywordflow">return</span> lookup<<span class="comment">/*insert*/</span><span class="keyword">false</span>>(&result, key, <span class="comment">/*write=*/</span><span class="keyword">true</span>, NULL );
-<a name="l00542"></a>00542     }
-<a name="l00543"></a>00543         
-<a name="l00545"></a>00545 
-<a name="l00546"></a><a class="code" href="a00103.html#2c10a645a8b40c6438c2bb119a61e93b">00546</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00105.html">const_accessor</a>& result, <span class="keyword">const</span> Key& key ) {
-<a name="l00547"></a>00547         <span class="keywordflow">return</span> lookup<<span class="comment">/*insert*/</span><span class="keyword">true</span>>(&result, key, <span class="comment">/*write=*/</span><span class="keyword">false</span>, NULL );
-<a name="l00548"></a>00548     }
-<a name="l00549"></a>00549 
-<a name="l00551"></a>00551 
-<a name="l00552"></a><a class="code" href="a00103.html#da381dd244a7dbad494e1e60743b5afa">00552</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00104.html">accessor</a>& result, <span class="keyword">const</span> Key& key ) {
-<a name="l00553"></a>00553         <span class="keywordflow">return</span> lookup<<span class="comment">/*insert*/</span><span class="keyword">true</span>>(&result, key, <span class="comment">/*write=*/</span><span class="keyword">true</span>, NULL );
-<a name="l00554"></a>00554     }
-<a name="l00555"></a>00555 
-<a name="l00557"></a>00557 
-<a name="l00558"></a><a class="code" href="a00103.html#7fa987ae247a894ce9f1ca097a919fd4">00558</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00105.html">const_accessor</a>& result, <span class="keyword">const</span> value_type& value ) {
-<a name="l00559"></a>00559         <span class="keywordflow">return</span> lookup<<span class="comment">/*insert*/</span><span class="keyword">true</span>>(&result, value.first, <span class="comment">/*write=*/</span><span class="keyword">false</span>, &value.second );
-<a name="l00560"></a>00560     }
-<a name="l00561"></a>00561 
-<a name="l00563"></a>00563 
-<a name="l00564"></a><a class="code" href="a00103.html#2182c693d5898106675b76b443812b47">00564</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00104.html">accessor</a>& result, <span class="keyword">const</span> value_type& value ) {
-<a name="l00565"></a>00565         <span class="keywordflow">return</span> lookup<<span class="comment">/*insert*/</span><span class="keyword">true</span>>(&result, value.first, <span class="comment">/*write=*/</span><span class="keyword">true</span>, &value.second );
-<a name="l00566"></a>00566     }
-<a name="l00567"></a>00567 
-<a name="l00569"></a>00569 
-<a name="l00570"></a><a class="code" href="a00103.html#70017dbe0ebbe8c83b9740cd54a6b7e0">00570</a>     <span class="keywordtype">bool</span> insert( <span class="keyword">const</span> value_type& value ) {
-<a name="l00571"></a>00571         <span class="keywordflow">return</span> lookup<<span class="comment">/*insert*/</span><span class="keyword">true</span>>(NULL, value.first, <span class="comment">/*write=*/</span><span class="keyword">false</span>, &value.second );
-<a name="l00572"></a>00572     }
-<a name="l00573"></a>00573 
-<a name="l00575"></a>00575     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00576"></a><a class="code" href="a00103.html#06a95a56a40fcbdf3897051d22aaab19">00576</a>     <span class="keywordtype">void</span> insert(I first, I last) {
-<a name="l00577"></a>00577         <span class="keywordflow">for</span>(; first != last; ++first)
-<a name="l00578"></a>00578             insert( *first );
-<a name="l00579"></a>00579     }
-<a name="l00580"></a>00580 
-<a name="l00582"></a>00582 
-<a name="l00583"></a>00583     <span class="keywordtype">bool</span> erase( <span class="keyword">const</span> Key& key );
-<a name="l00584"></a>00584 
-<a name="l00586"></a>00586 
-<a name="l00587"></a><a class="code" href="a00103.html#cc090be8a6c0a3765360ec363cf2474e">00587</a>     <span class="keywordtype">bool</span> erase( <a class="code" href="a00105.html">const_accessor</a>& item_accessor ) {
-<a name="l00588"></a>00588         <span class="keywordflow">return</span> exclude( item_accessor, <span class="comment">/*readonly=*/</span> <span class="keyword">true</span> );
-<a name="l00589"></a>00589     }
-<a name="l00590"></a>00590 
-<a name="l00592"></a>00592 
-<a name="l00593"></a><a class="code" href="a00103.html#b5bd8c8f49f8d0e72afedca53caa6b15">00593</a>     <span class="keywordtype">bool</span> erase( <a class="code" href="a00104.html">accessor</a>& item_accessor ) {
-<a name="l00594"></a>00594         <span class="keywordflow">return</span> exclude( item_accessor, <span class="comment">/*readonly=*/</span> <span class="keyword">false</span> );
-<a name="l00595"></a>00595     }
-<a name="l00596"></a>00596 
-<a name="l00597"></a>00597 <span class="keyword">private</span>:
-<a name="l00599"></a>00599     <span class="keyword">struct </span>node: internal::no_copy {
-<a name="l00601"></a>00601         node* next;
-<a name="l00602"></a>00602         node_mutex_t <a class="code" href="a00112.html">mutex</a>;
-<a name="l00603"></a>00603         value_type item;
-<a name="l00604"></a>00604         node( <span class="keyword">const</span> Key& key ) : item(key, T()) {}
-<a name="l00605"></a>00605         node( <span class="keyword">const</span> Key& key, <span class="keyword">const</span> T& t ) : item(key, t) {}
-<a name="l00606"></a>00606         <span class="comment">// exception-safe allocation, see C++ Standard 2003, clause 5.3.4p17</span>
-<a name="l00607"></a>00607         <span class="keywordtype">void</span>* operator new( size_t <span class="comment">/*size*/</span>, node_allocator_type& a ) {
-<a name="l00608"></a>00608             <span class="keywordtype">void</span> *ptr = a.allocate(1);
-<a name="l00609"></a>00609             <span class="keywordflow">if</span>(!ptr) <span class="keywordflow">throw</span> std::bad_alloc();
-<a name="l00610"></a>00610             <span class="keywordflow">return</span> ptr;
-<a name="l00611"></a>00611         }
-<a name="l00612"></a>00612         <span class="comment">// match placement-new form above to be called if exception thrown in constructor</span>
-<a name="l00613"></a>00613         <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="l00614"></a>00614     };
-<a name="l00615"></a>00615 
-<a name="l00616"></a>00616     <span class="keyword">struct </span>chain;
-<a name="l00617"></a>00617     <span class="keyword">friend</span> <span class="keyword">struct </span>chain;
-<a name="l00618"></a>00618 
-<a name="l00620"></a>00620 
-<a name="l00621"></a>00621     <span class="keyword">struct </span>chain {
-<a name="l00622"></a>00622         <span class="keywordtype">void</span> push_front( node& b ) {
-<a name="l00623"></a>00623             b.next = node_list;
-<a name="l00624"></a>00624             node_list = &b;
-<a name="l00625"></a>00625         }
-<a name="l00626"></a>00626         chain_mutex_t mutex;
-<a name="l00627"></a>00627         node* node_list;
-<a name="l00628"></a>00628     };
-<a name="l00629"></a>00629 
-<a name="l00630"></a>00630     <span class="keyword">struct </span>segment;
-<a name="l00631"></a>00631     <span class="keyword">friend</span> <span class="keyword">struct </span>segment;
-<a name="l00632"></a>00632 
-<a name="l00634"></a>00634 
-<a name="l00636"></a>00636     <span class="keyword">struct </span>segment: internal::hash_map_segment_base {
-<a name="l00637"></a>00637 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00638"></a>00638 <span class="preprocessor"></span>        ~segment() {
-<a name="l00639"></a>00639             __TBB_ASSERT( !my_array, <span class="stringliteral">"should have been cleared earlier"</span> );
-<a name="l00640"></a>00640         }
-<a name="l00641"></a>00641 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00642"></a>00642 
-<a name="l00643"></a>00643         <span class="comment">// Pointer to array of chains</span>
-<a name="l00644"></a>00644         chain* my_array;
-<a name="l00645"></a>00645 
-<a name="l00646"></a>00646         <span class="comment">// Get chain in this segment that corresponds to given hash code.</span>
-<a name="l00647"></a>00647         chain& get_chain( hashcode_t hashcode, size_t n_segment_bits ) {
-<a name="l00648"></a>00648             <span class="keywordflow">return</span> my_array[(hashcode>>n_segment_bits)&(my_physical_size-1)];
-<a name="l00649"></a>00649         }
-<a name="l00650"></a>00650      
-<a name="l00652"></a>00652 
-<a name="l00654"></a>00654         <span class="keywordtype">void</span> allocate_array( size_t new_size ) {
-<a name="l00655"></a>00655             size_t n=(internal::NFS_GetLineSize()+<span class="keyword">sizeof</span>(chain)-1)/<span class="keyword">sizeof</span>(chain);
-<a name="l00656"></a>00656             __TBB_ASSERT((n&(n-1))==0, NULL);
-<a name="l00657"></a>00657             <span class="keywordflow">while</span>( n<new_size ) n<<=1;
-<a name="l00658"></a>00658             chain* array = cache_aligned_allocator<chain>().allocate( n );
-<a name="l00659"></a>00659             <span class="comment">// storing earlier might help overcome false positives of in deducing "bool grow" in concurrent threads</span>
-<a name="l00660"></a>00660             __TBB_store_with_release(my_physical_size, n);
-<a name="l00661"></a>00661             std::memset( array, 0, n*<span class="keyword">sizeof</span>(chain) );
-<a name="l00662"></a>00662             my_array = array;
-<a name="l00663"></a>00663         }
-<a name="l00664"></a>00664     };
-<a name="l00665"></a>00665 
-<a name="l00666"></a>00666     segment& get_segment( hashcode_t hashcode ) {
-<a name="l00667"></a>00667         <span class="keywordflow">return</span> my_segment[hashcode&(n_segment-1)];
-<a name="l00668"></a>00668     }
-<a name="l00669"></a>00669 
-<a name="l00670"></a>00670     node_allocator_type my_allocator;
-<a name="l00671"></a>00671 
-<a name="l00672"></a>00672     HashCompare my_hash_compare;
-<a name="l00673"></a>00673 
-<a name="l00674"></a>00674     segment* my_segment;
-<a name="l00675"></a>00675 
-<a name="l00676"></a>00676     node* create_node(<span class="keyword">const</span> Key& key, <span class="keyword">const</span> T* t) {
-<a name="l00677"></a>00677         <span class="comment">// exception-safe allocation and construction</span>
-<a name="l00678"></a>00678         <span class="keywordflow">if</span>(t) <span class="keywordflow">return</span> <span class="keyword">new</span>( my_allocator ) node(key, *t);
-<a name="l00679"></a>00679         <span class="keywordflow">else</span>  <span class="keywordflow">return</span> <span class="keyword">new</span>( my_allocator ) node(key);
-<a name="l00680"></a>00680     }
-<a name="l00681"></a>00681 
-<a name="l00682"></a>00682     <span class="keywordtype">void</span> delete_node(node* b) {
-<a name="l00683"></a>00683         my_allocator.destroy(b);
-<a name="l00684"></a>00684         my_allocator.deallocate(b, 1);
-<a name="l00685"></a>00685     }
-<a name="l00686"></a>00686 
-<a name="l00687"></a>00687     node* search_list( <span class="keyword">const</span> Key& key, chain& c )<span class="keyword"> const </span>{
-<a name="l00688"></a>00688         node* b = c.node_list;
-<a name="l00689"></a>00689         <span class="keywordflow">while</span>( b && !my_hash_compare.equal(key, b->item.first) )
-<a name="l00690"></a>00690             b = b->next;
-<a name="l00691"></a>00691         <span class="keywordflow">return</span> b;
-<a name="l00692"></a>00692     }
-<a name="l00694"></a>00694     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00695"></a>00695     std::pair<I, I> internal_equal_range( <span class="keyword">const</span> Key& key, I end ) <span class="keyword">const</span>;
-<a name="l00696"></a>00696 
-<a name="l00698"></a>00698     <span class="keywordtype">bool</span> exclude( const_accessor& item_accessor, <span class="keywordtype">bool</span> readonly );
-<a name="l00699"></a>00699 
-<a name="l00701"></a>00701     <span class="keywordtype">void</span> grow_segment( segment_mutex_t::scoped_lock& segment_lock, segment& s );
-<a name="l00702"></a>00702 
-<a name="l00704"></a>00704     <span class="keyword">template</span><<span class="keywordtype">bool</span> op_insert>
-<a name="l00705"></a>00705     <span class="keywordtype">bool</span> lookup( const_accessor* result, <span class="keyword">const</span> Key& key, <span class="keywordtype">bool</span> write, <span class="keyword">const</span> T* t );
-<a name="l00706"></a>00706 
-<a name="l00708"></a>00708     <span class="keywordtype">void</span> initialize() {
-<a name="l00709"></a>00709         my_segment = cache_aligned_allocator<segment>().allocate(n_segment);
-<a name="l00710"></a>00710         std::memset( my_segment, 0, <span class="keyword">sizeof</span>(segment)*n_segment );
-<a name="l00711"></a>00711      }
-<a name="l00712"></a>00712 
-<a name="l00714"></a>00714     <span class="keywordtype">void</span> internal_copy( <span class="keyword">const</span> concurrent_hash_map& source );
-<a name="l00715"></a>00715 
-<a name="l00716"></a>00716     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00717"></a>00717     <span class="keywordtype">void</span> internal_copy(I first, I last);
-<a name="l00718"></a>00718 };
-<a name="l00719"></a>00719 
-<a name="l00720"></a>00720 <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="l00721"></a><a class="code" href="a00103.html#5a683e8db50438b9976e46e7d4f60e65">00721</a> <a class="code" href="a00103.html">concurrent_hash_map<Key,T,HashCompare,A>::~concurrent_hash_map</a>() {
-<a name="l00722"></a>00722     <a class="code" href="a00103.html#36bcd50fd5383f3682032323b2d74333">clear</a>();
-<a name="l00723"></a>00723     <a class="code" href="a00100.html">cache_aligned_allocator<segment></a>().deallocate( my_segment, n_segment );
-<a name="l00724"></a>00724 }
-<a name="l00725"></a>00725 
-<a name="l00726"></a>00726 <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="l00727"></a><a class="code" href="a00103.html#75bb57a153952ffadfcf2e4c73deabb1">00727</a> <span class="keyword">typename</span> <a class="code" href="a00103.html">concurrent_hash_map<Key,T,HashCompare,A>::size_type</a> <a class="code" href="a00103.html">concurrent_hash_map<Key,T,HashCompare,A>::size</a>()<span class="keyword"> const </span>{
-<a name="l00728"></a>00728     size_type result = 0;
-<a name="l00729"></a>00729     <span class="keywordflow">for</span>( size_t k=0; k<n_segment; ++k )
-<a name="l00730"></a>00730         result += my_segment[k].my_logical_size;
-<a name="l00731"></a>00731     <span class="keywordflow">return</span> result;
-<a name="l00732"></a>00732 }
-<a name="l00733"></a>00733 
-<a name="l00734"></a>00734 <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="l00735"></a><a class="code" href="a00103.html#b9599dd587892366ed31dea23e5c5837">00735</a> <span class="keywordtype">bool</span> <a class="code" href="a00103.html">concurrent_hash_map<Key,T,HashCompare,A>::empty</a>()<span class="keyword"> const </span>{
-<a name="l00736"></a>00736     <span class="keywordflow">for</span>( size_t k=0; k<n_segment; ++k )
-<a name="l00737"></a>00737         <span class="keywordflow">if</span>( my_segment[k].my_logical_size )
-<a name="l00738"></a>00738             <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00739"></a>00739     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00740"></a>00740 }
-<a name="l00741"></a>00741 
-<a name="l00742"></a>00742 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00743"></a>00743 <span class="preprocessor"></span>    <span class="comment">// Suppress "conditional expression is constant" warning.</span>
-<a name="l00744"></a>00744 <span class="preprocessor">    #pragma warning( push )</span>
-<a name="l00745"></a>00745 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning( disable: 4127 )</span>
-<a name="l00746"></a>00746 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00747"></a>00747 <span class="preprocessor"></span>
-<a name="l00748"></a>00748 <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="l00749"></a>00749 <span class="keyword">template</span><<span class="keywordtype">bool</span> op_insert>
-<a name="l00750"></a>00750 <span class="keywordtype">bool</span> <a class="code" href="a00103.html">concurrent_hash_map<Key,T,HashCompare,A>::lookup</a>( const_accessor* result, <span class="keyword">const</span> Key& key, <span class="keywordtype">bool</span> write, <span class="keyword">const</span> T* t ) {
-<a name="l00751"></a>00751     <span class="keywordflow">if</span>( result )
-<a name="l00752"></a>00752         result->release();
-<a name="l00753"></a>00753     <span class="keyword">const</span> hashcode_t h = my_hash_compare.hash( key );
-<a name="l00754"></a>00754     segment& s = get_segment(h);
-<a name="l00755"></a>00755 restart:
-<a name="l00756"></a>00756     <span class="keywordtype">bool</span> return_value = <span class="keyword">false</span>;
-<a name="l00757"></a>00757     <span class="comment">// first check in double-check sequence</span>
-<a name="l00758"></a>00758 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00759"></a>00759 <span class="preprocessor"></span>    <span class="keywordtype">bool</span> grow = op_insert && s.internal_grow_predicate();
-<a name="l00760"></a>00760 <span class="preprocessor">#else</span>
-<a name="l00761"></a>00761 <span class="preprocessor"></span>    <span class="keywordtype">bool</span> grow = op_insert && s.my_logical_size >= s.my_physical_size
-<a name="l00762"></a>00762         && s.my_physical_size < max_physical_size; <span class="comment">// check whether there are free bits</span>
-<a name="l00763"></a>00763 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
-<a name="l00764"></a>00764     segment_mutex_t::scoped_lock segment_lock( s.my_mutex, <span class="comment">/*write=*/</span>grow );
-<a name="l00765"></a>00765     <span class="keywordflow">if</span>( grow ) { <span class="comment">// Load factor is too high  </span>
-<a name="l00766"></a>00766         grow_segment( segment_lock, s );
-<a name="l00767"></a>00767     }
-<a name="l00768"></a>00768     <span class="keywordflow">if</span>( !s.my_array ) {
-<a name="l00769"></a>00769         __TBB_ASSERT( !op_insert, NULL );
-<a name="l00770"></a>00770         <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00771"></a>00771     }
-<a name="l00772"></a>00772     __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
-<a name="l00773"></a>00773     chain& c = s.get_chain( h, n_segment_bits );
-<a name="l00774"></a>00774     chain_mutex_t::scoped_lock chain_lock( c.mutex, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
-<a name="l00775"></a>00775 
-<a name="l00776"></a>00776     node* b = search_list( key, c );
-<a name="l00777"></a>00777     <span class="keywordflow">if</span>( op_insert ) {
-<a name="l00778"></a>00778         <span class="keywordflow">if</span>( !b ) {
-<a name="l00779"></a>00779             b = create_node(key, t);
-<a name="l00780"></a>00780             <span class="comment">// Search failed</span>
-<a name="l00781"></a>00781             <span class="keywordflow">if</span>( !chain_lock.upgrade_to_writer() ) {
-<a name="l00782"></a>00782                 <span class="comment">// Rerun search_list, in case another thread inserted the item during the upgrade.</span>
-<a name="l00783"></a>00783                 node* b_temp = search_list( key, c );
-<a name="l00784"></a>00784                 <span class="keywordflow">if</span>( b_temp ) { <span class="comment">// unfortunately, it did</span>
-<a name="l00785"></a>00785                     chain_lock.downgrade_to_reader();
-<a name="l00786"></a>00786                     delete_node( b );
-<a name="l00787"></a>00787                     b = b_temp;
-<a name="l00788"></a>00788                     <span class="keywordflow">goto</span> done;
-<a name="l00789"></a>00789                 }
-<a name="l00790"></a>00790             }
-<a name="l00791"></a>00791             ++s.my_logical_size; <span class="comment">// we can't change it earlier due to correctness of size() and exception safety of equal()</span>
-<a name="l00792"></a>00792             return_value = <span class="keyword">true</span>;
-<a name="l00793"></a>00793             c.push_front( *b );
-<a name="l00794"></a>00794         }
-<a name="l00795"></a>00795     } <span class="keywordflow">else</span> { <span class="comment">// find or count</span>
-<a name="l00796"></a>00796         <span class="keywordflow">if</span>( !b )      <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00797"></a>00797         return_value = <span class="keyword">true</span>;
-<a name="l00798"></a>00798     }
-<a name="l00799"></a>00799 done:
-<a name="l00800"></a>00800     <span class="keywordflow">if</span>( !result ) <span class="keywordflow">return</span> return_value;
-<a name="l00801"></a>00801     <span class="keywordflow">if</span>( !result->my_lock.try_acquire( b->mutex, write ) ) {
-<a name="l00802"></a>00802         <span class="comment">// we are unlucky, prepare for longer wait</span>
-<a name="l00803"></a>00803         internal::AtomicBackoff trials;
-<a name="l00804"></a>00804         <span class="keywordflow">do</span> {
-<a name="l00805"></a>00805             <span class="keywordflow">if</span>( !trials.bounded_pause() ) {
-<a name="l00806"></a>00806                 <span class="comment">// the wait takes really long, restart the operation</span>
-<a name="l00807"></a>00807                 chain_lock.release(); segment_lock.release();
-<a name="l00808"></a>00808                 __TBB_Yield();
-<a name="l00809"></a>00809                 <span class="keywordflow">goto</span> restart;
-<a name="l00810"></a>00810             }
-<a name="l00811"></a>00811         } <span class="keywordflow">while</span>( !result->my_lock.try_acquire( b->mutex, write ) );
-<a name="l00812"></a>00812     }
-<a name="l00813"></a>00813     result->my_node = b;
-<a name="l00814"></a>00814     result->my_hash = h;
-<a name="l00815"></a>00815     <span class="keywordflow">return</span> return_value;
-<a name="l00816"></a>00816 }
-<a name="l00817"></a>00817 
-<a name="l00818"></a>00818 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00819"></a>00819 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning( pop )</span>
-<a name="l00820"></a>00820 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4127 is back</span>
-<a name="l00821"></a>00821 <span class="preprocessor"></span>
-<a name="l00822"></a>00822 <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="l00823"></a>00823 <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00824"></a>00824 std::pair<I, I> concurrent_hash_map<Key,T,HashCompare,A>::internal_equal_range( <span class="keyword">const</span> Key& key, I end )<span class="keyword"> const </span>{
-<a name="l00825"></a>00825     hashcode_t h = my_hash_compare.hash( key );
-<a name="l00826"></a>00826     size_t segment_index = h&(n_segment-1);
-<a name="l00827"></a>00827     segment& s = my_segment[segment_index ];
-<a name="l00828"></a>00828     size_t chain_index = (h>>n_segment_bits)&(s.my_physical_size-1);
-<a name="l00829"></a>00829     <span class="keywordflow">if</span>( !s.my_array )
-<a name="l00830"></a>00830         <span class="keywordflow">return</span> std::make_pair(end, end);
-<a name="l00831"></a>00831     chain& c = s.my_array[chain_index];
-<a name="l00832"></a>00832     node* b = search_list( key, c );
-<a name="l00833"></a>00833     <span class="keywordflow">if</span>( !b )
-<a name="l00834"></a>00834         <span class="keywordflow">return</span> std::make_pair(end, end);
-<a name="l00835"></a>00835     iterator lower(*<span class="keyword">this</span>, segment_index, chain_index, b), upper(lower);
-<a name="l00836"></a>00836     <span class="keywordflow">return</span> std::make_pair(lower, ++upper);
-<a name="l00837"></a>00837 }
-<a name="l00838"></a>00838 
-<a name="l00839"></a>00839 <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="l00840"></a><a class="code" href="a00103.html#58df7a1e4373c55eb4c2fa9dc69516b1">00840</a> <span class="keywordtype">bool</span> <a class="code" href="a00103.html">concurrent_hash_map<Key,T,HashCompare,A>::erase</a>( <span class="keyword">const</span> Key &key ) {
-<a name="l00841"></a>00841     hashcode_t h = my_hash_compare.hash( key );
-<a name="l00842"></a>00842     segment& s = get_segment( h );
-<a name="l00843"></a>00843     node* b=NULL; <span class="comment">// explicitly initialized to prevent compiler warnings</span>
-<a name="l00844"></a>00844     {
-<a name="l00845"></a>00845         <span class="keywordtype">bool</span> chain_locked_for_write = <span class="keyword">false</span>;
-<a name="l00846"></a>00846         segment_mutex_t::scoped_lock segment_lock( s.my_mutex, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
-<a name="l00847"></a>00847         <span class="keywordflow">if</span>( !s.my_array ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00848"></a>00848         __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
-<a name="l00849"></a>00849         chain& c = s.get_chain( h, n_segment_bits );
-<a name="l00850"></a>00850         chain_mutex_t::scoped_lock chain_lock( c.mutex, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
-<a name="l00851"></a>00851     search:
-<a name="l00852"></a>00852         node** p = &c.node_list;
-<a name="l00853"></a>00853         b = *p;
-<a name="l00854"></a>00854         <span class="keywordflow">while</span>( b && !my_hash_compare.equal(key, b->item.first ) ) {
-<a name="l00855"></a>00855             p = &b->next;
-<a name="l00856"></a>00856             b = *p;
-<a name="l00857"></a>00857         }
-<a name="l00858"></a>00858         <span class="keywordflow">if</span>( !b ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00859"></a>00859         <span class="keywordflow">if</span>( !chain_locked_for_write && !chain_lock.upgrade_to_writer() ) {
-<a name="l00860"></a>00860             chain_locked_for_write = <span class="keyword">true</span>;
-<a name="l00861"></a>00861             <span class="keywordflow">goto</span> search;
-<a name="l00862"></a>00862         }
-<a name="l00863"></a>00863         *p = b->next;
-<a name="l00864"></a>00864         --s.my_logical_size;
-<a name="l00865"></a>00865     }
-<a name="l00866"></a>00866     {
-<a name="l00867"></a>00867         node_mutex_t::scoped_lock item_locker( b->mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
-<a name="l00868"></a>00868     }
-<a name="l00869"></a>00869     <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="l00870"></a>00870     delete_node( b ); <span class="comment">// Only one thread can delete it due to write lock on the chain_mutex</span>
-<a name="l00871"></a>00871     <span class="keywordflow">return</span> <span class="keyword">true</span>;        
-<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> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l00875"></a>00875 <span class="keywordtype">bool</span> <a class="code" href="a00103.html">concurrent_hash_map<Key,T,HashCompare,A>::exclude</a>( const_accessor &item_accessor, <span class="keywordtype">bool</span> readonly ) {
-<a name="l00876"></a>00876     __TBB_ASSERT( item_accessor.my_node, NULL );
-<a name="l00877"></a>00877     <span class="keyword">const</span> hashcode_t h = item_accessor.my_hash;
-<a name="l00878"></a>00878     node *<span class="keyword">const</span> b = item_accessor.my_node;
-<a name="l00879"></a>00879     item_accessor.my_node = NULL; <span class="comment">// we ought release accessor anyway</span>
-<a name="l00880"></a>00880     segment& s = get_segment( h );
-<a name="l00881"></a>00881     {
-<a name="l00882"></a>00882         segment_mutex_t::scoped_lock segment_lock( s.my_mutex, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
-<a name="l00883"></a>00883         __TBB_ASSERT( s.my_array, NULL );
-<a name="l00884"></a>00884         __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
-<a name="l00885"></a>00885         chain& c = s.get_chain( h, n_segment_bits );
-<a name="l00886"></a>00886         chain_mutex_t::scoped_lock chain_lock( c.mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
-<a name="l00887"></a>00887         node** p = &c.node_list;
-<a name="l00888"></a>00888         <span class="keywordflow">while</span>( *p && *p != b )
-<a name="l00889"></a>00889             p = &(*p)->next;
-<a name="l00890"></a>00890         <span class="keywordflow">if</span>( !*p ) { <span class="comment">// someone else was the first</span>
-<a name="l00891"></a>00891             item_accessor.my_lock.release();
-<a name="l00892"></a>00892             <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00893"></a>00893         }
-<a name="l00894"></a>00894         __TBB_ASSERT( *p == b, NULL );
-<a name="l00895"></a>00895         *p = b->next;
-<a name="l00896"></a>00896         --s.my_logical_size;
-<a name="l00897"></a>00897     }
-<a name="l00898"></a>00898     <span class="keywordflow">if</span>( readonly ) <span class="comment">// need to get exclusive lock</span>
-<a name="l00899"></a>00899         item_accessor.my_lock.upgrade_to_writer(); <span class="comment">// return value means nothing here</span>
-<a name="l00900"></a>00900     item_accessor.my_lock.release();
-<a name="l00901"></a>00901     delete_node( b ); <span class="comment">// Only one thread can delete it due to write lock on the chain_mutex</span>
-<a name="l00902"></a>00902     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<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> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l00906"></a>00906 <span class="keywordtype">void</span> concurrent_hash_map<Key,T,HashCompare,A>::swap(concurrent_hash_map<Key,T,HashCompare,A> &table) {
-<a name="l00907"></a>00907     std::swap(this->my_allocator, table.my_allocator);
-<a name="l00908"></a>00908     std::swap(this->my_hash_compare, table.my_hash_compare);
-<a name="l00909"></a>00909     std::swap(this->my_segment, table.my_segment);
-<a name="l00910"></a>00910 }
-<a name="l00911"></a>00911 
-<a name="l00912"></a>00912 <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="l00913"></a><a class="code" href="a00103.html#36bcd50fd5383f3682032323b2d74333">00913</a> <span class="keywordtype">void</span> <a class="code" href="a00103.html">concurrent_hash_map<Key,T,HashCompare,A>::clear</a>() {
-<a name="l00914"></a>00914 <span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l00915"></a>00915 <span class="preprocessor"></span>    size_t total_physical_size = 0, min_physical_size = size_t(-1L), max_physical_size = 0; <span class="comment">//< usage statistics</span>
-<a name="l00916"></a>00916     <span class="keyword">static</span> <span class="keywordtype">bool</span> reported = <span class="keyword">false</span>;
-<a name="l00917"></a>00917 <span class="preprocessor">#endif</span>
-<a name="l00918"></a>00918 <span class="preprocessor"></span>    <span class="keywordflow">for</span>( size_t i=0; i<n_segment; ++i ) {
-<a name="l00919"></a>00919         segment& s = my_segment[i];
-<a name="l00920"></a>00920         size_t n = s.my_physical_size;
-<a name="l00921"></a>00921         <span class="keywordflow">if</span>( chain* array = s.my_array ) {
-<a name="l00922"></a>00922             s.my_array = NULL;
-<a name="l00923"></a>00923             s.my_physical_size = 0;
-<a name="l00924"></a>00924             s.my_logical_size = 0;
-<a name="l00925"></a>00925             <span class="keywordflow">for</span>( size_t j=0; j<n; ++j ) {
-<a name="l00926"></a>00926                 <span class="keywordflow">while</span>( node* b = array[j].node_list ) {
-<a name="l00927"></a>00927                     array[j].node_list = b->next;
-<a name="l00928"></a>00928                     delete_node(b);
-<a name="l00929"></a>00929                 }
-<a name="l00930"></a>00930             }
-<a name="l00931"></a>00931             <a class="code" href="a00100.html">cache_aligned_allocator<chain></a>().deallocate( array, n );
-<a name="l00932"></a>00932         }
-<a name="l00933"></a>00933 <span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l00934"></a>00934 <span class="preprocessor"></span>        total_physical_size += n;
-<a name="l00935"></a>00935         <span class="keywordflow">if</span>(min_physical_size > n) min_physical_size = n;
-<a name="l00936"></a>00936         <span class="keywordflow">if</span>(max_physical_size < n) max_physical_size = n;
-<a name="l00937"></a>00937     }
-<a name="l00938"></a>00938     <span class="keywordflow">if</span>( !reported
-<a name="l00939"></a>00939         && ( (total_physical_size >= n_segment*48 && min_physical_size < total_physical_size/n_segment/2)
-<a name="l00940"></a>00940          || (total_physical_size >= n_segment*128 && max_physical_size > total_physical_size/n_segment*2) ) )
-<a name="l00941"></a>00941     {
-<a name="l00942"></a>00942         reported = <span class="keyword">true</span>;
-<a name="l00943"></a>00943         internal::runtime_warning(
-<a name="l00944"></a>00944             <span class="stringliteral">"Performance is not optimal because the hash function produces bad randomness in lower bits in %s"</span>,
-<a name="l00945"></a>00945             <span class="keyword">typeid</span>(*this).name() );
-<a name="l00946"></a>00946 <span class="preprocessor">#endif</span>
-<a name="l00947"></a>00947 <span class="preprocessor"></span>    }
-<a name="l00948"></a>00948 }
-<a name="l00949"></a>00949 
-<a name="l00950"></a>00950 <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="l00951"></a>00951 <span class="keywordtype">void</span> concurrent_hash_map<Key,T,HashCompare,A>::grow_segment( segment_mutex_t::scoped_lock& segment_lock, segment& s ) {
-<a name="l00952"></a>00952     <span class="comment">// Following is second check in a double-check.</span>
-<a name="l00953"></a>00953     <span class="keywordflow">if</span>( s.my_logical_size >= s.my_physical_size ) {
-<a name="l00954"></a>00954         chain* old_array = s.my_array;
-<a name="l00955"></a>00955         size_t old_size = s.my_physical_size;
-<a name="l00956"></a>00956         s.allocate_array( s.my_logical_size+1 );
-<a name="l00957"></a>00957         <span class="keywordflow">for</span>( size_t k=0; k<old_size; ++k )
-<a name="l00958"></a>00958             <span class="keywordflow">while</span>( node* b = old_array[k].node_list ) {
-<a name="l00959"></a>00959                 old_array[k].node_list = b->next;
-<a name="l00960"></a>00960                 hashcode_t h = my_hash_compare.hash( b->item.first );
-<a name="l00961"></a>00961                 __TBB_ASSERT( &get_segment(h)==&s, <span class="stringliteral">"hash function changed?"</span> );
-<a name="l00962"></a>00962                 s.get_chain(h,n_segment_bits).push_front(*b);
-<a name="l00963"></a>00963             }
-<a name="l00964"></a>00964         cache_aligned_allocator<chain>().deallocate( old_array, old_size );
-<a name="l00965"></a>00965     }
-<a name="l00966"></a>00966     segment_lock.downgrade_to_reader();
-<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> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l00970"></a>00970 <span class="keywordtype">void</span> concurrent_hash_map<Key,T,HashCompare,A>::internal_copy( <span class="keyword">const</span> concurrent_hash_map& source ) {
-<a name="l00971"></a>00971     <span class="keywordflow">for</span>( size_t i=0; i<n_segment; ++i ) {
-<a name="l00972"></a>00972         segment& s = source.my_segment[i];
-<a name="l00973"></a>00973         __TBB_ASSERT( !my_segment[i].my_array, <span class="stringliteral">"caller should have cleared"</span> );
-<a name="l00974"></a>00974         <span class="keywordflow">if</span>( s.my_logical_size ) {
-<a name="l00975"></a>00975             segment& d = my_segment[i];
-<a name="l00976"></a>00976             d.allocate_array( s.my_logical_size );
-<a name="l00977"></a>00977             d.my_logical_size = s.my_logical_size;
-<a name="l00978"></a>00978             size_t s_size = s.my_physical_size;
-<a name="l00979"></a>00979             chain* s_array = s.my_array;
-<a name="l00980"></a>00980             chain* d_array = d.my_array;
-<a name="l00981"></a>00981             <span class="keywordflow">for</span>( size_t k=0; k<s_size; ++k )
-<a name="l00982"></a>00982                 <span class="keywordflow">for</span>( node* b = s_array[k].node_list; b; b=b->next ) {
-<a name="l00983"></a>00983                     __TBB_ASSERT( &get_segment(my_hash_compare.hash( b->item.first ))==&d, <span class="stringliteral">"hash function changed?"</span> );
-<a name="l00984"></a>00984                     node* b_new = create_node(b->item.first, &b->item.second);
-<a name="l00985"></a>00985                     d_array[k].push_front(*b_new); <span class="comment">// hashcode is the same and segment and my_physical sizes are the same</span>
-<a name="l00986"></a>00986                 }
-<a name="l00987"></a>00987         }
-<a name="l00988"></a>00988     }
-<a name="l00989"></a>00989 }
-<a name="l00990"></a>00990 
-<a name="l00991"></a>00991 <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="l00992"></a>00992 <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00993"></a>00993 <span class="keywordtype">void</span> concurrent_hash_map<Key,T,HashCompare,A>::internal_copy(I first, I last) {
-<a name="l00994"></a>00994     <span class="keywordflow">for</span>(; first != last; ++first)
-<a name="l00995"></a>00995         <a class="code" href="a00103.html#2c10a645a8b40c6438c2bb119a61e93b">insert</a>( *first );
-<a name="l00996"></a>00996 }
-<a name="l00997"></a>00997 
-<a name="l00998"></a>00998 <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="l00999"></a>00999 <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="l01000"></a>01000     <span class="keywordflow">if</span>(a.size() != b.size()) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l01001"></a>01001     <span class="keyword">typename</span> concurrent_hash_map<Key, T, HashCompare, A1>::const_iterator i(a.begin()), i_end(a.end());
-<a name="l01002"></a>01002     <span class="keyword">typename</span> concurrent_hash_map<Key, T, HashCompare, A2>::const_iterator j, j_end(b.end());
-<a name="l01003"></a>01003     <span class="keywordflow">for</span>(; i != i_end; ++i) {
-<a name="l01004"></a>01004         j = b.equal_range(i->first).first;
-<a name="l01005"></a>01005         <span class="keywordflow">if</span>( j == j_end || !(i->second == j->second) ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l01006"></a>01006     }
-<a name="l01007"></a>01007     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l01008"></a>01008 }
-<a name="l01009"></a>01009 
-<a name="l01010"></a>01010 <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="l01011"></a>01011 <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="l01012"></a>01012 {    <span class="keywordflow">return</span> !(a == b); }
-<a name="l01013"></a>01013 
-<a name="l01014"></a>01014 <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="l01015"></a>01015 <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="l01016"></a>01016 {    a.swap( b ); }
-<a name="l01017"></a>01017 
-<a name="l01018"></a>01018 } <span class="comment">// namespace tbb</span>
-<a name="l01019"></a>01019 
-<a name="l01020"></a>01020 <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/a00167.html b/doc/html/a00206.html
similarity index 86%
copy from doc/html/a00167.html
copy to doc/html/a00206.html
index 90d96f0..4dbe3d0 100644
--- a/doc/html/a00167.html
+++ b/doc/html/a00206.html
@@ -21,38 +21,38 @@
   </ul></div>
 <h1>scalable_allocator.h File Reference</h1>
 <p>
-<a href="a00273.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00348.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="a00181.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="a00224.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="a00124.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="a00154.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="a00124.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="a00154.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="a00125.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="a00155.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="a00125.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="a00155.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="a00185.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#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="a00185.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#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="a00185.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#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="a00185.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="a00230.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="a00185.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="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">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00185.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#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="a00185.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#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="a00185.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="a00230.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</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/a00213.html b/doc/html/a00213.html
deleted file mode 100644
index 3477716..0000000
--- a/doc/html/a00213.html
+++ /dev/null
@@ -1,363 +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_queue.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_queue.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_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_queue_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 "cache_aligned_allocator.h"</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 
-<a name="l00029"></a>00029 <span class="keyword">namespace </span>tbb {
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A = cache_aligned_allocator<T> > 
-<a name="l00032"></a>00032 <span class="keyword">class </span>concurrent_queue;
-<a name="l00033"></a>00033 
-<a name="l00035"></a>00035 <span class="keyword">namespace </span>internal {
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037 <span class="keyword">class </span>concurrent_queue_rep;
-<a name="l00038"></a>00038 <span class="keyword">class </span>concurrent_queue_iterator_rep;
-<a name="l00039"></a>00039 <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
-<a name="l00040"></a>00040 <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="l00041"></a>00041 
-<a name="l00043"></a>00043 
-<a name="l00045"></a>00045 <span class="keyword">class </span>concurrent_queue_base_v3: no_copy {
-<a name="l00047"></a>00047     concurrent_queue_rep* my_rep;
-<a name="l00048"></a>00048 
-<a name="l00049"></a>00049     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_rep;
-<a name="l00050"></a>00050     <span class="keyword">friend</span> <span class="keyword">struct </span>micro_queue;
-<a name="l00051"></a>00051     <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue_pop_finalizer;
-<a name="l00052"></a>00052     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_rep;
-<a name="l00053"></a>00053     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
-<a name="l00054"></a>00054 <span class="keyword">protected</span>:
-<a name="l00056"></a>00056     <span class="keyword">struct </span>page {
-<a name="l00057"></a>00057         page* next;
-<a name="l00058"></a>00058         uintptr mask; 
-<a name="l00059"></a>00059     };
-<a name="l00060"></a>00060 
-<a name="l00062"></a>00062     ptrdiff_t my_capacity;
-<a name="l00063"></a>00063    
-<a name="l00065"></a>00065     size_t items_per_page;
-<a name="l00066"></a>00066 
-<a name="l00068"></a>00068     size_t item_size;
-<a name="l00069"></a>00069 
-<a name="l00070"></a>00070 <span class="keyword">private</span>:
-<a name="l00071"></a>00071     <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="l00072"></a>00072     <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="l00073"></a>00073 <span class="keyword">protected</span>:
-<a name="l00074"></a>00074     __TBB_EXPORTED_METHOD concurrent_queue_base_v3( size_t item_size );
-<a name="l00075"></a>00075     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD ~concurrent_queue_base_v3();
-<a name="l00076"></a>00076 
-<a name="l00078"></a>00078     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_push( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
-<a name="l00079"></a>00079 
-<a name="l00081"></a>00081     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_pop( <span class="keywordtype">void</span>* dst );
-<a name="l00082"></a>00082 
-<a name="l00084"></a>00084     <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="l00085"></a>00085 
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_pop_if_present( <span class="keywordtype">void</span>* dst );
-<a name="l00089"></a>00089 
-<a name="l00091"></a>00091     ptrdiff_t __TBB_EXPORTED_METHOD internal_size() <span class="keyword">const</span>;
-<a name="l00092"></a>00092 
-<a name="l00094"></a>00094     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_set_capacity( ptrdiff_t capacity, size_t element_size );
-<a name="l00095"></a>00095 
-<a name="l00097"></a>00097     <span class="keyword">virtual</span> page *allocate_page() = 0;
-<a name="l00098"></a>00098 
-<a name="l00100"></a>00100     <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( page *p ) = 0;
-<a name="l00101"></a>00101 
-<a name="l00103"></a>00103     <span class="comment">/* note that the name may be misleading, but it remains so due to a historical accident. */</span>
-<a name="l00104"></a>00104     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_finish_clear() ;
-<a name="l00105"></a>00105 
-<a name="l00107"></a>00107     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_throw_exception() <span class="keyword">const</span>;
-<a name="l00108"></a>00108 
-<a name="l00110"></a>00110     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD assign( <span class="keyword">const</span> concurrent_queue_base_v3& src ) ;
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112 <span class="keyword">private</span>:
-<a name="l00113"></a>00113     <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="l00114"></a>00114 };
-<a name="l00115"></a>00115 
-<a name="l00116"></a>00116 <span class="keyword">typedef</span> concurrent_queue_base_v3 concurrent_queue_base ;
-<a name="l00117"></a>00117 
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120 <span class="keyword">class </span>concurrent_queue_iterator_base_v3 {
-<a name="l00122"></a>00122 
-<a name="l00123"></a>00123     concurrent_queue_iterator_rep* my_rep;
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125     <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="l00126"></a>00126     <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="l00127"></a>00127 
-<a name="l00128"></a>00128     <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="l00129"></a>00129     <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="l00130"></a>00130 <span class="keyword">protected</span>:
-<a name="l00132"></a>00132     <span class="keyword">mutable</span> <span class="keywordtype">void</span>* my_item;
-<a name="l00133"></a>00133 
-<a name="l00135"></a>00135     concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
-<a name="l00136"></a>00136 
-<a name="l00138"></a>00138     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
-<a name="l00139"></a>00139         assign(i);
-<a name="l00140"></a>00140     }
-<a name="l00141"></a>00141 
-<a name="l00143"></a>00143     __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base& queue );
-<a name="l00144"></a>00144 
-<a name="l00146"></a>00146     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i );
-<a name="l00147"></a>00147 
-<a name="l00149"></a>00149     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD advance();
-<a name="l00150"></a>00150 
-<a name="l00152"></a>00152     __TBB_EXPORTED_METHOD ~concurrent_queue_iterator_base_v3();
-<a name="l00153"></a>00153 };
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155 <span class="keyword">typedef</span> concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base;
-<a name="l00156"></a>00156 
-<a name="l00158"></a>00158 
-<a name="l00160"></a>00160 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00161"></a>00161 <span class="keyword">class </span>concurrent_queue_iterator: <span class="keyword">public</span> concurrent_queue_iterator_base,
-<a name="l00162"></a>00162         <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value> {
-<a name="l00163"></a>00163 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
-<a name="l00164"></a>00164 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00165"></a>00165     <span class="keyword">friend</span> class ::tbb::concurrent_queue;
-<a name="l00166"></a>00166 <span class="preprocessor">#else</span>
-<a name="l00167"></a>00167 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
-<a name="l00168"></a>00168 <span class="preprocessor">#endif </span>
-<a name="l00170"></a>00170 <span class="preprocessor">    concurrent_queue_iterator( const concurrent_queue_base& queue ) :</span>
-<a name="l00171"></a>00171 <span class="preprocessor"></span>        concurrent_queue_iterator_base_v3(queue)
-<a name="l00172"></a>00172     {
-<a name="l00173"></a>00173     }
-<a name="l00174"></a>00174 <span class="keyword">public</span>:
-<a name="l00175"></a>00175     concurrent_queue_iterator() {}
-<a name="l00176"></a>00176 
-<a name="l00179"></a>00179     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,typename Container::value_type>& other ) :
-<a name="l00180"></a>00180         concurrent_queue_iterator_base_v3(other)
-<a name="l00181"></a>00181     {}
-<a name="l00182"></a>00182 
-<a name="l00184"></a>00184     concurrent_queue_iterator& operator=( <span class="keyword">const</span> concurrent_queue_iterator& other ) {
-<a name="l00185"></a>00185         assign(other);
-<a name="l00186"></a>00186         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00187"></a>00187     }
-<a name="l00188"></a>00188 
-<a name="l00190"></a>00190     Value& operator*()<span class="keyword"> const </span>{
-<a name="l00191"></a>00191         <span class="keywordflow">return</span> *static_cast<Value*>(my_item);
-<a name="l00192"></a>00192     }
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194     Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
-<a name="l00195"></a>00195 
-<a name="l00197"></a>00197     concurrent_queue_iterator& operator++() {
-<a name="l00198"></a>00198         advance();
-<a name="l00199"></a>00199         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00200"></a>00200     }
-<a name="l00201"></a>00201 
-<a name="l00203"></a>00203     Value* operator++(<span class="keywordtype">int</span>) {
-<a name="l00204"></a>00204         Value* result = &operator*();
-<a name="l00205"></a>00205         operator++();
-<a name="l00206"></a>00206         <span class="keywordflow">return</span> result;
-<a name="l00207"></a>00207     }
-<a name="l00208"></a>00208 }; <span class="comment">// concurrent_queue_iterator</span>
-<a name="l00209"></a>00209 
-<a name="l00210"></a>00210 
-<a name="l00211"></a>00211 <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="l00212"></a>00212 <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="l00213"></a>00213     <span class="keywordflow">return</span> i.my_item==j.my_item;
-<a name="l00214"></a>00214 }
-<a name="l00215"></a>00215 
-<a name="l00216"></a>00216 <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="l00217"></a>00217 <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="l00218"></a>00218     <span class="keywordflow">return</span> i.my_item!=j.my_item;
-<a name="l00219"></a>00219 }
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221 } <span class="comment">// namespace internal;</span>
-<a name="l00222"></a>00222 
-<a name="l00224"></a>00224 
-<a name="l00226"></a>00226 
-<a name="l00229"></a>00229 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00230"></a><a class="code" href="a00106.html">00230</a> <span class="keyword">class </span><a class="code" href="a00106.html">concurrent_queue</a>: <span class="keyword">public</span> internal::concurrent_queue_base_v3 {
-<a name="l00231"></a>00231     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value> <span class="keyword">friend</span> <span class="keyword">class </span>internal::concurrent_queue_iterator;
-<a name="l00232"></a>00232 
-<a name="l00234"></a>00234     <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template rebind<char>::other page_allocator_type;
-<a name="l00235"></a>00235     page_allocator_type my_allocator;
-<a name="l00236"></a>00236 
-<a name="l00238"></a>00238     <span class="keyword">class </span>destroyer: internal::no_copy {
-<a name="l00239"></a>00239         T& my_value;
-<a name="l00240"></a>00240     <span class="keyword">public</span>:
-<a name="l00241"></a>00241         destroyer( T& value ) : my_value(value) {}
-<a name="l00242"></a>00242         ~destroyer() {my_value.~T();}          
-<a name="l00243"></a>00243     };
-<a name="l00244"></a>00244 
-<a name="l00245"></a>00245     T& get_ref( page& page, size_t index ) {
-<a name="l00246"></a>00246         __TBB_ASSERT( index<items_per_page, NULL );
-<a name="l00247"></a>00247         <span class="keywordflow">return</span> static_cast<T*>(static_cast<void*>(&page+1))[index];
-<a name="l00248"></a>00248     }
-<a name="l00249"></a>00249 
-<a name="l00250"></a>00250     <span class="comment">/*override*/</span> <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 ) {
-<a name="l00251"></a>00251         <span class="keyword">new</span>( &get_ref(dst,index) ) T(*static_cast<const T*>(src)); 
-<a name="l00252"></a>00252     }
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254     <span class="comment">/*override*/</span> <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 ) {
-<a name="l00255"></a>00255         <span class="keyword">new</span>( &get_ref(dst,dindex) ) T( static_cast<const T*>(static_cast<const void*>(&src+1))[sindex] );
-<a name="l00256"></a>00256     }
-<a name="l00257"></a>00257 
-<a name="l00258"></a>00258     <span class="comment">/*override*/</span> <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 ) {
-<a name="l00259"></a>00259         T& from = get_ref(src,index);
-<a name="l00260"></a>00260         destroyer d(from);
-<a name="l00261"></a>00261         *static_cast<T*>(dst) = from;
-<a name="l00262"></a>00262     }
-<a name="l00263"></a>00263 
-<a name="l00264"></a>00264     <span class="comment">/*overide*/</span> <span class="keyword">virtual</span> page *allocate_page() {
-<a name="l00265"></a>00265         size_t n = <span class="keyword">sizeof</span>(page) + items_per_page*item_size;
-<a name="l00266"></a>00266         page *p = reinterpret_cast<page*>(my_allocator.allocate( n ));
-<a name="l00267"></a>00267         <span class="keywordflow">if</span>( !p ) internal_throw_exception(); 
-<a name="l00268"></a>00268         <span class="keywordflow">return</span> p;
-<a name="l00269"></a>00269     }
-<a name="l00270"></a>00270 
-<a name="l00271"></a>00271     <span class="comment">/*override*/</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( page *p ) {
-<a name="l00272"></a>00272         size_t n = <span class="keyword">sizeof</span>(page) + items_per_page*item_size;
-<a name="l00273"></a>00273         my_allocator.deallocate( reinterpret_cast<char*>(p), n );
-<a name="l00274"></a>00274     }
-<a name="l00275"></a>00275 
-<a name="l00276"></a>00276 <span class="keyword">public</span>:
-<a name="l00278"></a><a class="code" href="a00106.html#ec587adbe0da968d828c0178b2d863b0">00278</a>     <span class="keyword">typedef</span> T <a class="code" href="a00106.html#ec587adbe0da968d828c0178b2d863b0">value_type</a>;
-<a name="l00279"></a>00279 
-<a name="l00281"></a><a class="code" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">00281</a>     <span class="keyword">typedef</span> A <a class="code" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a>;
-<a name="l00282"></a>00282 
-<a name="l00284"></a><a class="code" href="a00106.html#ea0fab9094080138fef0802125160739">00284</a>     <span class="keyword">typedef</span> T& <a class="code" href="a00106.html#ea0fab9094080138fef0802125160739">reference</a>;
-<a name="l00285"></a>00285 
-<a name="l00287"></a><a class="code" href="a00106.html#981c7c13a4aef3d03f35797ebe214d59">00287</a>     <span class="keyword">typedef</span> <span class="keyword">const</span> T& <a class="code" href="a00106.html#981c7c13a4aef3d03f35797ebe214d59">const_reference</a>;
-<a name="l00288"></a>00288 
-<a name="l00290"></a>00290 
-<a name="l00292"></a><a class="code" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">00292</a>     <span class="keyword">typedef</span> std::ptrdiff_t <a class="code" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a>;
-<a name="l00293"></a>00293 
-<a name="l00295"></a><a class="code" href="a00106.html#3c0b5f19b820719ab4f69eeb9bf75afc">00295</a>     <span class="keyword">typedef</span> std::ptrdiff_t <a class="code" href="a00106.html#3c0b5f19b820719ab4f69eeb9bf75afc">difference_type</a>;
-<a name="l00296"></a>00296 
-<a name="l00298"></a><a class="code" href="a00106.html#6a4f9b451ceb08ae82709eef4c8a1a6b">00298</a>     <span class="keyword">explicit</span> <a class="code" href="a00106.html#6a4f9b451ceb08ae82709eef4c8a1a6b">concurrent_queue</a>(<span class="keyword">const</span> <a class="code" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a>  &a = <a class="code" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a>()) : 
-<a name="l00299"></a>00299         concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
-<a name="l00300"></a>00300     {
-<a name="l00301"></a>00301     }
-<a name="l00302"></a>00302 
-<a name="l00304"></a>00304     <a class="code" href="a00106.html#43480ba7f4ba2401d1213ee23248e4cd">~concurrent_queue</a>();
-<a name="l00305"></a>00305 
-<a name="l00307"></a><a class="code" href="a00106.html#28259b68d5ba6cc77abf72b8d7d22e69">00307</a>     <span class="keywordtype">void</span> <a class="code" href="a00106.html#28259b68d5ba6cc77abf72b8d7d22e69">push</a>( <span class="keyword">const</span> T& source ) {
-<a name="l00308"></a>00308         internal_push( &source );
-<a name="l00309"></a>00309     }
-<a name="l00310"></a>00310 
-<a name="l00312"></a>00312 
-<a name="l00313"></a><a class="code" href="a00106.html#170ab4b57a20f0ff00fb8642d4f55e5c">00313</a>     <span class="keywordtype">void</span> <a class="code" href="a00106.html#170ab4b57a20f0ff00fb8642d4f55e5c">pop</a>( T& destination ) {
-<a name="l00314"></a>00314         internal_pop( &destination );
-<a name="l00315"></a>00315     }
-<a name="l00316"></a>00316 
-<a name="l00318"></a>00318 
-<a name="l00320"></a><a class="code" href="a00106.html#0a91166177c0ceb5a1ddd22827509345">00320</a>     <span class="keywordtype">bool</span> <a class="code" href="a00106.html#0a91166177c0ceb5a1ddd22827509345">push_if_not_full</a>( <span class="keyword">const</span> T& source ) {
-<a name="l00321"></a>00321         <span class="keywordflow">return</span> internal_push_if_not_full( &source );
-<a name="l00322"></a>00322     }
-<a name="l00323"></a>00323 
-<a name="l00325"></a>00325 
-<a name="l00327"></a><a class="code" href="a00106.html#7088b06d6c226c44a07a310c12176a0c">00327</a>     <span class="keywordtype">bool</span> <a class="code" href="a00106.html#7088b06d6c226c44a07a310c12176a0c">pop_if_present</a>( T& destination ) {
-<a name="l00328"></a>00328         <span class="keywordflow">return</span> internal_pop_if_present( &destination );
-<a name="l00329"></a>00329     }
-<a name="l00330"></a>00330 
-<a name="l00332"></a>00332 
-<a name="l00335"></a><a class="code" href="a00106.html#94499bca8d540a1927f9368b386dabea">00335</a>     <a class="code" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a> <a class="code" href="a00106.html#94499bca8d540a1927f9368b386dabea">size</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> internal_size();}
-<a name="l00336"></a>00336 
-<a name="l00338"></a><a class="code" href="a00106.html#313c369998b69de6e039b9afb9ca3237">00338</a>     <span class="keywordtype">bool</span> <a class="code" href="a00106.html#313c369998b69de6e039b9afb9ca3237">empty</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00106.html#94499bca8d540a1927f9368b386dabea">size</a>()<=0;}
-<a name="l00339"></a>00339 
-<a name="l00341"></a><a class="code" href="a00106.html#95796a6ad29ea6fe102ac1663a776d07">00341</a>     <a class="code" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a> <a class="code" href="a00106.html#95796a6ad29ea6fe102ac1663a776d07">capacity</a>()<span class="keyword"> const </span>{
-<a name="l00342"></a>00342         <span class="keywordflow">return</span> my_capacity;
-<a name="l00343"></a>00343     }
-<a name="l00344"></a>00344 
-<a name="l00346"></a>00346 
-<a name="l00348"></a><a class="code" href="a00106.html#92977e1eb9af259f3aef69f0181476c1">00348</a>     <span class="keywordtype">void</span> <a class="code" href="a00106.html#92977e1eb9af259f3aef69f0181476c1">set_capacity</a>( <a class="code" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">size_type</a> <a class="code" href="a00106.html#95796a6ad29ea6fe102ac1663a776d07">capacity</a> ) {
-<a name="l00349"></a>00349         internal_set_capacity( capacity, <span class="keyword">sizeof</span>(T) );
-<a name="l00350"></a>00350     }
-<a name="l00351"></a>00351 
-<a name="l00353"></a><a class="code" href="a00106.html#11a088eee45cc1cb0c0b32adadbff92e">00353</a>     <a class="code" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a> <a class="code" href="a00106.html#11a088eee45cc1cb0c0b32adadbff92e">get_allocator</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
-<a name="l00354"></a>00354 
-<a name="l00356"></a>00356     <span class="keywordtype">void</span> <a class="code" href="a00106.html#8a6a8a7a8d977d86ae8bd254b9794af1">clear</a>() ;
-<a name="l00357"></a>00357 
-<a name="l00358"></a>00358     <span class="keyword">typedef</span> internal::concurrent_queue_iterator<concurrent_queue,T> iterator;
-<a name="l00359"></a>00359     <span class="keyword">typedef</span> internal::concurrent_queue_iterator<concurrent_queue,const T> const_iterator;
-<a name="l00360"></a>00360 
-<a name="l00361"></a>00361     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00362"></a>00362     <span class="comment">// The iterators are intended only for debugging.  They are slow and not thread safe.</span>
-<a name="l00363"></a>00363     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00364"></a>00364     iterator begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>);}
-<a name="l00365"></a>00365     iterator end() {<span class="keywordflow">return</span> iterator();}
-<a name="l00366"></a>00366     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>);}
-<a name="l00367"></a>00367     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator();}
-<a name="l00368"></a>00368     
-<a name="l00370"></a><a class="code" href="a00106.html#a919fd9a3d593dc4c8205a4636a8062e">00370</a>     <a class="code" href="a00106.html#6a4f9b451ceb08ae82709eef4c8a1a6b">concurrent_queue</a>( <span class="keyword">const</span> <a class="code" href="a00106.html">concurrent_queue</a>& src, <span class="keyword">const</span> <a class="code" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a> &a = <a class="code" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d" [...]
-<a name="l00371"></a>00371         concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
-<a name="l00372"></a>00372     {
-<a name="l00373"></a>00373         assign( src );
-<a name="l00374"></a>00374     }
-<a name="l00375"></a>00375 
-<a name="l00377"></a>00377     <span class="keyword">template</span><<span class="keyword">typename</span> InputIterator>
-<a name="l00378"></a><a class="code" href="a00106.html#d3ec1af9c793007ec2ecbdcf637f8ec5">00378</a>     <a class="code" href="a00106.html#6a4f9b451ceb08ae82709eef4c8a1a6b">concurrent_queue</a>( InputIterator begin, InputIterator end, <span class="keyword">const</span> <a class="code" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a> &a = <a class="code" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">allocator_type</a>()) :
-<a name="l00379"></a>00379         concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
-<a name="l00380"></a>00380     {
-<a name="l00381"></a>00381         <span class="keywordflow">for</span>( ; begin != end; ++begin )
-<a name="l00382"></a>00382             internal_push_if_not_full(&*begin);
-<a name="l00383"></a>00383     }
-<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> T, <span class="keyword">class</span> A>
-<a name="l00387"></a><a class="code" href="a00106.html#43480ba7f4ba2401d1213ee23248e4cd">00387</a> <a class="code" href="a00106.html">concurrent_queue<T,A>::~concurrent_queue</a>() {
-<a name="l00388"></a>00388     <a class="code" href="a00106.html#8a6a8a7a8d977d86ae8bd254b9794af1">clear</a>();
-<a name="l00389"></a>00389     internal_finish_clear();
-<a name="l00390"></a>00390 }
-<a name="l00391"></a>00391 
-<a name="l00392"></a>00392 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00393"></a><a class="code" href="a00106.html#8a6a8a7a8d977d86ae8bd254b9794af1">00393</a> <span class="keywordtype">void</span> <a class="code" href="a00106.html">concurrent_queue<T,A>::clear</a>() {
-<a name="l00394"></a>00394     <span class="keywordflow">while</span>( !<a class="code" href="a00106.html#313c369998b69de6e039b9afb9ca3237">empty</a>() ) {
-<a name="l00395"></a>00395         T value;
-<a name="l00396"></a>00396         internal_pop_if_present(&value);
-<a name="l00397"></a>00397     }
-<a name="l00398"></a>00398 }
-<a name="l00399"></a>00399 
-<a name="l00400"></a>00400 } <span class="comment">// namespace tbb</span>
-<a name="l00401"></a>00401 
-<a name="l00402"></a>00402 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_queue_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/a00219.html b/doc/html/a00219.html
deleted file mode 100644
index a36c4d3..0000000
--- a/doc/html/a00219.html
+++ /dev/null
@@ -1,829 +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 <memory></span>
-<a name="l00028"></a>00028 <span class="preprocessor">#include <limits></span>
-<a name="l00029"></a>00029 <span class="preprocessor">#include <new></span>
-<a name="l00030"></a>00030 <span class="preprocessor">#include <cstring></span>
-<a name="l00031"></a>00031 <span class="preprocessor">#include "atomic.h"</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
-<a name="l00033"></a>00033 <span class="preprocessor">#include "blocked_range.h"</span>
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035 <span class="preprocessor">#include "tbb_machine.h"</span>
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_Wp64)</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warnings in /Wp64 mode</span>
-<a name="l00039"></a>00039 <span class="preprocessor">    #pragma warning (push)</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4267)</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span>
-<a name="l00043"></a>00043 <span class="keyword">namespace </span>tbb {
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A = cache_aligned_allocator<T> >
-<a name="l00046"></a>00046 <span class="keyword">class </span>concurrent_vector;
-<a name="l00047"></a>00047 
-<a name="l00049"></a>00049 <span class="preprocessor">#define __TBB_BAD_ALLOC reinterpret_cast<void*>(size_t(63))</span>
-<a name="l00050"></a>00050 <span class="preprocessor"></span>
-<a name="l00052"></a>00052 <span class="keyword">namespace </span>internal {
-<a name="l00053"></a>00053 
-<a name="l00055"></a>00055     <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="l00056"></a>00056 
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059     <span class="keyword">class </span>concurrent_vector_base_v3 {
-<a name="l00060"></a>00060     <span class="keyword">protected</span>:
-<a name="l00061"></a>00061 
-<a name="l00062"></a>00062         <span class="comment">// Basic types declarations</span>
-<a name="l00063"></a>00063         <span class="keyword">typedef</span> size_t segment_index_t;
-<a name="l00064"></a>00064         <span class="keyword">typedef</span> size_t size_type;
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066         <span class="comment">// Using enumerations due to Mac linking problems of static const variables</span>
-<a name="l00067"></a>00067         <span class="keyword">enum</span> {
-<a name="l00068"></a>00068             <span class="comment">// Size constants</span>
-<a name="l00069"></a>00069             default_initial_segments = 1, <span class="comment">// 2 initial items</span>
-<a name="l00071"></a>00071 <span class="comment"></span>            pointers_per_short_table = 3, <span class="comment">// to fit into 8 words of entire structure</span>
-<a name="l00072"></a>00072             pointers_per_long_table = <span class="keyword">sizeof</span>(segment_index_t) * 8 <span class="comment">// one segment per bit</span>
-<a name="l00073"></a>00073         };
-<a name="l00074"></a>00074 
-<a name="l00075"></a>00075         <span class="comment">// Segment pointer. Can be zero-initialized</span>
-<a name="l00076"></a>00076         <span class="keyword">struct </span>segment_t {
-<a name="l00077"></a>00077             <span class="keywordtype">void</span>* array;
-<a name="l00078"></a>00078 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span>            ~segment_t() {
-<a name="l00080"></a>00080                 __TBB_ASSERT( array <= __TBB_BAD_ALLOC, <span class="stringliteral">"should have been freed by clear"</span> );
-<a name="l00081"></a>00081             }
-<a name="l00082"></a>00082 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00083"></a>00083         };
-<a name="l00084"></a>00084  
-<a name="l00085"></a>00085         <span class="comment">// Data fields</span>
-<a name="l00086"></a>00086 
-<a name="l00088"></a>00088         <span class="keywordtype">void</span>* (*vector_allocator_ptr)(concurrent_vector_base_v3 &, size_t);
-<a name="l00089"></a>00089 
-<a name="l00091"></a>00091         atomic<size_type> my_first_block;
-<a name="l00092"></a>00092 
-<a name="l00094"></a>00094         atomic<size_type> my_early_size;
-<a name="l00095"></a>00095 
-<a name="l00097"></a>00097         atomic<segment_t*> my_segment;
-<a name="l00098"></a>00098 
-<a name="l00100"></a>00100         segment_t my_storage[pointers_per_short_table];
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102         <span class="comment">// Methods</span>
-<a name="l00103"></a>00103 
-<a name="l00104"></a>00104         concurrent_vector_base_v3() {
-<a name="l00105"></a>00105             my_early_size = 0;
-<a name="l00106"></a>00106             my_first_block = 0; <span class="comment">// here is not default_initial_segments</span>
-<a name="l00107"></a>00107             <span class="keywordflow">for</span>( segment_index_t i = 0; i < pointers_per_short_table; i++)
-<a name="l00108"></a>00108                 my_storage[i].array = NULL;
-<a name="l00109"></a>00109             my_segment = my_storage;
-<a name="l00110"></a>00110         }
-<a name="l00111"></a>00111         __TBB_EXPORTED_METHOD ~concurrent_vector_base_v3();
-<a name="l00112"></a>00112 
-<a name="l00113"></a>00113         <span class="keyword">static</span> segment_index_t segment_index_of( size_type index ) {
-<a name="l00114"></a>00114             <span class="keywordflow">return</span> segment_index_t( __TBB_Log2( index|1 ) );
-<a name="l00115"></a>00115         }
-<a name="l00116"></a>00116 
-<a name="l00117"></a>00117         <span class="keyword">static</span> segment_index_t segment_base( segment_index_t k ) {
-<a name="l00118"></a>00118             <span class="keywordflow">return</span> (segment_index_t(1)<<k & ~segment_index_t(1));
-<a name="l00119"></a>00119         }
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121         <span class="keyword">static</span> <span class="keyword">inline</span> segment_index_t segment_base_index_of( segment_index_t &index ) {
-<a name="l00122"></a>00122             segment_index_t k = segment_index_of( index );
-<a name="l00123"></a>00123             index -= segment_base(k);
-<a name="l00124"></a>00124             <span class="keywordflow">return</span> k;
-<a name="l00125"></a>00125         }
-<a name="l00126"></a>00126 
-<a name="l00127"></a>00127         <span class="keyword">static</span> size_type segment_size( segment_index_t k ) {
-<a name="l00128"></a>00128             <span class="keywordflow">return</span> segment_index_t(1)<<k; <span class="comment">// fake value for k==0</span>
-<a name="l00129"></a>00129         }
-<a name="l00130"></a>00130 
-<a name="l00132"></a>00132         <span class="keyword">typedef</span> void (__TBB_EXPORTED_FUNC *internal_array_op1)(<span class="keywordtype">void</span>* begin, size_type n );
-<a name="l00133"></a>00133 
-<a name="l00135"></a>00135         <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="l00136"></a>00136 
-<a name="l00138"></a>00138         <span class="keyword">struct </span>internal_segments_table {
-<a name="l00139"></a>00139             segment_index_t first_block;
-<a name="l00140"></a>00140             <span class="keywordtype">void</span>* table[pointers_per_long_table];
-<a name="l00141"></a>00141         };
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_reserve( size_type n, size_type element_size, size_type max_size );
-<a name="l00144"></a>00144         size_type __TBB_EXPORTED_METHOD internal_capacity() <span class="keyword">const</span>;
-<a name="l00145"></a>00145         <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="l00146"></a>00146         <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="l00147"></a>00147         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="l00148"></a>00148         <span class="keywordtype">void</span>* __TBB_EXPORTED_METHOD internal_push_back( size_type element_size, size_type& index );
-<a name="l00149"></a>00149         segment_index_t __TBB_EXPORTED_METHOD internal_clear( internal_array_op1 destroy );
-<a name="l00150"></a>00150         <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="l00151"></a>00151         <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="l00152"></a>00152         <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="l00153"></a>00153                               internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy );
-<a name="l00154"></a>00154         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_throw_exception(size_type) <span class="keyword">const</span>;
-<a name="l00155"></a>00155         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_swap(concurrent_vector_base_v3& v);
-<a name="l00156"></a>00156 
-<a name="l00157"></a>00157 <span class="keyword">private</span>:
-<a name="l00159"></a>00159         <span class="keyword">class </span>helper;
-<a name="l00160"></a>00160         <span class="keyword">friend</span> <span class="keyword">class </span>helper;
-<a name="l00161"></a>00161     };
-<a name="l00162"></a>00162     
-<a name="l00163"></a>00163     <span class="keyword">typedef</span> concurrent_vector_base_v3 concurrent_vector_base;
-<a name="l00164"></a>00164 
-<a name="l00166"></a>00166 
-<a name="l00168"></a>00168     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00169"></a>00169     <span class="keyword">class </span>vector_iterator 
-<a name="l00170"></a>00170     {
-<a name="l00172"></a>00172         Container* my_vector;
-<a name="l00173"></a>00173 
-<a name="l00175"></a>00175         size_t my_index;
-<a name="l00176"></a>00176 
-<a name="l00178"></a>00178 
-<a name="l00179"></a>00179         <span class="keyword">mutable</span> Value* my_item;
-<a name="l00180"></a>00180 
-<a name="l00181"></a>00181         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T>
-<a name="l00182"></a>00182         <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="l00183"></a>00183 
-<a name="l00184"></a>00184         <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="l00185"></a>00185         <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="l00186"></a>00186 
-<a name="l00187"></a>00187         <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="l00188"></a>00188         <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="l00189"></a>00189 
-<a name="l00190"></a>00190         <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="l00191"></a>00191         <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="l00192"></a>00192     
-<a name="l00193"></a>00193         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
-<a name="l00194"></a>00194         <span class="keyword">friend</span> <span class="keyword">class </span>internal::vector_iterator;
-<a name="l00195"></a>00195 
-<a name="l00196"></a>00196 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
-<a name="l00197"></a>00197 <span class="preprocessor"></span>        <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00198"></a>00198         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00107.html">tbb::concurrent_vector</a>;
-<a name="l00199"></a>00199 <span class="preprocessor">#else</span>
-<a name="l00200"></a>00200 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
-<a name="l00201"></a>00201 <span class="preprocessor">#endif </span>
-<a name="l00202"></a>00202 <span class="preprocessor"></span>
-<a name="l00203"></a>00203         vector_iterator( <span class="keyword">const</span> Container& vector, size_t index ) : 
-<a name="l00204"></a>00204             my_vector(const_cast<Container*>(&vector)), 
-<a name="l00205"></a>00205             my_index(index), 
-<a name="l00206"></a>00206             my_item(NULL)
-<a name="l00207"></a>00207         {}
-<a name="l00208"></a>00208 
-<a name="l00209"></a>00209     <span class="keyword">public</span>:
-<a name="l00211"></a>00211         vector_iterator() : my_vector(NULL), my_index(~size_t(0)), my_item(NULL) {}
-<a name="l00212"></a>00212 
-<a name="l00213"></a>00213         vector_iterator( <span class="keyword">const</span> vector_iterator<Container,typename Container::value_type>& other ) :
-<a name="l00214"></a>00214             my_vector(other.my_vector),
-<a name="l00215"></a>00215             my_index(other.my_index),
-<a name="l00216"></a>00216             my_item(other.my_item)
-<a name="l00217"></a>00217         {}
-<a name="l00218"></a>00218 
-<a name="l00219"></a>00219         vector_iterator operator+( ptrdiff_t offset )<span class="keyword"> const </span>{
-<a name="l00220"></a>00220             <span class="keywordflow">return</span> vector_iterator( *my_vector, my_index+offset );
-<a name="l00221"></a>00221         }
-<a name="l00222"></a>00222         vector_iterator &operator+=( ptrdiff_t offset ) {
-<a name="l00223"></a>00223             my_index+=offset;
-<a name="l00224"></a>00224             my_item = NULL;
-<a name="l00225"></a>00225             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00226"></a>00226         }
-<a name="l00227"></a>00227         vector_iterator operator-( ptrdiff_t offset )<span class="keyword"> const </span>{
-<a name="l00228"></a>00228             <span class="keywordflow">return</span> vector_iterator( *my_vector, my_index-offset );
-<a name="l00229"></a>00229         }
-<a name="l00230"></a>00230         vector_iterator &operator-=( ptrdiff_t offset ) {
-<a name="l00231"></a>00231             my_index-=offset;
-<a name="l00232"></a>00232             my_item = NULL;
-<a name="l00233"></a>00233             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00234"></a>00234         }
-<a name="l00235"></a>00235         Value& operator*()<span class="keyword"> const </span>{
-<a name="l00236"></a>00236             Value* item = my_item;
-<a name="l00237"></a>00237             <span class="keywordflow">if</span>( !item ) {
-<a name="l00238"></a>00238                 item = my_item = &my_vector->internal_subscript(my_index);
-<a name="l00239"></a>00239             }
-<a name="l00240"></a>00240             __TBB_ASSERT( item==&my_vector->internal_subscript(my_index), <span class="stringliteral">"corrupt cache"</span> );
-<a name="l00241"></a>00241             <span class="keywordflow">return</span> *item;
-<a name="l00242"></a>00242         }
-<a name="l00243"></a>00243         Value& <a class="code" href="a00107.html#4c52f2950bb1832886bd4458eb09d7eb">operator[]</a>( ptrdiff_t k )<span class="keyword"> const </span>{
-<a name="l00244"></a>00244             <span class="keywordflow">return</span> my_vector->internal_subscript(my_index+k);
-<a name="l00245"></a>00245         }
-<a name="l00246"></a>00246         Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
-<a name="l00247"></a>00247 
-<a name="l00249"></a>00249         vector_iterator& operator++() {
-<a name="l00250"></a>00250             size_t k = ++my_index;
-<a name="l00251"></a>00251             <span class="keywordflow">if</span>( my_item ) {
-<a name="l00252"></a>00252                 <span class="comment">// Following test uses 2's-complement wizardry</span>
-<a name="l00253"></a>00253                 <span class="keywordflow">if</span>( (k& (k-2))==0 ) {
-<a name="l00254"></a>00254                     <span class="comment">// k is a power of two that is at least k-2</span>
-<a name="l00255"></a>00255                     my_item= NULL;
-<a name="l00256"></a>00256                 } <span class="keywordflow">else</span> {
-<a name="l00257"></a>00257                     ++my_item;
-<a name="l00258"></a>00258                 }
-<a name="l00259"></a>00259             }
-<a name="l00260"></a>00260             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00261"></a>00261         }
-<a name="l00262"></a>00262 
-<a name="l00264"></a>00264         vector_iterator& operator--() {
-<a name="l00265"></a>00265             __TBB_ASSERT( my_index>0, <span class="stringliteral">"operator--() applied to iterator already at beginning of concurrent_vector"</span> ); 
-<a name="l00266"></a>00266             size_t k = my_index--;
-<a name="l00267"></a>00267             <span class="keywordflow">if</span>( my_item ) {
-<a name="l00268"></a>00268                 <span class="comment">// Following test uses 2's-complement wizardry</span>
-<a name="l00269"></a>00269                 <span class="keywordflow">if</span>( (k& (k-2))==0 ) {
-<a name="l00270"></a>00270                     <span class="comment">// k is a power of two that is at least k-2  </span>
-<a name="l00271"></a>00271                     my_item= NULL;
-<a name="l00272"></a>00272                 } <span class="keywordflow">else</span> {
-<a name="l00273"></a>00273                     --my_item;
-<a name="l00274"></a>00274                 }
-<a name="l00275"></a>00275             }
-<a name="l00276"></a>00276             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00277"></a>00277         }
-<a name="l00278"></a>00278 
-<a name="l00280"></a>00280         vector_iterator operator++(<span class="keywordtype">int</span>) {
-<a name="l00281"></a>00281             vector_iterator result = *<span class="keyword">this</span>;
-<a name="l00282"></a>00282             operator++();
-<a name="l00283"></a>00283             <span class="keywordflow">return</span> result;
-<a name="l00284"></a>00284         }
-<a name="l00285"></a>00285 
-<a name="l00287"></a>00287         vector_iterator operator--(<span class="keywordtype">int</span>) {
-<a name="l00288"></a>00288             vector_iterator result = *<span class="keyword">this</span>;
-<a name="l00289"></a>00289             operator--();
-<a name="l00290"></a>00290             <span class="keywordflow">return</span> result;
-<a name="l00291"></a>00291         }
-<a name="l00292"></a>00292 
-<a name="l00293"></a>00293         <span class="comment">// STL support</span>
-<a name="l00294"></a>00294 
-<a name="l00295"></a>00295         <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00296"></a>00296         <span class="keyword">typedef</span> Value value_type;
-<a name="l00297"></a>00297         <span class="keyword">typedef</span> Value* pointer;
-<a name="l00298"></a>00298         <span class="keyword">typedef</span> Value& reference;
-<a name="l00299"></a>00299         <span class="keyword">typedef</span> std::random_access_iterator_tag iterator_category;
-<a name="l00300"></a>00300     };
-<a name="l00301"></a>00301 
-<a name="l00302"></a>00302     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T>
-<a name="l00303"></a>00303     vector_iterator<Container,T> operator+( ptrdiff_t offset, <span class="keyword">const</span> vector_iterator<Container,T>& v ) {
-<a name="l00304"></a>00304         <span class="keywordflow">return</span> vector_iterator<Container,T>( *v.my_vector, v.my_index+offset );
-<a name="l00305"></a>00305     }
-<a name="l00306"></a>00306 
-<a name="l00307"></a>00307     <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="l00308"></a>00308     <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="l00309"></a>00309         <span class="keywordflow">return</span> i.my_index==j.my_index && i.my_vector == j.my_vector;
-<a name="l00310"></a>00310     }
-<a name="l00311"></a>00311 
-<a name="l00312"></a>00312     <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="l00313"></a>00313     <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="l00314"></a>00314         <span class="keywordflow">return</span> !(i==j);
-<a name="l00315"></a>00315     }
-<a name="l00316"></a>00316 
-<a name="l00317"></a>00317     <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="l00318"></a>00318     <span class="keywordtype">bool</span> operator<( const vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
-<a name="l00319"></a>00319         <span class="keywordflow">return</span> i.my_index<j.my_index;
-<a name="l00320"></a>00320     }
-<a name="l00321"></a>00321 
-<a name="l00322"></a>00322     <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="l00323"></a>00323     <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="l00324"></a>00324         <span class="keywordflow">return</span> j<i;
-<a name="l00325"></a>00325     }
-<a name="l00326"></a>00326 
-<a name="l00327"></a>00327     <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="l00328"></a>00328     <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="l00329"></a>00329         <span class="keywordflow">return</span> !(i<j);
-<a name="l00330"></a>00330     }
-<a name="l00331"></a>00331 
-<a name="l00332"></a>00332     <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="l00333"></a>00333     <span class="keywordtype">bool</span> operator<=( const vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
-<a name="l00334"></a>00334         <span class="keywordflow">return</span> !(j<i);
-<a name="l00335"></a>00335     }
-<a name="l00336"></a>00336 
-<a name="l00337"></a>00337     <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="l00338"></a>00338     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="l00339"></a>00339         <span class="keywordflow">return</span> ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index);
-<a name="l00340"></a>00340     }
-<a name="l00341"></a>00341 
-<a name="l00342"></a>00342     <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00343"></a>00343     <span class="keyword">class </span>allocator_base {
-<a name="l00344"></a>00344     <span class="keyword">public</span>:
-<a name="l00345"></a>00345         <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template
-<a name="l00346"></a>00346             rebind<T>::other allocator_type;
-<a name="l00347"></a>00347         allocator_type my_allocator;
-<a name="l00348"></a>00348 
-<a name="l00349"></a>00349         allocator_base(<span class="keyword">const</span> allocator_type &a = allocator_type() ) : my_allocator(a) {}
-<a name="l00350"></a>00350     };
-<a name="l00351"></a>00351 
-<a name="l00352"></a>00352 } <span class="comment">// namespace internal</span>
-<a name="l00354"></a>00354 <span class="comment"></span>
-<a name="l00356"></a>00356 
-<a name="l00410"></a>00410 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00411"></a><a class="code" href="a00107.html">00411</a> <span class="keyword">class </span><a class="code" href="a00107.html">concurrent_vector</a>: <span class="keyword">protected</span> internal::allocator_base<T, A>,
-<a name="l00412"></a>00412                          <span class="keyword">private</span> internal::concurrent_vector_base_v3 {
-<a name="l00413"></a>00413 <span class="keyword">private</span>:
-<a name="l00414"></a>00414     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00415"></a>00415     <span class="keyword">class </span>generic_range_type: <span class="keyword">public</span> <a class="code" href="a00097.html">blocked_range</a><I> {
-<a name="l00416"></a>00416     <span class="keyword">public</span>:
-<a name="l00417"></a>00417         <span class="keyword">typedef</span> T value_type;
-<a name="l00418"></a>00418         <span class="keyword">typedef</span> T& reference;
-<a name="l00419"></a>00419         <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
-<a name="l00420"></a>00420         <span class="keyword">typedef</span> I iterator;
-<a name="l00421"></a>00421         <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00422"></a>00422         generic_range_type( I begin_, I end_, size_t grainsize = 1) : <a class="code" href="a00097.html">blocked_range<I></a>(begin_,end_,grainsize) {} 
-<a name="l00423"></a>00423         template<typename U>
-<a name="l00424"></a>00424         generic_range_type( <span class="keyword">const</span> generic_range_type<U>& r) : <a class="code" href="a00097.html">blocked_range<I></a>(r.begin(),r.end(),r.grainsize()) {} 
-<a name="l00425"></a>00425         generic_range_type( generic_range_type& r, <a class="code" href="a00131.html">split</a> ) : <a class="code" href="a00097.html">blocked_range<I></a>(r,<a class="code" href="a00131.html">split</a>()) {}
-<a name="l00426"></a>00426     };
-<a name="l00427"></a>00427 
-<a name="l00428"></a>00428     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
-<a name="l00429"></a>00429     <span class="keyword">friend</span> <span class="keyword">class </span>internal::vector_iterator;
-<a name="l00430"></a>00430 <span class="keyword">public</span>:
-<a name="l00431"></a>00431     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00432"></a>00432     <span class="comment">// STL compatible types</span>
-<a name="l00433"></a>00433     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00434"></a>00434     <span class="keyword">typedef</span> internal::concurrent_vector_base_v3::size_type size_type;
-<a name="l00435"></a>00435     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_base<T, A>::allocator_type allocator_type;
-<a name="l00436"></a>00436 
-<a name="l00437"></a>00437     <span class="keyword">typedef</span> T value_type;
-<a name="l00438"></a>00438     <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00439"></a>00439     <span class="keyword">typedef</span> T& reference;
-<a name="l00440"></a>00440     <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
-<a name="l00441"></a>00441     <span class="keyword">typedef</span> T *pointer;
-<a name="l00442"></a>00442     <span class="keyword">typedef</span> <span class="keyword">const</span> T *const_pointer;
-<a name="l00443"></a>00443 
-<a name="l00444"></a>00444     <span class="keyword">typedef</span> internal::vector_iterator<concurrent_vector,T> iterator;
-<a name="l00445"></a>00445     <span class="keyword">typedef</span> internal::vector_iterator<concurrent_vector,const T> const_iterator;
-<a name="l00446"></a>00446 
-<a name="l00447"></a>00447 <span class="preprocessor">#if !defined(_MSC_VER) || _CPPLIB_VER>=300 </span>
-<a name="l00448"></a>00448 <span class="preprocessor"></span>    <span class="comment">// Assume ISO standard definition of std::reverse_iterator</span>
-<a name="l00449"></a>00449     <span class="keyword">typedef</span> std::reverse_iterator<iterator> reverse_iterator;
-<a name="l00450"></a>00450     <span class="keyword">typedef</span> std::reverse_iterator<const_iterator> const_reverse_iterator;
-<a name="l00451"></a>00451 <span class="preprocessor">#else</span>
-<a name="l00452"></a>00452 <span class="preprocessor"></span>    <span class="comment">// Use non-standard std::reverse_iterator</span>
-<a name="l00453"></a>00453     <span class="keyword">typedef</span> std::reverse_iterator<iterator,T,T&,T*> reverse_iterator;
-<a name="l00454"></a>00454     <span class="keyword">typedef</span> std::reverse_iterator<const_iterator,T,const T&,const T*> const_reverse_iterator;
-<a name="l00455"></a>00455 <span class="preprocessor">#endif </span><span class="comment">/* defined(_MSC_VER) && (_MSC_VER<1300) */</span>
-<a name="l00456"></a>00456 
-<a name="l00457"></a>00457     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00458"></a>00458     <span class="comment">// Parallel algorithm support</span>
-<a name="l00459"></a>00459     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00460"></a>00460     <span class="keyword">typedef</span> generic_range_type<iterator> range_type;
-<a name="l00461"></a>00461     <span class="keyword">typedef</span> generic_range_type<const_iterator> const_range_type;
-<a name="l00462"></a>00462 
-<a name="l00463"></a>00463     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00464"></a>00464     <span class="comment">// STL compatible constructors & destructors</span>
-<a name="l00465"></a>00465     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00466"></a>00466 
-<a name="l00468"></a><a class="code" href="a00107.html#2c8ca9cabfcd30ad5943324c853664b5">00468</a>     <span class="keyword">explicit</span> <a class="code" href="a00107.html">concurrent_vector</a>(<span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00469"></a>00469         : internal::allocator_base<T, A>(a)
-<a name="l00470"></a>00470     {
-<a name="l00471"></a>00471         vector_allocator_ptr = &internal_allocator;
-<a name="l00472"></a>00472     }
-<a name="l00473"></a>00473 
-<a name="l00475"></a><a class="code" href="a00107.html#dd8a200b99a8088435a37934b58fe335">00475</a>     <a class="code" href="a00107.html">concurrent_vector</a>( <span class="keyword">const</span> <a class="code" href="a00107.html">concurrent_vector</a>& vector, <span class="keyword">const</span> allocator_type& a = allocator_type() )
-<a name="l00476"></a>00476         : internal::allocator_base<T, A>(a)
-<a name="l00477"></a>00477     {
-<a name="l00478"></a>00478         vector_allocator_ptr = &internal_allocator;
-<a name="l00479"></a>00479         internal_copy(vector, <span class="keyword">sizeof</span>(T), &copy_array);
-<a name="l00480"></a>00480     }
-<a name="l00481"></a>00481 
-<a name="l00483"></a>00483     <span class="keyword">template</span><<span class="keyword">class</span> M>
-<a name="l00484"></a><a class="code" href="a00107.html#64432f13f7b29bfe4acfb5568f34f3a8">00484</a>     <a class="code" href="a00107.html">concurrent_vector</a>( <span class="keyword">const</span> <a class="code" href="a00107.html">concurrent_vector<T, M></a>& vector, <span class="keyword">const</span> allocator_type& a = allocator_type() )
-<a name="l00485"></a>00485         : internal::allocator_base<T, A>(a)
-<a name="l00486"></a>00486     {
-<a name="l00487"></a>00487         vector_allocator_ptr = &internal_allocator;
-<a name="l00488"></a>00488         internal_copy(vector.<a class="code" href="a00107.html#bb5ae659871478f1f5c68039e1273e12">internal_vector_base</a>(), <span class="keyword">sizeof</span>(T), &copy_array);
-<a name="l00489"></a>00489     }
-<a name="l00490"></a>00490 
-<a name="l00492"></a><a class="code" href="a00107.html#2a2e261dfe1cab3f73f7b1a94137cfca">00492</a>     <span class="keyword">explicit</span> <a class="code" href="a00107.html">concurrent_vector</a>(size_type n)
-<a name="l00493"></a>00493     {
-<a name="l00494"></a>00494         vector_allocator_ptr = &internal_allocator;
-<a name="l00495"></a>00495         <span class="keywordflow">if</span> ( !n ) <span class="keywordflow">return</span>;
-<a name="l00496"></a>00496         internal_reserve(n, <span class="keyword">sizeof</span>(T), max_size()); my_early_size = n;
-<a name="l00497"></a>00497         __TBB_ASSERT( my_first_block == segment_index_of(n-1)+1, NULL );
-<a name="l00498"></a>00498         initialize_array(static_cast<T*>(my_segment[0].array), NULL, n);
-<a name="l00499"></a>00499     }
-<a name="l00500"></a>00500 
-<a name="l00502"></a><a class="code" href="a00107.html#3883a8a908b44e249a57f454de3f55d8">00502</a>     <a class="code" href="a00107.html">concurrent_vector</a>(size_type n, const_reference t, <span class="keyword">const</span> allocator_type& a = allocator_type())
-<a name="l00503"></a>00503         : internal::allocator_base<T, A>(a)
-<a name="l00504"></a>00504     {
-<a name="l00505"></a>00505         vector_allocator_ptr = &internal_allocator;
-<a name="l00506"></a>00506         internal_assign( n, t );
-<a name="l00507"></a>00507     }
-<a name="l00508"></a>00508 
-<a name="l00510"></a>00510     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00511"></a><a class="code" href="a00107.html#4450de83c5862ea4bcd9443fd7e67419">00511</a>     <a class="code" href="a00107.html">concurrent_vector</a>(I first, I last, <span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00512"></a>00512         : internal::allocator_base<T, A>(a)
-<a name="l00513"></a>00513     {
-<a name="l00514"></a>00514         vector_allocator_ptr = &internal_allocator;
-<a name="l00515"></a>00515         internal_assign(first, last, <span class="keyword">static_cast</span><is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
-<a name="l00516"></a>00516     }
-<a name="l00517"></a>00517 
-<a name="l00519"></a><a class="code" href="a00107.html#691f0f3cda3e489c37a657016e375eaf">00519</a>     <a class="code" href="a00107.html">concurrent_vector</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00107.html">concurrent_vector</a>& vector ) {
-<a name="l00520"></a>00520         <span class="keywordflow">if</span>( <span class="keyword">this</span> != &vector )
-<a name="l00521"></a>00521             concurrent_vector_base_v3::internal_assign(vector, <span class="keyword">sizeof</span>(T), &destroy_array, &assign_array, &copy_array);
-<a name="l00522"></a>00522         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00523"></a>00523     }
-<a name="l00524"></a>00524 
-<a name="l00526"></a>00526     <span class="keyword">template</span><<span class="keyword">class</span> M>
-<a name="l00527"></a><a class="code" href="a00107.html#19f4ab88a01b0fd056af3bba463e7bd6">00527</a>     <a class="code" href="a00107.html">concurrent_vector</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00107.html">concurrent_vector<T, M></a>& vector ) {
-<a name="l00528"></a>00528         <span class="keywordflow">if</span>( static_cast<void*>( <span class="keyword">this</span> ) != static_cast<const void*>( &vector ) )
-<a name="l00529"></a>00529             concurrent_vector_base_v3::internal_assign(vector.internal_vector_base(),
-<a name="l00530"></a>00530                 <span class="keyword">sizeof</span>(T), &destroy_array, &assign_array, &copy_array);
-<a name="l00531"></a>00531         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00532"></a>00532     }
-<a name="l00533"></a>00533 
-<a name="l00534"></a>00534     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00535"></a>00535     <span class="comment">// Concurrent operations</span>
-<a name="l00536"></a>00536     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00538"></a>00538 <span class="comment"></span>
-<a name="l00539"></a><a class="code" href="a00107.html#30484e3959892fd5392fa93c873c31f0">00539</a>     size_type grow_by( size_type delta ) {
-<a name="l00540"></a>00540         <span class="keywordflow">return</span> delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array, NULL ) : my_early_size;
-<a name="l00541"></a>00541     }
-<a name="l00542"></a>00542 
-<a name="l00544"></a>00544 
-<a name="l00545"></a><a class="code" href="a00107.html#38274ab3f772ecba600c7daca7690102">00545</a>     size_type grow_by( size_type delta, const_reference t ) {
-<a name="l00546"></a>00546         <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="l00547"></a>00547     }
-<a name="l00548"></a>00548 
-<a name="l00550"></a><a class="code" href="a00107.html#47fe588214dd5fa06ab6e8ab78d83874">00550</a>     <span class="keywordtype">void</span> grow_to_at_least( size_type n ) {
-<a name="l00551"></a>00551         <span class="keywordflow">if</span>( my_early_size<n )
-<a name="l00552"></a>00552             internal_grow_to_at_least( n, <span class="keyword">sizeof</span>(T), &initialize_array, NULL );
-<a name="l00553"></a>00553     };
-<a name="l00554"></a>00554 
-<a name="l00556"></a><a class="code" href="a00107.html#e0087c0f58b49e43b6322ff1ec0bc98d">00556</a>     size_type push_back( const_reference item ) {
-<a name="l00557"></a>00557         size_type k;
-<a name="l00558"></a>00558         internal_loop_guide loop(1, internal_push_back(<span class="keyword">sizeof</span>(T),k));
-<a name="l00559"></a>00559         loop.init(&item);
-<a name="l00560"></a>00560         <span class="keywordflow">return</span> k;
-<a name="l00561"></a>00561     }
-<a name="l00562"></a>00562 
-<a name="l00564"></a>00564 
-<a name="l00566"></a><a class="code" href="a00107.html#4c52f2950bb1832886bd4458eb09d7eb">00566</a>     reference operator[]( size_type index ) {
-<a name="l00567"></a>00567         <span class="keywordflow">return</span> internal_subscript(index);
-<a name="l00568"></a>00568     }
-<a name="l00569"></a>00569 
-<a name="l00571"></a><a class="code" href="a00107.html#c6fade5c732cc95274d1d8277ea619d1">00571</a>     const_reference operator[]( size_type index )<span class="keyword"> const </span>{
-<a name="l00572"></a>00572         <span class="keywordflow">return</span> internal_subscript(index);
-<a name="l00573"></a>00573     }
-<a name="l00574"></a>00574 
-<a name="l00576"></a><a class="code" href="a00107.html#0c073ca43e787c7cbf7b0e26d2221748">00576</a>     reference at( size_type index ) {
-<a name="l00577"></a>00577         <span class="keywordflow">return</span> internal_subscript_with_exceptions(index);
-<a name="l00578"></a>00578     }
-<a name="l00579"></a>00579 
-<a name="l00581"></a><a class="code" href="a00107.html#23e14a38af748edff96a7adc3a0f1c58">00581</a>     const_reference at( size_type index )<span class="keyword"> const </span>{
-<a name="l00582"></a>00582         <span class="keywordflow">return</span> internal_subscript_with_exceptions(index);
-<a name="l00583"></a>00583     }
-<a name="l00584"></a>00584 
-<a name="l00586"></a><a class="code" href="a00107.html#a4c6ffff3bf08b92939aa2fc516edfba">00586</a>     range_type range( size_t grainsize = 1) {
-<a name="l00587"></a>00587         <span class="keywordflow">return</span> range_type( begin(), end(), grainsize );
-<a name="l00588"></a>00588     }
-<a name="l00589"></a>00589 
-<a name="l00591"></a><a class="code" href="a00107.html#3d09ccfb581b879ae64203741035e193">00591</a>     const_range_type range( size_t grainsize = 1 )<span class="keyword"> const </span>{
-<a name="l00592"></a>00592         <span class="keywordflow">return</span> const_range_type( begin(), end(), grainsize );
-<a name="l00593"></a>00593     }
-<a name="l00594"></a>00594     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00595"></a>00595     <span class="comment">// Capacity</span>
-<a name="l00596"></a>00596     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00598"></a><a class="code" href="a00107.html#715fe313c4a9c22731cc404dd80c9ec9">00598</a> <span class="comment"></span>    size_type size()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_early_size;}
-<a name="l00599"></a>00599 
-<a name="l00601"></a><a class="code" href="a00107.html#c6426cb93cf20d3af40f3c90f1f0481a">00601</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !my_early_size;}
-<a name="l00602"></a>00602 
-<a name="l00604"></a><a class="code" href="a00107.html#3ed6b9ae7217af5103d974045b6f5cd5">00604</a>     size_type capacity()<span class="keyword"> const </span>{<span class="keywordflow">return</span> internal_capacity();}
-<a name="l00605"></a>00605 
-<a name="l00607"></a>00607 
-<a name="l00609"></a><a class="code" href="a00107.html#5a0ce05026994b010018f72cfdeb72c1">00609</a>     <span class="keywordtype">void</span> reserve( size_type n ) {
-<a name="l00610"></a>00610         <span class="keywordflow">if</span>( n )
-<a name="l00611"></a>00611             internal_reserve(n, <span class="keyword">sizeof</span>(T), max_size());
-<a name="l00612"></a>00612     }
-<a name="l00613"></a>00613 
-<a name="l00615"></a>00615     <span class="keywordtype">void</span> compact();
-<a name="l00616"></a>00616 
-<a name="l00618"></a><a class="code" href="a00107.html#2c248a017f0576df3e7cd99627836fd6">00618</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="l00619"></a>00619 
-<a name="l00620"></a>00620     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00621"></a>00621     <span class="comment">// STL support</span>
-<a name="l00622"></a>00622     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00623"></a>00623 
-<a name="l00625"></a><a class="code" href="a00107.html#730b23a251ecb6d37f692fb22f38e029">00625</a>     iterator begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,0);}
-<a name="l00627"></a><a class="code" href="a00107.html#c0b51160e5a764982ec97a455f94f2c6">00627</a>     iterator end() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,size());}
-<a name="l00629"></a><a class="code" href="a00107.html#78a06182276ff758788d4c0623ae0d71">00629</a>     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0);}
-<a name="l00631"></a><a class="code" href="a00107.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">00631</a>     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,size());}
-<a name="l00633"></a><a class="code" href="a00107.html#5e220926d09236d98f04fe0721e5f9a1">00633</a>     reverse_iterator rbegin() {<span class="keywordflow">return</span> reverse_iterator(end());}
-<a name="l00635"></a><a class="code" href="a00107.html#290119a4eb43cd6a9e98fa17016ba3c2">00635</a>     reverse_iterator rend() {<span class="keywordflow">return</span> reverse_iterator(begin());}
-<a name="l00637"></a><a class="code" href="a00107.html#9f9c103e18d5f212703805354074ad44">00637</a>     const_reverse_iterator rbegin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(end());}
-<a name="l00639"></a><a class="code" href="a00107.html#d438b9b32ea3a8ffb703015b6dce055b">00639</a>     const_reverse_iterator rend()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(begin());}
-<a name="l00641"></a><a class="code" href="a00107.html#15181759c0bfa2ddce5d10c7550e0002">00641</a>     reference front() {
-<a name="l00642"></a>00642         __TBB_ASSERT( size()>0, NULL);
-<a name="l00643"></a>00643         <span class="keywordflow">return</span> static_cast<T*>(my_segment[0].array)[0];
-<a name="l00644"></a>00644     }
-<a name="l00646"></a><a class="code" href="a00107.html#502615a858eb9fa0390ee59169065e90">00646</a>     const_reference front()<span class="keyword"> const </span>{
-<a name="l00647"></a>00647         __TBB_ASSERT( size()>0, NULL);
-<a name="l00648"></a>00648         <span class="keywordflow">return</span> static_cast<const T*>(my_segment[0].array)[0];
-<a name="l00649"></a>00649     }
-<a name="l00651"></a><a class="code" href="a00107.html#41ce48d6015a1a2812d41cf620ec3476">00651</a>     reference back() {
-<a name="l00652"></a>00652         __TBB_ASSERT( size()>0, NULL);
-<a name="l00653"></a>00653         <span class="keywordflow">return</span> internal_subscript( my_early_size-1 );
-<a name="l00654"></a>00654     }
-<a name="l00656"></a><a class="code" href="a00107.html#bd518e204107d07fd08d0ec5bdfd383d">00656</a>     const_reference back()<span class="keyword"> const </span>{
-<a name="l00657"></a>00657         __TBB_ASSERT( size()>0, NULL);
-<a name="l00658"></a>00658         <span class="keywordflow">return</span> internal_subscript( my_early_size-1 );
-<a name="l00659"></a>00659     }
-<a name="l00661"></a><a class="code" href="a00107.html#2fdba8e90de6a4d2300222236d46758e">00661</a>     allocator_type get_allocator()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
-<a name="l00662"></a>00662 
-<a name="l00664"></a><a class="code" href="a00107.html#423e5aa15e0e3309ad86d026fd85f6f6">00664</a>     <span class="keywordtype">void</span> assign(size_type n, const_reference t) { clear(); internal_assign( n, t ); }
-<a name="l00665"></a>00665 
-<a name="l00667"></a>00667     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00668"></a><a class="code" href="a00107.html#93a06b3112cb804f42f40efb5e7387b4">00668</a>     <span class="keywordtype">void</span> assign(I first, I last) {
-<a name="l00669"></a>00669         clear(); internal_assign( first, last, <span class="keyword">static_cast</span><is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
-<a name="l00670"></a>00670     }
-<a name="l00671"></a>00671 
-<a name="l00673"></a><a class="code" href="a00107.html#96c9c4bd968ed3edb8dd276854d2dae0">00673</a>     <span class="keywordtype">void</span> swap(<a class="code" href="a00107.html">concurrent_vector</a> &vector) {
-<a name="l00674"></a>00674         <span class="keywordflow">if</span>( <span class="keyword">this</span> != &vector ) {
-<a name="l00675"></a>00675             concurrent_vector_base_v3::internal_swap(static_cast<concurrent_vector_base_v3&>(vector));
-<a name="l00676"></a>00676             std::swap(this->my_allocator, vector.my_allocator);
-<a name="l00677"></a>00677         }
-<a name="l00678"></a>00678     }
-<a name="l00679"></a>00679 
-<a name="l00681"></a>00681 
-<a name="l00682"></a><a class="code" href="a00107.html#26f937a359a66b6aae904c3cd9a3c444">00682</a>     <span class="keywordtype">void</span> clear() {
-<a name="l00683"></a>00683         internal_clear(&destroy_array);
-<a name="l00684"></a>00684     }
-<a name="l00685"></a>00685 
-<a name="l00687"></a><a class="code" href="a00107.html#da2444b28bb840d38f60d0030333a5fc">00687</a>     ~<a class="code" href="a00107.html">concurrent_vector</a>() {
-<a name="l00688"></a>00688         segment_t *table = my_segment;
-<a name="l00689"></a>00689         internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
-<a name="l00690"></a>00690         <span class="comment">// base class destructor call should be then</span>
-<a name="l00691"></a>00691     }
-<a name="l00692"></a>00692 
-<a name="l00693"></a>00693     <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="l00694"></a>00694 <span class="keyword">private</span>:
-<a name="l00696"></a>00696     <span class="keyword">static</span> <span class="keywordtype">void</span> *internal_allocator(internal::concurrent_vector_base_v3 &vb, size_t k) {
-<a name="l00697"></a>00697         <span class="keywordflow">return</span> static_cast<concurrent_vector<T, A>&>(vb).my_allocator.allocate(k);
-<a name="l00698"></a>00698     }
-<a name="l00700"></a>00700     <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="l00701"></a>00701 
-<a name="l00703"></a>00703     T& internal_subscript( size_type index ) <span class="keyword">const</span>;
-<a name="l00704"></a>00704 
-<a name="l00706"></a>00706     T& internal_subscript_with_exceptions( size_type index ) <span class="keyword">const</span>;
-<a name="l00707"></a>00707 
-<a name="l00709"></a>00709     <span class="keywordtype">void</span> internal_assign(size_type n, const_reference t);
-<a name="l00710"></a>00710 
-<a name="l00712"></a>00712     <span class="keyword">template</span><<span class="keywordtype">bool</span> B> <span class="keyword">class </span>is_integer_tag;
-<a name="l00713"></a>00713 
-<a name="l00715"></a>00715     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00716"></a>00716     <span class="keywordtype">void</span> internal_assign(I first, I last, is_integer_tag<true> *) {
-<a name="l00717"></a>00717         internal_assign(static_cast<size_type>(first), static_cast<T>(last));
-<a name="l00718"></a>00718     }
-<a name="l00720"></a>00720     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00721"></a>00721     <span class="keywordtype">void</span> internal_assign(I first, I last, is_integer_tag<false> *) {
-<a name="l00722"></a>00722         internal_assign_iterators(first, last);
-<a name="l00723"></a>00723     }
-<a name="l00725"></a>00725     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00726"></a>00726     <span class="keywordtype">void</span> internal_assign_iterators(I first, I last);
-<a name="l00727"></a>00727 
-<a name="l00729"></a>00729     <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="l00730"></a>00730 
-<a name="l00732"></a>00732     <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="l00733"></a>00733 
-<a name="l00735"></a>00735     <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="l00736"></a>00736 
-<a name="l00738"></a>00738     <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="l00739"></a>00739 
-<a name="l00741"></a>00741     <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="l00742"></a>00742 
-<a name="l00744"></a>00744     <span class="keyword">class </span>internal_loop_guide : internal::no_copy {
-<a name="l00745"></a>00745     <span class="keyword">public</span>:
-<a name="l00746"></a>00746         <span class="keyword">const</span> pointer array;
-<a name="l00747"></a>00747         <span class="keyword">const</span> size_type n;
-<a name="l00748"></a>00748         size_type i;
-<a name="l00749"></a>00749         internal_loop_guide(size_type ntrials, <span class="keywordtype">void</span> *ptr)
-<a name="l00750"></a>00750             : array(static_cast<pointer>(ptr)), n(ntrials), i(0) {}
-<a name="l00751"></a>00751         <span class="keywordtype">void</span> init() {   <span class="keywordflow">for</span>(; i < n; ++i) <span class="keyword">new</span>( &array[i] ) T(); }
-<a name="l00752"></a>00752         <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="l00753"></a>00753         <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="l00754"></a>00754         <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="l00755"></a>00755         <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="l00756"></a>00756         ~internal_loop_guide() {
-<a name="l00757"></a>00757             <span class="keywordflow">if</span>(i < n) <span class="comment">// if exception raised, do zerroing on the rest of items</span>
-<a name="l00758"></a>00758                 std::memset(array+i, 0, (n-i)*<span class="keyword">sizeof</span>(value_type));
-<a name="l00759"></a>00759         }
-<a name="l00760"></a>00760     };
-<a name="l00761"></a>00761 };
-<a name="l00762"></a>00762 
-<a name="l00763"></a>00763 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00764"></a><a class="code" href="a00107.html#1693d1da41b1a8235871be9c6633be35">00764</a> <span class="keywordtype">void</span> <a class="code" href="a00107.html">concurrent_vector<T, A>::compact</a>() {
-<a name="l00765"></a>00765     internal_segments_table old;
-<a name="l00766"></a>00766     <span class="keywordflow">try</span> {
-<a name="l00767"></a>00767         <span class="keywordflow">if</span>( internal_compact( <span class="keyword">sizeof</span>(T), &old, &destroy_array, &copy_array ) )
-<a name="l00768"></a>00768             internal_free_segments( old.table, pointers_per_long_table, old.first_block ); <span class="comment">// free joined and unnecessary segments</span>
-<a name="l00769"></a>00769     } <span class="keywordflow">catch</span>(...) {
-<a name="l00770"></a>00770         <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="l00771"></a>00771             internal_free_segments( old.table, 1, old.first_block );
-<a name="l00772"></a>00772         <span class="keywordflow">throw</span>;
-<a name="l00773"></a>00773     }
-<a name="l00774"></a>00774 }
-<a name="l00775"></a>00775 
-<a name="l00776"></a>00776 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00777"></a>00777 <span class="keywordtype">void</span> <a class="code" href="a00107.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="l00778"></a>00778     <span class="comment">// Free the arrays</span>
-<a name="l00779"></a>00779     <span class="keywordflow">while</span>( k > first_block ) {
-<a name="l00780"></a>00780         --k;
-<a name="l00781"></a>00781         T* array = static_cast<T*>(table[k]);
-<a name="l00782"></a>00782         table[k] = NULL;
-<a name="l00783"></a>00783         <span class="keywordflow">if</span>( array > __TBB_BAD_ALLOC ) <span class="comment">// check for correct segment pointer</span>
-<a name="l00784"></a>00784             this->my_allocator.deallocate( array, segment_size(k) );
-<a name="l00785"></a>00785     }
-<a name="l00786"></a>00786     T* array = static_cast<T*>(table[0]);
-<a name="l00787"></a>00787     <span class="keywordflow">if</span>( array > __TBB_BAD_ALLOC ) {
-<a name="l00788"></a>00788         __TBB_ASSERT( first_block > 0, NULL );
-<a name="l00789"></a>00789         <span class="keywordflow">while</span>(k > 0) table[--k] = NULL;
-<a name="l00790"></a>00790         this->my_allocator.deallocate( array, segment_size(first_block) );
-<a name="l00791"></a>00791     }
-<a name="l00792"></a>00792 }
-<a name="l00793"></a>00793 
-<a name="l00794"></a>00794 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00795"></a>00795 T& concurrent_vector<T, A>::internal_subscript( size_type index )<span class="keyword"> const </span>{
-<a name="l00796"></a>00796     __TBB_ASSERT( index<<a class="code" href="a00107.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>(), <span class="stringliteral">"index out of bounds"</span> );
-<a name="l00797"></a>00797     size_type j = index;
-<a name="l00798"></a>00798     segment_index_t k = segment_base_index_of( j );
-<a name="l00799"></a>00799     <span class="comment">// no need in __TBB_load_with_acquire since thread works in own space or gets </span>
-<a name="l00800"></a>00800 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00801"></a>00801 <span class="preprocessor"></span>    <span class="keywordflow">return</span> static_cast<T*>( tbb::internal::itt_load_pointer_v3(&my_segment[k].array))[j];
-<a name="l00802"></a>00802 <span class="preprocessor">#else</span>
-<a name="l00803"></a>00803 <span class="preprocessor"></span>    <span class="keywordflow">return</span> static_cast<T*>(my_segment[k].array)[j];
-<a name="l00804"></a>00804 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
-<a name="l00805"></a>00805 }
-<a name="l00806"></a>00806 
-<a name="l00807"></a>00807 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00808"></a>00808 T& concurrent_vector<T, A>::internal_subscript_with_exceptions( size_type index )<span class="keyword"> const </span>{
-<a name="l00809"></a>00809     <span class="keywordflow">if</span>( index >= <a class="code" href="a00107.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>() )
-<a name="l00810"></a>00810         internal_throw_exception(0); <span class="comment">// throw std::out_of_range</span>
-<a name="l00811"></a>00811     size_type j = index;
-<a name="l00812"></a>00812     segment_index_t k = segment_base_index_of( j );
-<a name="l00813"></a>00813     <span class="keywordflow">if</span>( my_segment == (segment_t*)my_storage && k >= pointers_per_short_table )
-<a name="l00814"></a>00814         internal_throw_exception(1); <span class="comment">// throw std::out_of_range</span>
-<a name="l00815"></a>00815     <span class="keywordtype">void</span> *array = my_segment[k].array; <span class="comment">// no need in __TBB_load_with_acquire</span>
-<a name="l00816"></a>00816     <span class="keywordflow">if</span>( array <= __TBB_BAD_ALLOC ) <span class="comment">// check for correct segment pointer</span>
-<a name="l00817"></a>00817         internal_throw_exception(2); <span class="comment">// throw std::range_error</span>
-<a name="l00818"></a>00818     <span class="keywordflow">return</span> static_cast<T*>(array)[j];
-<a name="l00819"></a>00819 }
-<a name="l00820"></a>00820 
-<a name="l00821"></a>00821 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00822"></a>00822 <span class="keywordtype">void</span> concurrent_vector<T, A>::internal_assign(size_type n, const_reference t)
-<a name="l00823"></a>00823 {
-<a name="l00824"></a>00824     __TBB_ASSERT(my_early_size == 0, NULL);
-<a name="l00825"></a>00825     <span class="keywordflow">if</span>( !n ) <span class="keywordflow">return</span>;
-<a name="l00826"></a>00826     internal_reserve(n, <span class="keyword">sizeof</span>(T), <a class="code" href="a00107.html#2c248a017f0576df3e7cd99627836fd6">max_size</a>());
-<a name="l00827"></a>00827     my_early_size = n;
-<a name="l00828"></a>00828     segment_index_t k = 0;
-<a name="l00829"></a>00829     size_type sz = segment_size( my_first_block );
-<a name="l00830"></a>00830     <span class="keywordflow">while</span>( sz < n ) {
-<a name="l00831"></a>00831         initialize_array_by(static_cast<T*>(my_segment[k].array), static_cast<const void*>(&t), sz);
-<a name="l00832"></a>00832         n -= sz;
-<a name="l00833"></a>00833         <span class="keywordflow">if</span>( !k ) k = my_first_block;
-<a name="l00834"></a>00834         <span class="keywordflow">else</span> { ++k; sz <<= 1; }
-<a name="l00835"></a>00835     }
-<a name="l00836"></a>00836     initialize_array_by(static_cast<T*>(my_segment[k].array), static_cast<const void*>(&t), n);
-<a name="l00837"></a>00837 }
-<a name="l00838"></a>00838 
-<a name="l00839"></a>00839 <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="l00840"></a>00840 <span class="keywordtype">void</span> concurrent_vector<T, A>::internal_assign_iterators(I first, I last) {
-<a name="l00841"></a>00841     __TBB_ASSERT(my_early_size == 0, NULL);
-<a name="l00842"></a>00842     size_type n = std::distance(first, last);
-<a name="l00843"></a>00843     <span class="keywordflow">if</span>( !n ) <span class="keywordflow">return</span>;
-<a name="l00844"></a>00844     internal_reserve(n, <span class="keyword">sizeof</span>(T), <a class="code" href="a00107.html#2c248a017f0576df3e7cd99627836fd6">max_size</a>());
-<a name="l00845"></a>00845     my_early_size = n;
-<a name="l00846"></a>00846     segment_index_t k = 0;
-<a name="l00847"></a>00847     size_type sz = segment_size( my_first_block );
-<a name="l00848"></a>00848     <span class="keywordflow">while</span>( sz < n ) {
-<a name="l00849"></a>00849         internal_loop_guide loop(sz, my_segment[k].array);
-<a name="l00850"></a>00850         loop.iterate(first);
-<a name="l00851"></a>00851         n -= sz;
-<a name="l00852"></a>00852         <span class="keywordflow">if</span>( !k ) k = my_first_block;
-<a name="l00853"></a>00853         <span class="keywordflow">else</span> { ++k; sz <<= 1; }
-<a name="l00854"></a>00854     }
-<a name="l00855"></a>00855     internal_loop_guide loop(n, my_segment[k].array);
-<a name="l00856"></a>00856     loop.iterate(first);
-<a name="l00857"></a>00857 }
-<a name="l00858"></a>00858 
-<a name="l00859"></a>00859 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00860"></a>00860 <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="l00861"></a>00861     internal_loop_guide loop(n, begin); loop.init();
-<a name="l00862"></a>00862 }
-<a name="l00863"></a>00863 
-<a name="l00864"></a>00864 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00865"></a>00865 <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="l00866"></a>00866     internal_loop_guide loop(n, begin); loop.init(src);
-<a name="l00867"></a>00867 }
-<a name="l00868"></a>00868 
-<a name="l00869"></a>00869 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00870"></a>00870 <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="l00871"></a>00871     internal_loop_guide loop(n, dst); loop.copy(src);
-<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 <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="l00876"></a>00876     internal_loop_guide loop(n, dst); loop.assign(src);
-<a name="l00877"></a>00877 }
-<a name="l00878"></a>00878 
-<a name="l00879"></a>00879 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) </span>
-<a name="l00880"></a>00880 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warning</span>
-<a name="l00881"></a>00881 <span class="preprocessor">    #pragma warning (push)</span>
-<a name="l00882"></a>00882 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4189)</span>
-<a name="l00883"></a>00883 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00884"></a>00884 <span class="preprocessor"></span><span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00885"></a>00885 <span class="keywordtype">void</span> concurrent_vector<T, A>::destroy_array( <span class="keywordtype">void</span>* begin, size_type n ) {
-<a name="l00886"></a>00886     T* array = static_cast<T*>(begin);
-<a name="l00887"></a>00887     <span class="keywordflow">for</span>( size_type j=n; j>0; --j )
-<a name="l00888"></a>00888         array[j-1].~T(); <span class="comment">// destructors are supposed to not throw any exceptions</span>
-<a name="l00889"></a>00889 }
-<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="preprocessor">    #pragma warning (pop)</span>
-<a name="l00892"></a>00892 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4189 is back </span>
-<a name="l00893"></a>00893 <span class="preprocessor"></span>
-<a name="l00894"></a>00894 <span class="comment">// concurrent_vector's template functions</span>
-<a name="l00895"></a>00895 <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="l00896"></a>00896 <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="l00897"></a>00897     <span class="comment">//TODO[?]: deal with _Range_checked_iterator_tag of MSVC.</span>
-<a name="l00898"></a>00898     <span class="comment">// Simply:    return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());</span>
-<a name="l00899"></a>00899     <span class="keywordflow">if</span>(a.size() != b.size()) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00900"></a>00900     <span class="keyword">typename</span> concurrent_vector<T, A1>::const_iterator i(a.begin());
-<a name="l00901"></a>00901     <span class="keyword">typename</span> concurrent_vector<T, A2>::const_iterator j(b.begin());
-<a name="l00902"></a>00902     <span class="keywordflow">for</span>(; i != a.end(); ++i, ++j)
-<a name="l00903"></a>00903         <span class="keywordflow">if</span>( !(*i == *j) ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00904"></a>00904     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00905"></a>00905 }
-<a name="l00906"></a>00906 
-<a name="l00907"></a>00907 <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="l00908"></a>00908 <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="l00909"></a>00909 {    <span class="keywordflow">return</span> !(a == b); }
-<a name="l00910"></a>00910 
-<a name="l00911"></a>00911 <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="l00912"></a>00912 <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="l00913"></a>00913 {    <span class="keywordflow">return</span> (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())); }
-<a name="l00914"></a>00914 
-<a name="l00915"></a>00915 <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="l00916"></a>00916 <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="l00917"></a>00917 {    <span class="keywordflow">return</span> b < a; }
-<a name="l00918"></a>00918 
-<a name="l00919"></a>00919 <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="l00920"></a>00920 <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="l00921"></a>00921 {    <span class="keywordflow">return</span> !(b < a); }
-<a name="l00922"></a>00922 
-<a name="l00923"></a>00923 <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="l00924"></a>00924 <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="l00925"></a>00925 {    <span class="keywordflow">return</span> !(a < b); }
-<a name="l00926"></a>00926 
-<a name="l00927"></a>00927 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00928"></a>00928 <span class="keyword">inline</span> <span class="keywordtype">void</span> swap(concurrent_vector<T, A> &a, concurrent_vector<T, A> &b)
-<a name="l00929"></a>00929 {    a.swap( b ); }
-<a name="l00930"></a>00930 
-<a name="l00931"></a>00931 } <span class="comment">// namespace tbb</span>
-<a name="l00932"></a>00932 
-<a name="l00933"></a>00933 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_Wp64)</span>
-<a name="l00934"></a>00934 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00935"></a>00935 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4267 is back</span>
-<a name="l00936"></a>00936 <span class="preprocessor"></span>
-<a name="l00937"></a>00937 <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/a00181.html b/doc/html/a00224.html
similarity index 54%
rename from doc/html/a00181.html
rename to doc/html/a00224.html
index ed13ccd..232c220 100644
--- a/doc/html/a00181.html
+++ b/doc/html/a00224.html
@@ -25,274 +25,403 @@
 <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="a00092.html">aligned_space</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="a00092.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="a00093.html">atomic</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="a00093.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>atomic< void * ></b></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="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>atomic< bool ></b></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="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.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 range over which to iterate.  <a href="a00097.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="a00098.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 2-dimensional range that models the Range concept.  <a href="a00098.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="a00099.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">A 3-dimensional range that models the Range concept.  <a href="a00099.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="a00100.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">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00100.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="a00101.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">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00101.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="a00139.html">tbb_hash_compare</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="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="a00103.html">concurrent_hash_map</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="a00103.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="a00106.html">concurrent_queue</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 queue.  <a href="a00106.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="a00107.html">concurrent_vector</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="a00107.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="a00112.html">mutex</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">Wrapper around the platform's native reader-writer lock.  <a href="a00112.html#_details">More...</a><br></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="a00114.html">parallel_do_feeder</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">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">Class the user supplied algorithm body uses to add new tasks.  <a href="a00114.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">pre_scan_tag</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">Used to indicate that the initial scan is being performed.  <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="a00110.html">final_scan_tag</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">Used to indicate that the final scan is being performed.  <a href="a00110.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">parallel_while</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">Parallel iteration over a stream, with optional addition of more work.  <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="a00126.html">simple_partitioner</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">A simple partitioner.  <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="a00095.html">auto_partitioner</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">An auto partitioner.  <a href="a00095.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="a00091.html">affinity_partitioner</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">An affinity partitioner.  <a href="a00091.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="a00109.html">filter</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">A stage in a pipeline.  <a href="a00109.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="a00116.html">pipeline</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">A processing pipeling that applies filters to items.  <a href="a00116.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="a00118.html">queuing_mutex</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">Queuing lock with local-only spinning.  <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="a00120.html">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">spin_rw_mutex_v3</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Reader-writer lock with local-only spinning.  <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="a00122.html">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="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">Mutex that allows recursive mutex acquisition.  <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="a00124.html">scalable_allocator</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">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <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">scalable_allocator< void ></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">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <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="a00127.html">spin_mutex</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 lock that occupies a single byte.  <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="a00129.html">spin_rw_mutex_v3</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="mdescLeft"> </td><td class="mdescRight">Fast, unfair, spinning reader-writer lock with backoff and writer-preference.  <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="a00133.html">task_group_context</a></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="mdescLeft"> </td><td class="mdescRight">Used to form groups of tasks.  <a href="a00133.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="a00132.html">task</a></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="mdescLeft"> </td><td class="mdescRight">Base class for user-defined tasks.  <a href="a00132.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="a00108.html">empty_task</a></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="mdescLeft"> </td><td class="mdescRight">task that does nothing. Useful for synchronization.  <a href="a00108.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">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="a00165.html">task_scheduler_init</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A list of children.  <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="a00135.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">Class representing reference to tbb scheduler.  <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_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">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <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="a00137.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">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <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="a00096.html">bad_last_alloc</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">Exception for concurrent containers.  <a href="a00096.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">tbb_exception</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">Interface to be implemented by all exceptions TBB recognizes and propagates across the threads.  <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"><a class="el" href="a00102.html">captured_exception</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">This class is used by TBB to propagate information about unhandled exceptions into the root thread.  <a href="a00102.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="a00111.html">movable_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">Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread.  <a href="a00111.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="a00131.html">split</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">Dummy type that distinguishes splitting constructor from copy constructor.  <a href="a00131.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="a00140.html">tick_count</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">Absolute timestamp.  <a href="a00140.html#_details">More...</a><br></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="a00183.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a> (Iterator first, Iterator last, const Body &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="a00183.html#g2617dc9b88b3285a7212599d49f74228">parallel_do</a> (Iterator first, Iterator last, const Body &body, <a class="el" href="a00133.html">task_group_context</a> &context)</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="g2e90dde1b5dfe6cb03e64c7d7cd0d778"></a><!-- doxytag: member="tbb::parallel_for" ref="g2e90dde1b5dfe6cb03e64c7d7cd0d778" args="(const Range &range, const Body &body, const simple_partitioner &partitioner=simple_partitioner())" -->
+<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="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00126.html">simple_partitioner</a> &partitioner=<a class="el" href="a00126.html">simple_partitioner</a>())</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, or default partitioner if no partitioner is specified. <br></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="a00183.html#ga7ac75d532389b55b9247f3fdb0b00d1">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00095.html">auto_partitioner</a> &partitioner)</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="a00095.html">auto_partitioner</a>. <br></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="a00183.html#g9cd1b210ceb1c040f30e390b4a21bde8">parallel_for</a> (const Range &range, const Body &body, <a class="el" href="a00091.html">affinity_partitioner</a> &partitioner)</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="a00091.html">affinity_partitioner</a>. <br></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="a00183.html#g2d317a5e0078cd193125439fed60dfdc">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00126.html">simple_partitioner</a> &partitioner, <a class="el" href="a00133.html">task_group_context</a> &context)</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="a00183.html#g1c0700e3f85e83a788ff3ede88ebb7e9">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00095.html">auto_partitioner</a> &partitioner, <a class="el" href="a00133.html">task_group_context</a> &context)</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="a00095.html">auto_partitioner</a> and user-supplied context. <br></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="a00183.html#g04b4696b67370c01353ff5974c8f1196">parallel_for</a> (const Range &range, const Body &body, <a class="el" href="a00091.html">affinity_partitioner</a> &partitioner, <a class="el" href="a00133.html">task_group_context</a> &context)</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 class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00091.html">affinity_partitioner</a> and user-supplied context. <br></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="gaf32af4ef8fe4261b10e9f6086ce54dc"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gaf32af4ef8fe4261b10e9f6086ce54dc" args="(const Range &range, Body &body, const simple_partitioner &partitioner=simple_partitioner())" -->
+<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="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00126.html">simple_partitioner</a> &partitioner=<a class="el" href="a00126.html">simple_partitioner</a>())</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="a00126.html">simple_partitioner</a>, or no partitioner specified. <br></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="a00183.html#g18a19157e6245992fc00ca0adeb7dd37">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00095.html">auto_partitioner</a> &partitioner)</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="a00095.html">auto_partitioner</a>. <br></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="a00183.html#gc61e73fcc36c92d79a217fc355ff4a6b">parallel_reduce</a> (const Range &range, Body &body, <a class="el" href="a00091.html">affinity_partitioner</a> &partitioner)</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="a00091.html">affinity_partitioner</a>. <br></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="a00183.html#g45cb00c42a18e334bbde8b7535afe460">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00126.html">simple_partitioner</a> &partitioner, <a class="el" href="a00133.html">task_group_context</a> &context)</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="a00183.html#g1c1ea1d7c61b3c225e92c70d669a53a5">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00095.html">auto_partitioner</a> &partitioner, <a class="el" href="a00133.html">task_group_context</a> &context)</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="a00095.html">auto_partitioner</a> and user-supplied context. <br></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="a00183.html#gd9ac3a3811060314695f33b703c6e11b">parallel_reduce</a> (const Range &range, Body &body, <a class="el" href="a00091.html">affinity_partitioner</a> &partitioner, <a class="el" href="a00133.html">task_group_context</a> &context)</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, <a class="el" href="a00091.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gdddb4cb5d9de2f3d6bad3ffa6b64db07"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gdddb4cb5d9de2f3d6bad3ffa6b64db07" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner=simple_partitioner())" -->
+<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="a00183.html#gdddb4cb5d9de2f3d6bad3ffa6b64db07">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00126.html">simple_partitioner</a> &partitioner=<a class="el" href="a00126.html">simple_partitioner</a>())</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="a00126.html">simple_partitioner</a>, or no partitioner specified. <br></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="a00183.html#gb175401f0729e40dd2c5860a17c14385">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00095.html">auto_partitioner</a> &partitioner)</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="a00095.html">auto_partitioner</a>. <br></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="a00183.html#gb7f1f1828ae2b330ce05b8513a495154">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, <a class="el" href="a00091.html">affinity_partitioner</a> &partitioner)</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="a00091.html">affinity_partitioner</a>. <br></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="a00183.html#gfbc0cc2026d87f11a96bcd62788f5bb5">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00126.html">simple_partitioner</a> &partitioner, <a class="el" href="a00133.html">task_group_context</a> &context)</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="a00183.html#g630c90a399937d9d4ae70ff883186dfd">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00095.html">auto_partitioner</a> &partitioner, <a class="el" href="a00133.html">task_group_context</a> &context)</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="a00095.html">auto_partitioner</a> and user-supplied context. <br></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="a00183.html#g496bd7eadb3b97495ccb5655ef90319e">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, <a class="el" href="a00091.html">affinity_partitioner</a> &partitioner, <a class="el" href="a00133.html">task_group_context</a> &context)</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="a00091.html">affinity_partitioner</a> and user-supplied context. <br></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="gdf44892aacffa7360018e96ebdaae2ba"></a><!-- doxytag: member="tbb::parallel_scan" ref="gdf44892aacffa7360018e96ebdaae2ba" args="(const Range &range, Body &body, const simple_partitioner &partitioner=simple_partitioner())" -->
+<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="a00183.html#gdf44892aacffa7360018e96ebdaae2ba">parallel_scan</a> (const Range &range, Body &body, const <a class="el" href="a00126.html">simple_partitioner</a> &partitioner=<a class="el" href="a00126.html">simple_partitioner</a>())</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="a00126.html">simple_partitioner</a>. <br></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="a00183.html#g62fde400a37bbca1a2fddc8e3d22f556">parallel_scan</a> (const Range &range, Body &body, const <a class="el" href="a00095.html">auto_partitioner</a> &partitioner)</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="a00095.html">auto_partitioner</a>. <br></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="a00183.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)</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="a00183.html#g49edcf9447cd91a9527a3f8e8512b7aa"></a><br></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="a00183.html#g16c3eb77d0e530834c51ce3857f01012">parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end)</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="a00183.html#gc7576f82fdedc8a701a6c17ad9415926">parallel_sort</a> (T *begin, T *end)</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="a00129.html">spin_rw_mutex_v3</a> </td><td class="memItemRight" valign="bottom"><b>spin_rw_mutex</b></td></tr>
+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>
@@ -301,100 +430,152 @@ typedef std::size_t </td><td class="memItemRight" valign="bottom"><b>stack_
 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="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> (const char *filename, int line, const char *expression, const char *comment)</td></tr>
+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="a00181.html#a8686246bb5d3664bd07563749970fef">memory_semantics</a> { <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>, 
-<a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>, 
-<a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>
+<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 class="mdescLeft"> </td><td class="mdescRight">Specifies memory fencing.  <a href="a00181.html#a8686246bb5d3664bd07563749970fef">More...</a><br></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"><b>__TBB_DECL_ATOMIC_ALT</b> (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="a00093.html">atomic</a>< T * ></td></tr>
+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="a00100.html">cache_aligned_allocator</a>< T > &, const <a class="el" href="a00100.html">cache_aligned_allocator</a>< 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="a00100.html">cache_aligned_allocator</a>< T > &, const <a class="el" href="a00100.html">cache_aligned_allocator</a>< 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="a00103.html">concurrent_hash_map</a>< Key, T, HashCompare, A1 > &a, const <a class="el" href="a00103.html">concurrent_hash_map</a>< Key, T, HashCompare, A2 > &b)</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="a00103.html">concurrent_hash_map</a>< Key, T, HashCompare, A1 > &a, const <a class="el" href="a00103.html">concurrent_hash_map</a>< Key, T, HashCompare, A2 > &b)</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="a00103.html">concurrent_hash_map</a>< Key, T, HashCompare, A > &a, <a class="el" href="a00103.html">concurrent_hash_map</a>< Key, T, HashCompare, A > &b)</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="a00107.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00107.html">concurrent_vector</a>< T, A2 > &b)</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="a00107.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00107.html">concurrent_vector</a>< T, A2 > &b)</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="a00107.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00107.html">concurrent_vector</a>< T, A2 > &b)</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="a00107.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00107.html">concurrent_vector</a>< T, A2 > &b)</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="a00107.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00107.html">concurrent_vector</a>< T, A2 > &b)</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="a00107.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00107.html">concurrent_vector</a>< T, A2 > &b)</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="a00107.html">concurrent_vector</a>< T, A > &a, <a class="el" href="a00107.html">concurrent_vector</a>< T, A > &b)</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="a00124.html">scalable_allocator</a>< T > &, const <a class="el" href="a00124.html">scalable_allocator</a>< 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="a00124.html">scalable_allocator</a>< T > &, const <a class="el" href="a00124.html">scalable_allocator</a>< 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="a00136.html">tbb_allocator</a>< T > &, const <a class="el" href="a00136.html">tbb_allocator</a>< 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="a00136.html">tbb_allocator</a>< T > &, const <a class="el" href="a00136.html">tbb_allocator</a>< 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="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.html#823fa1c15dd829d1d9167157450ddcd9">set_assertion_handler</a> (<a class="el" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> new_handler)</td></tr>
+<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="a00181.html#3d1252787be39b4aef311f1cadaff9e8">assertion_failure</a> (const char *filename, int line, const char *expression, const char *comment)</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="a00181.html#a6858b22e90041c9c4669674ff39b056">TBB_runtime_interface_version</a> ()</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="a00141.html">tick_count::interval_t</a> </td><td class="memItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="a00140.html">tick_count</a> &t1, const <a class="el" href="a00140.html">tick_count</a> &t0)</td></tr>
+<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>
@@ -403,7 +584,7 @@ The namespace tbb contains all components of the library. <hr><h2>Enumeration Ty
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">enum <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fef">tbb::memory_semantics</a>          </td>
+          <td class="memname">enum <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fef">tbb::memory_semantics</a>          </td>
         </tr>
       </table>
 </div>
diff --git a/doc/html/a00228.html b/doc/html/a00228.html
index cebf878..8f0483f 100644
--- a/doc/html/a00228.html
+++ b/doc/html/a00228.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>mutex.h Source File</title>
+<title>Algorithms</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -11,186 +11,329 @@
     <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>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_mutex_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_mutex_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><span class="preprocessor">#include <windows.h></span>
-<a name="l00026"></a>00026 <span class="preprocessor">#if !defined(_WIN32_WINNT)</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="comment">// The following Windows API function is declared explicitly;</span>
-<a name="l00028"></a>00028 <span class="comment">// otherwise any user would have to specify /D_WIN32_WINNT=0x0400</span>
-<a name="l00029"></a>00029 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION );
-<a name="l00030"></a>00030 <span class="preprocessor">#endif</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span>
-<a name="l00032"></a>00032 <span class="preprocessor">#else </span><span class="comment">/* if not _WIN32||_WIN64 */</span>
-<a name="l00033"></a>00033 <span class="preprocessor">#include <pthread.h></span>
-<a name="l00034"></a>00034 <span class="keyword">namespace </span>tbb { <span class="keyword">namespace </span>internal {
-<a name="l00035"></a>00035 <span class="comment">// Use this internal TBB function to throw an exception</span>
-<a name="l00036"></a>00036 <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="l00037"></a>00037 } } <span class="comment">//namespaces</span>
-<a name="l00038"></a>00038 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00039"></a>00039 
-<a name="l00040"></a>00040 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00041"></a>00041 <span class="preprocessor">#include "tbb_profiling.h"</span>
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043 <span class="keyword">namespace </span>tbb {
-<a name="l00044"></a>00044 
-<a name="l00046"></a>00046 
-<a name="l00048"></a><a class="code" href="a00112.html">00048</a> <span class="keyword">class </span><a class="code" href="a00112.html">mutex</a> {
-<a name="l00049"></a>00049 <span class="keyword">public</span>:
-<a name="l00051"></a><a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">00051</a>     <a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>() {
-<a name="l00052"></a>00052 <span class="preprocessor">#if TBB_USE_ASSERT || TBB_USE_THREADING_TOOLS</span>
-<a name="l00053"></a>00053 <span class="preprocessor"></span>    internal_construct();
-<a name="l00054"></a>00054 <span class="preprocessor">#else</span>
-<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00056"></a>00056 <span class="preprocessor"></span>        InitializeCriticalSection(&impl);
-<a name="l00057"></a>00057 <span class="preprocessor">  #else</span>
-<a name="l00058"></a>00058 <span class="preprocessor"></span>        <span class="keywordtype">int</span> error_code = pthread_mutex_init(&impl,NULL);
-<a name="l00059"></a>00059         <span class="keywordflow">if</span>( error_code )
-<a name="l00060"></a>00060             tbb::internal::handle_perror(error_code,<span class="stringliteral">"mutex: pthread_mutex_init failed"</span>);
-<a name="l00061"></a>00061 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64*/</span>
-<a name="l00062"></a>00062 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00063"></a>00063     };
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065     ~<a class="code" href="a00112.html">mutex</a>() {
-<a name="l00066"></a>00066 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00067"></a>00067 <span class="preprocessor"></span>        internal_destroy();
-<a name="l00068"></a>00068 <span class="preprocessor">#else</span>
-<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00070"></a>00070 <span class="preprocessor"></span>        DeleteCriticalSection(&impl);
-<a name="l00071"></a>00071 <span class="preprocessor">  #else</span>
-<a name="l00072"></a>00072 <span class="preprocessor"></span>        pthread_mutex_destroy(&impl); 
-<a name="l00073"></a>00073 
-<a name="l00074"></a>00074 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00075"></a>00075 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00076"></a>00076     };
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078     <span class="keyword">class </span>scoped_lock;
-<a name="l00079"></a>00079     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
-<a name="l00080"></a>00080 
-<a name="l00082"></a>00082 
-<a name="l00084"></a><a class="code" href="a00113.html">00084</a>     <span class="keyword">class </span><a class="code" href="a00113.html">scoped_lock</a> : internal::no_copy {
-<a name="l00085"></a>00085     <span class="keyword">public</span>:
-<a name="l00087"></a><a class="code" href="a00113.html#1d403ae51b484df5d86d85ae38f11e6e">00087</a>         <a class="code" href="a00113.html#1d403ae51b484df5d86d85ae38f11e6e">scoped_lock</a>() : my_mutex(NULL) {};
-<a name="l00088"></a>00088 
-<a name="l00090"></a>00090 
-<a name="l00091"></a><a class="code" href="a00113.html#605a6b9af0f8cdabdf81825e0de99600">00091</a>         <a class="code" href="a00113.html#1d403ae51b484df5d86d85ae38f11e6e">scoped_lock</a>( <a class="code" href="a00112.html">mutex</a>& <a class="code" href="a00112.html">mutex</a> ) {
-<a name="l00092"></a>00092             <a class="code" href="a00113.html#862e022841cdc522e4296a5533b22efd">acquire</a>( <a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a> );
-<a name="l00093"></a>00093         }
-<a name="l00094"></a>00094 
-<a name="l00096"></a><a class="code" href="a00113.html#0ebbbecaf4311e9df7362cb76ceaa368">00096</a>         <a class="code" href="a00113.html#0ebbbecaf4311e9df7362cb76ceaa368">~scoped_lock</a>() {
-<a name="l00097"></a>00097             <span class="keywordflow">if</span>( my_mutex ) 
-<a name="l00098"></a>00098                 <a class="code" href="a00113.html#0d51d18cd99df3b2e93bf07378d0992c">release</a>();
-<a name="l00099"></a>00099         }
-<a name="l00100"></a>00100 
-<a name="l00102"></a><a class="code" href="a00113.html#862e022841cdc522e4296a5533b22efd">00102</a>         <span class="keywordtype">void</span> <a class="code" href="a00113.html#862e022841cdc522e4296a5533b22efd">acquire</a>( <a class="code" href="a00112.html">mutex</a>& <a class="code" href="a00112.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>            internal_acquire(<a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>);
-<a name="l00105"></a>00105 <span class="preprocessor">#else</span>
-<a name="l00106"></a>00106 <span class="preprocessor"></span>            my_mutex = &<a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>;
-<a name="l00107"></a>00107 <span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00108"></a>00108 <span class="preprocessor"></span>            EnterCriticalSection(&<a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>.impl);
-<a name="l00109"></a>00109 <span class="preprocessor">  #else</span>
-<a name="l00110"></a>00110 <span class="preprocessor"></span>            pthread_mutex_lock(&<a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>.impl);
-<a name="l00111"></a>00111 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00112"></a>00112 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00113"></a>00113         }
-<a name="l00114"></a>00114 
-<a name="l00116"></a><a class="code" href="a00113.html#591e0c49b82bcedffcbe0923f1b915ec">00116</a>         <span class="keywordtype">bool</span> <a class="code" href="a00113.html#591e0c49b82bcedffcbe0923f1b915ec">try_acquire</a>( <a class="code" href="a00112.html">mutex</a>& <a class="code" href="a00112.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>            <span class="keywordflow">return</span> internal_try_acquire (<a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>);
-<a name="l00119"></a>00119 <span class="preprocessor">#else</span>
-<a name="l00120"></a>00120 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result;
-<a name="l00121"></a>00121 <span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00122"></a>00122 <span class="preprocessor"></span>            result = TryEnterCriticalSection(&<a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>.impl)!=0;
-<a name="l00123"></a>00123 <span class="preprocessor">  #else</span>
-<a name="l00124"></a>00124 <span class="preprocessor"></span>            result = pthread_mutex_trylock(&<a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>.impl)==0;
-<a name="l00125"></a>00125 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00126"></a>00126             <span class="keywordflow">if</span>( result )
-<a name="l00127"></a>00127                 my_mutex = &<a class="code" href="a00112.html#05313cb77d4f85213103d4dab74ed454">mutex</a>;
-<a name="l00128"></a>00128             <span class="keywordflow">return</span> result;
-<a name="l00129"></a>00129 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00130"></a>00130         }
-<a name="l00131"></a>00131 
-<a name="l00133"></a><a class="code" href="a00113.html#0d51d18cd99df3b2e93bf07378d0992c">00133</a>         <span class="keywordtype">void</span> <a class="code" href="a00113.html#0d51d18cd99df3b2e93bf07378d0992c">release</a>() {
-<a name="l00134"></a>00134 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00135"></a>00135 <span class="preprocessor"></span>            internal_release ();
-<a name="l00136"></a>00136 <span class="preprocessor">#else</span>
-<a name="l00137"></a>00137 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00138"></a>00138 <span class="preprocessor"></span>            LeaveCriticalSection(&my_mutex-><a class="code" href="a00112.html#81ef45404275dd92c10ace5b1cfefed7">impl</a>);
-<a name="l00139"></a>00139 <span class="preprocessor">  #else</span>
-<a name="l00140"></a>00140 <span class="preprocessor"></span>            pthread_mutex_unlock(&my_mutex-><a class="code" href="a00112.html#81ef45404275dd92c10ace5b1cfefed7">impl</a>);
-<a name="l00141"></a>00141 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00142"></a>00142             my_mutex = NULL;
-<a name="l00143"></a>00143 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00144"></a>00144         }
-<a name="l00145"></a>00145 
-<a name="l00146"></a>00146     <span class="keyword">private</span>:
-<a name="l00148"></a>00148         <a class="code" href="a00112.html">mutex</a>* my_mutex;
-<a name="l00149"></a>00149 
-<a name="l00151"></a>00151         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire( <a class="code" href="a00112.html">mutex</a>& m );
-<a name="l00152"></a>00152 
-<a name="l00154"></a>00154         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire( <a class="code" href="a00112.html">mutex</a>& m );
-<a name="l00155"></a>00155 
-<a name="l00157"></a>00157         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release();
-<a name="l00158"></a>00158     };
-<a name="l00159"></a>00159 
-<a name="l00160"></a>00160     <span class="comment">// Mutex traits</span>
-<a name="l00161"></a>00161     <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="l00162"></a>00162     <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="l00163"></a>00163     <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="l00164"></a>00164 
-<a name="l00165"></a>00165 <span class="keyword">private</span>:
-<a name="l00166"></a>00166 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00167"></a>00167 <span class="preprocessor"></span>    CRITICAL_SECTION impl;    
-<a name="l00168"></a>00168     <span class="keyword">enum</span> state_t {
-<a name="l00169"></a>00169         INITIALIZED=0x1234,
-<a name="l00170"></a>00170         DESTROYED=0x789A,
-<a name="l00171"></a>00171         HELD=0x56CD
-<a name="l00172"></a>00172     } state;
-<a name="l00173"></a>00173 <span class="preprocessor">#else</span>
-<a name="l00174"></a>00174 <span class="preprocessor"></span>    pthread_mutex_t impl;
-<a name="l00175"></a>00175 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00176"></a>00176 
-<a name="l00178"></a>00178     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
-<a name="l00179"></a>00179 
-<a name="l00181"></a>00181     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_destroy();
-<a name="l00182"></a>00182 };
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184 __TBB_DEFINE_PROFILING_SET_NAME(mutex)
-<a name="l00185"></a>00185 
-<a name="l00186"></a>00186 } <span class="comment">// namespace tbb </span>
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_mutex_H */</span>
-</pre></div><hr>
+<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>
diff --git a/doc/html/a00229.html b/doc/html/a00229.html
index 046da71..4147d05 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>null_mutex.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,65 +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>null_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_null_mutex_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_null_mutex_H</span>
-<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="a00181.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="a00181.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>
-</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/a00185.html b/doc/html/a00230.html
similarity index 84%
rename from doc/html/a00185.html
rename to doc/html/a00230.html
index f46dc59..b531267 100644
--- a/doc/html/a00185.html
+++ b/doc/html/a00230.html
@@ -17,43 +17,49 @@
 <h1>Memory Allocation</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="a00092.html">tbb::aligned_space< T, N ></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">tbb::aligned_space< T, N ></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="a00092.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="a00100.html">tbb::cache_aligned_allocator< T ></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">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html">tbb::cache_aligned_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="a00100.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="a00101.html">tbb::cache_aligned_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="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">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="a00101.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::scalable_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="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="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <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">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="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">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <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="a00136.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="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">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <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="a00137.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="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">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00137.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="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">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">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 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="a00185.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#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="a00185.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#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="a00185.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#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="a00185.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="a00230.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="a00185.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="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">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00185.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#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="a00185.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#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="a00185.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="a00230.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</a> (void *ptr)</td></tr>
 
 </table>
 <hr><h2>Function Documentation</h2>
diff --git a/doc/html/a00186.html b/doc/html/a00231.html
similarity index 77%
rename from doc/html/a00186.html
rename to doc/html/a00231.html
index 05125d7..e31b197 100644
--- a/doc/html/a00186.html
+++ b/doc/html/a00231.html
@@ -17,27 +17,27 @@
 <h1>Synchronization</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">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00093.html">tbb::atomic< T ></a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html">tbb::atomic< T ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Primary template for atomic.  <a href="a00093.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="a00112.html">tbb::mutex</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">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="a00112.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="a00118.html">tbb::queuing_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="mdescLeft"> </td><td class="mdescRight">Queuing lock with local-only spinning.  <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="a00120.html">tbb::queuing_rw_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">Reader-writer lock with local-only spinning.  <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="a00122.html">tbb::recursive_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">Mutex that allows recursive mutex acquisition.  <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="a00127.html">tbb::spin_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">A lock that occupies a single byte.  <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="a00129.html">tbb::spin_rw_mutex_v3</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">Fast, unfair, spinning reader-writer lock with backoff and writer-preference.  <a href="a00129.html#_details">More...</a><br></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>
 </table>
 <hr>
 <p></p>
diff --git a/doc/html/a00232.html b/doc/html/a00232.html
index 90aa2c0..b4981c7 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>null_rw_mutex.h Source File</title>
+<title>Timing</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -11,67 +11,17 @@
     <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>null_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_null_rw_mutex_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_null_rw_mutex_H</span>
-<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="a00181.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="a00181.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>
-</pre></div><hr>
+<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="mdescLeft"> </td><td class="mdescRight">Absolute timestamp.  <a href="a00172.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/a00188.html b/doc/html/a00233.html
similarity index 79%
rename from doc/html/a00188.html
rename to doc/html/a00233.html
index 32d5667..5011be4 100644
--- a/doc/html/a00188.html
+++ b/doc/html/a00233.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="a00133.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="a00163.html">tbb::task_group_context</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to form groups of tasks.  <a href="a00133.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="a00132.html">tbb::task</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">Base class for user-defined tasks.  <a href="a00132.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="a00108.html">tbb::empty_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">tbb::empty_task</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task that does nothing. Useful for synchronization.  <a href="a00108.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::task_list</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 list of children.  <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="a00135.html">tbb::task_scheduler_init</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">Class representing reference to tbb scheduler.  <a href="a00135.html#_details">More...</a><br></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>
 </table>
 <hr>
 <p></p>
diff --git a/doc/html/a00234.html b/doc/html/a00234.html
index 75f354d..01dca2c 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>parallel_do.h Source File</title>
+<title>_concurrent_queue_internal.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>parallel_do.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<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>
@@ -39,436 +39,853 @@
 <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_parallel_do_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_do_H</span>
+<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 "task.h"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "aligned_space.h"</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include <iterator></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 <span class="keyword">namespace </span>internal {
-<a name="l00032"></a>00032     <span class="keyword">template</span><<span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item> <span class="keyword">class </span>parallel_do_feeder_impl;
-<a name="l00033"></a>00033     <span class="keyword">template</span><<span class="keyword">typename</span> Body> <span class="keyword">class </span>do_group_task;
+<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="l00036"></a>00036     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00037"></a>00037     <span class="keyword">struct </span>strip { <span class="keyword">typedef</span> T type; };
-<a name="l00038"></a>00038     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00039"></a>00039     <span class="keyword">struct </span>strip<T&> { <span class="keyword">typedef</span> T type; };
-<a name="l00040"></a>00040     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00041"></a>00041     <span class="keyword">struct </span>strip<const T&> { <span class="keyword">typedef</span> T type; };
-<a name="l00042"></a>00042     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00043"></a>00043     <span class="keyword">struct </span>strip<volatile T&> { <span class="keyword">typedef</span> T type; };
-<a name="l00044"></a>00044     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00045"></a>00045     <span class="keyword">struct </span>strip<const volatile T&> { <span class="keyword">typedef</span> T type; };
-<a name="l00046"></a>00046     <span class="comment">// Most of the compilers remove cv-qualifiers from non-reference function argument types. </span>
-<a name="l00047"></a>00047     <span class="comment">// But unfortunately there are those that don't.</span>
-<a name="l00048"></a>00048     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00049"></a>00049     <span class="keyword">struct </span>strip<const T> { <span class="keyword">typedef</span> T type; };
-<a name="l00050"></a>00050     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00051"></a>00051     <span class="keyword">struct </span>strip<volatile T> { <span class="keyword">typedef</span> T type; };
-<a name="l00052"></a>00052     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00053"></a>00053     <span class="keyword">struct </span>strip<const volatile T> { <span class="keyword">typedef</span> T type; };
-<a name="l00054"></a>00054 } <span class="comment">// namespace internal</span>
-<a name="l00056"></a>00056 <span class="comment"></span>
+<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">template</span><<span class="keyword">typename</span> Item>
-<a name="l00060"></a><a class="code" href="a00114.html">00060</a> <span class="keyword">class </span><a class="code" href="a00114.html">parallel_do_feeder</a>: internal::no_copy
-<a name="l00061"></a>00061 {
-<a name="l00062"></a>00062     <a class="code" href="a00114.html">parallel_do_feeder</a>() {}
-<a name="l00063"></a>00063     <span class="keyword">virtual</span> ~<a class="code" href="a00114.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="a00114.html#40baaf0f6856f4491dd0adf896c93516">00068</a>     <span class="keywordtype">void</span> <a class="code" href="a00114.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 {
-<a name="l00074"></a>00074 
-<a name="l00076"></a>00076     <span class="keyword">template</span><<span class="keyword">class</span> Body, <span class="keyword">typename</span> Item>
-<a name="l00077"></a>00077     <span class="keyword">class </span>parallel_do_operator_selector
-<a name="l00078"></a>00078     {
-<a name="l00079"></a>00079         <span class="keyword">typedef</span> parallel_do_feeder<Item> Feeder;
-<a name="l00080"></a>00080         <span class="keyword">template</span><<span class="keyword">typename</span> A1, <span class="keyword">typename</span> A2, <span class="keyword">typename</span> CvItem >
-<a name="l00081"></a>00081         <span class="keyword">static</span> <span class="keywordtype">void</span> internal_call( <span class="keyword">const</span> Body& obj, A1& arg1, A2&, <span class="keywordtype">void</span> (Body::*)(CvItem) <span class="keyword">const</span> ) {
-<a name="l00082"></a>00082             obj(arg1);
-<a name="l00083"></a>00083         }
-<a name="l00084"></a>00084         <span class="keyword">template</span><<span class="keyword">typename</span> A1, <span class="keyword">typename</span> A2, <span class="keyword">typename</span> CvItem >
-<a name="l00085"></a>00085         <span class="keyword">static</span> <span class="keywordtype">void</span> internal_call( <span class="keyword">const</span> Body& obj, A1& arg1, A2& arg2, <span class="keywordtype">void</span> (Body::*)(CvItem, parallel_do_feeder<Item>&) <span class="keyword">const</span> ) {
-<a name="l00086"></a>00086             obj(arg1, arg2);
-<a name="l00087"></a>00087         }
-<a name="l00088"></a>00088 
-<a name="l00089"></a>00089     <span class="keyword">public</span>:
-<a name="l00090"></a>00090         <span class="keyword">template</span><<span class="keyword">typename</span> A1, <span class="keyword">typename</span> A2 >
-<a name="l00091"></a>00091         <span class="keyword">static</span> <span class="keywordtype">void</span> call( <span class="keyword">const</span> Body& obj, A1& arg1, A2& arg2 )
-<a name="l00092"></a>00092         {
-<a name="l00093"></a>00093             internal_call( obj, arg1, arg2, &Body::operator() );
-<a name="l00094"></a>00094         }
-<a name="l00095"></a>00095     };
-<a name="l00096"></a>00096 
-<a name="l00098"></a>00098 
-<a name="l00100"></a>00100     <span class="keyword">template</span><<span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item>
-<a name="l00101"></a>00101     <span class="keyword">class </span>do_iteration_task: <span class="keyword">public</span> task
-<a name="l00102"></a>00102     {
-<a name="l00103"></a>00103         <span class="keyword">typedef</span> parallel_do_feeder_impl<Body, Item> feeder_type;
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105         Item my_value;
-<a name="l00106"></a>00106         feeder_type& my_feeder;
-<a name="l00107"></a>00107 
-<a name="l00108"></a>00108         do_iteration_task( <span class="keyword">const</span> Item& value, feeder_type& feeder ) : 
-<a name="l00109"></a>00109             my_value(value), my_feeder(feeder)
-<a name="l00110"></a>00110         {}
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112         <span class="comment">/*override*/</span> 
-<a name="l00113"></a>00113         task* execute()
-<a name="l00114"></a>00114         {
-<a name="l00115"></a>00115             parallel_do_operator_selector<Body, Item>::call(*my_feeder.my_body, my_value, my_feeder);
-<a name="l00116"></a>00116             <span class="keywordflow">return</span> NULL;
-<a name="l00117"></a>00117         }
+<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="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>parallel_do_feeder_impl;
-<a name="l00120"></a>00120     }; <span class="comment">// class do_iteration_task</span>
-<a name="l00121"></a>00121 
-<a name="l00122"></a>00122     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item>
-<a name="l00123"></a>00123     <span class="keyword">class </span>do_iteration_task_iter: <span class="keyword">public</span> task
-<a name="l00124"></a>00124     {
-<a name="l00125"></a>00125         <span class="keyword">typedef</span> parallel_do_feeder_impl<Body, Item> feeder_type;
+<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="l00127"></a>00127         Iterator my_iter;
-<a name="l00128"></a>00128         feeder_type& my_feeder;
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         do_iteration_task_iter( <span class="keyword">const</span> Iterator& iter, feeder_type& feeder ) : 
-<a name="l00131"></a>00131             my_iter(iter), my_feeder(feeder)
-<a name="l00132"></a>00132         {}
-<a name="l00133"></a>00133 
-<a name="l00134"></a>00134         <span class="comment">/*override*/</span> 
-<a name="l00135"></a>00135         task* execute()
-<a name="l00136"></a>00136         {
-<a name="l00137"></a>00137             parallel_do_operator_selector<Body, Item>::call(*my_feeder.my_body, *my_iter, my_feeder);
-<a name="l00138"></a>00138             <span class="keywordflow">return</span> NULL;
-<a name="l00139"></a>00139         }
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141         <span class="keyword">template</span><<span class="keyword">typename</span> Iterator_, <span class="keyword">typename</span> Body_, <span class="keyword">typename</span> Item_> <span class="keyword">friend</span> <span class="keyword">class </span>do_group_task_forward;    
-<a name="l00142"></a>00142         <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>do_group_task_input;    
-<a name="l00143"></a>00143         <span class="keyword">template</span><<span class="keyword">typename</span> Iterator_, <span class="keyword">typename</span> Body_, <span class="keyword">typename</span> Item_> <span class="keyword">friend</span> <span class="keyword">class </span>do_task_iter;    
-<a name="l00144"></a>00144     }; <span class="comment">// class do_iteration_task_iter</span>
-<a name="l00145"></a>00145 
+<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="l00149"></a>00149     <span class="keyword">template</span><<span class="keyword">class</span> Body, <span class="keyword">typename</span> Item>
-<a name="l00150"></a>00150     <span class="keyword">class </span>parallel_do_feeder_impl : <span class="keyword">public</span> parallel_do_feeder<Item>
-<a name="l00151"></a>00151     {
-<a name="l00152"></a>00152         <span class="comment">/*override*/</span> 
-<a name="l00153"></a>00153         <span class="keywordtype">void</span> internal_add( <span class="keyword">const</span> Item& item )
-<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="a00132.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         }
-<a name="l00161"></a>00161     <span class="keyword">public</span>:
-<a name="l00162"></a>00162         <span class="keyword">const</span> Body* my_body;
-<a name="l00163"></a>00163         empty_task* my_barrier;
-<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="a00132.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="a00133.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="a00132.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>
-<a name="l00178"></a>00178 <span class="preprocessor"></span>
-<a name="l00179"></a>00179         ~parallel_do_feeder_impl()
-<a name="l00180"></a>00180         {
-<a name="l00181"></a>00181             my_barrier->destroy(*my_barrier);
-<a name="l00182"></a>00182         }
-<a name="l00183"></a>00183     }; <span class="comment">// class parallel_do_feeder_impl</span>
-<a name="l00184"></a>00184 
-<a name="l00185"></a>00185 
-<a name="l00187"></a>00187 
-<a name="l00190"></a>00190     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item>
-<a name="l00191"></a>00191     <span class="keyword">class </span>do_group_task_forward: <span class="keyword">public</span> task
-<a name="l00192"></a>00192     {
-<a name="l00193"></a>00193         <span class="keyword">static</span> <span class="keyword">const</span> size_t max_arg_size = 4;         
-<a name="l00194"></a>00194 
-<a name="l00195"></a>00195         <span class="keyword">typedef</span> parallel_do_feeder_impl<Body, Item> feeder_type;
-<a name="l00196"></a>00196 
-<a name="l00197"></a>00197         feeder_type& my_feeder;
-<a name="l00198"></a>00198         Iterator my_first;
-<a name="l00199"></a>00199         size_t my_size;
-<a name="l00200"></a>00200         
-<a name="l00201"></a>00201         do_group_task_forward( Iterator first, size_t size, feeder_type& feeder ) 
-<a name="l00202"></a>00202             : my_feeder(feeder), my_first(first), my_size(size)
-<a name="l00203"></a>00203         {}
-<a name="l00204"></a>00204 
-<a name="l00205"></a>00205         <span class="comment">/*override*/</span> task* execute()
-<a name="l00206"></a>00206         {
-<a name="l00207"></a>00207             <span class="keyword">typedef</span> do_iteration_task_iter<Iterator, Body, Item> iteration_type;
-<a name="l00208"></a>00208             __TBB_ASSERT( my_size>0, NULL );
-<a name="l00209"></a>00209             task_list list;
-<a name="l00210"></a>00210             task* t; 
-<a name="l00211"></a>00211             size_t k=0; 
-<a name="l00212"></a>00212             <span class="keywordflow">for</span>(;;) {
-<a name="l00213"></a>00213                 t = <span class="keyword">new</span>( allocate_child() ) iteration_type( my_first, my_feeder );
-<a name="l00214"></a>00214                 ++my_first;
-<a name="l00215"></a>00215                 <span class="keywordflow">if</span>( ++k==my_size ) <span class="keywordflow">break</span>;
-<a name="l00216"></a>00216                 list.push_back(*t);
-<a name="l00217"></a>00217             }
-<a name="l00218"></a>00218             set_ref_count(<span class="keywordtype">int</span>(k+1));
-<a name="l00219"></a>00219             spawn(list);
-<a name="l00220"></a>00220             spawn_and_wait_for_all(*t);
-<a name="l00221"></a>00221             <span class="keywordflow">return</span> NULL;
-<a name="l00222"></a>00222         }
-<a name="l00223"></a>00223 
-<a name="l00224"></a>00224         <span class="keyword">template</span><<span class="keyword">typename</span> Iterator_, <span class="keyword">typename</span> Body_, <span class="keyword">typename</span> _Item> <span class="keyword">friend</span> <span class="keyword">class </span>do_task_iter;
-<a name="l00225"></a>00225     }; <span class="comment">// class do_group_task_forward</span>
-<a name="l00226"></a>00226 
-<a name="l00227"></a>00227     <span class="keyword">template</span><<span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item>
-<a name="l00228"></a>00228     <span class="keyword">class </span>do_group_task_input: <span class="keyword">public</span> task
-<a name="l00229"></a>00229     {
-<a name="l00230"></a>00230         <span class="keyword">static</span> <span class="keyword">const</span> size_t max_arg_size = 4;         
-<a name="l00231"></a>00231         
-<a name="l00232"></a>00232         <span class="keyword">typedef</span> parallel_do_feeder_impl<Body, Item> feeder_type;
-<a name="l00233"></a>00233 
-<a name="l00234"></a>00234         feeder_type& my_feeder;
-<a name="l00235"></a>00235         size_t my_size;
-<a name="l00236"></a>00236         aligned_space<Item, max_arg_size> my_arg;
-<a name="l00237"></a>00237 
-<a name="l00238"></a>00238         do_group_task_input( feeder_type& feeder ) 
-<a name="l00239"></a>00239             : my_feeder(feeder), my_size(0)
-<a name="l00240"></a>00240         {}
-<a name="l00241"></a>00241 
-<a name="l00242"></a>00242         <span class="comment">/*override*/</span> task* execute()
-<a name="l00243"></a>00243         {
-<a name="l00244"></a>00244             <span class="keyword">typedef</span> do_iteration_task_iter<Item*, Body, Item> iteration_type;
-<a name="l00245"></a>00245             __TBB_ASSERT( my_size>0, NULL );
-<a name="l00246"></a>00246             task_list list;
-<a name="l00247"></a>00247             task* t; 
-<a name="l00248"></a>00248             size_t k=0; 
-<a name="l00249"></a>00249             <span class="keywordflow">for</span>(;;) {
-<a name="l00250"></a>00250                 t = <span class="keyword">new</span>( allocate_child() ) iteration_type( my_arg.begin() + k, my_feeder );
-<a name="l00251"></a>00251                 <span class="keywordflow">if</span>( ++k==my_size ) <span class="keywordflow">break</span>;
-<a name="l00252"></a>00252                 list.push_back(*t);
-<a name="l00253"></a>00253             }
-<a name="l00254"></a>00254             set_ref_count(<span class="keywordtype">int</span>(k+1));
-<a name="l00255"></a>00255             spawn(list);
-<a name="l00256"></a>00256             spawn_and_wait_for_all(*t);
-<a name="l00257"></a>00257             <span class="keywordflow">return</span> NULL;
-<a name="l00258"></a>00258         }
-<a name="l00259"></a>00259 
-<a name="l00260"></a>00260         ~do_group_task_input(){
-<a name="l00261"></a>00261             <span class="keywordflow">for</span>( size_t k=0; k<my_size; ++k)
-<a name="l00262"></a>00262                 (my_arg.begin() + k)->~Item();
-<a name="l00263"></a>00263         }
-<a name="l00264"></a>00264 
-<a name="l00265"></a>00265         <span class="keyword">template</span><<span class="keyword">typename</span> Iterator_, <span class="keyword">typename</span> Body_, <span class="keyword">typename</span> Item_> <span class="keyword">friend</span> <span class="keyword">class </span>do_task_iter;
-<a name="l00266"></a>00266     }; <span class="comment">// class do_group_task_input</span>
-<a name="l00267"></a>00267     
-<a name="l00269"></a>00269 
-<a name="l00271"></a>00271     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item>
-<a name="l00272"></a>00272     <span class="keyword">class </span>do_task_iter: <span class="keyword">public</span> task
-<a name="l00273"></a>00273     {
-<a name="l00274"></a>00274         <span class="keyword">typedef</span> parallel_do_feeder_impl<Body, Item> feeder_type;
-<a name="l00275"></a>00275 
-<a name="l00276"></a>00276     <span class="keyword">public</span>:
-<a name="l00277"></a>00277         do_task_iter( Iterator first, Iterator last , feeder_type& feeder ) : 
-<a name="l00278"></a>00278             my_first(first), my_last(last), my_feeder(feeder)
-<a name="l00279"></a>00279         {}
-<a name="l00280"></a>00280 
-<a name="l00281"></a>00281     <span class="keyword">private</span>:
-<a name="l00282"></a>00282         Iterator my_first;
-<a name="l00283"></a>00283         Iterator my_last;
-<a name="l00284"></a>00284         feeder_type& my_feeder;
-<a name="l00285"></a>00285 
-<a name="l00286"></a>00286         <span class="comment">/* Do not merge run(xxx) and run_xxx() methods. They are separated in order</span>
-<a name="l00287"></a>00287 <span class="comment">            to make sure that compilers will eliminate unused argument of type xxx</span>
-<a name="l00288"></a>00288 <span class="comment">            (that is will not put it on stack). The sole purpose of this argument </span>
-<a name="l00289"></a>00289 <span class="comment">            is overload resolution.</span>
-<a name="l00290"></a>00290 <span class="comment">            </span>
-<a name="l00291"></a>00291 <span class="comment">            An alternative could be using template functions, but explicit specialization </span>
-<a name="l00292"></a>00292 <span class="comment">            of member function templates is not supported for non specialized class </span>
-<a name="l00293"></a>00293 <span class="comment">            templates. Besides template functions would always fall back to the least </span>
-<a name="l00294"></a>00294 <span class="comment">            efficient variant (the one for input iterators) in case of iterators having </span>
-<a name="l00295"></a>00295 <span class="comment">            custom tags derived from basic ones. */</span>
-<a name="l00296"></a>00296         <span class="comment">/*override*/</span> task* execute()
-<a name="l00297"></a>00297         {
-<a name="l00298"></a>00298             <span class="keyword">typedef</span> <span class="keyword">typename</span> std::iterator_traits<Iterator>::iterator_category iterator_tag;
-<a name="l00299"></a>00299             <span class="keywordflow">return</span> run( (iterator_tag*)NULL );
-<a name="l00300"></a>00300         }
-<a name="l00301"></a>00301 
-<a name="l00304"></a>00304         <span class="keyword">inline</span> task* run( <span class="keywordtype">void</span>* ) { <span class="keywordflow">return</span> run_for_input_iterator(); }
-<a name="l00305"></a>00305         
-<a name="l00306"></a>00306         task* run_for_input_iterator() {
-<a name="l00307"></a>00307             <span class="keyword">typedef</span> do_group_task_input<Body, Item> block_type;
-<a name="l00308"></a>00308 
-<a name="l00309"></a>00309             block_type& t = *<span class="keyword">new</span>( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(my_feeder);
-<a name="l00310"></a>00310             size_t k=0; 
-<a name="l00311"></a>00311             <span class="keywordflow">while</span>( !(my_first == my_last) ) {
-<a name="l00312"></a>00312                 <span class="keyword">new</span> (t.my_arg.begin() + k) Item(*my_first);
-<a name="l00313"></a>00313                 ++my_first;
-<a name="l00314"></a>00314                 <span class="keywordflow">if</span>( ++k==block_type::max_arg_size ) {
-<a name="l00315"></a>00315                     <span class="keywordflow">if</span> ( !(my_first == my_last) )
-<a name="l00316"></a>00316                         recycle_to_reexecute();
-<a name="l00317"></a>00317                     <span class="keywordflow">break</span>;
-<a name="l00318"></a>00318                 }
-<a name="l00319"></a>00319             }
-<a name="l00320"></a>00320             <span class="keywordflow">if</span>( k==0 ) {
-<a name="l00321"></a>00321                 destroy(t);
-<a name="l00322"></a>00322                 <span class="keywordflow">return</span> NULL;
-<a name="l00323"></a>00323             } <span class="keywordflow">else</span> {
-<a name="l00324"></a>00324                 t.my_size = k;
-<a name="l00325"></a>00325                 <span class="keywordflow">return</span> &t;
-<a name="l00326"></a>00326             }
-<a name="l00327"></a>00327         }
-<a name="l00328"></a>00328 
-<a name="l00329"></a>00329         <span class="keyword">inline</span> task* run( std::forward_iterator_tag* ) { <span class="keywordflow">return</span> run_for_forward_iterator(); }
-<a name="l00330"></a>00330 
-<a name="l00331"></a>00331         task* run_for_forward_iterator() {
-<a name="l00332"></a>00332             <span class="keyword">typedef</span> do_group_task_forward<Iterator, Body, Item> block_type;
-<a name="l00333"></a>00333 
-<a name="l00334"></a>00334             Iterator first = my_first;
-<a name="l00335"></a>00335             size_t k=0; 
-<a name="l00336"></a>00336             <span class="keywordflow">while</span>( !(my_first==my_last) ) {
-<a name="l00337"></a>00337                 ++my_first;
-<a name="l00338"></a>00338                 <span class="keywordflow">if</span>( ++k==block_type::max_arg_size ) {
-<a name="l00339"></a>00339                     <span class="keywordflow">if</span> ( !(my_first==my_last) )
-<a name="l00340"></a>00340                         recycle_to_reexecute();
-<a name="l00341"></a>00341                     <span class="keywordflow">break</span>;
-<a name="l00342"></a>00342                 }
-<a name="l00343"></a>00343             }
-<a name="l00344"></a>00344             <span class="keywordflow">return</span> k==0 ? NULL : <span class="keyword">new</span>( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(first, k, my_feeder);
-<a name="l00345"></a>00345         }
-<a name="l00346"></a>00346         
-<a name="l00347"></a>00347         <span class="keyword">inline</span> task* run( std::random_access_iterator_tag* ) { <span class="keywordflow">return</span> run_for_random_access_iterator(); }
-<a name="l00348"></a>00348 
-<a name="l00349"></a>00349         task* run_for_random_access_iterator() {
-<a name="l00350"></a>00350             <span class="keyword">typedef</span> do_group_task_forward<Iterator, Body, Item> block_type;
-<a name="l00351"></a>00351             <span class="keyword">typedef</span> do_iteration_task_iter<Iterator, Body, Item> iteration_type;
-<a name="l00352"></a>00352             
-<a name="l00353"></a>00353             size_t k = static_cast<size_t>(my_last-my_first); 
-<a name="l00354"></a>00354             <span class="keywordflow">if</span>( k > block_type::max_arg_size ) {
-<a name="l00355"></a>00355                 Iterator middle = my_first + k/2;
+<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                 empty_task& c = *<span class="keyword">new</span>( allocate_continuation() ) empty_task;
-<a name="l00358"></a>00358                 do_task_iter& b = *<span class="keyword">new</span>( c.allocate_child() ) do_task_iter(middle, my_last, my_feeder);
-<a name="l00359"></a>00359                 recycle_as_child_of(c);
-<a name="l00360"></a>00360 
-<a name="l00361"></a>00361                 my_last = middle;
-<a name="l00362"></a>00362                 c.set_ref_count(2);
-<a name="l00363"></a>00363                 c.spawn(b);
-<a name="l00364"></a>00364                 <span class="keywordflow">return</span> <span class="keyword">this</span>;
-<a name="l00365"></a>00365             }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( k != 0 ) {
-<a name="l00366"></a>00366                 task_list list;
-<a name="l00367"></a>00367                 task* t; 
-<a name="l00368"></a>00368                 size_t k1=0; 
-<a name="l00369"></a>00369                 <span class="keywordflow">for</span>(;;) {
-<a name="l00370"></a>00370                     t = <span class="keyword">new</span>( allocate_child() ) iteration_type(my_first, my_feeder);
-<a name="l00371"></a>00371                     ++my_first;
-<a name="l00372"></a>00372                     <span class="keywordflow">if</span>( ++k1==k ) <span class="keywordflow">break</span>;
-<a name="l00373"></a>00373                     list.push_back(*t);
-<a name="l00374"></a>00374                 }
-<a name="l00375"></a>00375                 set_ref_count(<span class="keywordtype">int</span>(k+1));
-<a name="l00376"></a>00376                 spawn(list);
-<a name="l00377"></a>00377                 spawn_and_wait_for_all(*t);
-<a name="l00378"></a>00378             }
-<a name="l00379"></a>00379             <span class="keywordflow">return</span> NULL;
-<a name="l00380"></a>00380         }
-<a name="l00381"></a>00381     }; <span class="comment">// class do_task_iter</span>
+<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="l00386"></a>00386     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item> 
-<a name="l00387"></a>00387     <span class="keywordtype">void</span> run_parallel_do( Iterator first, Iterator last, <span class="keyword">const</span> Body& body
-<a name="l00388"></a>00388 #<span class="keywordflow">if</span> __TBB_EXCEPTIONS
-<a name="l00389"></a>00389         , task_group_context& context
-<a name="l00390"></a>00390 #endif
-<a name="l00391"></a>00391         )
-<a name="l00392"></a>00392     {
-<a name="l00393"></a>00393         <span class="keyword">typedef</span> do_task_iter<Iterator, Body, Item> root_iteration_task;
-<a name="l00394"></a>00394 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00395"></a>00395 <span class="preprocessor"></span>        parallel_do_feeder_impl<Body, Item> feeder(context);
-<a name="l00396"></a>00396 <span class="preprocessor">#else</span>
-<a name="l00397"></a>00397 <span class="preprocessor"></span>        parallel_do_feeder_impl<Body, Item> feeder;
-<a name="l00398"></a>00398 <span class="preprocessor">#endif</span>
-<a name="l00399"></a>00399 <span class="preprocessor"></span>        feeder.my_body = &body;
+<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         root_iteration_task &t = *<span class="keyword">new</span>( feeder.my_barrier->allocate_child() ) root_iteration_task(first, last, feeder);
-<a name="l00402"></a>00402 
-<a name="l00403"></a>00403         feeder.my_barrier->set_ref_count(2);
-<a name="l00404"></a>00404         feeder.my_barrier->spawn_and_wait_for_all(t);
-<a name="l00405"></a>00405     }
-<a name="l00406"></a>00406 
-<a name="l00408"></a>00408 
-<a name="l00410"></a>00410     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item> 
-<a name="l00411"></a>00411     <span class="keywordtype">void</span> select_parallel_do( Iterator first, Iterator last, <span class="keyword">const</span> Body& body, <span class="keywordtype">void</span> (Body::*)(Item) <span class="keyword">const</span>
-<a name="l00412"></a>00412 #<span class="keywordflow">if</span> __TBB_EXCEPTIONS
-<a name="l00413"></a>00413         , task_group_context& context 
-<a name="l00414"></a>00414 #endif <span class="comment">// __TBB_EXCEPTIONS </span>
-<a name="l00415"></a>00415         )
-<a name="l00416"></a>00416     {
-<a name="l00417"></a>00417         run_parallel_do<Iterator, Body, typename strip<Item>::type>( first, last, body
-<a name="l00418"></a>00418 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00419"></a>00419 <span class="preprocessor"></span>            , context
-<a name="l00420"></a>00420 <span class="preprocessor">#endif // __TBB_EXCEPTIONS </span>
-<a name="l00421"></a>00421 <span class="preprocessor"></span>            );
-<a name="l00422"></a>00422     }
-<a name="l00423"></a>00423 
-<a name="l00425"></a>00425 
-<a name="l00427"></a>00427     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item, <span class="keyword">typename</span> _Item> 
-<a name="l00428"></a>00428     <span class="keywordtype">void</span> select_parallel_do( Iterator first, Iterator last, <span class="keyword">const</span> Body& body, <span class="keywordtype">void</span> (Body::*)(Item, parallel_do_feeder<_Item>&) <span class="keyword">const</span>
-<a name="l00429"></a>00429 #<span class="keywordflow">if</span> __TBB_EXCEPTIONS
-<a name="l00430"></a>00430         , task_group_context& context 
-<a name="l00431"></a>00431 #endif <span class="comment">// __TBB_EXCEPTIONS</span>
-<a name="l00432"></a>00432         )
-<a name="l00433"></a>00433     {
-<a name="l00434"></a>00434         run_parallel_do<Iterator, Body, typename strip<Item>::type>( first, last, body
-<a name="l00435"></a>00435 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00436"></a>00436 <span class="preprocessor"></span>            , context
-<a name="l00437"></a>00437 <span class="preprocessor">#endif // __TBB_EXCEPTIONS</span>
-<a name="l00438"></a>00438 <span class="preprocessor"></span>            );
-<a name="l00439"></a>00439     }
+<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="l00441"></a>00441 } <span class="comment">// namespace internal</span>
-<a name="l00443"></a>00443 <span class="comment"></span>
-<a name="l00444"></a>00444 
-<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="a00183.html#g3383e2703977012b6f384d673410f1f7">00470</a> <span class="keywordtype">void</span> <a class="code" href="a00183.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="a00133.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
-<a name="l00479"></a>00479         , context
-<a name="l00480"></a>00480 #endif <span class="comment">// __TBB_EXCEPTIONS</span>
-<a name="l00481"></a>00481         );
-<a name="l00482"></a>00482 }
-<a name="l00483"></a>00483 
-<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="a00183.html#g2617dc9b88b3285a7212599d49f74228">00488</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00183.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& body, <a class="code" href="a00133.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>;
-<a name="l00492"></a>00492     internal::select_parallel_do( first, last, body, &Body::operator(), context );
-<a name="l00493"></a>00493 }
-<a name="l00494"></a>00494 <span class="preprocessor">#endif // __TBB_EXCEPTIONS</span>
-<a name="l00495"></a>00495 <span class="preprocessor"></span>
-<a name="l00497"></a>00497 
-<a name="l00498"></a>00498 } <span class="comment">// namespace </span>
-<a name="l00499"></a>00499 
-<a name="l00500"></a>00500 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_do_H */</span>
+<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>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00243.html b/doc/html/a00243.html
deleted file mode 100644
index 6050c22..0000000
--- a/doc/html/a00243.html
+++ /dev/null
@@ -1,174 +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>parallel_for.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>parallel_for.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_parallel_for_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_for_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 "partitioner.h"</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include <new></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 <span class="keyword">namespace </span>internal {
-<a name="l00032"></a>00032 
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
-<a name="l00036"></a>00036     <span class="keyword">class </span>start_for: <span class="keyword">public</span> task {
-<a name="l00037"></a>00037         Range my_range;
-<a name="l00038"></a>00038         <span class="keyword">const</span> Body my_body;
-<a name="l00039"></a>00039         <span class="keyword">typename</span> Partitioner::partition_type my_partition;
-<a name="l00040"></a>00040         <span class="comment">/*override*/</span> task* execute();
-<a name="l00041"></a>00041 
-<a name="l00043"></a>00043         start_for( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, Partitioner& partitioner ) :
-<a name="l00044"></a>00044             my_range(range),    
-<a name="l00045"></a>00045             my_body(body),
-<a name="l00046"></a>00046             my_partition(partitioner)
-<a name="l00047"></a>00047         {
-<a name="l00048"></a>00048         }
-<a name="l00050"></a>00050 
-<a name="l00051"></a>00051         start_for( start_for& parent, split ) :
-<a name="l00052"></a>00052             my_range(parent.my_range,split()),    
-<a name="l00053"></a>00053             my_body(parent.my_body),
-<a name="l00054"></a>00054             my_partition(parent.my_partition,split())
-<a name="l00055"></a>00055         {
-<a name="l00056"></a>00056             my_partition.set_affinity(*<span class="keyword">this</span>);
-<a name="l00057"></a>00057         }
-<a name="l00059"></a>00059         <span class="comment">/*override*/</span> <span class="keywordtype">void</span> note_affinity( affinity_id <span class="keywordtype">id</span> ) {
-<a name="l00060"></a>00060             my_partition.note_affinity( <span class="keywordtype">id</span> );
-<a name="l00061"></a>00061         }
-<a name="l00062"></a>00062     <span class="keyword">public</span>:
-<a name="l00063"></a>00063         <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="l00064"></a>00064             <span class="keywordflow">if</span>( !range.empty() ) {
-<a name="l00065"></a>00065 #<span class="keywordflow">if</span> !__TBB_EXCEPTIONS || TBB_JOIN_OUTER_TASK_GROUP
-<a name="l00066"></a>00066                 start_for& a = *<span class="keyword">new</span>(<a class="code" href="a00132.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) start_for(range,body,const_cast<Partitioner&>(partitioner));
-<a name="l00067"></a>00067 <span class="preprocessor">#else</span>
-<a name="l00068"></a>00068 <span class="preprocessor"></span>                <span class="comment">// Bound context prevents exceptions from body to affect nesting or sibling algorithms,</span>
-<a name="l00069"></a>00069                 <span class="comment">// and allows users to handle exceptions safely by wrapping parallel_for in the try-block.</span>
-<a name="l00070"></a>00070                 task_group_context context;
-<a name="l00071"></a>00071                 start_for& a = *<span class="keyword">new</span>(task::allocate_root(context)) start_for(range,body,const_cast<Partitioner&>(partitioner));
-<a name="l00072"></a>00072 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS && !TBB_JOIN_OUTER_TASK_GROUP */</span>
-<a name="l00073"></a>00073                 <a class="code" href="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>(a);
-<a name="l00074"></a>00074             }
-<a name="l00075"></a>00075         }
-<a name="l00076"></a>00076 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00077"></a>00077 <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="l00078"></a>00078             <span class="keywordflow">if</span>( !range.empty() ) {
-<a name="l00079"></a>00079                 start_for& a = *<span class="keyword">new</span>(task::allocate_root(context)) start_for(range,body,const_cast<Partitioner&>(partitioner));
-<a name="l00080"></a>00080                 <a class="code" href="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>(a);
-<a name="l00081"></a>00081             }
-<a name="l00082"></a>00082         }
-<a name="l00083"></a>00083 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00084"></a>00084     };
-<a name="l00085"></a>00085 
-<a name="l00086"></a>00086     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
-<a name="l00087"></a>00087     task* start_for<Range,Body,Partitioner>::execute() {
-<a name="l00088"></a>00088         <span class="keywordflow">if</span>( !my_range.is_divisible() || my_partition.should_execute_range(*<span class="keyword">this</span>) ) {
-<a name="l00089"></a>00089             my_body( my_range );
-<a name="l00090"></a>00090             <span class="keywordflow">return</span> my_partition.continue_after_execute_range(*<span class="keyword">this</span>); 
-<a name="l00091"></a>00091         } <span class="keywordflow">else</span> {
-<a name="l00092"></a>00092             empty_task& c = *<span class="keyword">new</span>( this->allocate_continuation() ) empty_task;
-<a name="l00093"></a>00093             recycle_as_child_of(c);
-<a name="l00094"></a>00094             c.set_ref_count(2);
-<a name="l00095"></a>00095             <span class="keywordtype">bool</span> delay = my_partition.decide_whether_to_delay();
-<a name="l00096"></a>00096             start_for& b = *<span class="keyword">new</span>( c.allocate_child() ) start_for(*<span class="keyword">this</span>,split());
-<a name="l00097"></a>00097             my_partition.spawn_or_delay(delay,*<span class="keyword">this</span>,b);
-<a name="l00098"></a>00098             <span class="keywordflow">return</span> <span class="keyword">this</span>;
-<a name="l00099"></a>00099         }
-<a name="l00100"></a>00100     } 
-<a name="l00101"></a>00101 } <span class="comment">// namespace internal</span>
-<a name="l00103"></a>00103 <span class="comment"></span>
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105 <span class="comment">// Requirements on Range concept are documented in blocked_range.h</span>
-<a name="l00106"></a>00106 
-<a name="l00117"></a>00117 
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00121"></a><a class="code" href="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">00121</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">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="a00126.html">simple_partitioner</a>& partitioner=<a class="code" href="a00126.html">simple_partitioner [...]
-<a name="l00122"></a>00122     internal::start_for<Range,Body,simple_partitioner>::run(range,body,partitioner);
-<a name="l00123"></a>00123 }
-<a name="l00124"></a>00124 
-<a name="l00126"></a>00126 
-<a name="l00127"></a>00127 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00128"></a><a class="code" href="a00183.html#ga7ac75d532389b55b9247f3fdb0b00d1">00128</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">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="a00095.html">auto_partitioner</a>& partitioner ) {
-<a name="l00129"></a>00129     internal::start_for<Range,Body,auto_partitioner>::run(range,body,partitioner);
-<a name="l00130"></a>00130 }
-<a name="l00131"></a>00131 
-<a name="l00133"></a>00133 
-<a name="l00134"></a>00134 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00135"></a><a class="code" href="a00183.html#g9cd1b210ceb1c040f30e390b4a21bde8">00135</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <a class="code" href="a00091.html">affinity_partitioner</a>& partitioner ) {
-<a name="l00136"></a>00136     internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner);
-<a name="l00137"></a>00137 }
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00141"></a>00141 <span class="preprocessor"></span>
-<a name="l00142"></a>00142 <span class="preprocessor">template<typename Range, typename Body></span>
-<a name="l00143"></a><a class="code" href="a00183.html#g2d317a5e0078cd193125439fed60dfdc">00143</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">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="a00126.html">simple_partitioner</a>& partitioner, <a class="code" hr [...]
-<a name="l00144"></a>00144     internal::start_for<Range,Body,simple_partitioner>::run(range, body, partitioner, context);
-<a name="l00145"></a>00145 }
-<a name="l00146"></a>00146 
-<a name="l00148"></a>00148 
-<a name="l00149"></a>00149 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00150"></a><a class="code" href="a00183.html#g1c0700e3f85e83a788ff3ede88ebb7e9">00150</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">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="a00095.html">auto_partitioner</a>& partitioner, <a class="code" href="a00133.html">task_group_context< [...]
-<a name="l00151"></a>00151     internal::start_for<Range,Body,auto_partitioner>::run(range, body, partitioner, context);
-<a name="l00152"></a>00152 }
-<a name="l00153"></a>00153 
-<a name="l00155"></a>00155 
-<a name="l00156"></a>00156 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00157"></a><a class="code" href="a00183.html#g04b4696b67370c01353ff5974c8f1196">00157</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <a class="code" href="a00091.html">affinity_partitioner</a>& partitioner, <a class="code" href="a00133.html">task_group_context</a>& context ) {
-<a name="l00158"></a>00158     internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner, context);
-<a name="l00159"></a>00159 }
-<a name="l00160"></a>00160 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163 } <span class="comment">// namespace tbb</span>
-<a name="l00164"></a>00164 
-<a name="l00165"></a>00165 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_for_H */</span>
-<a name="l00166"></a>00166 
-</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/a00245.html b/doc/html/a00245.html
deleted file mode 100644
index 75bc3f2..0000000
--- a/doc/html/a00245.html
+++ /dev/null
@@ -1,436 +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>parallel_reduce.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>parallel_reduce.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_parallel_reduce_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_reduce_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 "aligned_space.h"</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include "partitioner.h"</span>
-<a name="l00027"></a>00027 <span class="preprocessor">#include <new></span>
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029 <span class="keyword">namespace </span>tbb {
-<a name="l00030"></a>00030 
-<a name="l00032"></a>00032 <span class="keyword">namespace </span>internal {
-<a name="l00033"></a>00033 
-<a name="l00035"></a>00035     <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="l00036"></a>00036 
-<a name="l00038"></a>00038     <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="l00039"></a>00039 
-<a name="l00040"></a>00040     <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">inline</span> <span class="keywordtype">void</span> parallel_reduce_store_body( T*& dst, T* src ) {
-<a name="l00041"></a>00041 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span>        itt_store_pointer_with_release_v3(&dst,src);
-<a name="l00043"></a>00043 <span class="preprocessor">#else</span>
-<a name="l00044"></a>00044 <span class="preprocessor"></span>        __TBB_store_with_release(dst,src);
-<a name="l00045"></a>00045 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
-<a name="l00046"></a>00046     }
-<a name="l00047"></a>00047 
-<a name="l00048"></a>00048     <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">inline</span> T* parallel_reduce_load_body( T*& src ) {
-<a name="l00049"></a>00049 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00050"></a>00050 <span class="preprocessor"></span>        <span class="keywordflow">return</span> static_cast<T*>(itt_load_pointer_with_acquire_v3(&src));
-<a name="l00051"></a>00051 <span class="preprocessor">#else</span>
-<a name="l00052"></a>00052 <span class="preprocessor"></span>        <span class="keywordflow">return</span> __TBB_load_with_acquire(src);
-<a name="l00053"></a>00053 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
-<a name="l00054"></a>00054     }
-<a name="l00055"></a>00055 
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058     <span class="keyword">template</span><<span class="keyword">typename</span> Body>
-<a name="l00059"></a>00059     <span class="keyword">class </span>finish_reduce: <span class="keyword">public</span> task {
-<a name="l00060"></a>00060         Body* <span class="keyword">const</span> my_body;
-<a name="l00061"></a>00061         <span class="keywordtype">bool</span> has_right_zombie;
-<a name="l00062"></a>00062         aligned_space<Body,1> zombie_space;
-<a name="l00063"></a>00063         finish_reduce( Body* body ) : 
-<a name="l00064"></a>00064             my_body(body),
-<a name="l00065"></a>00065             has_right_zombie(false)
-<a name="l00066"></a>00066         {
-<a name="l00067"></a>00067         }
-<a name="l00068"></a>00068         task* execute() {
-<a name="l00069"></a>00069             <span class="keywordflow">if</span>( has_right_zombie ) {
-<a name="l00070"></a>00070                 <span class="comment">// Right child was stolen.</span>
-<a name="l00071"></a>00071                 Body* s = zombie_space.begin();
-<a name="l00072"></a>00072                 my_body->join( *s );
-<a name="l00073"></a>00073                 s->~Body();
-<a name="l00074"></a>00074             }
-<a name="l00075"></a>00075             <span class="keywordflow">return</span> NULL;
-<a name="l00076"></a>00076         }       
-<a name="l00077"></a>00077         <span class="keyword">template</span><<span class="keyword">typename</span> Range,<span class="keyword">typename</span> Body_, <span class="keyword">typename</span> Partitioner>
-<a name="l00078"></a>00078         <span class="keyword">friend</span> <span class="keyword">class </span>start_reduce;
-<a name="l00079"></a>00079     };
-<a name="l00080"></a>00080 
-<a name="l00082"></a>00082 
-<a name="l00083"></a>00083     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
-<a name="l00084"></a>00084     <span class="keyword">class </span>start_reduce: <span class="keyword">public</span> task {
-<a name="l00085"></a>00085         <span class="keyword">typedef</span> finish_reduce<Body> finish_type;
-<a name="l00086"></a>00086         Body* my_body;
-<a name="l00087"></a>00087         Range my_range;
-<a name="l00088"></a>00088         <span class="keyword">typename</span> Partitioner::partition_type my_partition;
-<a name="l00089"></a>00089         <span class="comment">/*override*/</span> task* execute();
-<a name="l00090"></a>00090         <span class="keyword">template</span><<span class="keyword">typename</span> Body_>
-<a name="l00091"></a>00091         <span class="keyword">friend</span> <span class="keyword">class </span>finish_reduce;
-<a name="l00092"></a>00092     
-<a name="l00094"></a>00094         start_reduce( <span class="keyword">const</span> Range& range, Body* body, <span class="keyword">const</span> Partitioner &partitioner ) :
-<a name="l00095"></a>00095             my_body(body),
-<a name="l00096"></a>00096             my_range(range),
-<a name="l00097"></a>00097             my_partition(partitioner)
-<a name="l00098"></a>00098         {
-<a name="l00099"></a>00099         }
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102         start_reduce( start_reduce& parent, split ) :
-<a name="l00103"></a>00103             my_body(parent.my_body),
-<a name="l00104"></a>00104             my_range(parent.my_range,split()),
-<a name="l00105"></a>00105             my_partition(parent.my_partition,split())
-<a name="l00106"></a>00106         {
-<a name="l00107"></a>00107         }
-<a name="l00109"></a>00109 
-<a name="l00110"></a>00110         <span class="comment">/*override*/</span> <span class="keywordtype">void</span> note_affinity( affinity_id <span class="comment">/*id*/</span> ) {
-<a name="l00111"></a>00111             finish_type* p = static_cast<finish_type*>(parent() );
-<a name="l00112"></a>00112             Body* body = <span class="keyword">new</span>( p->zombie_space.begin() ) Body(*my_body,split());
-<a name="l00113"></a>00113             p->has_right_zombie = <span class="keyword">true</span>;
-<a name="l00114"></a>00114             my_body = body;
-<a name="l00115"></a>00115         }
-<a name="l00116"></a>00116     <span class="keyword">public</span>:
-<a name="l00117"></a>00117 <span class="preprocessor">#if !__TBB_EXCEPTIONS</span>
-<a name="l00118"></a>00118 <span class="preprocessor"></span>        <span class="keyword">static</span> <span class="keywordtype">void</span> run( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> Partitioner &partitioner ) {
-<a name="l00119"></a>00119             <span class="keywordflow">if</span>( !range.empty() ) 
-<a name="l00120"></a>00120                 <a class="code" href="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *<span class="keyword">new</span>(<a class="code" href="a00132.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) start_reduce(range,&body,partitioner) );
-<a name="l00121"></a>00121         }
-<a name="l00122"></a>00122 <span class="preprocessor">#else </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00123"></a>00123         <span class="keyword">static</span> <span class="keywordtype">void</span> run( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> Partitioner &partitioner ) {
-<a name="l00124"></a>00124             <span class="comment">// Bound context prevents exceptions from body to affect nesting or sibling algorithms,</span>
-<a name="l00125"></a>00125             <span class="comment">// and allows users to handle exceptions safely by wrapping parallel_for in the try-block.</span>
-<a name="l00126"></a>00126             <span class="keywordflow">if</span>( !range.empty() )  {
-<a name="l00127"></a>00127                 task_group_context context;
-<a name="l00128"></a>00128                 <a class="code" href="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *<span class="keyword">new</span>(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
-<a name="l00129"></a>00129             }
-<a name="l00130"></a>00130         }
-<a name="l00131"></a>00131         <span class="keyword">static</span> <span class="keywordtype">void</span> run( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> Partitioner &partitioner, task_group_context& context ) {
-<a name="l00132"></a>00132             <span class="keywordflow">if</span>( !range.empty() ) 
-<a name="l00133"></a>00133                 <a class="code" href="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *<span class="keyword">new</span>(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
-<a name="l00134"></a>00134         }
-<a name="l00135"></a>00135 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00136"></a>00136     };
-<a name="l00137"></a>00137 
-<a name="l00138"></a>00138     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
-<a name="l00139"></a>00139     task* start_reduce<Range,Body,Partitioner>::execute() {
-<a name="l00140"></a>00140         <span class="keywordflow">if</span>( !my_range.is_divisible() || my_partition.should_execute_range(*<span class="keyword">this</span>) ) {
-<a name="l00141"></a>00141             (*my_body)( my_range );
-<a name="l00142"></a>00142             <span class="keywordflow">return</span> NULL;
-<a name="l00143"></a>00143         } <span class="keywordflow">else</span> {
-<a name="l00144"></a>00144             finish_type& c = *<span class="keyword">new</span>( allocate_continuation()) finish_type(my_body);
-<a name="l00145"></a>00145             recycle_as_child_of(c);
-<a name="l00146"></a>00146             c.set_ref_count(2);    
-<a name="l00147"></a>00147             start_reduce& b = *<span class="keyword">new</span>( c.allocate_child() ) start_reduce(*<span class="keyword">this</span>,split());
-<a name="l00148"></a>00148             spawn(b);
-<a name="l00149"></a>00149             <span class="keywordflow">return</span> <span class="keyword">this</span>;
-<a name="l00150"></a>00150         }
-<a name="l00151"></a>00151     }
-<a name="l00152"></a>00152  
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155     <span class="keyword">typedef</span> <span class="keywordtype">char</span> reduction_context;
-<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> Body>
-<a name="l00160"></a>00160     <span class="keyword">class </span>finish_reduce_with_affinity: <span class="keyword">public</span> task {
-<a name="l00162"></a>00162         Body* my_body;
-<a name="l00163"></a>00163         <span class="keywordtype">bool</span> has_right_zombie;
-<a name="l00164"></a>00164         <span class="keyword">const</span> reduction_context my_context;
-<a name="l00165"></a>00165         aligned_space<Body,1> zombie_space;
-<a name="l00166"></a>00166         finish_reduce_with_affinity( <span class="keywordtype">char</span> context ) : 
-<a name="l00167"></a>00167             my_body(NULL),
-<a name="l00168"></a>00168             has_right_zombie(false),
-<a name="l00169"></a>00169             my_context(context)
-<a name="l00170"></a>00170         {
-<a name="l00171"></a>00171         }
-<a name="l00172"></a>00172         task* execute() {
-<a name="l00173"></a>00173             <span class="keywordflow">if</span>( has_right_zombie ) {
-<a name="l00174"></a>00174                 <span class="comment">// Right child was stolen.</span>
-<a name="l00175"></a>00175                 Body* s = zombie_space.begin();
-<a name="l00176"></a>00176                 my_body->join( *s );
-<a name="l00177"></a>00177                 s->~Body();
-<a name="l00178"></a>00178             }
-<a name="l00179"></a>00179             <span class="keywordflow">if</span>( my_context==1 ) 
-<a name="l00180"></a>00180                 parallel_reduce_store_body( static_cast<finish_reduce_with_affinity*>(parent())->my_body, my_body );
-<a name="l00181"></a>00181             <span class="keywordflow">return</span> NULL;
-<a name="l00182"></a>00182         }       
-<a name="l00183"></a>00183         <span class="keyword">template</span><<span class="keyword">typename</span> Range,<span class="keyword">typename</span> Body_>
-<a name="l00184"></a>00184         <span class="keyword">friend</span> <span class="keyword">class </span>start_reduce_with_affinity;
-<a name="l00185"></a>00185     };
-<a name="l00186"></a>00186 
-<a name="l00188"></a>00188 
-<a name="l00189"></a>00189     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00190"></a>00190     <span class="keyword">class </span>start_reduce_with_affinity: <span class="keyword">public</span> task {
-<a name="l00191"></a>00191         <span class="keyword">typedef</span> finish_reduce_with_affinity<Body> finish_type;
-<a name="l00192"></a>00192         Body* my_body;
-<a name="l00193"></a>00193         Range my_range;
-<a name="l00194"></a>00194         <span class="keyword">typename</span> affinity_partitioner::partition_type my_partition;
-<a name="l00195"></a>00195         reduction_context my_context;
-<a name="l00196"></a>00196         <span class="comment">/*override*/</span> task* execute();
-<a name="l00197"></a>00197         <span class="keyword">template</span><<span class="keyword">typename</span> Body_>
-<a name="l00198"></a>00198         <span class="keyword">friend</span> <span class="keyword">class </span>finish_reduce_with_affinity;
-<a name="l00199"></a>00199     
-<a name="l00201"></a>00201         start_reduce_with_affinity( <span class="keyword">const</span> Range& range, Body* body, affinity_partitioner& partitioner ) :
-<a name="l00202"></a>00202             my_body(body),
-<a name="l00203"></a>00203             my_range(range),
-<a name="l00204"></a>00204             my_partition(partitioner),
-<a name="l00205"></a>00205             my_context(0)
-<a name="l00206"></a>00206         {
-<a name="l00207"></a>00207         }
-<a name="l00209"></a>00209 
-<a name="l00210"></a>00210         start_reduce_with_affinity( start_reduce_with_affinity& parent, split ) :
-<a name="l00211"></a>00211             my_body(parent.my_body),
-<a name="l00212"></a>00212             my_range(parent.my_range,split()),
-<a name="l00213"></a>00213             my_partition(parent.my_partition,split()),
-<a name="l00214"></a>00214             my_context(2)
-<a name="l00215"></a>00215         {
-<a name="l00216"></a>00216             my_partition.set_affinity(*<span class="keyword">this</span>);
-<a name="l00217"></a>00217             parent.my_context = 1;
-<a name="l00218"></a>00218         }
-<a name="l00220"></a>00220         <span class="comment">/*override*/</span> <span class="keywordtype">void</span> note_affinity( affinity_id <span class="keywordtype">id</span> ) {
-<a name="l00221"></a>00221             my_partition.note_affinity( <span class="keywordtype">id</span> );
-<a name="l00222"></a>00222         }
-<a name="l00223"></a>00223 
-<a name="l00224"></a>00224 <span class="keyword">public</span>:
-<a name="l00225"></a>00225         <span class="keyword">static</span> <span class="keywordtype">void</span> run( <span class="keyword">const</span> Range& range, Body& body, affinity_partitioner& partitioner ) {
-<a name="l00226"></a>00226             <span class="keywordflow">if</span>( !range.empty() ) {
-<a name="l00227"></a>00227 #<span class="keywordflow">if</span> !__TBB_EXCEPTIONS || TBB_JOIN_OUTER_TASK_GROUP
-<a name="l00228"></a>00228                 task::spawn_root_and_wait( *<span class="keyword">new</span>(task::allocate_root()) start_reduce_with_affinity(range,&body,partitioner) );
-<a name="l00229"></a>00229 <span class="preprocessor">#else</span>
-<a name="l00230"></a>00230 <span class="preprocessor"></span>                <span class="comment">// Bound context prevents exceptions from body to affect nesting or sibling algorithms,</span>
-<a name="l00231"></a>00231                 <span class="comment">// and allows users to handle exceptions safely by wrapping parallel_for in the try-block.</span>
-<a name="l00232"></a>00232                 task_group_context context;
-<a name="l00233"></a>00233                 task::spawn_root_and_wait( *<span class="keyword">new</span>(task::allocate_root(context)) start_reduce_with_affinity(range,&body,partitioner) );
-<a name="l00234"></a>00234 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS && !TBB_JOIN_OUTER_TASK_GROUP */</span>
-<a name="l00235"></a>00235             }
-<a name="l00236"></a>00236         }
-<a name="l00237"></a>00237 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00238"></a>00238 <span class="preprocessor"></span>        <span class="keyword">static</span> <span class="keywordtype">void</span> run( <span class="keyword">const</span> Range& range, Body& body, affinity_partitioner& partitioner, task_group_context& context ) {
-<a name="l00239"></a>00239             <span class="keywordflow">if</span>( !range.empty() ) 
-<a name="l00240"></a>00240                 task::spawn_root_and_wait( *<span class="keyword">new</span>(task::allocate_root(context)) start_reduce_with_affinity(range,&body,partitioner) );
-<a name="l00241"></a>00241         }
-<a name="l00242"></a>00242 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00243"></a>00243     };
-<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>00246     task* start_reduce_with_affinity<Range,Body>::execute() {
-<a name="l00247"></a>00247         <span class="keywordflow">if</span>( my_context==2 ) {
-<a name="l00248"></a>00248             finish_type* p = static_cast<finish_type*>(parent() );
-<a name="l00249"></a>00249             <span class="keywordflow">if</span>( !parallel_reduce_load_body(p->my_body) ) {
-<a name="l00250"></a>00250                 my_body = <span class="keyword">new</span>( p->zombie_space.begin() ) Body(*my_body,split());
-<a name="l00251"></a>00251                 p->has_right_zombie = <span class="keyword">true</span>;
-<a name="l00252"></a>00252             } 
-<a name="l00253"></a>00253         }
-<a name="l00254"></a>00254         <span class="keywordflow">if</span>( !my_range.is_divisible() || my_partition.should_execute_range(*<span class="keyword">this</span>) ) {
-<a name="l00255"></a>00255             (*my_body)( my_range );
-<a name="l00256"></a>00256             <span class="keywordflow">if</span>( my_context==1 ) 
-<a name="l00257"></a>00257                 parallel_reduce_store_body(static_cast<finish_type*>(parent())->my_body, my_body );
-<a name="l00258"></a>00258             <span class="keywordflow">return</span> my_partition.continue_after_execute_range(*<span class="keyword">this</span>);
-<a name="l00259"></a>00259         } <span class="keywordflow">else</span> {
-<a name="l00260"></a>00260             finish_type& c = *<span class="keyword">new</span>( allocate_continuation()) finish_type(my_context);
-<a name="l00261"></a>00261             recycle_as_child_of(c);
-<a name="l00262"></a>00262             c.set_ref_count(2);    
-<a name="l00263"></a>00263             <span class="keywordtype">bool</span> delay = my_partition.decide_whether_to_delay();
-<a name="l00264"></a>00264             start_reduce_with_affinity& b = *<span class="keyword">new</span>( c.allocate_child() ) start_reduce_with_affinity(*<span class="keyword">this</span>,split());
-<a name="l00265"></a>00265             my_partition.spawn_or_delay(delay,*<span class="keyword">this</span>,b);
-<a name="l00266"></a>00266             <span class="keywordflow">return</span> <span class="keyword">this</span>;
-<a name="l00267"></a>00267         }
-<a name="l00268"></a>00268     } 
-<a name="l00269"></a>00269 
-<a name="l00271"></a>00271 
-<a name="l00275"></a>00275     <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="l00276"></a>00276     <span class="keyword">class </span>lambda_reduce_body {
-<a name="l00277"></a>00277 
-<a name="l00278"></a>00278 <span class="comment">//FIXME: decide if my_real_body, my_reduction, and identity_element should be copied or referenced</span>
-<a name="l00279"></a>00279 <span class="comment">//       (might require some performance measurements)</span>
-<a name="l00280"></a>00280 
-<a name="l00281"></a>00281         <span class="keyword">const</span> Value&     identity_element;
-<a name="l00282"></a>00282         <span class="keyword">const</span> RealBody&  my_real_body;
-<a name="l00283"></a>00283         <span class="keyword">const</span> Reduction& my_reduction;
-<a name="l00284"></a>00284         Value            my_value;
-<a name="l00285"></a>00285     <span class="keyword">public</span>:
-<a name="l00286"></a>00286         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="l00287"></a>00287             : identity_element(identity)
-<a name="l00288"></a>00288             , my_real_body(body)
-<a name="l00289"></a>00289             , my_reduction(reduction)
-<a name="l00290"></a>00290             , my_value(identity)
-<a name="l00291"></a>00291         { }
-<a name="l00292"></a>00292         lambda_reduce_body( <span class="keyword">const</span> lambda_reduce_body& other )
-<a name="l00293"></a>00293             : identity_element(other.identity_element)
-<a name="l00294"></a>00294             , my_real_body(other.my_real_body)
-<a name="l00295"></a>00295             , my_reduction(other.my_reduction)
-<a name="l00296"></a>00296             , my_value(other.my_value)
-<a name="l00297"></a>00297         { }
-<a name="l00298"></a>00298         lambda_reduce_body( lambda_reduce_body& other, <a class="code" href="a00131.html">tbb::split</a> )
-<a name="l00299"></a>00299             : identity_element(other.identity_element)
-<a name="l00300"></a>00300             , my_real_body(other.my_real_body)
-<a name="l00301"></a>00301             , my_reduction(other.my_reduction)
-<a name="l00302"></a>00302             , my_value(other.identity_element)
-<a name="l00303"></a>00303         { }
-<a name="l00304"></a>00304         <span class="keywordtype">void</span> operator()(Range& range) {
-<a name="l00305"></a>00305             my_value = my_real_body(range, const_cast<const Value&>(my_value));
-<a name="l00306"></a>00306         }
-<a name="l00307"></a>00307         <span class="keywordtype">void</span> join( lambda_reduce_body& rhs ) {
-<a name="l00308"></a>00308             my_value = my_reduction(const_cast<const Value&>(my_value), const_cast<const Value&>(rhs.my_value));
-<a name="l00309"></a>00309         }
-<a name="l00310"></a>00310         Value result()<span class="keyword"> const </span>{
-<a name="l00311"></a>00311             <span class="keywordflow">return</span> my_value;
-<a name="l00312"></a>00312         }
-<a name="l00313"></a>00313     };
-<a name="l00314"></a>00314 
-<a name="l00315"></a>00315 } <span class="comment">// namespace internal</span>
-<a name="l00317"></a>00317 <span class="comment"></span>
-<a name="l00318"></a>00318 <span class="comment">// Requirements on Range concept are documented in blocked_range.h</span>
-<a name="l00319"></a>00319 
-<a name="l00338"></a>00338 
-<a name="l00340"></a>00340 
-<a name="l00341"></a>00341 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00342"></a><a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">00342</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00126.html">simple_partitioner</a>& partitioner = <a class="code" href="a00126.html">simple_partitioner</a>() ) {
-<a name="l00343"></a>00343     internal::start_reduce<Range,Body,simple_partitioner>::run( range, body, partitioner );
-<a name="l00344"></a>00344 }
-<a name="l00345"></a>00345 
-<a name="l00347"></a>00347 
-<a name="l00348"></a>00348 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00349"></a><a class="code" href="a00183.html#g18a19157e6245992fc00ca0adeb7dd37">00349</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00095.html">auto_partitioner</a>& partitioner ) {
-<a name="l00350"></a>00350     internal::start_reduce<Range,Body,auto_partitioner>::run( range, body, partitioner );
-<a name="l00351"></a>00351 }
-<a name="l00352"></a>00352 
-<a name="l00354"></a>00354 
-<a name="l00355"></a>00355 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00356"></a><a class="code" href="a00183.html#gc61e73fcc36c92d79a217fc355ff4a6b">00356</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <a class="code" href="a00091.html">affinity_partitioner</a>& partitioner ) {
-<a name="l00357"></a>00357     internal::start_reduce_with_affinity<Range,Body>::run( range, body, partitioner );
-<a name="l00358"></a>00358 }
-<a name="l00359"></a>00359 
-<a name="l00360"></a>00360 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00362"></a>00362 <span class="preprocessor"></span>
-<a name="l00363"></a>00363 <span class="preprocessor">template<typename Range, typename Body></span>
-<a name="l00364"></a><a class="code" href="a00183.html#g45cb00c42a18e334bbde8b7535afe460">00364</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00126.html">simple_partitioner</a>& partitioner, <a class="code" href="a00133.html">task_group_cont [...]
-<a name="l00365"></a>00365     internal::start_reduce<Range,Body,simple_partitioner>::run( range, body, partitioner, context );
-<a name="l00366"></a>00366 }
-<a name="l00367"></a>00367 
-<a name="l00369"></a>00369 
-<a name="l00370"></a>00370 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00371"></a><a class="code" href="a00183.html#g1c1ea1d7c61b3c225e92c70d669a53a5">00371</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00095.html">auto_partitioner</a>& partitioner, <a class="code" href="a00133.html">task_group_context</a>& context ) {
-<a name="l00372"></a>00372     internal::start_reduce<Range,Body,auto_partitioner>::run( range, body, partitioner, context );
-<a name="l00373"></a>00373 }
-<a name="l00374"></a>00374 
-<a name="l00376"></a>00376 
-<a name="l00377"></a>00377 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00378"></a><a class="code" href="a00183.html#gd9ac3a3811060314695f33b703c6e11b">00378</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <a class="code" href="a00091.html">affinity_partitioner</a>& partitioner, <a class="code" href="a00133.html">task_group_context</a>& context ) {
-<a name="l00379"></a>00379     internal::start_reduce_with_affinity<Range,Body>::run( range, body, partitioner, context );
-<a name="l00380"></a>00380 }
-<a name="l00381"></a>00381 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00382"></a>00382 
-<a name="l00386"></a>00386 
-<a name="l00387"></a>00387 
-<a name="l00388"></a>00388 <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="l00389"></a><a class="code" href="a00183.html#gdddb4cb5d9de2f3d6bad3ffa6b64db07">00389</a> Value <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">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="l00390"></a>00390                        <span class="keyword">const</span> <a class="code" href="a00126.html">simple_partitioner</a>& partitioner = <a class="code" href="a00126.html">simple_partitioner</a>() ) {
-<a name="l00391"></a>00391     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00392"></a>00392     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<a class="code" href="a00126.html">simple_partitioner</a>>
-<a name="l00393"></a>00393                           ::run(range, body, partitioner );
-<a name="l00394"></a>00394     <span class="keywordflow">return</span> body.result();
-<a name="l00395"></a>00395 }
-<a name="l00396"></a>00396 
-<a name="l00398"></a>00398 
-<a name="l00399"></a>00399 <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="l00400"></a><a class="code" href="a00183.html#gb175401f0729e40dd2c5860a17c14385">00400</a> Value <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">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="l00401"></a>00401                        <span class="keyword">const</span> <a class="code" href="a00095.html">auto_partitioner</a>& partitioner ) {
-<a name="l00402"></a>00402     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00403"></a>00403     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<a class="code" href="a00095.html">auto_partitioner</a>>
-<a name="l00404"></a>00404                           ::run( range, body, partitioner );
-<a name="l00405"></a>00405     <span class="keywordflow">return</span> body.result();
-<a name="l00406"></a>00406 }
-<a name="l00407"></a>00407 
-<a name="l00409"></a>00409 
-<a name="l00410"></a>00410 <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="l00411"></a><a class="code" href="a00183.html#gb7f1f1828ae2b330ce05b8513a495154">00411</a> Value <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">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="l00412"></a>00412                        <a class="code" href="a00091.html">affinity_partitioner</a>& partitioner ) {
-<a name="l00413"></a>00413     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00414"></a>00414     internal::start_reduce_with_affinity<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction> >
-<a name="l00415"></a>00415                                         ::run( range, body, partitioner );
-<a name="l00416"></a>00416     <span class="keywordflow">return</span> body.result();
-<a name="l00417"></a>00417 }
-<a name="l00418"></a>00418 
-<a name="l00419"></a>00419 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00421"></a>00421 <span class="preprocessor"></span>
-<a name="l00422"></a>00422 <span class="preprocessor">template<typename Range, typename Value, typename RealBody, typename Reduction></span>
-<a name="l00423"></a><a class="code" href="a00183.html#gfbc0cc2026d87f11a96bcd62788f5bb5">00423</a> <span class="preprocessor"></span>Value <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">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="l00424"></a>00424                        <span class="keyword">const</span> <a class="code" href="a00126.html">simple_partitioner</a>& partitioner, <a class="code" href="a00133.html">task_group_context</a>& context ) {
-<a name="l00425"></a>00425     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00426"></a>00426     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<a class="code" href="a00126.html">simple_partitioner</a>>
-<a name="l00427"></a>00427                           ::run( range, body, partitioner, context );
-<a name="l00428"></a>00428     <span class="keywordflow">return</span> body.result();
-<a name="l00429"></a>00429 }
-<a name="l00430"></a>00430 
-<a name="l00432"></a>00432 
-<a name="l00433"></a>00433 <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="l00434"></a><a class="code" href="a00183.html#g630c90a399937d9d4ae70ff883186dfd">00434</a> Value <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">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="l00435"></a>00435                        <span class="keyword">const</span> <a class="code" href="a00095.html">auto_partitioner</a>& partitioner, <a class="code" href="a00133.html">task_group_context</a>& context ) {
-<a name="l00436"></a>00436     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00437"></a>00437     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<a class="code" href="a00095.html">auto_partitioner</a>>
-<a name="l00438"></a>00438                           ::run( range, body, partitioner, context );
-<a name="l00439"></a>00439     <span class="keywordflow">return</span> body.result();
-<a name="l00440"></a>00440 }
-<a name="l00441"></a>00441 
-<a name="l00443"></a>00443 
-<a name="l00444"></a>00444 <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="l00445"></a><a class="code" href="a00183.html#g496bd7eadb3b97495ccb5655ef90319e">00445</a> Value <a class="code" href="a00183.html#gaf32af4ef8fe4261b10e9f6086ce54dc">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="l00446"></a>00446                        <a class="code" href="a00091.html">affinity_partitioner</a>& partitioner, <a class="code" href="a00133.html">task_group_context</a>& context ) {
-<a name="l00447"></a>00447     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00448"></a>00448     internal::start_reduce_with_affinity<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction> >
-<a name="l00449"></a>00449                                         ::run( range, body, partitioner, context );
-<a name="l00450"></a>00450     <span class="keywordflow">return</span> body.result();
-<a name="l00451"></a>00451 }
-<a name="l00452"></a>00452 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00453"></a>00453 
-<a name="l00454"></a>00454 
-<a name="l00455"></a>00455 } <span class="comment">// namespace tbb</span>
-<a name="l00456"></a>00456 
-<a name="l00457"></a>00457 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_reduce_H */</span>
-<a name="l00458"></a>00458 
-</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/a00189.html b/doc/html/a00250.html
similarity index 100%
rename from doc/html/a00189.html
rename to doc/html/a00250.html
diff --git a/doc/html/a00191.html b/doc/html/a00252.html
similarity index 90%
rename from doc/html/a00191.html
rename to doc/html/a00252.html
index 14dd7af..b9a1a61 100644
--- a/doc/html/a00191.html
+++ b/doc/html/a00252.html
@@ -45,18 +45,18 @@
 <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="a00181.html">00027</a> <span class="keyword">namespace </span>tbb {
+<a name="l00027"></a><a class="code" href="a00224.html">00027</a> <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>
-<a name="l00033"></a><a class="code" href="a00092.html">00033</a> <span class="keyword">class </span><a class="code" href="a00092.html">aligned_space</a> {
+<a name="l00033"></a><a class="code" href="a00116.html">00033</a> <span class="keyword">class </span><a class="code" href="a00116.html">aligned_space</a> {
 <a name="l00034"></a>00034 <span class="keyword">private</span>:
 <a name="l00035"></a>00035     <span class="keyword">typedef</span> __TBB_TypeWithAlignmentAtLeastAsStrict(T) element_type;
 <a name="l00036"></a>00036     element_type array[(<span class="keyword">sizeof</span>(T)*N+<span class="keyword">sizeof</span>(element_type)-1)/<span class="keyword">sizeof</span>(element_type)];
 <a name="l00037"></a>00037 <span class="keyword">public</span>:
-<a name="l00039"></a><a class="code" href="a00092.html#0d702fc6b9e9d061ace3501b3c861cdf">00039</a>     T* <a class="code" href="a00092.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>() {<span class="keywordflow">return</span> reinterpret_cast<T*>(<span class="keyword">this</span>);}
+<a name="l00039"></a><a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">00039</a>     T* <a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>() {<span class="keywordflow">return</span> reinterpret_cast<T*>(<span class="keyword">this</span>);}
 <a name="l00040"></a>00040 
-<a name="l00042"></a><a class="code" href="a00092.html#024be075c23c0394c9a2518d993bcd9e">00042</a>     T* <a class="code" href="a00092.html#024be075c23c0394c9a2518d993bcd9e">end</a>() {<span class="keywordflow">return</span> <a class="code" href="a00092.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()+N;}
+<a name="l00042"></a><a class="code" href="a00116.html#024be075c23c0394c9a2518d993bcd9e">00042</a>     T* <a class="code" href="a00116.html#024be075c23c0394c9a2518d993bcd9e">end</a>() {<span class="keywordflow">return</span> <a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()+N;}
 <a name="l00043"></a>00043 };
 <a name="l00044"></a>00044 
 <a name="l00045"></a>00045 } <span class="comment">// namespace tbb </span>
diff --git a/doc/html/a00253.html b/doc/html/a00253.html
new file mode 100644
index 0000000..8c37ab4
--- /dev/null
+++ b/doc/html/a00253.html
@@ -0,0 +1,401 @@
+<!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>atomic.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>atomic.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_atomic_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_atomic_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 "tbb_stddef.h"</span>
+<a name="l00026"></a>00026 
+<a name="l00027"></a>00027 <span class="preprocessor">#if _MSC_VER </span>
+<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_LONG_LONG __int64</span>
+<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_LONG_LONG long long</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER */</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 defined(_MSC_VER) && !defined(__INTEL_COMPILER)</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warnings </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: 4244 4267)</span>
+<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<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="l00051"></a>00051 };
+<a name="l00052"></a>00052 
+<a name="l00054"></a>00054 <span class="keyword">namespace </span>internal {
+<a name="l00055"></a>00055 
+<a name="l00056"></a>00056 <span class="preprocessor">#if __GNUC__ || __SUNPRO_CC</span>
+<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_DECL_ATOMIC_FIELD(t,f,a) t f  __attribute__ ((aligned(a)));</span>
+<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__INTEL_COMPILER)||_MSC_VER >= 1300</span>
+<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_DECL_ATOMIC_FIELD(t,f,a) __declspec(align(a)) t f;</span>
+<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#else </span>
+<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#error Do not know syntax for forcing alignment.</span>
+<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
+<a name="l00063"></a>00063 
+<a name="l00064"></a>00064 <span class="keyword">template</span><size_t S>
+<a name="l00065"></a>00065 <span class="keyword">struct </span>atomic_rep;           <span class="comment">// Primary template declared, but never defined.</span>
+<a name="l00066"></a>00066 
+<a name="l00067"></a>00067 <span class="keyword">template</span><>
+<a name="l00068"></a>00068 <span class="keyword">struct </span>atomic_rep<1> {       <span class="comment">// Specialization</span>
+<a name="l00069"></a>00069     <span class="keyword">typedef</span> int8_t word;
+<a name="l00070"></a>00070     int8_t value;
+<a name="l00071"></a>00071 };
+<a name="l00072"></a>00072 <span class="keyword">template</span><>
+<a name="l00073"></a>00073 <span class="keyword">struct </span>atomic_rep<2> {       <span class="comment">// Specialization</span>
+<a name="l00074"></a>00074     <span class="keyword">typedef</span> int16_t word;
+<a name="l00075"></a>00075     __TBB_DECL_ATOMIC_FIELD(int16_t,value,2)
+<a name="l00076"></a>00076 };
+<a name="l00077"></a>00077 <span class="keyword">template</span><>
+<a name="l00078"></a>00078 <span class="keyword">struct </span>atomic_rep<4> {       <span class="comment">// Specialization</span>
+<a name="l00079"></a>00079 <span class="preprocessor">#if _MSC_VER && __TBB_WORDSIZE==4</span>
+<a name="l00080"></a>00080 <span class="preprocessor"></span>    <span class="comment">// Work-around that avoids spurious /Wp64 warnings</span>
+<a name="l00081"></a>00081     <span class="keyword">typedef</span> intptr_t word;
+<a name="l00082"></a>00082 <span class="preprocessor">#else</span>
+<a name="l00083"></a>00083 <span class="preprocessor"></span>    <span class="keyword">typedef</span> int32_t word;
+<a name="l00084"></a>00084 <span class="preprocessor">#endif</span>
+<a name="l00085"></a>00085 <span class="preprocessor"></span>    __TBB_DECL_ATOMIC_FIELD(int32_t,value,4)
+<a name="l00086"></a>00086 };
+<a name="l00087"></a>00087 <span class="keyword">template</span><>
+<a name="l00088"></a>00088 <span class="keyword">struct </span>atomic_rep<8> {       <span class="comment">// Specialization</span>
+<a name="l00089"></a>00089     <span class="keyword">typedef</span> int64_t word;
+<a name="l00090"></a>00090     __TBB_DECL_ATOMIC_FIELD(int64_t,value,8)
+<a name="l00091"></a>00091 };
+<a name="l00092"></a>00092 
+<a name="l00093"></a>00093 <span class="keyword">template</span><size_t Size, memory_semantics M>
+<a name="l00094"></a>00094 <span class="keyword">struct </span>atomic_traits;        <span class="comment">// Primary template declared, but not defined.</span>
+<a name="l00095"></a>00095 
+<a name="l00096"></a>00096 <span class="preprocessor">#define __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(S,M)                         \</span>
+<a name="l00097"></a>00097 <span class="preprocessor">    template<> struct atomic_traits<S,M> {                               \</span>
+<a name="l00098"></a>00098 <span class="preprocessor">        typedef atomic_rep<S>::word word;                               \</span>
+<a name="l00099"></a>00099 <span class="preprocessor">        inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\</span>
+<a name="l00100"></a>00100 <span class="preprocessor">            return __TBB_CompareAndSwap##S##M(location,new_value,comparand);    \</span>
+<a name="l00101"></a>00101 <span class="preprocessor">        }                                                                       \</span>
+<a name="l00102"></a>00102 <span class="preprocessor">        inline static word fetch_and_add( volatile void* location, word addend ) { \</span>
+<a name="l00103"></a>00103 <span class="preprocessor">            return __TBB_FetchAndAdd##S##M(location,addend);                    \</span>
+<a name="l00104"></a>00104 <span class="preprocessor">        }                                                                       \</span>
+<a name="l00105"></a>00105 <span class="preprocessor">        inline static word fetch_and_store( volatile void* location, word value ) {\</span>
+<a name="l00106"></a>00106 <span class="preprocessor">            return __TBB_FetchAndStore##S##M(location,value);                   \</span>
+<a name="l00107"></a>00107 <span class="preprocessor">        }                                                                       \</span>
+<a name="l00108"></a>00108 <span class="preprocessor">    };</span>
+<a name="l00109"></a>00109 <span class="preprocessor"></span>
+<a name="l00110"></a>00110 <span class="preprocessor">#define __TBB_DECL_ATOMIC_PRIMITIVES(S)                                  \</span>
+<a name="l00111"></a>00111 <span class="preprocessor">    template<memory_semantics M>                                         \</span>
+<a name="l00112"></a>00112 <span class="preprocessor">    struct atomic_traits<S,M> {                                          \</span>
+<a name="l00113"></a>00113 <span class="preprocessor">        typedef atomic_rep<S>::word word;                               \</span>
+<a name="l00114"></a>00114 <span class="preprocessor">        inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\</span>
+<a name="l00115"></a>00115 <span class="preprocessor">            return __TBB_CompareAndSwap##S(location,new_value,comparand);       \</span>
+<a name="l00116"></a>00116 <span class="preprocessor">        }                                                                       \</span>
+<a name="l00117"></a>00117 <span class="preprocessor">        inline static word fetch_and_add( volatile void* location, word addend ) { \</span>
+<a name="l00118"></a>00118 <span class="preprocessor">            return __TBB_FetchAndAdd##S(location,addend);                       \</span>
+<a name="l00119"></a>00119 <span class="preprocessor">        }                                                                       \</span>
+<a name="l00120"></a>00120 <span class="preprocessor">        inline static word fetch_and_store( volatile void* location, word value ) {\</span>
+<a name="l00121"></a>00121 <span class="preprocessor">            return __TBB_FetchAndStore##S(location,value);                      \</span>
+<a name="l00122"></a>00122 <span class="preprocessor">        }                                                                       \</span>
+<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="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)
+<a name="l00141"></a>00141 __TBB_DECL_ATOMIC_PRIMITIVES(4)
+<a name="l00142"></a>00142 __TBB_DECL_ATOMIC_PRIMITIVES(8)
+<a name="l00143"></a>00143 <span class="preprocessor">#endif</span>
+<a name="l00144"></a>00144 <span class="preprocessor"></span>
+<a name="l00146"></a>00146 
+<a name="l00148"></a>00148 <span class="preprocessor">#define __TBB_MINUS_ONE(T) (T(T(0)-T(1)))</span>
+<a name="l00149"></a>00149 <span class="preprocessor"></span>
+<a name="l00151"></a>00151 
+<a name="l00153"></a>00153 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00154"></a>00154 <span class="keyword">struct </span>atomic_impl {
+<a name="l00155"></a>00155 <span class="keyword">protected</span>:
+<a name="l00156"></a>00156     atomic_rep<sizeof(T)> rep;
+<a name="l00157"></a>00157 <span class="keyword">private</span>:
+<a name="l00159"></a>00159     <span class="keyword">union </span>converter {
+<a name="l00160"></a>00160         T value;
+<a name="l00161"></a>00161         <span class="keyword">typename</span> atomic_rep<sizeof(T)>::word bits;
+<a name="l00162"></a>00162     };
+<a name="l00163"></a>00163 <span class="keyword">public</span>:
+<a name="l00164"></a>00164     <span class="keyword">typedef</span> T value_type;
+<a name="l00165"></a>00165 
+<a name="l00166"></a>00166     <span class="keyword">template</span><memory_semantics M>
+<a name="l00167"></a>00167     value_type fetch_and_store( value_type value ) {
+<a name="l00168"></a>00168         converter u, w;
+<a name="l00169"></a>00169         u.value = value;
+<a name="l00170"></a>00170         w.bits = internal::atomic_traits<sizeof(value_type),M>::fetch_and_store(&rep.value,u.bits);
+<a name="l00171"></a>00171         <span class="keywordflow">return</span> w.value;
+<a name="l00172"></a>00172     }
+<a name="l00173"></a>00173 
+<a name="l00174"></a>00174     value_type fetch_and_store( value_type value ) {
+<a name="l00175"></a>00175         <span class="keywordflow">return</span> fetch_and_store<__TBB_full_fence>(value);
+<a name="l00176"></a>00176     }
+<a name="l00177"></a>00177 
+<a name="l00178"></a>00178     <span class="keyword">template</span><memory_semantics M>
+<a name="l00179"></a>00179     value_type compare_and_swap( value_type value, value_type comparand ) {
+<a name="l00180"></a>00180         converter u, v, w;
+<a name="l00181"></a>00181         u.value = value;
+<a name="l00182"></a>00182         v.value = comparand;
+<a name="l00183"></a>00183         w.bits = internal::atomic_traits<sizeof(value_type),M>::compare_and_swap(&rep.value,u.bits,v.bits);
+<a name="l00184"></a>00184         <span class="keywordflow">return</span> w.value;
+<a name="l00185"></a>00185     }
+<a name="l00186"></a>00186 
+<a name="l00187"></a>00187     value_type compare_and_swap( value_type value, value_type comparand ) {
+<a name="l00188"></a>00188         <span class="keywordflow">return</span> compare_and_swap<__TBB_full_fence>(value,comparand);
+<a name="l00189"></a>00189     }
+<a name="l00190"></a>00190 
+<a name="l00191"></a>00191     operator value_type()<span class="keyword"> const volatile </span>{                <span class="comment">// volatile qualifier here for backwards compatibility </span>
+<a name="l00192"></a>00192         converter w;
+<a name="l00193"></a>00193         w.bits = __TBB_load_with_acquire( rep.value );
+<a name="l00194"></a>00194         <span class="keywordflow">return</span> w.value;
+<a name="l00195"></a>00195     }
+<a name="l00196"></a>00196 
+<a name="l00197"></a>00197 <span class="keyword">protected</span>:
+<a name="l00198"></a>00198     value_type store_with_release( value_type rhs ) {
+<a name="l00199"></a>00199         converter u;
+<a name="l00200"></a>00200         u.value = rhs;
+<a name="l00201"></a>00201         __TBB_store_with_release(rep.value,u.bits);
+<a name="l00202"></a>00202         <span class="keywordflow">return</span> rhs;
+<a name="l00203"></a>00203     }
+<a name="l00204"></a>00204 };
+<a name="l00205"></a>00205 
+<a name="l00207"></a>00207 
+<a name="l00210"></a>00210 <span class="keyword">template</span><<span class="keyword">typename</span> I, <span class="keyword">typename</span> D, <span class="keyword">typename</span> StepType>
+<a name="l00211"></a>00211 <span class="keyword">struct </span>atomic_impl_with_arithmetic: atomic_impl<I> {
+<a name="l00212"></a>00212 <span class="keyword">public</span>:
+<a name="l00213"></a>00213     <span class="keyword">typedef</span> I value_type;
+<a name="l00214"></a>00214 
+<a name="l00215"></a>00215     <span class="keyword">template</span><memory_semantics M>
+<a name="l00216"></a>00216     value_type fetch_and_add( D addend ) {
+<a name="l00217"></a>00217         <span class="keywordflow">return</span> value_type(internal::atomic_traits<<span class="keyword">sizeof</span>(value_type),M>::fetch_and_add( &this->rep.value, addend*<span class="keyword">sizeof</span>(StepType) ));
+<a name="l00218"></a>00218     }
+<a name="l00219"></a>00219 
+<a name="l00220"></a>00220     value_type fetch_and_add( D addend ) {
+<a name="l00221"></a>00221         <span class="keywordflow">return</span> fetch_and_add<__TBB_full_fence>(addend);
+<a name="l00222"></a>00222     }
+<a name="l00223"></a>00223 
+<a name="l00224"></a>00224     <span class="keyword">template</span><memory_semantics M>
+<a name="l00225"></a>00225     value_type fetch_and_increment() {
+<a name="l00226"></a>00226         <span class="keywordflow">return</span> fetch_and_add<M>(1);
+<a name="l00227"></a>00227     }
+<a name="l00228"></a>00228 
+<a name="l00229"></a>00229     value_type fetch_and_increment() {
+<a name="l00230"></a>00230         <span class="keywordflow">return</span> fetch_and_add(1);
+<a name="l00231"></a>00231     }
+<a name="l00232"></a>00232 
+<a name="l00233"></a>00233     <span class="keyword">template</span><memory_semantics M>
+<a name="l00234"></a>00234     value_type fetch_and_decrement() {
+<a name="l00235"></a>00235         <span class="keywordflow">return</span> fetch_and_add<M>(__TBB_MINUS_ONE(D));
+<a name="l00236"></a>00236     }
+<a name="l00237"></a>00237 
+<a name="l00238"></a>00238     value_type fetch_and_decrement() {
+<a name="l00239"></a>00239         <span class="keywordflow">return</span> fetch_and_add(__TBB_MINUS_ONE(D));
+<a name="l00240"></a>00240     }
+<a name="l00241"></a>00241 
+<a name="l00242"></a>00242 <span class="keyword">public</span>:
+<a name="l00243"></a>00243     value_type operator+=( D addend ) {
+<a name="l00244"></a>00244         <span class="keywordflow">return</span> fetch_and_add(addend)+addend;
+<a name="l00245"></a>00245     }
+<a name="l00246"></a>00246 
+<a name="l00247"></a>00247     value_type operator-=( D addend ) {
+<a name="l00248"></a>00248         <span class="comment">// Additive inverse of addend computed using binary minus,</span>
+<a name="l00249"></a>00249         <span class="comment">// instead of unary minus, for sake of avoiding compiler warnings.</span>
+<a name="l00250"></a>00250         <span class="keywordflow">return</span> operator+=(D(0)-addend);    
+<a name="l00251"></a>00251     }
+<a name="l00252"></a>00252 
+<a name="l00253"></a>00253     value_type operator++() {
+<a name="l00254"></a>00254         <span class="keywordflow">return</span> fetch_and_add(1)+1;
+<a name="l00255"></a>00255     }
+<a name="l00256"></a>00256 
+<a name="l00257"></a>00257     value_type operator--() {
+<a name="l00258"></a>00258         <span class="keywordflow">return</span> fetch_and_add(__TBB_MINUS_ONE(D))-1;
+<a name="l00259"></a>00259     }
+<a name="l00260"></a>00260 
+<a name="l00261"></a>00261     value_type operator++(<span class="keywordtype">int</span>) {
+<a name="l00262"></a>00262         <span class="keywordflow">return</span> fetch_and_add(1);
+<a name="l00263"></a>00263     }
+<a name="l00264"></a>00264 
+<a name="l00265"></a>00265     value_type operator--(<span class="keywordtype">int</span>) {
+<a name="l00266"></a>00266         <span class="keywordflow">return</span> fetch_and_add(__TBB_MINUS_ONE(D));
+<a name="l00267"></a>00267     }
+<a name="l00268"></a>00268 };
+<a name="l00269"></a>00269 
+<a name="l00270"></a>00270 <span class="preprocessor">#if __TBB_WORDSIZE == 4</span>
+<a name="l00271"></a>00271 <span class="preprocessor"></span><span class="comment">// Plaforms with 32-bit hardware require special effort for 64-bit loads and stores.</span>
+<a name="l00272"></a>00272 <span class="preprocessor">#if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400</span>
+<a name="l00273"></a>00273 <span class="preprocessor"></span>
+<a name="l00274"></a>00274 <span class="keyword">template</span><>
+<a name="l00275"></a>00275 <span class="keyword">inline</span> atomic_impl<__TBB_LONG_LONG>::operator atomic_impl<__TBB_LONG_LONG>::value_type()<span class="keyword"> const volatile </span>{
+<a name="l00276"></a>00276     <span class="keywordflow">return</span> __TBB_Load8(&rep.value);
+<a name="l00277"></a>00277 }
+<a name="l00278"></a>00278 
+<a name="l00279"></a>00279 <span class="keyword">template</span><>
+<a name="l00280"></a>00280 <span class="keyword">inline</span> atomic_impl<unsigned __TBB_LONG_LONG>::operator atomic_impl<unsigned __TBB_LONG_LONG>::value_type()<span class="keyword"> const volatile </span>{
+<a name="l00281"></a>00281     <span class="keywordflow">return</span> __TBB_Load8(&rep.value);
+<a name="l00282"></a>00282 }
+<a name="l00283"></a>00283 
+<a name="l00284"></a>00284 <span class="keyword">template</span><>
+<a name="l00285"></a>00285 <span class="keyword">inline</span> atomic_impl<__TBB_LONG_LONG>::value_type atomic_impl<__TBB_LONG_LONG>::store_with_release( value_type rhs ) {
+<a name="l00286"></a>00286     __TBB_Store8(&rep.value,rhs);
+<a name="l00287"></a>00287     <span class="keywordflow">return</span> rhs;
+<a name="l00288"></a>00288 }
+<a name="l00289"></a>00289 
+<a name="l00290"></a>00290 <span class="keyword">template</span><>
+<a name="l00291"></a>00291 <span class="keyword">inline</span> atomic_impl<unsigned __TBB_LONG_LONG>::value_type atomic_impl<unsigned __TBB_LONG_LONG>::store_with_release( value_type rhs ) {
+<a name="l00292"></a>00292     __TBB_Store8(&rep.value,rhs);
+<a name="l00293"></a>00293     <span class="keywordflow">return</span> rhs;
+<a name="l00294"></a>00294 }
+<a name="l00295"></a>00295 
+<a name="l00296"></a>00296 <span class="preprocessor">#endif </span><span class="comment">/* defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */</span>
+<a name="l00297"></a>00297 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_WORDSIZE==4 */</span>
+<a name="l00298"></a>00298 
+<a name="l00299"></a>00299 } <span class="comment">/* Internal */</span>
+<a name="l00301"></a>00301 
+<a name="l00303"></a>00303 
+<a name="l00305"></a>00305 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00306"></a><a class="code" href="a00117.html">00306</a> <span class="keyword">struct </span><a class="code" href="a00117.html">atomic</a>: internal::atomic_impl<T> {
+<a name="l00307"></a>00307     T operator=( T rhs ) {
+<a name="l00308"></a>00308         <span class="comment">// "this" required here in strict ISO C++ because store_with_release is a dependent name</span>
+<a name="l00309"></a>00309         <span class="keywordflow">return</span> this->store_with_release(rhs);
+<a name="l00310"></a>00310     }
+<a name="l00311"></a>00311     <a class="code" href="a00117.html">atomic<T></a>& operator=( <span class="keyword">const</span> <a class="code" href="a00117.html">atomic<T></a>& rhs ) {this->store_with_release(rhs); <span class="keywordflow">return</span> *<span class="keyword">this</span>;}
+<a name="l00312"></a>00312 };
+<a name="l00313"></a>00313 
+<a name="l00314"></a>00314 <span class="preprocessor">#define __TBB_DECL_ATOMIC(T) \</span>
+<a name="l00315"></a>00315 <span class="preprocessor">    template<> struct atomic<T>: internal::atomic_impl_with_arithmetic<T,T,char> {  \</span>
+<a name="l00316"></a>00316 <span class="preprocessor">        T operator=( T rhs ) {return store_with_release(rhs);}  \</span>
+<a name="l00317"></a>00317 <span class="preprocessor">        atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;}  \</span>
+<a name="l00318"></a>00318 <span class="preprocessor">    };</span>
+<a name="l00319"></a>00319 <span class="preprocessor"></span>
+<a name="l00320"></a>00320 <span class="preprocessor">#if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400</span>
+<a name="l00321"></a>00321 <span class="preprocessor"></span>__TBB_DECL_ATOMIC(__TBB_LONG_LONG)
+<a name="l00322"></a>00322 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> __TBB_LONG_LONG)
+<a name="l00323"></a>00323 <span class="preprocessor">#else</span>
+<a name="l00324"></a>00324 <span class="preprocessor"></span><span class="comment">// Some old versions of MVSC cannot correctly compile templates with "long long".</span>
+<a name="l00325"></a>00325 <span class="preprocessor">#endif </span><span class="comment">/* defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */</span>
+<a name="l00326"></a>00326 
+<a name="l00327"></a>00327 __TBB_DECL_ATOMIC(<span class="keywordtype">long</span>)
+<a name="l00328"></a>00328 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)
+<a name="l00329"></a>00329 
+<a name="l00330"></a>00330 <span class="preprocessor">#if defined(_MSC_VER) && __TBB_WORDSIZE==4</span>
+<a name="l00331"></a>00331 <span class="preprocessor"></span><span class="comment">/* Special version of __TBB_DECL_ATOMIC that avoids gratuitous warnings from cl /Wp64 option. </span>
+<a name="l00332"></a>00332 <span class="comment">   It is identical to __TBB_DECL_ATOMIC(unsigned) except that it replaces operator=(T) </span>
+<a name="l00333"></a>00333 <span class="comment">   with an operator=(U) that explicitly converts the U to a T.  Types T and U should be</span>
+<a name="l00334"></a>00334 <span class="comment">   type synonyms on the platform.  Type U should be the wider variant of T from the</span>
+<a name="l00335"></a>00335 <span class="comment">   perspective of /Wp64. */</span>
+<a name="l00336"></a>00336 <span class="preprocessor">#define __TBB_DECL_ATOMIC_ALT(T,U) \</span>
+<a name="l00337"></a>00337 <span class="preprocessor">    template<> struct atomic<T>: internal::atomic_impl_with_arithmetic<T,T,char> {  \</span>
+<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="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>)
+<a name="l00346"></a>00346 <span class="preprocessor">#endif </span><span class="comment">/* defined(_MSC_VER) && __TBB_WORDSIZE==4 */</span>
+<a name="l00347"></a>00347 
+<a name="l00348"></a>00348 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>)
+<a name="l00349"></a>00349 __TBB_DECL_ATOMIC(<span class="keywordtype">short</span>)
+<a name="l00350"></a>00350 __TBB_DECL_ATOMIC(<span class="keywordtype">char</span>)
+<a name="l00351"></a>00351 __TBB_DECL_ATOMIC(<span class="keywordtype">signed</span> <span class="keywordtype">char</span>)
+<a name="l00352"></a>00352 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)
+<a name="l00353"></a>00353 
+<a name="l00354"></a>00354 <span class="preprocessor">#if !defined(_MSC_VER)||defined(_NATIVE_WCHAR_T_DEFINED) </span>
+<a name="l00355"></a>00355 <span class="preprocessor"></span>__TBB_DECL_ATOMIC(<span class="keywordtype">wchar_t</span>)
+<a name="l00356"></a>00356 <span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER||!defined(_NATIVE_WCHAR_T_DEFINED) */</span>
+<a name="l00357"></a>00357 
+<a name="l00359"></a>00359 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">struct </span><a class="code" href="a00117.html">atomic</a><T*>: internal::atomic_impl_with_arithmetic<T*,ptrdiff_t,T> {
+<a name="l00360"></a>00360     T* operator=( T* rhs ) {
+<a name="l00361"></a>00361         <span class="comment">// "this" required here in strict ISO C++ because store_with_release is a dependent name</span>
+<a name="l00362"></a>00362         <span class="keywordflow">return</span> this->store_with_release(rhs);
+<a name="l00363"></a>00363     }
+<a name="l00364"></a>00364     <a class="code" href="a00117.html">atomic<T*></a>& operator=( <span class="keyword">const</span> <a class="code" href="a00117.html">atomic<T*></a>& rhs ) {
+<a name="l00365"></a>00365         this->store_with_release(rhs); <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00366"></a>00366     }
+<a name="l00367"></a>00367     T* operator->()<span class="keyword"> const </span>{
+<a name="l00368"></a>00368         <span class="keywordflow">return</span> (*<span class="keyword">this</span>);
+<a name="l00369"></a>00369     }
+<a name="l00370"></a>00370 };
+<a name="l00371"></a>00371 
+<a name="l00373"></a><a class="code" href="a00118.html">00373</a> <span class="keyword">template</span><> <span class="keyword">struct </span><a class="code" href="a00117.html">atomic</a><void*>: internal::atomic_impl<void*> {
+<a name="l00374"></a>00374     <span class="keywordtype">void</span>* operator=( <span class="keywordtype">void</span>* rhs ) {
+<a name="l00375"></a>00375         <span class="comment">// "this" required here in strict ISO C++ because store_with_release is a dependent name</span>
+<a name="l00376"></a>00376         <span class="keywordflow">return</span> this->store_with_release(rhs);
+<a name="l00377"></a>00377     }
+<a name="l00378"></a>00378     <a class="code" href="a00117.html">atomic<void*></a>& operator=( <span class="keyword">const</span> <a class="code" href="a00117.html">atomic<void*></a>& rhs ) {
+<a name="l00379"></a>00379         this->store_with_release(rhs); <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00380"></a>00380     }
+<a name="l00381"></a>00381 };
+<a name="l00382"></a>00382 
+<a name="l00383"></a>00383 } <span class="comment">// namespace tbb</span>
+<a name="l00384"></a>00384 
+<a name="l00385"></a>00385 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)</span>
+<a name="l00386"></a>00386 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
+<a name="l00387"></a>00387 <span class="preprocessor"></span><span class="preprocessor">#endif // warnings 4244, 4267 are back</span>
+<a name="l00388"></a>00388 <span class="preprocessor"></span>
+<a name="l00389"></a>00389 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_atomic_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/a00200.html b/doc/html/a00261.html
similarity index 76%
rename from doc/html/a00200.html
rename to doc/html/a00261.html
index 95daa5a..93a01ab 100644
--- a/doc/html/a00200.html
+++ b/doc/html/a00261.html
@@ -49,45 +49,45 @@
 <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="a00097.html">00040</a> <span class="keyword">class </span><a class="code" href="a00097.html">blocked_range</a> {
+<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="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">00045</a>     <span class="keyword">typedef</span> Value <a class="code" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a>;
+<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="a00097.html#f5707bffea38eee5c9680f37358afb8e">00048</a>     <span class="keyword">typedef</span> std::size_t <a class="code" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a>;
+<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="a00097.html#94607755c5110d199202234d58d022ac">00052</a>     <a class="code" href="a00097.html#94607755c5110d199202234d58d022ac">blocked_range</a>() : my_begin(), my_end() {}
+<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="a00097.html#14795a36ead1414b4371dbe1a4656359">00055</a>     <a class="code" href="a00097.html#94607755c5110d199202234d58d022ac">blocked_range</a>( Value begin_, Value end_, <a class="code" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> grainsize_=1 ) : 
+<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="a00097.html#18d2258400756ac1446dac7676b18df3">00062</a>     <a class="code" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> <a class="code" href="a00097.html#18d2258400756ac1446dac7676b18df3">begin</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin;}
+<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="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">00065</a>     <a class="code" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> <a class="code" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_end;}
+<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="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">00069</a>     <a class="code" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> <a class="code" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()<span class="keyword"> const </span>{
-<a name="l00070"></a>00070         __TBB_ASSERT( !(<a class="code" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>()<<a class="code" href="a00097.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="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a>(my_end-my_begin);
+<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="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">00075</a>     <a class="code" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> <a class="code" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize;}
+<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="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">00082</a>     <span class="keywordtype">bool</span> <a class="code" href="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !(my_begin<my_end);}
+<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="a00097.html#41a58b703d574b6e1ca155df3576f578">00086</a>     <span class="keywordtype">bool</span> <a class="code" href="a00097.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize<<a class="code" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>();}
+<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="a00097.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">00091</a>     <a class="code" href="a00097.html#94607755c5110d199202234d58d022ac">blocked_range</a>( <a class="code" href="a00097.html">blocked_range</a>& r, <a class="code" href="a00131.html">split</a> ) : 
+<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)
@@ -96,13 +96,13 @@
 <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="a00097.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> my_grainsize;
+<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="a00097.html">blocked_range</a>& r ) {
-<a name="l00106"></a>00106         __TBB_ASSERT( r.<a class="code" href="a00097.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="a00097.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> + (r.<a class="code" href="a00097.html#1ec95c8988b50064dd603998b16f3930">my_end</a>-r.<a class="code" href="a00097.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a>)/2u;
-<a name="l00108"></a>00108         r.<a class="code" href="a00097.html#1ec95c8988b50064dd603998b16f3930">my_end</a> = middle;
+<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 
diff --git a/doc/html/a00201.html b/doc/html/a00262.html
similarity index 76%
rename from doc/html/a00201.html
rename to doc/html/a00262.html
index da0f52a..ac3628b 100644
--- a/doc/html/a00201.html
+++ b/doc/html/a00262.html
@@ -49,54 +49,54 @@
 <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="a00098.html">00032</a> <span class="keyword">class </span><a class="code" href="a00098.html">blocked_range2d</a> {
+<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="a00098.html#a807a22fe658ec38b8edfd69521d0383">00035</a>     <span class="keyword">typedef</span> <a class="code" href="a00097.html">blocked_range<RowValue></a> <a class="code" href="a00097.html">row_range_type</a>;
-<a name="l00036"></a>00036     <span class="keyword">typedef</span> <a class="code" href="a00097.html">blocked_range<ColValue></a> <a class="code" href="a00097.html">col_range_type</a>;
+<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="a00097.html">row_range_type</a> my_rows;
-<a name="l00040"></a>00040     <a class="code" href="a00097.html">col_range_type</a> my_cols;
+<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="a00098.html">blocked_range2d</a>( RowValue row_begin, RowValue row_end, <span class="keyword">typename</span> <a class="code" href="a00097.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="a00097.html#f5707bffea38eee5c9680f37358afb8e">col_range_type::size_type</a> col_grainsize ) : 
+<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="a00098.html">blocked_range2d</a>( RowValue row_begin, RowValue row_end,
+<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="a00098.html#d144cb2d88cef553420311aca8667a44">00059</a>     <span class="keywordtype">bool</span> <a class="code" href="a00098.html#d144cb2d88cef553420311aca8667a44">empty</a>()<span class="keyword"> const </span>{
+<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="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() || my_cols.<a class="code" href="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>();
+<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="a00098.html#ad36a9b38e4fef26d376f99552ce2d92">00065</a>     <span class="keywordtype">bool</span> <a class="code" href="a00098.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="a00097.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() || my_cols.<a class="code" href="a00097.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>();
+<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="a00098.html">blocked_range2d</a>( <a class="code" href="a00098.html">blocked_range2d</a>& r, <a class="code" href="a00131.html">split</a> ) : 
+<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="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_cols.<a class="code" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) < my_cols.<a class="code" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_rows.<a class="code" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) ) {
-<a name="l00074"></a>00074             my_cols.<a class="code" href="a00097.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00098.html#9837bbaabc5836741fde79512ea1131d">my_cols</a>);
+<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="a00097.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = row_range_type::do_split(r.<a class="code" href="a00098.html#4be7c7b39da256afe9c67be735b6f788">my_rows</a>);
+<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="a00098.html#f496e7348a82652fba581203477cc07c">00081</a>     <span class="keyword">const</span> <a class="code" href="a00097.html">row_range_type</a>& <a class="code" href="a00098.html#f496e7348a82652fba581203477cc07c">rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_rows;}
+<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="a00098.html#392a46759af2c884957115771affa7f4">00084</a>     <span class="keyword">const</span> <a class="code" href="a00097.html">col_range_type</a>& <a class="code" href="a00098.html#392a46759af2c884957115771affa7f4">cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_cols;}
+<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>
diff --git a/doc/html/a00202.html b/doc/html/a00263.html
similarity index 71%
rename from doc/html/a00202.html
rename to doc/html/a00263.html
index 54fc43d..e23061d 100644
--- a/doc/html/a00202.html
+++ b/doc/html/a00263.html
@@ -49,20 +49,20 @@
 <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> PageValue, <span class="keyword">typename</span> RowValue=PageValue, <span class="keyword">typename</span> ColValue=RowValue>
-<a name="l00032"></a><a class="code" href="a00099.html">00032</a> <span class="keyword">class </span><a class="code" href="a00099.html">blocked_range3d</a> {
+<a name="l00032"></a><a class="code" href="a00124.html">00032</a> <span class="keyword">class </span><a class="code" href="a00124.html">blocked_range3d</a> {
 <a name="l00033"></a>00033 <span class="keyword">public</span>:
-<a name="l00035"></a><a class="code" href="a00099.html#b8ebf17a552ba47825e9b3887855b719">00035</a>     <span class="keyword">typedef</span> <a class="code" href="a00097.html">blocked_range<PageValue></a> <a class="code" href="a00097.html">page_range_type</a>;
-<a name="l00036"></a>00036     <span class="keyword">typedef</span> <a class="code" href="a00097.html">blocked_range<RowValue></a>  <a class="code" href="a00097.html">row_range_type</a>;
-<a name="l00037"></a>00037     <span class="keyword">typedef</span> <a class="code" href="a00097.html">blocked_range<ColValue></a>  <a class="code" href="a00097.html">col_range_type</a>;
+<a name="l00035"></a><a class="code" href="a00124.html#b8ebf17a552ba47825e9b3887855b719">00035</a>     <span class="keyword">typedef</span> <a class="code" href="a00122.html">blocked_range<PageValue></a> <a class="code" href="a00122.html">page_range_type</a>;
+<a name="l00036"></a>00036     <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="l00037"></a>00037     <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="l00038"></a>00038  
 <a name="l00039"></a>00039 <span class="keyword">private</span>:
-<a name="l00040"></a>00040     <a class="code" href="a00097.html">page_range_type</a> my_pages;
-<a name="l00041"></a>00041     <a class="code" href="a00097.html">row_range_type</a>  my_rows;
-<a name="l00042"></a>00042     <a class="code" href="a00097.html">col_range_type</a>  my_cols;
+<a name="l00040"></a>00040     <a class="code" href="a00122.html">page_range_type</a> my_pages;
+<a name="l00041"></a>00041     <a class="code" href="a00122.html">row_range_type</a>  my_rows;
+<a name="l00042"></a>00042     <a class="code" href="a00122.html">col_range_type</a>  my_cols;
 <a name="l00043"></a>00043 
 <a name="l00044"></a>00044 <span class="keyword">public</span>:
 <a name="l00045"></a>00045 
-<a name="l00046"></a>00046     <a class="code" href="a00099.html">blocked_range3d</a>( PageValue page_begin, PageValue page_end,
+<a name="l00046"></a>00046     <a class="code" href="a00124.html">blocked_range3d</a>( PageValue page_begin, PageValue page_end,
 <a name="l00047"></a>00047                      RowValue  row_begin,  RowValue row_end,
 <a name="l00048"></a>00048                      ColValue  col_begin,  ColValue col_end ) : 
 <a name="l00049"></a>00049         my_pages(page_begin,page_end),
@@ -71,49 +71,49 @@
 <a name="l00052"></a>00052     {
 <a name="l00053"></a>00053     }
 <a name="l00054"></a>00054 
-<a name="l00055"></a>00055     <a class="code" href="a00099.html">blocked_range3d</a>( PageValue page_begin, PageValue page_end, <span class="keyword">typename</span> <a class="code" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">page_range_type::size_type</a> page_grainsize, 
-<a name="l00056"></a>00056                      RowValue  row_begin,  RowValue row_end,   <span class="keyword">typename</span> <a class="code" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">row_range_type::size_type</a> row_grainsize,
-<a name="l00057"></a>00057                      ColValue  col_begin,  ColValue col_end,   <span class="keyword">typename</span> <a class="code" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">col_range_type::size_type</a> col_grainsize ) :  
+<a name="l00055"></a>00055     <a class="code" href="a00124.html">blocked_range3d</a>( PageValue page_begin, PageValue page_end, <span class="keyword">typename</span> <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">page_range_type::size_type</a> page_grainsize, 
+<a name="l00056"></a>00056                      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="l00057"></a>00057                      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="l00058"></a>00058         my_pages(page_begin,page_end,page_grainsize),
 <a name="l00059"></a>00059         my_rows(row_begin,row_end,row_grainsize),
 <a name="l00060"></a>00060         my_cols(col_begin,col_end,col_grainsize)
 <a name="l00061"></a>00061     {
 <a name="l00062"></a>00062     }
 <a name="l00063"></a>00063 
-<a name="l00065"></a><a class="code" href="a00099.html#356860e1c977d91711e8216bd55c0b25">00065</a>     <span class="keywordtype">bool</span> <a class="code" href="a00099.html#356860e1c977d91711e8216bd55c0b25">empty</a>()<span class="keyword"> const </span>{
+<a name="l00065"></a><a class="code" href="a00124.html#356860e1c977d91711e8216bd55c0b25">00065</a>     <span class="keywordtype">bool</span> <a class="code" href="a00124.html#356860e1c977d91711e8216bd55c0b25">empty</a>()<span class="keyword"> const </span>{
 <a name="l00066"></a>00066         <span class="comment">// Yes, it is a logical OR here, not AND.</span>
-<a name="l00067"></a>00067         <span class="keywordflow">return</span> my_pages.<a class="code" href="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() || my_rows.<a class="code" href="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() || my_cols.<a class="code" href="a00097.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>();
+<a name="l00067"></a>00067         <span class="keywordflow">return</span> my_pages.<a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() || my_rows.<a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() || my_cols.<a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>();
 <a name="l00068"></a>00068     }
 <a name="l00069"></a>00069 
-<a name="l00071"></a><a class="code" href="a00099.html#39d69191721c488e737ae5d9c5336b9c">00071</a>     <span class="keywordtype">bool</span> <a class="code" href="a00099.html#39d69191721c488e737ae5d9c5336b9c">is_divisible</a>()<span class="keyword"> const </span>{
-<a name="l00072"></a>00072         <span class="keywordflow">return</span>  my_pages.<a class="code" href="a00097.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() || my_rows.<a class="code" href="a00097.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() || my_cols.<a class="code" href="a00097.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>();
+<a name="l00071"></a><a class="code" href="a00124.html#39d69191721c488e737ae5d9c5336b9c">00071</a>     <span class="keywordtype">bool</span> <a class="code" href="a00124.html#39d69191721c488e737ae5d9c5336b9c">is_divisible</a>()<span class="keyword"> const </span>{
+<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="a00099.html">blocked_range3d</a>( <a class="code" href="a00099.html">blocked_range3d</a>& r, <a class="code" href="a00131.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="a00161.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)
 <a name="l00079"></a>00079     {
-<a name="l00080"></a>00080         <span class="keywordflow">if</span>( my_pages.<a class="code" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_rows.<a class="code" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) < my_rows.<a class="code" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_pages.<a class="code" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) ) {
-<a name="l00081"></a>00081             <span class="keywordflow">if</span> ( my_rows.<a class="code" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_cols.<a class="code" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) < my_cols.<a class="code" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_rows.<a class="code" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) ) {
-<a name="l00082"></a>00082                 my_cols.<a class="code" href="a00097.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00099.html#ef7143ddf8f5b1265b5a6d05be00cde5">my_cols</a>);
+<a name="l00080"></a>00080         <span class="keywordflow">if</span>( my_pages.<a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_rows.<a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) < my_rows.<a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_pages.<a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) ) {
+<a name="l00081"></a>00081             <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="l00082"></a>00082                 my_cols.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00124.html#ef7143ddf8f5b1265b5a6d05be00cde5">my_cols</a>);
 <a name="l00083"></a>00083             } <span class="keywordflow">else</span> {
-<a name="l00084"></a>00084                 my_rows.<a class="code" href="a00097.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = row_range_type::do_split(r.<a class="code" href="a00099.html#76ead25c280ef630b88a1c8846471707">my_rows</a>);
+<a name="l00084"></a>00084                 my_rows.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = row_range_type::do_split(r.<a class="code" href="a00124.html#76ead25c280ef630b88a1c8846471707">my_rows</a>);
 <a name="l00085"></a>00085             }
 <a name="l00086"></a>00086         } <span class="keywordflow">else</span> {
-<a name="l00087"></a>00087             <span class="keywordflow">if</span> ( my_pages.<a class="code" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_cols.<a class="code" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) < my_cols.<a class="code" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_pages.<a class="code" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) ) {
-<a name="l00088"></a>00088                 my_cols.<a class="code" href="a00097.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00099.html#ef7143ddf8f5b1265b5a6d05be00cde5">my_cols</a>);
+<a name="l00087"></a>00087             <span class="keywordflow">if</span> ( my_pages.<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_pages.<a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) ) {
+<a name="l00088"></a>00088                 my_cols.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00124.html#ef7143ddf8f5b1265b5a6d05be00cde5">my_cols</a>);
 <a name="l00089"></a>00089             } <span class="keywordflow">else</span> {
-<a name="l00090"></a>00090                     my_pages.<a class="code" href="a00097.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = page_range_type::do_split(r.<a class="code" href="a00099.html#b18ae46a01d42745078d9e287ab87baa">my_pages</a>);
+<a name="l00090"></a>00090                     my_pages.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = page_range_type::do_split(r.<a class="code" href="a00124.html#b18ae46a01d42745078d9e287ab87baa">my_pages</a>);
 <a name="l00091"></a>00091             }
 <a name="l00092"></a>00092         }
 <a name="l00093"></a>00093     }
 <a name="l00094"></a>00094 
-<a name="l00096"></a><a class="code" href="a00099.html#cf971430aa12361d3ed245344b7c6764">00096</a>     <span class="keyword">const</span> <a class="code" href="a00097.html">page_range_type</a>& <a class="code" href="a00099.html#cf971430aa12361d3ed245344b7c6764">pages</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_pages;}
+<a name="l00096"></a><a class="code" href="a00124.html#cf971430aa12361d3ed245344b7c6764">00096</a>     <span class="keyword">const</span> <a class="code" href="a00122.html">page_range_type</a>& <a class="code" href="a00124.html#cf971430aa12361d3ed245344b7c6764">pages</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_pages;}
 <a name="l00097"></a>00097 
-<a name="l00099"></a><a class="code" href="a00099.html#1584623e59ff32a8aa82006827508be4">00099</a>     <span class="keyword">const</span> <a class="code" href="a00097.html">row_range_type</a>& <a class="code" href="a00099.html#1584623e59ff32a8aa82006827508be4">rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_rows;}
+<a name="l00099"></a><a class="code" href="a00124.html#1584623e59ff32a8aa82006827508be4">00099</a>     <span class="keyword">const</span> <a class="code" href="a00122.html">row_range_type</a>& <a class="code" href="a00124.html#1584623e59ff32a8aa82006827508be4">rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_rows;}
 <a name="l00100"></a>00100 
-<a name="l00102"></a><a class="code" href="a00099.html#3336ba9480fd6c43e158f9beb024c050">00102</a>     <span class="keyword">const</span> <a class="code" href="a00097.html">col_range_type</a>& <a class="code" href="a00099.html#3336ba9480fd6c43e158f9beb024c050">cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_cols;}
+<a name="l00102"></a><a class="code" href="a00124.html#3336ba9480fd6c43e158f9beb024c050">00102</a>     <span class="keyword">const</span> <a class="code" href="a00122.html">col_range_type</a>& <a class="code" href="a00124.html#3336ba9480fd6c43e158f9beb024c050">cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_cols;}
 <a name="l00103"></a>00103 
 <a name="l00104"></a>00104 };
 <a name="l00105"></a>00105 
diff --git a/doc/html/a00264.html b/doc/html/a00264.html
index 1a52b0a..ec1ffa1 100644
--- a/doc/html/a00264.html
+++ b/doc/html/a00264.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>partitioner.h Source File</title>
+<title>cache_aligned_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>partitioner.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>cache_aligned_allocator.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,187 +39,99 @@
 <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_partitioner_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_partitioner_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_cache_aligned_allocator_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_cache_aligned_allocator_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 <span class="keyword">class </span>affinity_partitioner;
+<a name="l00024"></a>00024 <span class="preprocessor">#include <new></span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include "tbb_stddef.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 <span class="keyword">namespace </span>internal {
-<a name="l00031"></a>00031 size_t __TBB_EXPORTED_FUNC get_initial_auto_partitioner_divisor();
 <a name="l00032"></a>00032 
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035 <span class="keyword">class </span>affinity_partitioner_base_v3: no_copy {
-<a name="l00036"></a>00036     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00091.html">tbb::affinity_partitioner</a>;
+<a name="l00035"></a>00035     <span class="keyword">const</span> size_t NFS_MaxLineSize = 128;
+<a name="l00036"></a>00036 
 <a name="l00038"></a>00038 
-<a name="l00039"></a>00039     affinity_id* my_array;
-<a name="l00041"></a>00041     size_t my_size;
-<a name="l00043"></a>00043     affinity_partitioner_base_v3() : my_array(NULL), my_size(0) {}
-<a name="l00045"></a>00045     ~affinity_partitioner_base_v3() {resize(0);}
-<a name="l00047"></a>00047 
-<a name="l00048"></a>00048     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD resize( <span class="keywordtype">unsigned</span> factor );
-<a name="l00049"></a>00049     <span class="keyword">friend</span> <span class="keyword">class </span>affinity_partition_type;
-<a name="l00050"></a>00050 };
+<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="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="a00132.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 ) {
-<a name="l00060"></a>00060         a.spawn(b);
-<a name="l00061"></a>00061     }
-<a name="l00062"></a>00062 };
-<a name="l00063"></a>00063 
-<a name="l00064"></a>00064 <span class="keyword">class </span>affinity_partition_type;
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066 <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">class </span>start_for;
-<a name="l00067"></a>00067 <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">class </span>start_reduce;
-<a name="l00068"></a>00068 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body> <span class="keyword">class </span>start_reduce_with_affinity;
-<a name="l00069"></a>00069 <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">class </span>start_scan;
-<a name="l00070"></a>00070 
-<a name="l00071"></a>00071 } <span class="comment">// namespace internal</span>
-<a name="l00073"></a>00073 <span class="comment"></span>
+<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="l00077"></a><a class="code" href="a00126.html">00077</a> <span class="keyword">class </span><a class="code" href="a00126.html">simple_partitioner</a> {
-<a name="l00078"></a>00078 <span class="keyword">public</span>:
-<a name="l00079"></a>00079     <a class="code" href="a00126.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;
-<a name="l00083"></a>00083     <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_scan;
-<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="a00132.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="a00126.html">simple_partitioner</a>& ) {}
-<a name="l00089"></a>00089         partition_type( <span class="keyword">const</span> partition_type&, <a class="code" href="a00131.html">split</a> ) {}
-<a name="l00090"></a>00090     };
-<a name="l00091"></a>00091 };
-<a name="l00092"></a>00092 
-<a name="l00094"></a>00094 
-<a name="l00097"></a><a class="code" href="a00095.html">00097</a> <span class="keyword">class </span><a class="code" href="a00095.html">auto_partitioner</a> {
-<a name="l00098"></a>00098 <span class="keyword">public</span>:
-<a name="l00099"></a>00099     <a class="code" href="a00095.html">auto_partitioner</a>() {}
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101 <span class="keyword">private</span>:
-<a name="l00102"></a>00102     <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="l00103"></a>00103     <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;
-<a name="l00104"></a>00104     <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_scan;
+<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="l00105"></a>00105 
-<a name="l00106"></a>00106     <span class="keyword">class </span>partition_type: <span class="keyword">public</span> internal::partition_type_base {
-<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="a00132.html">task</a> &t) {
-<a name="l00111"></a>00111             <span class="keywordflow">if</span>( num_chunks<VICTIM_CHUNKS && t.<a class="code" href="a00132.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="a00095.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="a00131.html">split</a> ) {
-<a name="l00117"></a>00117             num_chunks = pt.num_chunks /= 2u;
-<a name="l00118"></a>00118         }
-<a name="l00119"></a>00119     };
-<a name="l00120"></a>00120 };
-<a name="l00121"></a>00121 
-<a name="l00123"></a><a class="code" href="a00091.html">00123</a> <span class="keyword">class </span><a class="code" href="a00091.html">affinity_partitioner</a>: internal::affinity_partitioner_base_v3 {
-<a name="l00124"></a>00124 <span class="keyword">public</span>:
-<a name="l00125"></a>00125     <a class="code" href="a00091.html">affinity_partitioner</a>() {}
-<a name="l00126"></a>00126 
-<a name="l00127"></a>00127 <span class="keyword">private</span>:
-<a name="l00128"></a>00128     <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="l00129"></a>00129     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body> <span class="keyword">friend</span> <span class="keyword">class </span>internal::start_reduce_with_affinity;
-<a name="l00130"></a>00130     <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_scan;
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132     <span class="keyword">typedef</span> internal::affinity_partition_type partition_type;
-<a name="l00133"></a>00133     <span class="keyword">friend</span> <span class="keyword">class </span>internal::affinity_partition_type;
-<a name="l00134"></a>00134 };
-<a name="l00135"></a>00135 
-<a name="l00137"></a>00137 <span class="keyword">namespace </span>internal {
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139 <span class="keyword">class </span>affinity_partition_type: <span class="keyword">public</span> no_copy {
-<a name="l00141"></a>00141     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> factor = 16;
-<a name="l00142"></a>00142     <span class="keyword">static</span> <span class="keyword">const</span> size_t VICTIM_CHUNKS = 4;
-<a name="l00143"></a>00143 
-<a name="l00144"></a>00144     internal::affinity_id* my_array;
-<a name="l00145"></a>00145     <a class="code" href="a00134.html">task_list</a> delay_list;
-<a name="l00146"></a>00146     <span class="keywordtype">unsigned</span> map_begin, map_end;
-<a name="l00147"></a>00147     size_t num_chunks;
-<a name="l00148"></a>00148 <span class="keyword">public</span>:
-<a name="l00149"></a>00149     affinity_partition_type( <a class="code" href="a00091.html">affinity_partitioner</a>& ap ) {
-<a name="l00150"></a>00150         __TBB_ASSERT( (factor&(factor-1))==0, <span class="stringliteral">"factor must be power of two"</span> ); 
-<a name="l00151"></a>00151         ap.resize(factor);
-<a name="l00152"></a>00152         my_array = ap.my_array;
-<a name="l00153"></a>00153         map_begin = 0;
-<a name="l00154"></a>00154         map_end = unsigned(ap.my_size);
-<a name="l00155"></a>00155         num_chunks = internal::get_initial_auto_partitioner_divisor();
-<a name="l00156"></a>00156     }
-<a name="l00157"></a>00157     affinity_partition_type(affinity_partition_type& p, split) : my_array(p.my_array) {
-<a name="l00158"></a>00158         __TBB_ASSERT( p.map_end-p.map_begin<factor || (p.map_end-p.map_begin)%factor==0, NULL );
-<a name="l00159"></a>00159         num_chunks = p.num_chunks /= 2;
-<a name="l00160"></a>00160         <span class="keywordtype">unsigned</span> e = p.map_end;
-<a name="l00161"></a>00161         <span class="keywordtype">unsigned</span> d = (e - p.map_begin)/2;
-<a name="l00162"></a>00162         <span class="keywordflow">if</span>( d>factor ) 
-<a name="l00163"></a>00163             d &= 0u-factor;
-<a name="l00164"></a>00164         map_end = e;
-<a name="l00165"></a>00165         map_begin = p.map_end = e-d;
-<a name="l00166"></a>00166     }
-<a name="l00167"></a>00167 
-<a name="l00168"></a>00168     <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> task &t) {
-<a name="l00169"></a>00169         <span class="keywordflow">if</span>( num_chunks < VICTIM_CHUNKS && t.is_stolen_task() )
-<a name="l00170"></a>00170             num_chunks = VICTIM_CHUNKS;
-<a name="l00171"></a>00171         <span class="keywordflow">return</span> num_chunks == 1;
-<a name="l00172"></a>00172     }
-<a name="l00173"></a>00173 
-<a name="l00174"></a>00174     <span class="keywordtype">void</span> set_affinity( task &t ) {
-<a name="l00175"></a>00175         <span class="keywordflow">if</span>( map_begin<map_end )
-<a name="l00176"></a>00176             t.set_affinity( my_array[map_begin] );
-<a name="l00177"></a>00177     }
-<a name="l00178"></a>00178     <span class="keywordtype">void</span> note_affinity( <a class="code" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">task::affinity_id</a> <span class="keywordtype">id</span> ) {
-<a name="l00179"></a>00179         <span class="keywordflow">if</span>( map_begin<map_end ) 
-<a name="l00180"></a>00180             my_array[map_begin] = id;
-<a name="l00181"></a>00181     }
-<a name="l00182"></a>00182     task* continue_after_execute_range( task& t ) {
-<a name="l00183"></a>00183         task* first = NULL;
-<a name="l00184"></a>00184         <span class="keywordflow">if</span>( !delay_list.empty() ) {
-<a name="l00185"></a>00185             first = &delay_list.pop_front();
-<a name="l00186"></a>00186             <span class="keywordflow">while</span>( !delay_list.empty() ) {
-<a name="l00187"></a>00187                 t.spawn(*first);
-<a name="l00188"></a>00188                 first = &delay_list.pop_front();
-<a name="l00189"></a>00189             }
-<a name="l00190"></a>00190         }
-<a name="l00191"></a>00191         <span class="keywordflow">return</span> first;
-<a name="l00192"></a>00192     }
-<a name="l00193"></a>00193     <span class="keywordtype">bool</span> decide_whether_to_delay() {
-<a name="l00194"></a>00194         <span class="comment">// The possible underflow caused by "-1u" is deliberate</span>
-<a name="l00195"></a>00195         <span class="keywordflow">return</span> (map_begin&(factor-1))==0 && map_end-map_begin-1u<factor;
-<a name="l00196"></a>00196     }
-<a name="l00197"></a>00197     <span class="keywordtype">void</span> spawn_or_delay( <span class="keywordtype">bool</span> delay, task& a, task& b ) {
-<a name="l00198"></a>00198         <span class="keywordflow">if</span>( delay )  
-<a name="l00199"></a>00199             delay_list.push_back(b);
-<a name="l00200"></a>00200         <span class="keywordflow">else</span> 
-<a name="l00201"></a>00201             a.spawn(b);
-<a name="l00202"></a>00202     }
-<a name="l00203"></a>00203 
-<a name="l00204"></a>00204     ~affinity_partition_type() {
-<a name="l00205"></a>00205         <span class="comment">// The delay_list can be non-empty if an exception is thrown.</span>
-<a name="l00206"></a>00206         <span class="keywordflow">while</span>( !delay_list.empty() ) {
-<a name="l00207"></a>00207             task& t = delay_list.pop_front();
-<a name="l00208"></a>00208             t.destroy(t);
-<a name="l00209"></a>00209         } 
-<a name="l00210"></a>00210     }
-<a name="l00211"></a>00211 };
-<a name="l00212"></a>00212 
-<a name="l00213"></a>00213 } <span class="comment">// namespace internal</span>
-<a name="l00215"></a>00215 <span class="comment"></span>
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217 } <span class="comment">// namespace tbb</span>
-<a name="l00218"></a>00218 
-<a name="l00219"></a>00219 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_partitioner_H */</span>
+<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="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>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00266.html b/doc/html/a00266.html
new file mode 100644
index 0000000..4889a96
--- /dev/null
+++ b/doc/html/a00266.html
@@ -0,0 +1,96 @@
+<!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>
+<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>combinable.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_combinable_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_combinable_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="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="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="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>
+</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/a00267.html b/doc/html/a00267.html
new file mode 100644
index 0000000..f8d3682
--- /dev/null
+++ b/doc/html/a00267.html
@@ -0,0 +1,1099 @@
+<!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="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>
+</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/a00269.html b/doc/html/a00269.html
deleted file mode 100644
index 796ac48..0000000
--- a/doc/html/a00269.html
+++ /dev/null
@@ -1,192 +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 
-<a name="l00044"></a>00044 } <span class="comment">// namespace internal</span>
-<a name="l00046"></a>00046 <span class="comment"></span>
-<a name="l00048"></a>00048 
-<a name="l00049"></a><a class="code" href="a00109.html">00049</a> <span class="keyword">class </span><a class="code" href="a00109.html">filter</a>: internal::no_copy {
-<a name="l00050"></a>00050 <span class="keyword">private</span>:
-<a name="l00052"></a>00052     <span class="keyword">static</span> <a class="code" href="a00109.html">filter</a>* not_in_pipeline() {<span class="keywordflow">return</span> reinterpret_cast<filter*>(internal::intptr(-1));}
-<a name="l00053"></a>00053     
-<a name="l00055"></a>00055     <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="l00056"></a>00056 
-<a name="l00058"></a>00058     <span class="comment">// The bit was not set for parallel filters in TBB 2.1 and earlier,</span>
-<a name="l00059"></a>00059     <span class="comment">// but is_ordered() function always treats parallel filters as out of order</span>
-<a name="l00060"></a>00060     <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="l00061"></a>00061 
-<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> current_version = __TBB_PIPELINE_VERSION(4);
-<a name="l00063"></a>00063     <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="l00064"></a>00064 <span class="keyword">public</span>:
-<a name="l00065"></a><a class="code" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf">00065</a>     <span class="keyword">enum</span> <a class="code" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> {
-<a name="l00067"></a>00067         <a class="code" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a> = current_version | filter_is_out_of_order, 
-<a name="l00069"></a>00069         <a class="code" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">serial_in_order</a> = current_version | filter_is_serial,
-<a name="l00071"></a>00071         <a class="code" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">serial_out_of_order</a> = current_version | filter_is_serial | filter_is_out_of_order,
-<a name="l00073"></a>00073         <a class="code" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> = serial_in_order
-<a name="l00074"></a>00074     };
-<a name="l00075"></a>00075 <span class="keyword">protected</span>:
-<a name="l00076"></a>00076     <a class="code" href="a00109.html">filter</a>( <span class="keywordtype">bool</span> is_serial_ ) : 
-<a name="l00077"></a>00077         next_filter_in_pipeline(not_in_pipeline()),
-<a name="l00078"></a>00078         input_buffer(NULL),
-<a name="l00079"></a>00079         my_filter_mode(static_cast<unsigned char>(is_serial_ ? <a class="code" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> : <a class="code" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a>)),
-<a name="l00080"></a>00080         prev_filter_in_pipeline(not_in_pipeline()),
-<a name="l00081"></a>00081         my_pipeline(NULL)
-<a name="l00082"></a>00082     {}
-<a name="l00083"></a>00083     
-<a name="l00084"></a>00084     filter( <a class="code" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> filter_mode ) :
-<a name="l00085"></a>00085         next_filter_in_pipeline(not_in_pipeline()),
-<a name="l00086"></a>00086         input_buffer(NULL),
-<a name="l00087"></a>00087         my_filter_mode(static_cast<unsigned char>(filter_mode)),
-<a name="l00088"></a>00088         prev_filter_in_pipeline(not_in_pipeline()),
-<a name="l00089"></a>00089         my_pipeline(NULL)
-<a name="l00090"></a>00090     {}
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092 <span class="keyword">public</span>:
-<a name="l00094"></a><a class="code" href="a00109.html#fcfec27656a69ff2072802ac001e936f">00094</a>     <span class="keywordtype">bool</span> <a class="code" href="a00109.html#fcfec27656a69ff2072802ac001e936f">is_serial</a>()<span class="keyword"> const </span>{
-<a name="l00095"></a>00095         <span class="keywordflow">return</span> bool( my_filter_mode & filter_is_serial );
-<a name="l00096"></a>00096     }  
-<a name="l00097"></a>00097     
-<a name="l00098"></a>00098     <span class="comment">// ! True if filter must receive stream in order.</span>
-<a name="l00099"></a>00099     <span class="keywordtype">bool</span> is_ordered()<span class="keyword"> const </span>{
-<a name="l00100"></a>00100         <span class="keywordflow">return</span> (my_filter_mode & (filter_is_out_of_order|filter_is_serial))==filter_is_serial;
-<a name="l00101"></a>00101     }
-<a name="l00102"></a>00102 
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105     <span class="keyword">virtual</span> <span class="keywordtype">void</span>* <a class="code" href="a00109.html#fa1b3dc1f4f47563ccab7f4d92f5b543">operator()</a>( <span class="keywordtype">void</span>* item ) = 0;
-<a name="l00106"></a>00106 
-<a name="l00108"></a>00108 
-<a name="l00109"></a>00109     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD <a class="code" href="a00109.html#66d159f362293e3964ba3da8bc1d2604">~filter</a>();
-<a name="l00110"></a>00110 
-<a name="l00111"></a>00111 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00113"></a>00113 <span class="preprocessor"></span>
-<a name="l00115"></a><a class="code" href="a00109.html#56275eb889c77c4807967133e21401bd">00115</a> <span class="preprocessor">    virtual void finalize( void* </span><span class="comment">/*item*/</span> ) {};
-<a name="l00116"></a>00116 <span class="preprocessor">#endif</span>
-<a name="l00117"></a>00117 <span class="preprocessor"></span>
-<a name="l00118"></a>00118 <span class="keyword">private</span>:
-<a name="l00120"></a>00120     <a class="code" href="a00109.html">filter</a>* next_filter_in_pipeline;
-<a name="l00121"></a>00121 
-<a name="l00123"></a>00123     internal::ordered_buffer* input_buffer;
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125     <span class="keyword">friend</span> <span class="keyword">class </span>internal::stage_task;
-<a name="l00126"></a>00126     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00116.html">pipeline</a>;
-<a name="l00127"></a>00127 
-<a name="l00129"></a>00129     <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> my_filter_mode;
-<a name="l00130"></a>00130 
-<a name="l00132"></a>00132     <a class="code" href="a00109.html">filter</a>* prev_filter_in_pipeline;
-<a name="l00133"></a>00133 
-<a name="l00135"></a>00135     <a class="code" href="a00116.html">pipeline</a>* my_pipeline;
-<a name="l00136"></a>00136 };
-<a name="l00137"></a>00137 
-<a name="l00139"></a>00139 
-<a name="l00140"></a><a class="code" href="a00116.html">00140</a> <span class="keyword">class </span><a class="code" href="a00116.html">pipeline</a> {
-<a name="l00141"></a>00141 <span class="keyword">public</span>:
-<a name="l00143"></a>00143     __TBB_EXPORTED_METHOD <a class="code" href="a00116.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a>();
-<a name="l00144"></a>00144 
-<a name="l00147"></a>00147     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD <a class="code" href="a00116.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a>();
-<a name="l00148"></a>00148 
-<a name="l00150"></a>00150     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00116.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a>( <a class="code" href="a00109.html">filter</a>& filter_ );
-<a name="l00151"></a>00151 
-<a name="l00153"></a>00153     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00116.html#f627616049b3fe36801f37ee40403ef8">run</a>( size_t max_number_of_live_tokens );
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00157"></a>00157 <span class="preprocessor">    void __TBB_EXPORTED_METHOD run( size_t max_number_of_live_tokens, tbb::task_group_context& context );</span>
-<a name="l00158"></a>00158 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00159"></a>00159 <span class="preprocessor"></span>
-<a name="l00161"></a>00161     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00116.html#2c84aef5b834b555ee220b176e25931e">clear</a>();
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163 <span class="keyword">private</span>:
-<a name="l00164"></a>00164     <span class="keyword">friend</span> <span class="keyword">class </span>internal::stage_task;
-<a name="l00165"></a>00165     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00109.html">filter</a>;
-<a name="l00166"></a>00166 
-<a name="l00168"></a>00168     <a class="code" href="a00109.html">filter</a>* filter_list;
-<a name="l00169"></a>00169 
-<a name="l00171"></a>00171     <a class="code" href="a00109.html">filter</a>* filter_end;
-<a name="l00172"></a>00172 
-<a name="l00174"></a>00174     <a class="code" href="a00108.html">empty_task</a>* end_counter;
-<a name="l00175"></a>00175 
-<a name="l00177"></a>00177     <a class="code" href="a00093.html">atomic<internal::Token></a> input_tokens;
-<a name="l00178"></a>00178 
-<a name="l00180"></a>00180     internal::Token token_counter;
-<a name="l00181"></a>00181 
-<a name="l00183"></a>00183     <span class="keywordtype">bool</span> end_of_input;
-<a name="l00184"></a>00184 
-<a name="l00186"></a>00186     <span class="keywordtype">void</span> remove_filter( <a class="code" href="a00109.html">filter</a>& filter_ );
-<a name="l00187"></a>00187 
-<a name="l00189"></a>00189     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD inject_token( <a class="code" href="a00132.html">task</a>& <span class="keyword">self</span> );
-<a name="l00190"></a>00190 
-<a name="l00191"></a>00191 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00193"></a>00193 <span class="preprocessor">    void clear_filters();</span>
-<a name="l00194"></a>00194 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00195"></a>00195 <span class="preprocessor"></span>};
-<a name="l00196"></a>00196 
-<a name="l00197"></a>00197 } <span class="comment">// tbb</span>
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199 <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/a00272.html b/doc/html/a00272.html
deleted file mode 100644
index 96366c1..0000000
--- a/doc/html/a00272.html
+++ /dev/null
@@ -1,211 +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>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>
-<!-- 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>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>
-<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_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">#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 "tbb_stddef.h"</span>
-<a name="l00044"></a>00044 <span class="preprocessor">#include "tbb_profiling.h"</span>
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="keyword">namespace </span>tbb {
-<a name="l00048"></a>00048 
-<a name="l00050"></a><a class="code" href="a00122.html">00050</a> <span class="keyword">class </span><a class="code" href="a00122.html">recursive_mutex</a> {
-<a name="l00051"></a>00051 <span class="keyword">public</span>:
-<a name="l00053"></a><a class="code" href="a00122.html#d2fceb7f95c24a8cd1457d4527e4b8c6">00053</a>     <a class="code" href="a00122.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a>() {
-<a name="l00054"></a>00054 <span class="preprocessor">#if TBB_USE_ASSERT || TBB_USE_THREADING_TOOLS</span>
-<a name="l00055"></a>00055 <span class="preprocessor"></span>        internal_construct();
-<a name="l00056"></a>00056 <span class="preprocessor">#else</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00058"></a>00058 <span class="preprocessor"></span>        InitializeCriticalSection(&impl);
-<a name="l00059"></a>00059 <span class="preprocessor">  #else</span>
-<a name="l00060"></a>00060 <span class="preprocessor"></span>        pthread_mutexattr_t mtx_attr;
-<a name="l00061"></a>00061         <span class="keywordtype">int</span> error_code = pthread_mutexattr_init( &mtx_attr );
-<a name="l00062"></a>00062         <span class="keywordflow">if</span>( error_code )
-<a name="l00063"></a>00063             tbb::internal::handle_perror(error_code,<span class="stringliteral">"recursive_mutex: pthread_mutexattr_init failed"</span>);
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065         pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE );
-<a name="l00066"></a>00066         error_code = pthread_mutex_init( &impl, &mtx_attr );
-<a name="l00067"></a>00067         <span class="keywordflow">if</span>( error_code )
-<a name="l00068"></a>00068             tbb::internal::handle_perror(error_code,<span class="stringliteral">"recursive_mutex: pthread_mutex_init failed"</span>);
-<a name="l00069"></a>00069 
-<a name="l00070"></a>00070         pthread_mutexattr_destroy( &mtx_attr );
-<a name="l00071"></a>00071 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64*/</span>
-<a name="l00072"></a>00072 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00073"></a>00073     };
-<a name="l00074"></a>00074 
-<a name="l00075"></a>00075     ~<a class="code" href="a00122.html">recursive_mutex</a>() {
-<a name="l00076"></a>00076 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00077"></a>00077 <span class="preprocessor"></span>        internal_destroy();
-<a name="l00078"></a>00078 <span class="preprocessor">#else</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00080"></a>00080 <span class="preprocessor"></span>        DeleteCriticalSection(&impl);
-<a name="l00081"></a>00081 <span class="preprocessor">  #else</span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span>        pthread_mutex_destroy(&impl); 
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00085"></a>00085 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00086"></a>00086     };
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088     <span class="keyword">class </span>scoped_lock;
-<a name="l00089"></a>00089     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
-<a name="l00090"></a>00090 
-<a name="l00092"></a>00092 
-<a name="l00094"></a><a class="code" href="a00123.html">00094</a>     <span class="keyword">class </span><a class="code" href="a00123.html">scoped_lock</a>: internal::no_copy {
-<a name="l00095"></a>00095     <span class="keyword">public</span>:
-<a name="l00097"></a><a class="code" href="a00123.html#d82d4d36fbf9727a493d26ae50855fe7">00097</a>         <a class="code" href="a00123.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a>() : my_mutex(NULL) {};
-<a name="l00098"></a>00098 
-<a name="l00100"></a>00100 
-<a name="l00101"></a><a class="code" href="a00123.html#dec17713c4c1321ac8fec66816d0c602">00101</a>         <a class="code" href="a00123.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a>( <a class="code" href="a00122.html">recursive_mutex</a>& <a class="code" href="a00112.html">mutex</a> ) {
-<a name="l00102"></a>00102             <a class="code" href="a00123.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a>( mutex );
-<a name="l00103"></a>00103         }
-<a name="l00104"></a>00104 
-<a name="l00106"></a><a class="code" href="a00123.html#c1197ffb8f3cd9d4fed71d7e06265b7c">00106</a>         <a class="code" href="a00123.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a>() {
-<a name="l00107"></a>00107             <span class="keywordflow">if</span>( my_mutex ) 
-<a name="l00108"></a>00108                 <a class="code" href="a00123.html#ac480ea0e9d5ea0345a67d57008b6263">release</a>();
-<a name="l00109"></a>00109         }
-<a name="l00110"></a>00110 
-<a name="l00112"></a><a class="code" href="a00123.html#7fb04da37cccf8c99b1f9102d9074f9a">00112</a>         <span class="keywordtype">void</span> <a class="code" href="a00123.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a>( <a class="code" href="a00122.html">recursive_mutex</a>& <a class="code" href="a00112.html">mutex</a> ) {
-<a name="l00113"></a>00113 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00114"></a>00114 <span class="preprocessor"></span>            internal_acquire( mutex );
-<a name="l00115"></a>00115 <span class="preprocessor">#else</span>
-<a name="l00116"></a>00116 <span class="preprocessor"></span>            my_mutex = &mutex;
-<a name="l00117"></a>00117 <span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00118"></a>00118 <span class="preprocessor"></span>            EnterCriticalSection(&mutex.<a class="code" href="a00122.html#19cbe7ff028602532d43ff81ec388f29">impl</a>);
-<a name="l00119"></a>00119 <span class="preprocessor">  #else</span>
-<a name="l00120"></a>00120 <span class="preprocessor"></span>            pthread_mutex_lock( &mutex.<a class="code" href="a00122.html#19cbe7ff028602532d43ff81ec388f29">impl</a> );
-<a name="l00121"></a>00121 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<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="a00123.html#36bfc3e93e3ef6340abef4901444d340">00126</a>         <span class="keywordtype">bool</span> <a class="code" href="a00123.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a>( <a class="code" href="a00122.html">recursive_mutex</a>& <a class="code" href="a00112.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;
-<a name="l00131"></a>00131 <span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00132"></a>00132 <span class="preprocessor"></span>            result = TryEnterCriticalSection(&mutex.<a class="code" href="a00122.html#19cbe7ff028602532d43ff81ec388f29">impl</a>)!=0;
-<a name="l00133"></a>00133 <span class="preprocessor">  #else</span>
-<a name="l00134"></a>00134 <span class="preprocessor"></span>            result = pthread_mutex_trylock(&mutex.<a class="code" href="a00122.html#19cbe7ff028602532d43ff81ec388f29">impl</a>)==0;
-<a name="l00135"></a>00135 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00136"></a>00136             <span class="keywordflow">if</span>( result )
-<a name="l00137"></a>00137                 my_mutex = &mutex;
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139             <span class="keywordflow">return</span> result;
-<a name="l00140"></a>00140 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00141"></a>00141         }
-<a name="l00142"></a>00142 
-<a name="l00144"></a><a class="code" href="a00123.html#ac480ea0e9d5ea0345a67d57008b6263">00144</a>         <span class="keywordtype">void</span> <a class="code" href="a00123.html#ac480ea0e9d5ea0345a67d57008b6263">release</a>() {
-<a name="l00145"></a>00145 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00146"></a>00146 <span class="preprocessor"></span>            internal_release ();
-<a name="l00147"></a>00147 <span class="preprocessor">#else</span>
-<a name="l00148"></a>00148 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00149"></a>00149 <span class="preprocessor"></span>            LeaveCriticalSection(&my_mutex-><a class="code" href="a00122.html#19cbe7ff028602532d43ff81ec388f29">impl</a>);
-<a name="l00150"></a>00150 <span class="preprocessor">  #else</span>
-<a name="l00151"></a>00151 <span class="preprocessor"></span>            pthread_mutex_unlock(&my_mutex-><a class="code" href="a00122.html#19cbe7ff028602532d43ff81ec388f29">impl</a>);
-<a name="l00152"></a>00152 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00153"></a>00153             my_mutex = NULL;
-<a name="l00154"></a>00154 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00155"></a>00155         }
-<a name="l00156"></a>00156 
-<a name="l00157"></a>00157     <span class="keyword">private</span>:
-<a name="l00159"></a>00159         <a class="code" href="a00122.html">recursive_mutex</a>* my_mutex;
-<a name="l00160"></a>00160 
-<a name="l00162"></a>00162         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire( <a class="code" href="a00122.html">recursive_mutex</a>& m );
-<a name="l00163"></a>00163 
-<a name="l00165"></a>00165         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire( <a class="code" href="a00122.html">recursive_mutex</a>& m );
-<a name="l00166"></a>00166 
-<a name="l00168"></a>00168         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release();
-<a name="l00169"></a>00169     };
-<a name="l00170"></a>00170 
-<a name="l00171"></a>00171     <span class="comment">// Mutex traits</span>
-<a name="l00172"></a>00172     <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="l00173"></a>00173     <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="l00174"></a>00174     <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="l00175"></a>00175 
-<a name="l00176"></a>00176 <span class="keyword">private</span>:
-<a name="l00177"></a>00177 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00178"></a>00178 <span class="preprocessor"></span>    CRITICAL_SECTION impl;
-<a name="l00179"></a>00179     <span class="keyword">enum</span> state_t {
-<a name="l00180"></a>00180         INITIALIZED=0x1234,
-<a name="l00181"></a>00181         DESTROYED=0x789A,
-<a name="l00182"></a>00182     } state;
-<a name="l00183"></a>00183 <span class="preprocessor">#else</span>
-<a name="l00184"></a>00184 <span class="preprocessor"></span>    pthread_mutex_t impl;
-<a name="l00185"></a>00185 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00186"></a>00186 
-<a name="l00188"></a>00188     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
-<a name="l00189"></a>00189 
-<a name="l00191"></a>00191     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_destroy();
-<a name="l00192"></a>00192 };
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194 __TBB_DEFINE_PROFILING_SET_NAME(recursive_mutex)
-<a name="l00195"></a>00195 
-<a name="l00196"></a>00196 } <span class="comment">// namespace tbb </span>
-<a name="l00197"></a>00197 
-<a name="l00198"></a>00198 <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.
-<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/a00274.html b/doc/html/a00274.html
deleted file mode 100644
index fa82b90..0000000
--- a/doc/html/a00274.html
+++ /dev/null
@@ -1,154 +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>spin_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>spin_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_spin_mutex_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_spin_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 "tbb_stddef.h"</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include "tbb_machine.h"</span>
-<a name="l00027"></a>00027 <span class="preprocessor">#include "tbb_profiling.h"</span>
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029 <span class="keyword">namespace </span>tbb {
-<a name="l00030"></a>00030 
-<a name="l00032"></a>00032 
-<a name="l00037"></a><a class="code" href="a00127.html">00037</a> <span class="keyword">class </span><a class="code" href="a00127.html">spin_mutex</a> {
-<a name="l00039"></a>00039     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> flag;
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041 <span class="keyword">public</span>:
-<a name="l00043"></a>00043 
-<a name="l00044"></a><a class="code" href="a00127.html#3d8fb44644fd8d41ada1fbeba7409be3">00044</a>     <a class="code" href="a00127.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a>() : flag(0) {
-<a name="l00045"></a>00045 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00046"></a>00046 <span class="preprocessor"></span>        internal_construct();
-<a name="l00047"></a>00047 <span class="preprocessor">#endif</span>
-<a name="l00048"></a>00048 <span class="preprocessor"></span>    }
-<a name="l00049"></a>00049 
-<a name="l00051"></a><a class="code" href="a00128.html">00051</a>     <span class="keyword">class </span><a class="code" href="a00128.html">scoped_lock</a> : internal::no_copy {
-<a name="l00052"></a>00052     <span class="keyword">private</span>:
-<a name="l00054"></a>00054         <a class="code" href="a00127.html">spin_mutex</a>* my_mutex; 
-<a name="l00055"></a>00055 
-<a name="l00057"></a>00057         internal::uintptr my_unlock_value;
-<a name="l00058"></a>00058 
-<a name="l00060"></a>00060         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire( <a class="code" href="a00127.html">spin_mutex</a>& m );
-<a name="l00061"></a>00061 
-<a name="l00063"></a>00063         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire( <a class="code" href="a00127.html">spin_mutex</a>& m );
-<a name="l00064"></a>00064 
-<a name="l00066"></a>00066         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release();
-<a name="l00067"></a>00067 
-<a name="l00068"></a>00068     <span class="keyword">public</span>:
-<a name="l00070"></a><a class="code" href="a00128.html#29ae680ae7f5e685c2e15535b9c855b3">00070</a>         <a class="code" href="a00128.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>() : my_mutex(NULL), my_unlock_value(0) {}
-<a name="l00071"></a>00071 
-<a name="l00073"></a><a class="code" href="a00128.html#5ce6807050a9e8f87bcb4a65dccb12ef">00073</a>         <a class="code" href="a00128.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>( <a class="code" href="a00127.html">spin_mutex</a>& m ) { 
-<a name="l00074"></a>00074 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00075"></a>00075 <span class="preprocessor"></span>            my_mutex=NULL;
-<a name="l00076"></a>00076             internal_acquire(m);
-<a name="l00077"></a>00077 <span class="preprocessor">#else</span>
-<a name="l00078"></a>00078 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00127.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
-<a name="l00079"></a>00079             my_mutex=&m;
-<a name="l00080"></a>00080 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/</span>
-<a name="l00081"></a>00081         }
-<a name="l00082"></a>00082 
-<a name="l00084"></a><a class="code" href="a00128.html#3ee3c338732b1f64b0b32a757807a30d">00084</a>         <span class="keywordtype">void</span> <a class="code" href="a00128.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a>( <a class="code" href="a00127.html">spin_mutex</a>& m ) {
-<a name="l00085"></a>00085 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00086"></a>00086 <span class="preprocessor"></span>            internal_acquire(m);
-<a name="l00087"></a>00087 <span class="preprocessor">#else</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00127.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
-<a name="l00089"></a>00089             my_mutex = &m;
-<a name="l00090"></a>00090 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/</span>
-<a name="l00091"></a>00091         }
-<a name="l00092"></a>00092 
-<a name="l00094"></a><a class="code" href="a00128.html#9297ec188534b45dc0ca48f2f39a0501">00094</a>         <span class="keywordtype">bool</span> <a class="code" href="a00128.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a>( <a class="code" href="a00127.html">spin_mutex</a>& m ) {
-<a name="l00095"></a>00095 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00096"></a>00096 <span class="preprocessor"></span>            <span class="keywordflow">return</span> internal_try_acquire(m);
-<a name="l00097"></a>00097 <span class="preprocessor">#else</span>
-<a name="l00098"></a>00098 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result = __TBB_TryLockByte(m.<a class="code" href="a00127.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
-<a name="l00099"></a>00099             <span class="keywordflow">if</span>( result ) {
-<a name="l00100"></a>00100                 my_unlock_value = 0;
-<a name="l00101"></a>00101                 my_mutex = &m;
-<a name="l00102"></a>00102             }
-<a name="l00103"></a>00103             <span class="keywordflow">return</span> result;
-<a name="l00104"></a>00104 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/</span>
-<a name="l00105"></a>00105         }
-<a name="l00106"></a>00106 
-<a name="l00108"></a><a class="code" href="a00128.html#eeb615e68e963e6bf8d9c11402d0ce8e">00108</a>         <span class="keywordtype">void</span> <a class="code" href="a00128.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a>() {
-<a name="l00109"></a>00109 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00110"></a>00110 <span class="preprocessor"></span>            internal_release();
-<a name="l00111"></a>00111 <span class="preprocessor">#else</span>
-<a name="l00112"></a>00112 <span class="preprocessor"></span>            __TBB_store_with_release(my_mutex-><a class="code" href="a00127.html#81b0b05fb71280ce0c79708e82569d86">flag</a>, static_cast<unsigned char>(my_unlock_value));
-<a name="l00113"></a>00113             my_mutex = NULL;
-<a name="l00114"></a>00114 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00115"></a>00115         }
-<a name="l00116"></a>00116 
-<a name="l00118"></a><a class="code" href="a00128.html#ac6fa425d1f06c56d8b70abc51aac844">00118</a>         <a class="code" href="a00128.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a>() {
-<a name="l00119"></a>00119             <span class="keywordflow">if</span>( my_mutex ) {
-<a name="l00120"></a>00120 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00121"></a>00121 <span class="preprocessor"></span>                internal_release();
-<a name="l00122"></a>00122 <span class="preprocessor">#else</span>
-<a name="l00123"></a>00123 <span class="preprocessor"></span>                __TBB_store_with_release(my_mutex-><a class="code" href="a00127.html#81b0b05fb71280ce0c79708e82569d86">flag</a>, static_cast<unsigned char>(my_unlock_value));
-<a name="l00124"></a>00124 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00125"></a>00125             }
-<a name="l00126"></a>00126         }
-<a name="l00127"></a>00127     };
-<a name="l00128"></a>00128 
-<a name="l00129"></a>00129     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
-<a name="l00130"></a>00130 
-<a name="l00131"></a>00131     <span class="comment">// Mutex traits</span>
-<a name="l00132"></a>00132     <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="l00133"></a>00133     <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="l00134"></a>00134     <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="l00135"></a>00135 
-<a name="l00136"></a>00136     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
-<a name="l00137"></a>00137 };
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139 __TBB_DEFINE_PROFILING_SET_NAME(spin_mutex)
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141 } <span class="comment">// namespace tbb</span>
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_spin_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/a00276.html b/doc/html/a00276.html
index 573aa71..2d08848 100644
--- a/doc/html/a00276.html
+++ b/doc/html/a00276.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>concurrent_queue.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>concurrent_queue.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,523 +39,317 @@
 <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_concurrent_queue_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_queue_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="l00024"></a>00024 <span class="preprocessor">#include "_concurrent_queue_internal.h"</span>
 <a name="l00025"></a>00025 
-<a name="l00026"></a>00026 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#include "cache_aligned_allocator.h"</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00026"></a>00026 <span class="keyword">namespace </span>tbb {
+<a name="l00027"></a>00027 
+<a name="l00028"></a>00028 <span class="keyword">namespace </span>strict_ppl {
 <a name="l00029"></a>00029 
-<a name="l00030"></a>00030 <span class="keyword">namespace </span>tbb {
 <a name="l00031"></a>00031 
-<a name="l00032"></a>00032 <span class="keyword">class </span>task;
-<a name="l00033"></a>00033 <span class="keyword">class </span>task_list;
-<a name="l00034"></a>00034 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="keyword">class </span>task_group_context;
-<a name="l00036"></a>00036 <span class="keyword">class </span>tbb_exception;
-<a name="l00037"></a>00037 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00038"></a>00038 
-<a name="l00040"></a>00040 <span class="keyword">namespace </span>internal {
+<a name="l00034"></a>00034 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A = cache_aligned_allocator<T> > 
+<a name="l00035"></a><a class="code" href="a00134.html">00035</a> <span class="keyword">class </span><a class="code" href="a00134.html">concurrent_queue</a>: <span class="keyword">public</span> internal::concurrent_queue_base_v3<T> {
+<a name="l00036"></a>00036     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value> <span class="keyword">friend</span> <span class="keyword">class </span>internal::concurrent_queue_iterator;
+<a name="l00037"></a>00037 
+<a name="l00039"></a>00039     <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template rebind<char>::other page_allocator_type;
+<a name="l00040"></a>00040     page_allocator_type my_allocator;
 <a name="l00041"></a>00041 
-<a name="l00042"></a>00042     <span class="keyword">class </span>scheduler: no_copy {
-<a name="l00043"></a>00043     <span class="keyword">public</span>:
-<a name="l00045"></a>00045         <span class="keyword">virtual</span> <span class="keywordtype">void</span> spawn( task& first, task*& next ) = 0;
-<a name="l00046"></a>00046 
-<a name="l00048"></a>00048         <span class="keyword">virtual</span> <span class="keywordtype">void</span> wait_for_all( task& parent, task* child ) = 0;
-<a name="l00049"></a>00049 
-<a name="l00051"></a>00051         <span class="keyword">virtual</span> <span class="keywordtype">void</span> spawn_root_and_wait( task& first, task*& next ) = 0;
-<a name="l00052"></a>00052 
-<a name="l00054"></a>00054         <span class="comment">//  Have to have it just to shut up overzealous compilation warnings</span>
-<a name="l00055"></a>00055         <span class="keyword">virtual</span> ~scheduler() = 0;
-<a name="l00056"></a>00056     };
+<a name="l00043"></a>00043     <span class="comment">/*overide*/</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> *allocate_block( size_t n ) {
+<a name="l00044"></a>00044         <span class="keywordtype">void</span> *b = reinterpret_cast<void*>(my_allocator.allocate( n ));
+<a name="l00045"></a>00045         <span class="keywordflow">if</span>( !b ) this->internal_throw_exception(); 
+<a name="l00046"></a>00046         <span class="keywordflow">return</span> b;
+<a name="l00047"></a>00047     }
+<a name="l00048"></a>00048 
+<a name="l00050"></a>00050     <span class="comment">/*override*/</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_block( <span class="keywordtype">void</span> *b, size_t n ) {
+<a name="l00051"></a>00051         my_allocator.deallocate( reinterpret_cast<char*>(b), n );
+<a name="l00052"></a>00052     }
+<a name="l00053"></a>00053 
+<a name="l00054"></a>00054 <span class="keyword">public</span>:
+<a name="l00056"></a><a class="code" href="a00134.html#682c3978d5cb0620000994f11c44a476">00056</a>     <span class="keyword">typedef</span> T <a class="code" href="a00134.html#682c3978d5cb0620000994f11c44a476">value_type</a>;
 <a name="l00057"></a>00057 
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060     <span class="keyword">typedef</span> intptr reference_count;
-<a name="l00061"></a>00061 
-<a name="l00063"></a>00063     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> affinity_id;
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00066"></a>00066 <span class="preprocessor"></span>    <span class="keyword">struct </span>context_list_node_t {
-<a name="l00067"></a>00067         context_list_node_t *my_prev,
-<a name="l00068"></a>00068                             *my_next;
-<a name="l00069"></a>00069     };
-<a name="l00070"></a>00070 
-<a name="l00071"></a>00071     <span class="keyword">class </span>allocate_root_with_context_proxy: no_assign {
-<a name="l00072"></a>00072         task_group_context& my_context;
-<a name="l00073"></a>00073     <span class="keyword">public</span>:
-<a name="l00074"></a>00074         allocate_root_with_context_proxy ( task_group_context& ctx ) : my_context(ctx) {}
-<a name="l00075"></a>00075         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
-<a name="l00076"></a>00076         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
-<a name="l00077"></a>00077     };
-<a name="l00078"></a>00078 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00079"></a>00079 
-<a name="l00080"></a>00080     <span class="keyword">class </span>allocate_root_proxy: no_assign {
-<a name="l00081"></a>00081     <span class="keyword">public</span>:
-<a name="l00082"></a>00082         <span class="keyword">static</span> task& __TBB_EXPORTED_FUNC allocate( size_t size );
-<a name="l00083"></a>00083         <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC free( task& );
-<a name="l00084"></a>00084     };
-<a name="l00085"></a>00085 
-<a name="l00086"></a>00086     <span class="keyword">class </span>allocate_continuation_proxy: no_assign {
-<a name="l00087"></a>00087     <span class="keyword">public</span>:
-<a name="l00088"></a>00088         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
-<a name="l00089"></a>00089         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
-<a name="l00090"></a>00090     };
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092     <span class="keyword">class </span>allocate_child_proxy: no_assign {
-<a name="l00093"></a>00093     <span class="keyword">public</span>:
-<a name="l00094"></a>00094         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
-<a name="l00095"></a>00095         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
-<a name="l00096"></a>00096     };
+<a name="l00059"></a><a class="code" href="a00134.html#a8d725c50a9834bb7af5b67c0aff92b8">00059</a>     <span class="keyword">typedef</span> T& <a class="code" href="a00134.html#a8d725c50a9834bb7af5b67c0aff92b8">reference</a>;
+<a name="l00060"></a>00060 
+<a name="l00062"></a><a class="code" href="a00134.html#4d48e7ff93f81636bca2c74f7da34750">00062</a>     <span class="keyword">typedef</span> <span class="keyword">const</span> T& <a class="code" href="a00134.html#4d48e7ff93f81636bca2c74f7da34750">const_reference</a>;
+<a name="l00063"></a>00063 
+<a name="l00065"></a><a class="code" href="a00134.html#8fc30e93f8342a1960357f71e4fe8a2b">00065</a>     <span class="keyword">typedef</span> size_t <a class="code" href="a00134.html#8fc30e93f8342a1960357f71e4fe8a2b">size_type</a>;
+<a name="l00066"></a>00066 
+<a name="l00068"></a><a class="code" href="a00134.html#068576d16c7e4e05d52f9db7a45b5b65">00068</a>     <span class="keyword">typedef</span> ptrdiff_t <a class="code" href="a00134.html#068576d16c7e4e05d52f9db7a45b5b65">difference_type</a>;
+<a name="l00069"></a>00069 
+<a name="l00071"></a><a class="code" href="a00134.html#5a3956341728eaa558d8827063718cac">00071</a>     <span class="keyword">typedef</span> A <a class="code" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a>;
+<a name="l00072"></a>00072 
+<a name="l00074"></a><a class="code" href="a00134.html#7c48a05a94a1f4f98fdfadfbef98ecf6">00074</a>     <span class="keyword">explicit</span> <a class="code" href="a00134.html#7c48a05a94a1f4f98fdfadfbef98ecf6">concurrent_queue</a>(<span class="keyword">const</span> <a class="code" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a>& a = <a class="code" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a>()) : 
+<a name="l00075"></a>00075         internal::concurrent_queue_base_v3<T>( sizeof(T) ), my_allocator( a )
+<a name="l00076"></a>00076     {
+<a name="l00077"></a>00077     }
+<a name="l00078"></a>00078 
+<a name="l00080"></a>00080     <span class="keyword">template</span><<span class="keyword">typename</span> InputIterator>
+<a name="l00081"></a><a class="code" href="a00134.html#25209656c84f2f9b030e2f9162713341">00081</a>     <a class="code" href="a00134.html#7c48a05a94a1f4f98fdfadfbef98ecf6">concurrent_queue</a>( InputIterator begin, InputIterator end, <span class="keyword">const</span> <a class="code" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a>& a = <a class="code" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a>()) :
+<a name="l00082"></a>00082         internal::concurrent_queue_base_v3<T>( sizeof(T) ), my_allocator( a )
+<a name="l00083"></a>00083     {
+<a name="l00084"></a>00084         <span class="keywordflow">for</span>( ; begin != end; ++begin )
+<a name="l00085"></a>00085             internal_push(&*begin);
+<a name="l00086"></a>00086     }
+<a name="l00087"></a>00087     
+<a name="l00089"></a><a class="code" href="a00134.html#8a6b98ea11a867db8ac868f0113ca429">00089</a>     <a class="code" href="a00134.html#7c48a05a94a1f4f98fdfadfbef98ecf6">concurrent_queue</a>( <span class="keyword">const</span> <a class="code" href="a00134.html">concurrent_queue</a>& src, <span class="keyword">const</span> <a class="code" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a>& a = <a class="code" href="a00134.html#5a3956341728eaa558d8827063718cac" [...]
+<a name="l00090"></a>00090         internal::concurrent_queue_base_v3<T>( sizeof(T) ), my_allocator( a )
+<a name="l00091"></a>00091     {
+<a name="l00092"></a>00092         assign( src );
+<a name="l00093"></a>00093     }
+<a name="l00094"></a>00094     
+<a name="l00096"></a>00096     <a class="code" href="a00134.html#830b33753d6b149c366344e29b2edd8c">~concurrent_queue</a>();
 <a name="l00097"></a>00097 
-<a name="l00098"></a>00098     <span class="keyword">class </span>allocate_additional_child_of_proxy: no_assign {
-<a name="l00099"></a>00099         task& <span class="keyword">self</span>;
-<a name="l00100"></a>00100         task& parent;
-<a name="l00101"></a>00101     <span class="keyword">public</span>:
-<a name="l00102"></a>00102         allocate_additional_child_of_proxy( task& self_, task& parent_ ) : self(self_), parent(parent_) {}
-<a name="l00103"></a>00103         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
-<a name="l00104"></a>00104         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
-<a name="l00105"></a>00105     };
-<a name="l00106"></a>00106 
-<a name="l00108"></a>00108 
-<a name="l00113"></a>00113     <span class="keyword">class </span>task_prefix {
-<a name="l00114"></a>00114     <span class="keyword">private</span>:
-<a name="l00115"></a>00115         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00132.html">tbb::task</a>;
-<a name="l00116"></a>00116         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00134.html">tbb::task_list</a>;
-<a name="l00117"></a>00117         <span class="keyword">friend</span> <span class="keyword">class </span>internal::scheduler;
-<a name="l00118"></a>00118         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_proxy;
-<a name="l00119"></a>00119         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_child_proxy;
-<a name="l00120"></a>00120         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_continuation_proxy;
-<a name="l00121"></a>00121         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_additional_child_of_proxy;
-<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="a00132.html">tbb::task</a>* parent;
+<a name="l00099"></a><a class="code" href="a00134.html#73c47563ffcc4c2f6452f25a04ebe2e2">00099</a>     <span class="keywordtype">void</span> <a class="code" href="a00134.html#73c47563ffcc4c2f6452f25a04ebe2e2">push</a>( <span class="keyword">const</span> T& source ) {
+<a name="l00100"></a>00100         internal_push( &source );
+<a name="l00101"></a>00101     }
+<a name="l00102"></a>00102 
+<a name="l00104"></a>00104 
+<a name="l00106"></a><a class="code" href="a00134.html#ae31ca0db34ef96ef1e74aa0d28c95f8">00106</a>     <span class="keywordtype">bool</span> <a class="code" href="a00134.html#ae31ca0db34ef96ef1e74aa0d28c95f8">try_pop</a>( T& result ) {
+<a name="l00107"></a>00107         <span class="keywordflow">return</span> internal_try_pop( &result );
+<a name="l00108"></a>00108     }
+<a name="l00109"></a>00109 
+<a name="l00111"></a><a class="code" href="a00134.html#eaa35a5274606779802e9a669a706260">00111</a>     <a class="code" href="a00134.html#8fc30e93f8342a1960357f71e4fe8a2b">size_type</a> <a class="code" href="a00134.html#eaa35a5274606779802e9a669a706260">unsafe_size</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> this->internal_size();}
+<a name="l00112"></a>00112 
+<a name="l00114"></a><a class="code" href="a00134.html#f3f6fce0cfa2d581d6f3b47e0613ad64">00114</a>     <span class="keywordtype">bool</span> <a class="code" href="a00134.html#f3f6fce0cfa2d581d6f3b47e0613ad64">empty</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> this->internal_empty();}
+<a name="l00115"></a>00115 
+<a name="l00117"></a>00117     <span class="keywordtype">void</span> <a class="code" href="a00134.html#c32e8e84c0524155133b4aae32d2a827">clear</a>() ;
+<a name="l00118"></a>00118 
+<a name="l00120"></a><a class="code" href="a00134.html#f034f70caef445fe8abc9113ec926a8d">00120</a>     <a class="code" href="a00134.html#5a3956341728eaa558d8827063718cac">allocator_type</a> <a class="code" href="a00134.html#f034f70caef445fe8abc9113ec926a8d">get_allocator</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
+<a name="l00121"></a>00121 
+<a name="l00122"></a>00122     <span class="keyword">typedef</span> internal::concurrent_queue_iterator<concurrent_queue,T> iterator;
+<a name="l00123"></a>00123     <span class="keyword">typedef</span> internal::concurrent_queue_iterator<concurrent_queue,const T> const_iterator;
+<a name="l00124"></a>00124 
+<a name="l00125"></a>00125     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00126"></a>00126     <span class="comment">// The iterators are intended only for debugging.  They are slow and not thread safe.</span>
+<a name="l00127"></a>00127     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00128"></a>00128     iterator unsafe_begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>);}
+<a name="l00129"></a>00129     iterator unsafe_end() {<span class="keywordflow">return</span> iterator();}
+<a name="l00130"></a>00130     const_iterator unsafe_begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>);}
+<a name="l00131"></a>00131     const_iterator unsafe_end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator();}
+<a name="l00132"></a>00132 } ;
+<a name="l00133"></a>00133 
+<a name="l00134"></a>00134 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00135"></a><a class="code" href="a00134.html#830b33753d6b149c366344e29b2edd8c">00135</a> <a class="code" href="a00134.html">concurrent_queue<T,A>::~concurrent_queue</a>() {
+<a name="l00136"></a>00136     <a class="code" href="a00134.html#c32e8e84c0524155133b4aae32d2a827">clear</a>();
+<a name="l00137"></a>00137     this->internal_finish_clear();
+<a name="l00138"></a>00138 }
+<a name="l00139"></a>00139 
+<a name="l00140"></a>00140 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00141"></a><a class="code" href="a00134.html#c32e8e84c0524155133b4aae32d2a827">00141</a> <span class="keywordtype">void</span> <a class="code" href="a00134.html">concurrent_queue<T,A>::clear</a>() {
+<a name="l00142"></a>00142     <span class="keywordflow">while</span>( !<a class="code" href="a00134.html#f3f6fce0cfa2d581d6f3b47e0613ad64">empty</a>() ) {
+<a name="l00143"></a>00143         T value;
+<a name="l00144"></a>00144         internal_try_pop(&value);
+<a name="l00145"></a>00145     }
+<a name="l00146"></a>00146 }
 <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         <span class="keywordtype">int</span> depth;
-<a name="l00157"></a>00157 
+<a name="l00148"></a>00148 } <span class="comment">// namespace strict_ppl</span>
+<a name="l00149"></a>00149     
+<a name="l00151"></a>00151 
+<a name="l00156"></a>00156 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A = cache_aligned_allocator<T> >
+<a name="l00157"></a><a class="code" href="a00129.html">00157</a> <span class="keyword">class </span><a class="code" href="a00129.html">concurrent_bounded_queue</a>: <span class="keyword">public</span> internal::concurrent_queue_base_v3 {
+<a name="l00158"></a>00158     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value> <span class="keyword">friend</span> <span class="keyword">class </span>internal::concurrent_queue_iterator;
 <a name="l00159"></a>00159 
-<a name="l00160"></a>00160         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> state;
-<a name="l00161"></a>00161 
+<a name="l00161"></a>00161     <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template rebind<char>::other page_allocator_type;
+<a name="l00162"></a>00162     page_allocator_type my_allocator;
 <a name="l00163"></a>00163 
-<a name="l00167"></a>00167         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> extra_state;
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169         affinity_id affinity;
-<a name="l00170"></a>00170 
-<a name="l00172"></a>00172         <a class="code" href="a00132.html">tbb::task</a>* next;
-<a name="l00173"></a>00173 
-<a name="l00175"></a>00175         <a class="code" href="a00132.html">tbb::task</a>& task() {<span class="keywordflow">return</span> *reinterpret_cast<tbb::task*>(<span class="keyword">this</span>+1);}
-<a name="l00176"></a>00176     };
-<a name="l00177"></a>00177 
-<a name="l00178"></a>00178 } <span class="comment">// namespace internal</span>
-<a name="l00180"></a>00180 <span class="comment"></span>
-<a name="l00181"></a>00181 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00182"></a>00182 <span class="preprocessor"></span>
-<a name="l00183"></a>00183 
-<a name="l00185"></a>00185 
-<a name="l00200"></a><a class="code" href="a00133.html">00200</a> <span class="keyword">class </span><a class="code" href="a00133.html">task_group_context</a> : internal::no_copy
-<a name="l00201"></a>00201 {
-<a name="l00202"></a>00202 <span class="keyword">public</span>:
-<a name="l00203"></a>00203     <span class="keyword">enum</span> kind_type {
-<a name="l00204"></a>00204         isolated,
-<a name="l00205"></a>00205         bound
-<a name="l00206"></a>00206     };
-<a name="l00207"></a>00207 
-<a name="l00208"></a>00208 <span class="keyword">private</span>:
-<a name="l00209"></a>00209     <span class="keyword">union </span>{
-<a name="l00211"></a>00211         kind_type my_kind;
-<a name="l00212"></a>00212         uintptr_t _my_kind_aligner;
-<a name="l00213"></a>00213     };
-<a name="l00214"></a>00214 
-<a name="l00216"></a>00216     <a class="code" href="a00133.html">task_group_context</a> *my_parent;
+<a name="l00165"></a>00165     <span class="keyword">class </span>destroyer: internal::no_copy {
+<a name="l00166"></a>00166         T& my_value;
+<a name="l00167"></a>00167     <span class="keyword">public</span>:
+<a name="l00168"></a>00168         destroyer( T& value ) : my_value(value) {}
+<a name="l00169"></a>00169         ~destroyer() {my_value.~T();}          
+<a name="l00170"></a>00170     };
+<a name="l00171"></a>00171 
+<a name="l00172"></a>00172     T& get_ref( page& page, size_t index ) {
+<a name="l00173"></a>00173         __TBB_ASSERT( index<items_per_page, NULL );
+<a name="l00174"></a>00174         <span class="keywordflow">return</span> static_cast<T*>(static_cast<void*>(&page+1))[index];
+<a name="l00175"></a>00175     }
+<a name="l00176"></a>00176 
+<a name="l00177"></a>00177     <span class="comment">/*override*/</span> <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 ) {
+<a name="l00178"></a>00178         <span class="keyword">new</span>( &get_ref(dst,index) ) T(*static_cast<const T*>(src)); 
+<a name="l00179"></a>00179     }
+<a name="l00180"></a>00180 
+<a name="l00181"></a>00181     <span class="comment">/*override*/</span> <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 ) {
+<a name="l00182"></a>00182         <span class="keyword">new</span>( &get_ref(dst,dindex) ) T( static_cast<const T*>(static_cast<const void*>(&src+1))[sindex] );
+<a name="l00183"></a>00183     }
+<a name="l00184"></a>00184 
+<a name="l00185"></a>00185     <span class="comment">/*override*/</span> <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 ) {
+<a name="l00186"></a>00186         T& from = get_ref(src,index);
+<a name="l00187"></a>00187         destroyer d(from);
+<a name="l00188"></a>00188         *static_cast<T*>(dst) = from;
+<a name="l00189"></a>00189     }
+<a name="l00190"></a>00190 
+<a name="l00191"></a>00191     <span class="comment">/*overide*/</span> <span class="keyword">virtual</span> page *allocate_page() {
+<a name="l00192"></a>00192         size_t n = <span class="keyword">sizeof</span>(page) + items_per_page*item_size;
+<a name="l00193"></a>00193         page *p = reinterpret_cast<page*>(my_allocator.allocate( n ));
+<a name="l00194"></a>00194         <span class="keywordflow">if</span>( !p ) internal_throw_exception(); 
+<a name="l00195"></a>00195         <span class="keywordflow">return</span> p;
+<a name="l00196"></a>00196     }
+<a name="l00197"></a>00197 
+<a name="l00198"></a>00198     <span class="comment">/*override*/</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( page *p ) {
+<a name="l00199"></a>00199         size_t n = <span class="keyword">sizeof</span>(page) + items_per_page*item_size;
+<a name="l00200"></a>00200         my_allocator.deallocate( reinterpret_cast<char*>(p), n );
+<a name="l00201"></a>00201     }
+<a name="l00202"></a>00202 
+<a name="l00203"></a>00203 <span class="keyword">public</span>:
+<a name="l00205"></a><a class="code" href="a00129.html#98245517a931e5893f6601e66c51fc75">00205</a>     <span class="keyword">typedef</span> T <a class="code" href="a00129.html#98245517a931e5893f6601e66c51fc75">value_type</a>;
+<a name="l00206"></a>00206 
+<a name="l00208"></a><a class="code" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">00208</a>     <span class="keyword">typedef</span> A <a class="code" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>;
+<a name="l00209"></a>00209 
+<a name="l00211"></a><a class="code" href="a00129.html#dcd44ca6a88c0dc7a847a47a10811f0c">00211</a>     <span class="keyword">typedef</span> T& <a class="code" href="a00129.html#dcd44ca6a88c0dc7a847a47a10811f0c">reference</a>;
+<a name="l00212"></a>00212 
+<a name="l00214"></a><a class="code" href="a00129.html#796713d0b9ba93a4721cbe13e4474068">00214</a>     <span class="keyword">typedef</span> <span class="keyword">const</span> T& <a class="code" href="a00129.html#796713d0b9ba93a4721cbe13e4474068">const_reference</a>;
+<a name="l00215"></a>00215 
 <a name="l00217"></a>00217 
-<a name="l00219"></a>00219 
-<a name="l00221"></a>00221     internal::context_list_node_t my_node;
-<a name="l00222"></a>00222 
-<a name="l00224"></a>00224 
-<a name="l00227"></a>00227     <span class="keywordtype">char</span> _leading_padding[internal::NFS_MaxLineSize - 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="l00228"></a>00228     
-<a name="l00230"></a>00230     uintptr_t my_cancellation_requested;
-<a name="l00231"></a>00231     
-<a name="l00233"></a>00233 
-<a name="l00236"></a>00236     uintptr_t  my_version;
-<a name="l00237"></a>00237 
-<a name="l00239"></a>00239     <a class="code" href="a00138.html">tbb_exception</a> *my_exception;
-<a name="l00240"></a>00240 
-<a name="l00242"></a>00242 
-<a name="l00245"></a>00245     <span class="keywordtype">void</span> *my_owner;
-<a name="l00246"></a>00246 
+<a name="l00219"></a><a class="code" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">00219</a>     <span class="keyword">typedef</span> std::ptrdiff_t <a class="code" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a>;
+<a name="l00220"></a>00220 
+<a name="l00222"></a><a class="code" href="a00129.html#4b45c91297e69515d83d5eef85ae1f49">00222</a>     <span class="keyword">typedef</span> std::ptrdiff_t <a class="code" href="a00129.html#4b45c91297e69515d83d5eef85ae1f49">difference_type</a>;
+<a name="l00223"></a>00223 
+<a name="l00225"></a><a class="code" href="a00129.html#e3525226732963ff0f13e89d8e6dab5b">00225</a>     <span class="keyword">explicit</span> <a class="code" href="a00129.html#e3525226732963ff0f13e89d8e6dab5b">concurrent_bounded_queue</a>(<span class="keyword">const</span> <a class="code" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>& a = <a class="code" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>()) : 
+<a name="l00226"></a>00226         concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
+<a name="l00227"></a>00227     {
+<a name="l00228"></a>00228     }
+<a name="l00229"></a>00229 
+<a name="l00231"></a><a class="code" href="a00129.html#7b7fb414d2eaa8a7f5d68fc4cd63ac50">00231</a>     <a class="code" href="a00129.html#e3525226732963ff0f13e89d8e6dab5b">concurrent_bounded_queue</a>( <span class="keyword">const</span> <a class="code" href="a00129.html">concurrent_bounded_queue</a>& src, <span class="keyword">const</span> <a class="code" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>& a = <a class="code" href="a00129.html#2e2726fccf6d975dc [...]
+<a name="l00232"></a>00232         concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
+<a name="l00233"></a>00233     {
+<a name="l00234"></a>00234         assign( src );
+<a name="l00235"></a>00235     }
+<a name="l00236"></a>00236 
+<a name="l00238"></a>00238     <span class="keyword">template</span><<span class="keyword">typename</span> InputIterator>
+<a name="l00239"></a><a class="code" href="a00129.html#a5e04dcd7db9fd9b583b4e7df832246a">00239</a>     <a class="code" href="a00129.html#e3525226732963ff0f13e89d8e6dab5b">concurrent_bounded_queue</a>( InputIterator begin, InputIterator end, <span class="keyword">const</span> <a class="code" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>& a = <a class="code" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>()) :
+<a name="l00240"></a>00240         concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
+<a name="l00241"></a>00241     {
+<a name="l00242"></a>00242         <span class="keywordflow">for</span>( ; begin != end; ++begin )
+<a name="l00243"></a>00243             internal_push_if_not_full(&*begin);
+<a name="l00244"></a>00244     }
+<a name="l00245"></a>00245 
+<a name="l00247"></a>00247     <a class="code" href="a00129.html#acaf5b510dc0dfc7780b8c956cf773cf">~concurrent_bounded_queue</a>();
 <a name="l00248"></a>00248 
-<a name="l00249"></a>00249     <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="l00250"></a>00250 
-<a name="l00251"></a>00251 <span class="keyword">public</span>:
-<a name="l00252"></a>00252 
+<a name="l00250"></a><a class="code" href="a00129.html#ceb08c743b11ba88c878e73fff8af20b">00250</a>     <span class="keywordtype">void</span> <a class="code" href="a00129.html#ceb08c743b11ba88c878e73fff8af20b">push</a>( <span class="keyword">const</span> T& source ) {
+<a name="l00251"></a>00251         internal_push( &source );
+<a name="l00252"></a>00252     }
 <a name="l00253"></a>00253 
 <a name="l00255"></a>00255 
-<a name="l00272"></a><a class="code" href="a00133.html#6fc0ba6f3abcdb4d43277c05bd67bdd4">00272</a>     <a class="code" href="a00133.html#6fc0ba6f3abcdb4d43277c05bd67bdd4">task_group_context</a> ( kind_type relation_with_parent = bound )
-<a name="l00273"></a>00273         : my_kind(relation_with_parent)
-<a name="l00274"></a>00274         , my_version(0)
-<a name="l00275"></a>00275     {
-<a name="l00276"></a>00276         <a class="code" href="a00133.html#49a55352084fd44b8863d182e839e6dc">init</a>();
-<a name="l00277"></a>00277     }
-<a name="l00278"></a>00278 
-<a name="l00279"></a>00279     __TBB_EXPORTED_METHOD ~<a class="code" href="a00133.html">task_group_context</a> ();
-<a name="l00280"></a>00280 
+<a name="l00256"></a><a class="code" href="a00129.html#41f4c6bd7a82ab070e840bbf81b0b123">00256</a>     <span class="keywordtype">void</span> <a class="code" href="a00129.html#41f4c6bd7a82ab070e840bbf81b0b123">pop</a>( T& destination ) {
+<a name="l00257"></a>00257         internal_pop( &destination );
+<a name="l00258"></a>00258     }
+<a name="l00259"></a>00259 
+<a name="l00261"></a>00261 
+<a name="l00263"></a><a class="code" href="a00129.html#2bd6232531279fb3ccbd296bea23066b">00263</a>     <span class="keywordtype">bool</span> <a class="code" href="a00129.html#2bd6232531279fb3ccbd296bea23066b">try_push</a>( <span class="keyword">const</span> T& source ) {
+<a name="l00264"></a>00264         <span class="keywordflow">return</span> internal_push_if_not_full( &source );
+<a name="l00265"></a>00265     }
+<a name="l00266"></a>00266 
+<a name="l00268"></a>00268 
+<a name="l00270"></a><a class="code" href="a00129.html#0ca487019bbb00a196442aff78a1e4f7">00270</a>     <span class="keywordtype">bool</span> <a class="code" href="a00129.html#0ca487019bbb00a196442aff78a1e4f7">try_pop</a>( T& destination ) {
+<a name="l00271"></a>00271         <span class="keywordflow">return</span> internal_pop_if_present( &destination );
+<a name="l00272"></a>00272     }
+<a name="l00273"></a>00273 
+<a name="l00275"></a>00275 
+<a name="l00278"></a><a class="code" href="a00129.html#7dc14d1a579a4cccda9f857585e1768d">00278</a>     <a class="code" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> <a class="code" href="a00129.html#7dc14d1a579a4cccda9f857585e1768d">size</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> internal_size();}
+<a name="l00279"></a>00279 
+<a name="l00281"></a><a class="code" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">00281</a>     <span class="keywordtype">bool</span> <a class="code" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">empty</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> internal_empty();}
 <a name="l00282"></a>00282 
-<a name="l00289"></a>00289     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00133.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</a> ();
-<a name="l00290"></a>00290 
-<a name="l00292"></a>00292 
-<a name="l00299"></a>00299     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD <a class="code" href="a00133.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</a> ();
+<a name="l00284"></a><a class="code" href="a00129.html#b2888b3e4e837d7e03f2c731963a402b">00284</a>     <a class="code" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> <a class="code" href="a00129.html#b2888b3e4e837d7e03f2c731963a402b">capacity</a>()<span class="keyword"> const </span>{
+<a name="l00285"></a>00285         <span class="keywordflow">return</span> my_capacity;
+<a name="l00286"></a>00286     }
+<a name="l00287"></a>00287 
+<a name="l00289"></a>00289 
+<a name="l00291"></a><a class="code" href="a00129.html#089f33dfd504e30a95f40ed2a5799367">00291</a>     <span class="keywordtype">void</span> <a class="code" href="a00129.html#089f33dfd504e30a95f40ed2a5799367">set_capacity</a>( <a class="code" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> <a class="code" href="a00129.html#b2888b3e4e837d7e03f2c731963a402b">capacity</a> ) {
+<a name="l00292"></a>00292         internal_set_capacity( capacity, <span class="keyword">sizeof</span>(T) );
+<a name="l00293"></a>00293     }
+<a name="l00294"></a>00294 
+<a name="l00296"></a><a class="code" href="a00129.html#415eb87e53b1c6a266de06ecbc490d16">00296</a>     <a class="code" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> <a class="code" href="a00129.html#415eb87e53b1c6a266de06ecbc490d16">get_allocator</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
+<a name="l00297"></a>00297 
+<a name="l00299"></a>00299     <span class="keywordtype">void</span> <a class="code" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">clear</a>() ;
 <a name="l00300"></a>00300 
-<a name="l00302"></a>00302     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD <a class="code" href="a00133.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a> () <span class="keyword">const</span>;
+<a name="l00301"></a>00301     <span class="keyword">typedef</span> internal::concurrent_queue_iterator<concurrent_bounded_queue,T> iterator;
+<a name="l00302"></a>00302     <span class="keyword">typedef</span> internal::concurrent_queue_iterator<concurrent_bounded_queue,const T> const_iterator;
 <a name="l00303"></a>00303 
-<a name="l00304"></a>00304 <span class="keyword">protected</span>:
-<a name="l00306"></a>00306 
-<a name="l00307"></a>00307     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00133.html#49a55352084fd44b8863d182e839e6dc">init</a> ();
-<a name="l00308"></a>00308 
-<a name="l00309"></a>00309 <span class="keyword">private</span>:
-<a name="l00310"></a>00310     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00132.html">task</a>;
-<a name="l00311"></a>00311     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_with_context_proxy;
-<a name="l00312"></a>00312 
-<a name="l00313"></a>00313     <span class="keyword">static</span> <span class="keyword">const</span> kind_type binding_required = bound;
-<a name="l00314"></a>00314     <span class="keyword">static</span> <span class="keyword">const</span> kind_type binding_completed = kind_type(bound+1);
-<a name="l00315"></a>00315 
-<a name="l00318"></a>00318     <span class="keywordtype">void</span> propagate_cancellation_from_ancestors ();
-<a name="l00319"></a>00319 }; <span class="comment">// class task_group_context</span>
-<a name="l00320"></a>00320 
-<a name="l00321"></a>00321 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00322"></a>00322 
-<a name="l00324"></a>00324 
-<a name="l00325"></a><a class="code" href="a00132.html">00325</a> <span class="keyword">class </span><a class="code" href="a00132.html">task</a>: internal::no_copy {
-<a name="l00327"></a>00327     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_set_ref_count( <span class="keywordtype">int</span> count );
-<a name="l00328"></a>00328 
-<a name="l00329"></a>00329 <span class="keyword">protected</span>:
-<a name="l00331"></a><a class="code" href="a00132.html#2bce8ec6e44706e70128f5cf91b76e67">00331</a>     <a class="code" href="a00132.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>() {prefix().extra_state=1;}
-<a name="l00332"></a>00332 
-<a name="l00333"></a>00333 <span class="keyword">public</span>:
-<a name="l00335"></a><a class="code" href="a00132.html#98245ee0473f84cb19dbbf8c81134908">00335</a>     <span class="keyword">virtual</span> <a class="code" href="a00132.html#98245ee0473f84cb19dbbf8c81134908">~task</a>() {}
-<a name="l00336"></a>00336 
-<a name="l00338"></a>00338     <span class="keyword">virtual</span> <a class="code" href="a00132.html">task</a>* <a class="code" href="a00132.html#22c298cd40937a431a06777423f002f6">execute</a>() = 0;
-<a name="l00339"></a>00339 
-<a name="l00341"></a><a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293e">00341</a>     <span class="keyword">enum</span> <a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293e">state_type</a> {
-<a name="l00343"></a>00343         <a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a>,
-<a name="l00345"></a>00345         <a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a>,
-<a name="l00347"></a>00347         <a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a>,
-<a name="l00349"></a>00349         <a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a>,
-<a name="l00351"></a>00351         <a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a>,
-<a name="l00353"></a>00353         <a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a>
-<a name="l00354"></a>00354     };
-<a name="l00355"></a>00355 
-<a name="l00356"></a>00356     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00357"></a>00357     <span class="comment">// Allocating tasks</span>
-<a name="l00358"></a>00358     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00359"></a>00359 
-<a name="l00361"></a><a class="code" href="a00132.html#23acb0da0afd690da797f9f882027d34">00361</a>     <span class="keyword">static</span> internal::allocate_root_proxy <a class="code" href="a00132.html#23acb0da0afd690da797f9f882027d34">allocate_root</a>() {
-<a name="l00362"></a>00362         <span class="keywordflow">return</span> internal::allocate_root_proxy();
-<a name="l00363"></a>00363     }
-<a name="l00364"></a>00364 
-<a name="l00365"></a>00365 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00367"></a><a class="code" href="a00132.html#8ccc518caf31075a3e073996d2d240a4">00367</a> <span class="preprocessor">    static internal::allocate_root_with_context_proxy allocate_root( task_group_context& ctx ) {</span>
-<a name="l00368"></a>00368 <span class="preprocessor"></span>        <span class="keywordflow">return</span> internal::allocate_root_with_context_proxy(ctx);
-<a name="l00369"></a>00369     }
-<a name="l00370"></a>00370 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00371"></a>00371 
-<a name="l00373"></a>00373 
-<a name="l00374"></a><a class="code" href="a00132.html#1434c79a5138993269d034008bff7329">00374</a>     internal::allocate_continuation_proxy& allocate_continuation() {
-<a name="l00375"></a>00375         <span class="keywordflow">return</span> *reinterpret_cast<internal::allocate_continuation_proxy*>(<span class="keyword">this</span>);
+<a name="l00304"></a>00304     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00305"></a>00305     <span class="comment">// The iterators are intended only for debugging.  They are slow and not thread safe.</span>
+<a name="l00306"></a>00306     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00307"></a>00307     iterator unsafe_begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>);}
+<a name="l00308"></a>00308     iterator unsafe_end() {<span class="keywordflow">return</span> iterator();}
+<a name="l00309"></a>00309     const_iterator unsafe_begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>);}
+<a name="l00310"></a>00310     const_iterator unsafe_end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator();}
+<a name="l00311"></a>00311 
+<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, <span class="keyword">class</span> A>
+<a name="l00315"></a><a class="code" href="a00129.html#acaf5b510dc0dfc7780b8c956cf773cf">00315</a> <a class="code" href="a00129.html">concurrent_bounded_queue<T,A>::~concurrent_bounded_queue</a>() {
+<a name="l00316"></a>00316     <a class="code" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">clear</a>();
+<a name="l00317"></a>00317     internal_finish_clear();
+<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> T, <span class="keyword">class</span> A>
+<a name="l00321"></a><a class="code" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">00321</a> <span class="keywordtype">void</span> <a class="code" href="a00129.html">concurrent_bounded_queue<T,A>::clear</a>() {
+<a name="l00322"></a>00322     <span class="keywordflow">while</span>( !<a class="code" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">empty</a>() ) {
+<a name="l00323"></a>00323         T value;
+<a name="l00324"></a>00324         internal_pop_if_present(&value);
+<a name="l00325"></a>00325     }
+<a name="l00326"></a>00326 }
+<a name="l00327"></a>00327 
+<a name="l00328"></a>00328 <span class="keyword">namespace </span>deprecated {
+<a name="l00329"></a>00329 
+<a name="l00331"></a>00331 
+<a name="l00336"></a>00336 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A = cache_aligned_allocator<T> > 
+<a name="l00337"></a><a class="code" href="a00135.html">00337</a> <span class="keyword">class </span><a class="code" href="a00135.html">concurrent_queue</a>: <span class="keyword">public</span> <a class="code" href="a00129.html">concurrent_bounded_queue</a><T,A> {
+<a name="l00338"></a>00338 <span class="preprocessor">#if !__TBB_TEMPLATE_FRIENDS_BROKEN</span>
+<a name="l00339"></a>00339 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value> <span class="keyword">friend</span> <span class="keyword">class </span>internal::concurrent_queue_iterator;
+<a name="l00340"></a>00340 <span class="preprocessor">#endif </span>
+<a name="l00341"></a>00341 <span class="preprocessor"></span>
+<a name="l00342"></a>00342 <span class="keyword">public</span>:
+<a name="l00344"></a><a class="code" href="a00135.html#aaf19bd7337b72f3131ece60f7315ef7">00344</a>     <span class="keyword">explicit</span> <a class="code" href="a00135.html#aaf19bd7337b72f3131ece60f7315ef7">concurrent_queue</a>(<span class="keyword">const</span> A& a = A()) : 
+<a name="l00345"></a>00345         <a class="code" href="a00129.html">concurrent_bounded_queue</a><T,A>( a )
+<a name="l00346"></a>00346     {
+<a name="l00347"></a>00347     }
+<a name="l00348"></a>00348 
+<a name="l00350"></a><a class="code" href="a00135.html#fc092b9082f233482f3513fc3bb670f7">00350</a>     <a class="code" href="a00135.html#aaf19bd7337b72f3131ece60f7315ef7">concurrent_queue</a>( <span class="keyword">const</span> <a class="code" href="a00135.html">concurrent_queue</a>& src, <span class="keyword">const</span> A& a = A()) : 
+<a name="l00351"></a>00351         <a class="code" href="a00129.html">concurrent_bounded_queue</a><T,A>( src, a )
+<a name="l00352"></a>00352     {
+<a name="l00353"></a>00353     }
+<a name="l00354"></a>00354 
+<a name="l00356"></a>00356     <span class="keyword">template</span><<span class="keyword">typename</span> InputIterator>
+<a name="l00357"></a><a class="code" href="a00135.html#383187b910f8c3ca27a39c1638566f15">00357</a>     <a class="code" href="a00135.html#aaf19bd7337b72f3131ece60f7315ef7">concurrent_queue</a>( InputIterator begin, InputIterator end, <span class="keyword">const</span> A& a = A()) :
+<a name="l00358"></a>00358         <a class="code" href="a00129.html">concurrent_bounded_queue</a><T,A>( begin, end, a )
+<a name="l00359"></a>00359     {
+<a name="l00360"></a>00360     }
+<a name="l00361"></a>00361 
+<a name="l00363"></a>00363 
+<a name="l00365"></a><a class="code" href="a00135.html#7c45561bafe71107d09b2bc1b8f4e681">00365</a>     <span class="keywordtype">bool</span> <a class="code" href="a00135.html#7c45561bafe71107d09b2bc1b8f4e681">push_if_not_full</a>( <span class="keyword">const</span> T& source ) {
+<a name="l00366"></a>00366         <span class="keywordflow">return</span> <a class="code" href="a00129.html#2bd6232531279fb3ccbd296bea23066b">try_push</a>( source );
+<a name="l00367"></a>00367     }
+<a name="l00368"></a>00368 
+<a name="l00370"></a>00370 
+<a name="l00374"></a><a class="code" href="a00135.html#48da3536245318af6cb5fd58bac78039">00374</a>     <span class="keywordtype">bool</span> <a class="code" href="a00135.html#48da3536245318af6cb5fd58bac78039">pop_if_present</a>( T& destination ) {
+<a name="l00375"></a>00375         <span class="keywordflow">return</span> <a class="code" href="a00129.html#0ca487019bbb00a196442aff78a1e4f7">try_pop</a>( destination );
 <a name="l00376"></a>00376     }
 <a name="l00377"></a>00377 
-<a name="l00379"></a><a class="code" href="a00132.html#1ff794f7053cd9148d5f280fbf07377f">00379</a>     internal::allocate_child_proxy& allocate_child() {
-<a name="l00380"></a>00380         <span class="keywordflow">return</span> *reinterpret_cast<internal::allocate_child_proxy*>(<span class="keyword">this</span>);
-<a name="l00381"></a>00381     }
-<a name="l00382"></a>00382 
-<a name="l00384"></a>00384 
-<a name="l00386"></a><a class="code" href="a00132.html#43bfe64c0e9333c0ca895cc0c375512b">00386</a>     internal::allocate_additional_child_of_proxy allocate_additional_child_of( <a class="code" href="a00132.html">task</a>& t ) {
-<a name="l00387"></a>00387         <span class="keywordflow">return</span> internal::allocate_additional_child_of_proxy(*<span class="keyword">this</span>,t);
-<a name="l00388"></a>00388     }
+<a name="l00378"></a>00378     <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00129.html">concurrent_bounded_queue<T,A>::iterator</a> iterator;
+<a name="l00379"></a>00379     <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00129.html">concurrent_bounded_queue<T,A>::const_iterator</a> const_iterator;
+<a name="l00380"></a>00380     <span class="comment">//</span>
+<a name="l00381"></a>00381     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00382"></a>00382     <span class="comment">// The iterators are intended only for debugging.  They are slow and not thread safe.</span>
+<a name="l00383"></a>00383     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00384"></a>00384     iterator begin() {<span class="keywordflow">return</span> this->unsafe_begin();}
+<a name="l00385"></a>00385     iterator end() {<span class="keywordflow">return</span> this->unsafe_end();}
+<a name="l00386"></a>00386     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> this->unsafe_begin();}
+<a name="l00387"></a>00387     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> this->unsafe_end();}
+<a name="l00388"></a>00388 }; 
 <a name="l00389"></a>00389 
-<a name="l00391"></a>00391 
-<a name="l00395"></a>00395     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD destroy( <a class="code" href="a00132.html">task</a>& victim );
-<a name="l00396"></a>00396 
-<a name="l00397"></a>00397     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00398"></a>00398     <span class="comment">// Recycling of tasks</span>
-<a name="l00399"></a>00399     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00390"></a>00390 }
+<a name="l00391"></a>00391     
+<a name="l00392"></a>00392 
+<a name="l00393"></a>00393 <span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00394"></a>00394 <span class="preprocessor"></span><span class="keyword">using</span> deprecated::concurrent_queue;
+<a name="l00395"></a>00395 <span class="preprocessor">#else</span>
+<a name="l00396"></a>00396 <span class="preprocessor"></span><span class="keyword">using</span> strict_ppl::concurrent_queue;    
+<a name="l00397"></a>00397 <span class="preprocessor">#endif</span>
+<a name="l00398"></a>00398 <span class="preprocessor"></span>
+<a name="l00399"></a>00399 } <span class="comment">// namespace tbb</span>
 <a name="l00400"></a>00400 
-<a name="l00402"></a>00402 
-<a name="l00408"></a><a class="code" href="a00132.html#a67a79e18f62b43a623a00cfbd76db4c">00408</a>     <span class="keywordtype">void</span> recycle_as_continuation() {
-<a name="l00409"></a>00409         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running?"</span> );
-<a name="l00410"></a>00410         prefix().state = allocated;
-<a name="l00411"></a>00411     }
-<a name="l00412"></a>00412 
-<a name="l00414"></a>00414 
-<a name="l00415"></a><a class="code" href="a00132.html#3b290d14109704e2b69dc1ac980a7a76">00415</a>     <span class="keywordtype">void</span> recycle_as_safe_continuation() {
-<a name="l00416"></a>00416         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running?"</span> );
-<a name="l00417"></a>00417         prefix().state = recycle;
-<a name="l00418"></a>00418     }
-<a name="l00419"></a>00419 
-<a name="l00421"></a><a class="code" href="a00132.html#db399855177438bbc9cc61d508dae8d2">00421</a>     <span class="keywordtype">void</span> recycle_as_child_of( <a class="code" href="a00132.html">task</a>& new_parent ) {
-<a name="l00422"></a>00422         internal::task_prefix& p = prefix();
-<a name="l00423"></a>00423         __TBB_ASSERT( prefix().state==executing||prefix().state==allocated, <span class="stringliteral">"execute not running, or already recycled"</span> );
-<a name="l00424"></a>00424         __TBB_ASSERT( prefix().ref_count==0, <span class="stringliteral">"no child tasks allowed when recycled as a child"</span> );
-<a name="l00425"></a>00425         __TBB_ASSERT( p.parent==NULL, <span class="stringliteral">"parent must be null"</span> );
-<a name="l00426"></a>00426         __TBB_ASSERT( new_parent.<a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().state<=recycle, <span class="stringliteral">"corrupt parent's state"</span> );
-<a name="l00427"></a>00427         __TBB_ASSERT( new_parent.<a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().state!=freed, <span class="stringliteral">"parent already freed"</span> );
-<a name="l00428"></a>00428         p.state = allocated;
-<a name="l00429"></a>00429         p.parent = &new_parent;
-<a name="l00430"></a>00430         p.<a class="code" href="a00132.html#5be823a972b3c3b9901c5963eeb050fd">depth</a> = new_parent.<a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().depth+1;
-<a name="l00431"></a>00431 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00432"></a>00432 <span class="preprocessor"></span>        p.context = new_parent.<a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().context;
-<a name="l00433"></a>00433 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00434"></a>00434     }
-<a name="l00435"></a>00435 
-<a name="l00437"></a>00437 
-<a name="l00438"></a><a class="code" href="a00132.html#4f1be9bbcdb487830dbe298b68d85144">00438</a>     <span class="keywordtype">void</span> recycle_to_reexecute() {
-<a name="l00439"></a>00439         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running, or already recycled"</span> );
-<a name="l00440"></a>00440         __TBB_ASSERT( prefix().ref_count==0, <span class="stringliteral">"no child tasks allowed when recycled for reexecution"</span> );
-<a name="l00441"></a>00441         prefix().state = reexecute;
-<a name="l00442"></a>00442     }
-<a name="l00443"></a>00443 
-<a name="l00445"></a>00445 
-<a name="l00446"></a><a class="code" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">00446</a>     <span class="keyword">typedef</span> internal::intptr depth_type;
-<a name="l00447"></a>00447 
-<a name="l00449"></a><a class="code" href="a00132.html#5be823a972b3c3b9901c5963eeb050fd">00449</a>     depth_type depth()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().depth;}
-<a name="l00450"></a>00450 
-<a name="l00452"></a>00452 
-<a name="l00453"></a><a class="code" href="a00132.html#fc4d4e61a56823aa1efdbb5d59e42973">00453</a>     <span class="keywordtype">void</span> set_depth( depth_type new_depth ) {
-<a name="l00454"></a>00454         __TBB_ASSERT( state()!=ready, <span class="stringliteral">"cannot change depth of ready task"</span> );
-<a name="l00455"></a>00455         __TBB_ASSERT( new_depth>=0, <span class="stringliteral">"depth cannot be negative"</span> );
-<a name="l00456"></a>00456         __TBB_ASSERT( new_depth==<span class="keywordtype">int</span>(new_depth), <span class="stringliteral">"integer overflow error"</span>);
-<a name="l00457"></a>00457         prefix().depth = int(new_depth);
-<a name="l00458"></a>00458     }
-<a name="l00459"></a>00459 
-<a name="l00461"></a>00461 
-<a name="l00462"></a><a class="code" href="a00132.html#b0f98c633647fc73b978fe4cd2277ac4">00462</a>     <span class="keywordtype">void</span> add_to_depth( <span class="keywordtype">int</span> delta ) {
-<a name="l00463"></a>00463         __TBB_ASSERT( state()!=ready, <span class="stringliteral">"cannot change depth of ready task"</span> );
-<a name="l00464"></a>00464         __TBB_ASSERT( prefix().depth>=-delta, <span class="stringliteral">"depth cannot be negative"</span> );
-<a name="l00465"></a>00465         prefix().depth+=delta;
-<a name="l00466"></a>00466     }
-<a name="l00467"></a>00467 
-<a name="l00468"></a>00468     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00469"></a>00469     <span class="comment">// Spawning and blocking</span>
-<a name="l00470"></a>00470     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00471"></a>00471 
-<a name="l00473"></a><a class="code" href="a00132.html#06a4206a57e8e12a439b14d6d41cfd92">00473</a>     <span class="keywordtype">void</span> set_ref_count( <span class="keywordtype">int</span> count ) {
-<a name="l00474"></a>00474 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00475"></a>00475 <span class="preprocessor"></span>        internal_set_ref_count(count);
-<a name="l00476"></a>00476 <span class="preprocessor">#else</span>
-<a name="l00477"></a>00477 <span class="preprocessor"></span>        prefix().ref_count = count;
-<a name="l00478"></a>00478 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00479"></a>00479     }
-<a name="l00480"></a>00480 
-<a name="l00482"></a>00482 
-<a name="l00486"></a><a class="code" href="a00132.html#f7737143d458f1ed1c0d7da3971d9e6b">00486</a>     <span class="keywordtype">void</span> spawn( <a class="code" href="a00132.html">task</a>& child ) {
-<a name="l00487"></a>00487         __TBB_ASSERT( is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00488"></a>00488         prefix().owner->spawn( child, child.<a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next );
-<a name="l00489"></a>00489     }
-<a name="l00490"></a>00490 
-<a name="l00492"></a>00492 
-<a name="l00493"></a>00493     <span class="keywordtype">void</span> spawn( <a class="code" href="a00134.html">task_list</a>& list );
-<a name="l00494"></a>00494 
-<a name="l00496"></a><a class="code" href="a00132.html#3ce28ca9baa771cfc37ecd72e69c4f3c">00496</a>     <span class="keywordtype">void</span> spawn_and_wait_for_all( <a class="code" href="a00132.html">task</a>& child ) {
-<a name="l00497"></a>00497         __TBB_ASSERT( is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00498"></a>00498         prefix().owner->wait_for_all( *<span class="keyword">this</span>, &child );
-<a name="l00499"></a>00499     }
-<a name="l00500"></a>00500 
-<a name="l00502"></a>00502     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD spawn_and_wait_for_all( <a class="code" href="a00134.html">task_list</a>& list );
-<a name="l00503"></a>00503 
-<a name="l00505"></a>00505 
-<a name="l00507"></a><a class="code" href="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">00507</a>     <span class="keyword">static</span> <span class="keywordtype">void</span> spawn_root_and_wait( <a class="code" href="a00132.html">task</a>& root ) {
-<a name="l00508"></a>00508         __TBB_ASSERT( root.<a class="code" href="a00132.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>(), <span class="stringliteral">"root not owned by current thread"</span> );
-<a name="l00509"></a>00509         root.<a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().owner->spawn_root_and_wait( root, root.<a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next );
-<a name="l00510"></a>00510     }
-<a name="l00511"></a>00511 
-<a name="l00513"></a>00513 
-<a name="l00515"></a>00515     <span class="keyword">static</span> <span class="keywordtype">void</span> spawn_root_and_wait( <a class="code" href="a00134.html">task_list</a>& root_list );
-<a name="l00516"></a>00516 
-<a name="l00518"></a>00518 
-<a name="l00519"></a><a class="code" href="a00132.html#53d2615ad9c38859b4c8080936600283">00519</a>     <span class="keywordtype">void</span> wait_for_all() {
-<a name="l00520"></a>00520         __TBB_ASSERT( is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00521"></a>00521         prefix().owner->wait_for_all( *<span class="keyword">this</span>, NULL );
-<a name="l00522"></a>00522     }
-<a name="l00523"></a>00523 
-<a name="l00525"></a>00525     <span class="keyword">static</span> <a class="code" href="a00132.html">task</a>& __TBB_EXPORTED_FUNC <span class="keyword">self</span>();
-<a name="l00526"></a>00526 
-<a name="l00528"></a><a class="code" href="a00132.html#314e98ee4347ccec83efcb9ee22e8596">00528</a>     <a class="code" href="a00132.html">task</a>* parent()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().parent;}
-<a name="l00529"></a>00529 
-<a name="l00531"></a><a class="code" href="a00132.html#f9169402702f56bf519448aaf34450aa">00531</a>     <span class="keywordtype">bool</span> is_stolen_task()<span class="keyword"> const </span>{
-<a name="l00532"></a>00532         internal::task_prefix& p = prefix();
-<a name="l00533"></a>00533         internal::task_prefix& q = parent()->prefix();
-<a name="l00534"></a>00534         <span class="keywordflow">return</span> p.owner!=q.owner;
-<a name="l00535"></a>00535     }
-<a name="l00536"></a>00536 
-<a name="l00537"></a>00537     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00538"></a>00538     <span class="comment">// Debugging</span>
-<a name="l00539"></a>00539     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00540"></a>00540 
-<a name="l00542"></a><a class="code" href="a00132.html#0af7b2d7e6e8b4333b2accfce3dfb374">00542</a>     <a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293e">state_type</a> state()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00132.html#4a3c415562d17905390ea5b49d12293e">state_type</a>(prefix().state);}
-<a name="l00543"></a>00543 
-<a name="l00545"></a><a class="code" href="a00132.html#ad774f55eaec008ae02b236423209ced">00545</a>     <span class="keywordtype">int</span> ref_count()<span class="keyword"> const </span>{
-<a name="l00546"></a>00546 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00547"></a>00547 <span class="preprocessor"></span>        internal::reference_count ref_count = prefix().ref_count;
-<a name="l00548"></a>00548         __TBB_ASSERT( ref_count==<span class="keywordtype">int</span>(ref_count), <span class="stringliteral">"integer overflow error"</span>);
-<a name="l00549"></a>00549 <span class="preprocessor">#endif</span>
-<a name="l00550"></a>00550 <span class="preprocessor"></span>        <span class="keywordflow">return</span> int(prefix().ref_count);
-<a name="l00551"></a>00551     }
-<a name="l00552"></a>00552 
-<a name="l00554"></a>00554     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD is_owned_by_current_thread() <span class="keyword">const</span>;
-<a name="l00555"></a>00555 
-<a name="l00556"></a>00556     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00557"></a>00557     <span class="comment">// Affinity</span>
-<a name="l00558"></a>00558     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00559"></a>00559  
-<a name="l00561"></a>00561 
-<a name="l00562"></a><a class="code" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">00562</a>     <span class="keyword">typedef</span> internal::affinity_id affinity_id;
-<a name="l00563"></a>00563 
-<a name="l00565"></a><a class="code" href="a00132.html#dca19d7a45487a7d67a0db517e2b57c9">00565</a>     <span class="keywordtype">void</span> set_affinity( affinity_id <span class="keywordtype">id</span> ) {prefix().affinity = id;}
-<a name="l00566"></a>00566 
-<a name="l00568"></a><a class="code" href="a00132.html#3a920a56b0bcf2801518fb45b2c9d2be">00568</a>     affinity_id affinity()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().affinity;}
-<a name="l00569"></a>00569 
-<a name="l00571"></a>00571 
-<a name="l00575"></a>00575     <span class="keyword">virtual</span> <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD note_affinity( affinity_id <span class="keywordtype">id</span> );
-<a name="l00576"></a>00576 
-<a name="l00577"></a>00577 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00579"></a>00579 <span class="preprocessor"></span>
-<a name="l00580"></a><a class="code" href="a00132.html#0f3fb4aac549ab642022450a4bd13326">00580</a> <span class="preprocessor">    bool cancel_group_execution () { return prefix().context->cancel_group_execution(); }</span>
-<a name="l00581"></a>00581 <span class="preprocessor"></span>
-<a name="l00583"></a><a class="code" href="a00132.html#025f18118c057c4c8db87ff2ce8df975">00583</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="l00584"></a>00584 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00585"></a>00585 
-<a name="l00586"></a>00586 <span class="keyword">private</span>:
-<a name="l00587"></a>00587     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00134.html">task_list</a>;
-<a name="l00588"></a>00588     <span class="keyword">friend</span> <span class="keyword">class </span>internal::scheduler;
-<a name="l00589"></a>00589     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_proxy;
-<a name="l00590"></a>00590 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00591"></a>00591 <span class="preprocessor"></span>    <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_with_context_proxy;
-<a name="l00592"></a>00592 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00593"></a>00593     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_continuation_proxy;
-<a name="l00594"></a>00594     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_child_proxy;
-<a name="l00595"></a>00595     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_additional_child_of_proxy;
-<a name="l00596"></a>00596 
-<a name="l00598"></a>00598 
-<a name="l00599"></a>00599     internal::task_prefix& prefix( internal::version_tag* = NULL )<span class="keyword"> const </span>{
-<a name="l00600"></a>00600         <span class="keywordflow">return</span> reinterpret_cast<internal::task_prefix*>(const_cast<task*>(<span class="keyword">this</span>))[-1];
-<a name="l00601"></a>00601     }
-<a name="l00602"></a>00602 }; <span class="comment">// class task</span>
-<a name="l00603"></a>00603 
-<a name="l00605"></a>00605 
-<a name="l00606"></a><a class="code" href="a00108.html">00606</a> <span class="keyword">class </span><a class="code" href="a00108.html">empty_task</a>: <span class="keyword">public</span> <a class="code" href="a00132.html">task</a> {
-<a name="l00607"></a>00607     <span class="comment">/*override*/</span> <a class="code" href="a00132.html">task</a>* execute() {
-<a name="l00608"></a>00608         <span class="keywordflow">return</span> NULL;
-<a name="l00609"></a>00609     }
-<a name="l00610"></a>00610 };
-<a name="l00611"></a>00611 
-<a name="l00613"></a>00613 
-<a name="l00615"></a><a class="code" href="a00134.html">00615</a> <span class="keyword">class </span><a class="code" href="a00134.html">task_list</a>: internal::no_copy {
-<a name="l00616"></a>00616 <span class="keyword">private</span>:
-<a name="l00617"></a>00617     <a class="code" href="a00132.html">task</a>* first;
-<a name="l00618"></a>00618     <a class="code" href="a00132.html">task</a>** next_ptr;
-<a name="l00619"></a>00619     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00132.html">task</a>;
-<a name="l00620"></a>00620 <span class="keyword">public</span>:
-<a name="l00622"></a><a class="code" href="a00134.html#416341c2047eaef50417b41eaf7e9de6">00622</a>     <a class="code" href="a00134.html">task_list</a>() : first(NULL), next_ptr(&first) {}
-<a name="l00623"></a>00623 
-<a name="l00625"></a><a class="code" href="a00134.html#6d438f1499a02db1e59c24ab6043e5ba">00625</a>     ~<a class="code" href="a00134.html">task_list</a>() {}
-<a name="l00626"></a>00626 
-<a name="l00628"></a><a class="code" href="a00134.html#f3ac31e092814b90929f81bb30441959">00628</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !first;}
-<a name="l00629"></a>00629 
-<a name="l00631"></a><a class="code" href="a00134.html#4cd34756bc4763dafb8c84838a0124ff">00631</a>     <span class="keywordtype">void</span> push_back( <a class="code" href="a00132.html">task</a>& <a class="code" href="a00132.html">task</a> ) {
-<a name="l00632"></a>00632         task.<a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next = NULL;
-<a name="l00633"></a>00633         *next_ptr = &task;
-<a name="l00634"></a>00634         next_ptr = &task.<a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next;
-<a name="l00635"></a>00635     }
-<a name="l00636"></a>00636 
-<a name="l00638"></a><a class="code" href="a00134.html#5fe85df5ed524418389d34051750347d">00638</a>     <a class="code" href="a00132.html">task</a>& pop_front() {
-<a name="l00639"></a>00639         __TBB_ASSERT( !empty(), <span class="stringliteral">"attempt to pop item from empty task_list"</span> );
-<a name="l00640"></a>00640         <a class="code" href="a00132.html">task</a>* result = first;
-<a name="l00641"></a>00641         first = result-><a class="code" href="a00132.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next;
-<a name="l00642"></a>00642         <span class="keywordflow">if</span>( !first ) next_ptr = &first;
-<a name="l00643"></a>00643         <span class="keywordflow">return</span> *result;
-<a name="l00644"></a>00644     }
-<a name="l00645"></a>00645 
-<a name="l00647"></a><a class="code" href="a00134.html#fce446ee13e025969945328f3ff59b95">00647</a>     <span class="keywordtype">void</span> clear() {
-<a name="l00648"></a>00648         first=NULL;
-<a name="l00649"></a>00649         next_ptr=&first;
-<a name="l00650"></a>00650     }
-<a name="l00651"></a>00651 };
-<a name="l00652"></a>00652 
-<a name="l00653"></a><a class="code" href="a00132.html#db841c647eb6d754440c2f4e4a73c80b">00653</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> task::spawn( <a class="code" href="a00134.html">task_list</a>& list ) {
-<a name="l00654"></a>00654     __TBB_ASSERT( <a class="code" href="a00132.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00655"></a>00655     <span class="keywordflow">if</span>( <a class="code" href="a00132.html">task</a>* t = list.<a class="code" href="a00134.html#78fcc389819ee34427d510f7d8cb8b1e">first</a> ) {
-<a name="l00656"></a>00656         prefix().owner->spawn( *t, *list.<a class="code" href="a00134.html#21553a32bcd08f980aa28f61254307da">next_ptr</a> );
-<a name="l00657"></a>00657         list.<a class="code" href="a00134.html#fce446ee13e025969945328f3ff59b95">clear</a>();
-<a name="l00658"></a>00658     }
-<a name="l00659"></a>00659 }
-<a name="l00660"></a>00660 
-<a name="l00661"></a><a class="code" href="a00132.html#c33c7edbaec67aa8a56f48986a9dc69f">00661</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( <a class="code" href="a00134.html">task_list</a>& root_list ) {
-<a name="l00662"></a>00662     <span class="keywordflow">if</span>( <a class="code" href="a00132.html">task</a>* t = root_list.<a class="code" href="a00134.html#78fcc389819ee34427d510f7d8cb8b1e">first</a> ) {
-<a name="l00663"></a>00663         __TBB_ASSERT( t->is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00664"></a>00664         t->prefix().owner->spawn_root_and_wait( *t, *root_list.<a class="code" href="a00134.html#21553a32bcd08f980aa28f61254307da">next_ptr</a> );
-<a name="l00665"></a>00665         root_list.<a class="code" href="a00134.html#fce446ee13e025969945328f3ff59b95">clear</a>();
-<a name="l00666"></a>00666     }
-<a name="l00667"></a>00667 }
-<a name="l00668"></a>00668 
-<a name="l00669"></a>00669 } <span class="comment">// namespace tbb</span>
-<a name="l00670"></a>00670 
-<a name="l00671"></a>00671 <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="l00672"></a>00672     <span class="keywordflow">return</span> &tbb::internal::allocate_root_proxy::allocate(bytes);
-<a name="l00673"></a>00673 }
-<a name="l00674"></a>00674 
-<a name="l00675"></a>00675 <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="l00676"></a>00676     tbb::internal::allocate_root_proxy::free( *static_cast<tbb::task*>(task) );
-<a name="l00677"></a>00677 }
-<a name="l00678"></a>00678 
-<a name="l00679"></a>00679 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00680"></a>00680 <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="l00681"></a>00681     <span class="keywordflow">return</span> &p.allocate(bytes);
-<a name="l00682"></a>00682 }
-<a name="l00683"></a>00683 
-<a name="l00684"></a>00684 <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="l00685"></a>00685     p.free( *static_cast<tbb::task*>(task) );
-<a name="l00686"></a>00686 }
-<a name="l00687"></a>00687 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00688"></a>00688 
-<a name="l00689"></a>00689 <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="l00690"></a>00690     <span class="keywordflow">return</span> &p.allocate(bytes);
-<a name="l00691"></a>00691 }
-<a name="l00692"></a>00692 
-<a name="l00693"></a>00693 <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="l00694"></a>00694     p.free( *static_cast<tbb::task*>(task) );
-<a name="l00695"></a>00695 }
-<a name="l00696"></a>00696 
-<a name="l00697"></a>00697 <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="l00698"></a>00698     <span class="keywordflow">return</span> &p.allocate(bytes);
-<a name="l00699"></a>00699 }
-<a name="l00700"></a>00700 
-<a name="l00701"></a>00701 <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="l00702"></a>00702     p.free( *static_cast<tbb::task*>(task) );
-<a name="l00703"></a>00703 }
-<a name="l00704"></a>00704 
-<a name="l00705"></a>00705 <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="l00706"></a>00706     <span class="keywordflow">return</span> &p.allocate(bytes);
-<a name="l00707"></a>00707 }
-<a name="l00708"></a>00708 
-<a name="l00709"></a>00709 <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="l00710"></a>00710     p.free( *static_cast<tbb::task*>(task) );
-<a name="l00711"></a>00711 }
-<a name="l00712"></a>00712 
-<a name="l00713"></a>00713 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_H */</span>
+<a name="l00401"></a>00401 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_queue_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00277.html b/doc/html/a00277.html
new file mode 100644
index 0000000..f0fae97
--- /dev/null
+++ b/doc/html/a00277.html
@@ -0,0 +1,875 @@
+<!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/a00286.html b/doc/html/a00286.html
index 87886d1..73afcbc 100644
--- a/doc/html/a00286.html
+++ b/doc/html/a00286.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>enumerable_thread_specific.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>enumerable_thread_specific.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,811 @@
 <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_enumerable_thread_specific_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_enumerable_thread_specific_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="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="l00024"></a>00024 <span class="preprocessor">#include "concurrent_vector.h"</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include "tbb_thread.h"</span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include "concurrent_hash_map.h"</span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
+<a name="l00028"></a>00028 <span class="preprocessor">#if __SUNPRO_CC</span>
+<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#include <string.h></span>  <span class="comment">// for memcpy</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#endif</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span>
+<a name="l00032"></a>00032 <span class="preprocessor">#if _WIN32||_WIN64</span>
+<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include <windows.h></span>
+<a name="l00034"></a>00034 <span class="preprocessor">#else</span>
+<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#include <pthread.h></span>
+<a name="l00036"></a>00036 <span class="preprocessor">#endif</span>
+<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="l00042"></a>00042 
+<a name="l00044"></a>00044     <span class="keyword">namespace </span>internal {
+<a name="l00045"></a>00045         
+<a name="l00047"></a>00047         <span class="keyword">template</span>< <span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value >
+<a name="l00048"></a>00048         <span class="keyword">class </span>enumerable_thread_specific_iterator 
+<a name="l00049"></a>00049 #if defined(_WIN64) && defined(_MSC_VER) 
+<a name="l00050"></a>00050             <span class="comment">// Ensure that Microsoft's internal template function _Val_type works correctly.</span>
+<a name="l00051"></a>00051             : public std::iterator<std::random_access_iterator_tag,Value>
+<a name="l00052"></a>00052 #endif <span class="comment">/* defined(_WIN64) && defined(_MSC_VER) */</span>
+<a name="l00053"></a>00053         {
+<a name="l00055"></a>00055         
+<a name="l00056"></a>00056             Container *my_container;
+<a name="l00057"></a>00057             <span class="keyword">typename</span> Container::size_type my_index;
+<a name="l00058"></a>00058             <span class="keyword">mutable</span> Value *my_value;
+<a name="l00059"></a>00059         
+<a name="l00060"></a>00060             <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T>
+<a name="l00061"></a>00061             <span class="keyword">friend</span> enumerable_thread_specific_iterator<C,T> operator+( ptrdiff_t offset, 
+<a name="l00062"></a>00062                                                                        <span class="keyword">const</span> enumerable_thread_specific_iterator<C,T>& v );
+<a name="l00063"></a>00063         
+<a name="l00064"></a>00064             <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="l00065"></a>00065             <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> enumerable_thread_specific_iterator<C,T>& i, 
+<a name="l00066"></a>00066                                     <span class="keyword">const</span> enumerable_thread_specific_iterator<C,U>& j );
+<a name="l00067"></a>00067         
+<a name="l00068"></a>00068             <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="l00069"></a>00069             <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<( const enumerable_thread_specific_iterator<C,T>& i, 
+<a name="l00070"></a>00070                                    <span class="keyword">const</span> enumerable_thread_specific_iterator<C,U>& j );
+<a name="l00071"></a>00071         
+<a name="l00072"></a>00072             <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="l00073"></a>00073             <span class="keyword">friend</span> ptrdiff_t operator-( <span class="keyword">const</span> enumerable_thread_specific_iterator<C,T>& i, <span class="keyword">const</span> enumerable_thread_specific_iterator<C,U>& j );
+<a name="l00074"></a>00074             
+<a name="l00075"></a>00075             <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U> 
+<a name="l00076"></a>00076             <span class="keyword">friend</span> <span class="keyword">class </span>enumerable_thread_specific_iterator;
+<a name="l00077"></a>00077         
+<a name="l00078"></a>00078             <span class="keyword">public</span>:
+<a name="l00079"></a>00079         
+<a name="l00080"></a>00080             enumerable_thread_specific_iterator( <span class="keyword">const</span> Container &container, <span class="keyword">typename</span> Container::size_type index ) : 
+<a name="l00081"></a>00081                 my_container(&const_cast<Container &>(container)), my_index(index), my_value(NULL) {}
+<a name="l00082"></a>00082         
+<a name="l00084"></a>00084             enumerable_thread_specific_iterator() : my_container(NULL), my_index(0), my_value(NULL) {}
+<a name="l00085"></a>00085         
+<a name="l00086"></a>00086             <span class="keyword">template</span><<span class="keyword">typename</span> U>
+<a name="l00087"></a>00087             enumerable_thread_specific_iterator( <span class="keyword">const</span> enumerable_thread_specific_iterator<Container, U>& other ) :
+<a name="l00088"></a>00088                     my_container( other.my_container ), my_index( other.my_index), my_value( const_cast<Value *>(other.my_value) ) {}
+<a name="l00089"></a>00089         
+<a name="l00090"></a>00090             enumerable_thread_specific_iterator operator+( ptrdiff_t offset )<span class="keyword"> const </span>{
+<a name="l00091"></a>00091                 <span class="keywordflow">return</span> enumerable_thread_specific_iterator(*my_container, my_index + offset);
+<a name="l00092"></a>00092             }
+<a name="l00093"></a>00093         
+<a name="l00094"></a>00094             enumerable_thread_specific_iterator &operator+=( ptrdiff_t offset ) {
+<a name="l00095"></a>00095                 my_index += offset;
+<a name="l00096"></a>00096                 my_value = NULL;
+<a name="l00097"></a>00097                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00098"></a>00098             }
+<a name="l00099"></a>00099         
+<a name="l00100"></a>00100             enumerable_thread_specific_iterator operator-( ptrdiff_t offset )<span class="keyword"> const </span>{
+<a name="l00101"></a>00101                 <span class="keywordflow">return</span> enumerable_thread_specific_iterator( *my_container, my_index-offset );
+<a name="l00102"></a>00102             }
+<a name="l00103"></a>00103         
+<a name="l00104"></a>00104             enumerable_thread_specific_iterator &operator-=( ptrdiff_t offset ) {
+<a name="l00105"></a>00105                 my_index -= offset;
+<a name="l00106"></a>00106                 my_value = NULL;
+<a name="l00107"></a>00107                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00108"></a>00108             }
+<a name="l00109"></a>00109         
+<a name="l00110"></a>00110             Value& operator*()<span class="keyword"> const </span>{
+<a name="l00111"></a>00111                 Value* value = my_value;
+<a name="l00112"></a>00112                 <span class="keywordflow">if</span>( !value ) {
+<a name="l00113"></a>00113                     value = my_value = &(*my_container)[my_index].value;
+<a name="l00114"></a>00114                 }
+<a name="l00115"></a>00115                 __TBB_ASSERT( value==&(*my_container)[my_index].value, <span class="stringliteral">"corrupt cache"</span> );
+<a name="l00116"></a>00116                 <span class="keywordflow">return</span> *value;
+<a name="l00117"></a>00117             }
+<a name="l00118"></a>00118         
+<a name="l00119"></a>00119             Value& operator[]( ptrdiff_t k )<span class="keyword"> const </span>{
+<a name="l00120"></a>00120                <span class="keywordflow">return</span> (*my_container)[my_index + k].value;
+<a name="l00121"></a>00121             }
+<a name="l00122"></a>00122         
+<a name="l00123"></a>00123             Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
+<a name="l00124"></a>00124         
+<a name="l00125"></a>00125             enumerable_thread_specific_iterator& operator++() {
+<a name="l00126"></a>00126                 ++my_index;
+<a name="l00127"></a>00127                 my_value = NULL;
+<a name="l00128"></a>00128                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00129"></a>00129             }
+<a name="l00130"></a>00130         
+<a name="l00131"></a>00131             enumerable_thread_specific_iterator& operator--() {
+<a name="l00132"></a>00132                 --my_index;
+<a name="l00133"></a>00133                 my_value = NULL;
+<a name="l00134"></a>00134                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00135"></a>00135             }
+<a name="l00136"></a>00136         
+<a name="l00138"></a>00138             enumerable_thread_specific_iterator operator++(<span class="keywordtype">int</span>) {
+<a name="l00139"></a>00139                 enumerable_thread_specific_iterator result = *<span class="keyword">this</span>;
+<a name="l00140"></a>00140                 ++my_index;
+<a name="l00141"></a>00141                 my_value = NULL;
+<a name="l00142"></a>00142                 <span class="keywordflow">return</span> result;
+<a name="l00143"></a>00143             }
+<a name="l00144"></a>00144         
+<a name="l00146"></a>00146             enumerable_thread_specific_iterator operator--(<span class="keywordtype">int</span>) {
+<a name="l00147"></a>00147                 enumerable_thread_specific_iterator result = *<span class="keyword">this</span>;
+<a name="l00148"></a>00148                 --my_index;
+<a name="l00149"></a>00149                 my_value = NULL;
+<a name="l00150"></a>00150                 <span class="keywordflow">return</span> result;
+<a name="l00151"></a>00151             }
+<a name="l00152"></a>00152         
+<a name="l00153"></a>00153             <span class="comment">// STL support</span>
+<a name="l00154"></a>00154             <span class="keyword">typedef</span> ptrdiff_t difference_type;
+<a name="l00155"></a>00155             <span class="keyword">typedef</span> Value value_type;
+<a name="l00156"></a>00156             <span class="keyword">typedef</span> Value* pointer;
+<a name="l00157"></a>00157             <span class="keyword">typedef</span> Value& reference;
+<a name="l00158"></a>00158             <span class="keyword">typedef</span> std::random_access_iterator_tag iterator_category;
+<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> Container, <span class="keyword">typename</span> T>
+<a name="l00162"></a>00162         enumerable_thread_specific_iterator<Container,T> operator+( ptrdiff_t offset, 
+<a name="l00163"></a>00163                                                                     <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,T>& v ) {
+<a name="l00164"></a>00164             <span class="keywordflow">return</span> enumerable_thread_specific_iterator<Container,T>( v.my_container, v.my_index + offset );
+<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> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00168"></a>00168         <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,T>& i, 
+<a name="l00169"></a>00169                          <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,U>& j ) {
+<a name="l00170"></a>00170             <span class="keywordflow">return</span> i.my_index==j.my_index && i.my_container == j.my_container;
+<a name="l00171"></a>00171         }
+<a name="l00172"></a>00172         
+<a name="l00173"></a>00173         <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="l00174"></a>00174         <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,T>& i, 
+<a name="l00175"></a>00175                          <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,U>& j ) {
+<a name="l00176"></a>00176             <span class="keywordflow">return</span> !(i==j);
+<a name="l00177"></a>00177         }
+<a name="l00178"></a>00178         
+<a name="l00179"></a>00179         <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="l00180"></a>00180         <span class="keywordtype">bool</span> operator<( const enumerable_thread_specific_iterator<Container,T>& i, 
+<a name="l00181"></a>00181                         <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,U>& j ) {
+<a name="l00182"></a>00182             <span class="keywordflow">return</span> i.my_index<j.my_index;
+<a name="l00183"></a>00183         }
+<a name="l00184"></a>00184         
+<a name="l00185"></a>00185         <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="l00186"></a>00186         <span class="keywordtype">bool</span> operator>( <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,T>& i, 
+<a name="l00187"></a>00187                         <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,U>& j ) {
+<a name="l00188"></a>00188             <span class="keywordflow">return</span> j<i;
+<a name="l00189"></a>00189         }
+<a name="l00190"></a>00190         
+<a name="l00191"></a>00191         <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="l00192"></a>00192         <span class="keywordtype">bool</span> operator>=( <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,T>& i, 
+<a name="l00193"></a>00193                          <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,U>& j ) {
+<a name="l00194"></a>00194             <span class="keywordflow">return</span> !(i<j);
+<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> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00198"></a>00198         <span class="keywordtype">bool</span> operator<=( const enumerable_thread_specific_iterator<Container,T>& i, 
+<a name="l00199"></a>00199                          <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,U>& j ) {
+<a name="l00200"></a>00200             <span class="keywordflow">return</span> !(j<i);
+<a name="l00201"></a>00201         }
+<a name="l00202"></a>00202         
+<a name="l00203"></a>00203         <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="l00204"></a>00204         ptrdiff_t operator-( <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,T>& i, 
+<a name="l00205"></a>00205                              <span class="keyword">const</span> enumerable_thread_specific_iterator<Container,U>& j ) {
+<a name="l00206"></a>00206             <span class="keywordflow">return</span> i.my_index-j.my_index;
+<a name="l00207"></a>00207         }
+<a name="l00208"></a>00208 
+<a name="l00209"></a>00209     <span class="keyword">template</span><<span class="keyword">typename</span> SegmentedContainer, <span class="keyword">typename</span> Value >
+<a name="l00210"></a>00210         <span class="keyword">class </span>segmented_iterator
+<a name="l00211"></a>00211 #if defined(_WIN64) && defined(_MSC_VER)
+<a name="l00212"></a>00212         : public std::iterator<std::input_iterator_tag, Value>
+<a name="l00213"></a>00213 #endif
+<a name="l00214"></a>00214         {
+<a name="l00215"></a>00215             <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="l00216"></a>00216             <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> segmented_iterator<C,T>& i, <span class="keyword">const</span> segmented_iterator<C,U>& j);
+<a name="l00217"></a>00217 
+<a name="l00218"></a>00218             <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="l00219"></a>00219             <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> segmented_iterator<C,T>& i, <span class="keyword">const</span> segmented_iterator<C,U>& j);
+<a name="l00220"></a>00220             
+<a name="l00221"></a>00221             <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U> 
+<a name="l00222"></a>00222             <span class="keyword">friend</span> <span class="keyword">class </span>segmented_iterator;
+<a name="l00223"></a>00223 
+<a name="l00224"></a>00224             <span class="keyword">public</span>:
+<a name="l00225"></a>00225 
+<a name="l00226"></a>00226                 segmented_iterator() {my_segcont = NULL;}
+<a name="l00227"></a>00227 
+<a name="l00228"></a>00228                 segmented_iterator( <span class="keyword">const</span> SegmentedContainer& _segmented_container ) : 
+<a name="l00229"></a>00229                     my_segcont(const_cast<SegmentedContainer*>(&_segmented_container)),
+<a name="l00230"></a>00230                     outer_iter(my_segcont->end()) { }
+<a name="l00231"></a>00231 
+<a name="l00232"></a>00232                 ~segmented_iterator() {}
+<a name="l00233"></a>00233 
+<a name="l00234"></a>00234                 <span class="keyword">typedef</span> <span class="keyword">typename</span> SegmentedContainer::iterator outer_iterator;
+<a name="l00235"></a>00235                 <span class="keyword">typedef</span> <span class="keyword">typename</span> SegmentedContainer::value_type InnerContainer;
+<a name="l00236"></a>00236                 <span class="keyword">typedef</span> <span class="keyword">typename</span> InnerContainer::iterator inner_iterator;
+<a name="l00237"></a>00237 
+<a name="l00238"></a>00238                 <span class="comment">// STL support</span>
+<a name="l00239"></a>00239                 <span class="keyword">typedef</span> ptrdiff_t difference_type;
+<a name="l00240"></a>00240                 <span class="keyword">typedef</span> Value value_type;
+<a name="l00241"></a>00241                 <span class="keyword">typedef</span> <span class="keyword">typename</span> SegmentedContainer::size_type size_type;
+<a name="l00242"></a>00242                 <span class="keyword">typedef</span> Value* pointer;
+<a name="l00243"></a>00243                 <span class="keyword">typedef</span> Value& reference;
+<a name="l00244"></a>00244                 <span class="keyword">typedef</span> std::input_iterator_tag iterator_category;
+<a name="l00245"></a>00245 
+<a name="l00246"></a>00246                 <span class="comment">// Copy Constructor</span>
+<a name="l00247"></a>00247                 <span class="keyword">template</span><<span class="keyword">typename</span> U>
+<a name="l00248"></a>00248                 segmented_iterator(<span class="keyword">const</span> segmented_iterator<SegmentedContainer, U>& other) :
+<a name="l00249"></a>00249                     my_segcont(other.my_segcont),
+<a name="l00250"></a>00250                     outer_iter(other.outer_iter),
+<a name="l00251"></a>00251                     <span class="comment">// can we assign a default-constructed iterator to inner if we're at the end?</span>
+<a name="l00252"></a>00252                     inner_iter(other.inner_iter)
+<a name="l00253"></a>00253                 {}
+<a name="l00254"></a>00254 
+<a name="l00255"></a>00255                 <span class="comment">// assignment</span>
+<a name="l00256"></a>00256                 <span class="keyword">template</span><<span class="keyword">typename</span> U>
+<a name="l00257"></a>00257                 segmented_iterator& operator=( <span class="keyword">const</span> segmented_iterator<SegmentedContainer, U>& other) {
+<a name="l00258"></a>00258                     <span class="keywordflow">if</span>(<span class="keyword">this</span> != &other) {
+<a name="l00259"></a>00259                         my_segcont = other.my_segcont;
+<a name="l00260"></a>00260                         outer_iter = other.outer_iter;
+<a name="l00261"></a>00261                         <span class="keywordflow">if</span>(outer_iter != my_segcont->end()) inner_iter = other.inner_iter;
+<a name="l00262"></a>00262                     }
+<a name="l00263"></a>00263                     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00264"></a>00264                 }
+<a name="l00265"></a>00265 
+<a name="l00266"></a>00266                 <span class="comment">// allow assignment of outer iterator to segmented iterator.  Once it is</span>
+<a name="l00267"></a>00267                 <span class="comment">// assigned, move forward until a non-empty inner container is found or</span>
+<a name="l00268"></a>00268                 <span class="comment">// the end of the outer container is reached.</span>
+<a name="l00269"></a>00269                 segmented_iterator& operator=(<span class="keyword">const</span> outer_iterator& new_outer_iter) {
+<a name="l00270"></a>00270                     __TBB_ASSERT(my_segcont != NULL, NULL);
+<a name="l00271"></a>00271                     <span class="comment">// check that this iterator points to something inside the segmented container</span>
+<a name="l00272"></a>00272                     <span class="keywordflow">for</span>(outer_iter = new_outer_iter ;outer_iter!=my_segcont->end(); ++outer_iter) {
+<a name="l00273"></a>00273                         <span class="keywordflow">if</span>( !outer_iter->empty() ) {
+<a name="l00274"></a>00274                             inner_iter = outer_iter->begin();
+<a name="l00275"></a>00275                             <span class="keywordflow">break</span>;
+<a name="l00276"></a>00276                         }
+<a name="l00277"></a>00277                     }
+<a name="l00278"></a>00278                     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00279"></a>00279                 }
+<a name="l00280"></a>00280 
+<a name="l00281"></a>00281                 <span class="comment">// pre-increment</span>
+<a name="l00282"></a>00282                 segmented_iterator& operator++() {
+<a name="l00283"></a>00283                     advance_me();
+<a name="l00284"></a>00284                     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00285"></a>00285                 }
+<a name="l00286"></a>00286 
+<a name="l00287"></a>00287                 <span class="comment">// post-increment</span>
+<a name="l00288"></a>00288                 segmented_iterator operator++(<span class="keywordtype">int</span>) {
+<a name="l00289"></a>00289                     segmented_iterator tmp = *<span class="keyword">this</span>;
+<a name="l00290"></a>00290                     operator++();
+<a name="l00291"></a>00291                     <span class="keywordflow">return</span> tmp;
+<a name="l00292"></a>00292                 }
+<a name="l00293"></a>00293 
+<a name="l00294"></a>00294                 <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> outer_iterator& other_outer)<span class="keyword"> const </span>{
+<a name="l00295"></a>00295                     __TBB_ASSERT(my_segcont != NULL, NULL);
+<a name="l00296"></a>00296                     <span class="keywordflow">return</span> (outer_iter == other_outer &&
+<a name="l00297"></a>00297                             (outer_iter == my_segcont->end() || inner_iter == outer_iter->begin()));
+<a name="l00298"></a>00298                 }
+<a name="l00299"></a>00299 
+<a name="l00300"></a>00300                 <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> outer_iterator& other_outer)<span class="keyword"> const </span>{
+<a name="l00301"></a>00301                     <span class="keywordflow">return</span> !operator==(other_outer);
+<a name="l00302"></a>00302 
+<a name="l00303"></a>00303                 }
+<a name="l00304"></a>00304 
+<a name="l00305"></a>00305                 <span class="comment">// (i)* RHS</span>
+<a name="l00306"></a>00306                 reference operator*()<span class="keyword"> const </span>{
+<a name="l00307"></a>00307                     __TBB_ASSERT(my_segcont != NULL, NULL);
+<a name="l00308"></a>00308                     __TBB_ASSERT(outer_iter != my_segcont->end(), <span class="stringliteral">"Dereferencing a pointer at end of container"</span>);
+<a name="l00309"></a>00309                     __TBB_ASSERT(inner_iter != outer_iter->end(), NULL); <span class="comment">// should never happen</span>
+<a name="l00310"></a>00310                     <span class="keywordflow">return</span> *inner_iter;
+<a name="l00311"></a>00311                 }
+<a name="l00312"></a>00312 
+<a name="l00313"></a>00313                 <span class="comment">// i-></span>
+<a name="l00314"></a>00314                 pointer operator->()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> &operator*();}
+<a name="l00315"></a>00315 
+<a name="l00316"></a>00316             <span class="keyword">private</span>:
+<a name="l00317"></a>00317                 SegmentedContainer*             my_segcont;
+<a name="l00318"></a>00318                 outer_iterator outer_iter;
+<a name="l00319"></a>00319                 inner_iterator inner_iter;
+<a name="l00320"></a>00320 
+<a name="l00321"></a>00321                 <span class="keywordtype">void</span> advance_me() {
+<a name="l00322"></a>00322                     __TBB_ASSERT(my_segcont != NULL, NULL);
+<a name="l00323"></a>00323                     __TBB_ASSERT(outer_iter != my_segcont->end(), NULL); <span class="comment">// not true if there are no inner containers</span>
+<a name="l00324"></a>00324                     __TBB_ASSERT(inner_iter != outer_iter->end(), NULL); <span class="comment">// not true if the inner containers are all empty.</span>
+<a name="l00325"></a>00325                     ++inner_iter;
+<a name="l00326"></a>00326                     <span class="keywordflow">while</span>(inner_iter == outer_iter->end() && ++outer_iter != my_segcont->end()) {
+<a name="l00327"></a>00327                         inner_iter = outer_iter->begin();
+<a name="l00328"></a>00328                     }
+<a name="l00329"></a>00329                 }
+<a name="l00330"></a>00330         };    <span class="comment">// segmented_iterator</span>
+<a name="l00331"></a>00331 
+<a name="l00332"></a>00332         <span class="keyword">template</span><<span class="keyword">typename</span> SegmentedContainer, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00333"></a>00333         <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> segmented_iterator<SegmentedContainer,T>& i, 
+<a name="l00334"></a>00334                          <span class="keyword">const</span> segmented_iterator<SegmentedContainer,U>& j ) {
+<a name="l00335"></a>00335             <span class="keywordflow">if</span>(i.my_segcont != j.my_segcont) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l00336"></a>00336             <span class="keywordflow">if</span>(i.my_segcont == NULL) <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l00337"></a>00337             <span class="keywordflow">if</span>(i.outer_iter != j.outer_iter) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l00338"></a>00338             <span class="keywordflow">if</span>(i.outer_iter == i.my_segcont->end()) <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l00339"></a>00339             <span class="keywordflow">return</span> i.inner_iter == j.inner_iter;
+<a name="l00340"></a>00340         }
+<a name="l00341"></a>00341 
+<a name="l00342"></a>00342         <span class="comment">// !=</span>
+<a name="l00343"></a>00343         <span class="keyword">template</span><<span class="keyword">typename</span> SegmentedContainer, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00344"></a>00344         <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> segmented_iterator<SegmentedContainer,T>& i, 
+<a name="l00345"></a>00345                          <span class="keyword">const</span> segmented_iterator<SegmentedContainer,U>& j ) {
+<a name="l00346"></a>00346             <span class="keywordflow">return</span> !(i==j);
+<a name="l00347"></a>00347         }
+<a name="l00348"></a>00348 
+<a name="l00349"></a>00349         <span class="comment">// empty template for following specializations</span>
+<a name="l00350"></a>00350         <span class="keyword">template</span><ets_key_usage_type et>
+<a name="l00351"></a>00351         <span class="keyword">struct </span>tls_manager {};
+<a name="l00352"></a>00352         
+<a name="l00354"></a>00354         <span class="keyword">template</span> <>
+<a name="l00355"></a>00355         <span class="keyword">struct </span>tls_manager<ets_no_key> {
+<a name="l00356"></a>00356             <span class="keyword">typedef</span> size_t tls_key_t;
+<a name="l00357"></a>00357             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> create_key( tls_key_t &) { }
+<a name="l00358"></a>00358             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> destroy_key( tls_key_t & ) { }
+<a name="l00359"></a>00359             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> set_tls( tls_key_t &, <span class="keywordtype">void</span> *  ) { }
+<a name="l00360"></a>00360             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> * get_tls( tls_key_t & ) { <span class="keywordflow">return</span> (size_t)0; }
+<a name="l00361"></a>00361         };
+<a name="l00362"></a>00362 
+<a name="l00364"></a>00364         <span class="keyword">template</span> <>
+<a name="l00365"></a>00365         <span class="keyword">struct </span>tls_manager <ets_key_per_instance> {
+<a name="l00366"></a>00366 <span class="preprocessor">#if _WIN32||_WIN64</span>
+<a name="l00367"></a>00367 <span class="preprocessor"></span>            <span class="keyword">typedef</span> DWORD tls_key_t;
+<a name="l00368"></a>00368             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> create_key( tls_key_t &k) { k = TlsAlloc(); }
+<a name="l00369"></a>00369             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> destroy_key( tls_key_t &k) { TlsFree(k); }
+<a name="l00370"></a>00370             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> set_tls( tls_key_t &k, <span class="keywordtype">void</span> * value) { TlsSetValue(k, (LPVOID)value); }
+<a name="l00371"></a>00371             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> * get_tls( tls_key_t &k ) { <span class="keywordflow">return</span> (<span class="keywordtype">void</span> *)TlsGetValue(k); }
+<a name="l00372"></a>00372 <span class="preprocessor">#else</span>
+<a name="l00373"></a>00373 <span class="preprocessor"></span>            <span class="keyword">typedef</span> pthread_key_t tls_key_t;
+<a name="l00374"></a>00374             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> create_key( tls_key_t &k) { pthread_key_create(&k, NULL); }
+<a name="l00375"></a>00375             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> destroy_key( tls_key_t &k) { pthread_key_delete(k); }
+<a name="l00376"></a>00376             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> set_tls( tls_key_t &k, <span class="keywordtype">void</span> * value) { pthread_setspecific(k, value); }
+<a name="l00377"></a>00377             <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> * get_tls( tls_key_t &k ) { <span class="keywordflow">return</span> pthread_getspecific(k); }
+<a name="l00378"></a>00378 <span class="preprocessor">#endif</span>
+<a name="l00379"></a>00379 <span class="preprocessor"></span>        };
+<a name="l00380"></a>00380 
+<a name="l00381"></a>00381         <span class="keyword">class </span>thread_hash_compare {
+<a name="l00382"></a>00382         <span class="keyword">public</span>:
+<a name="l00383"></a>00383             <span class="comment">// using hack suggested by Arch to get value for thread id for hashing...</span>
+<a name="l00384"></a>00384 <span class="preprocessor">#if _WIN32||_WIN64</span>
+<a name="l00385"></a>00385 <span class="preprocessor"></span>            <span class="keyword">typedef</span> DWORD thread_key;
+<a name="l00386"></a>00386 <span class="preprocessor">#else</span>
+<a name="l00387"></a>00387 <span class="preprocessor"></span>            <span class="keyword">typedef</span> pthread_t thread_key;
+<a name="l00388"></a>00388 <span class="preprocessor">#endif</span>
+<a name="l00389"></a>00389 <span class="preprocessor"></span>            <span class="keyword">static</span> thread_key my_thread_key(<span class="keyword">const</span> tbb_thread::id j) {
+<a name="l00390"></a>00390                 thread_key key_val;
+<a name="l00391"></a>00391                 memcpy(&key_val, &j, <span class="keyword">sizeof</span>(thread_key));
+<a name="l00392"></a>00392                 <span class="keywordflow">return</span> key_val;
+<a name="l00393"></a>00393             }
+<a name="l00394"></a>00394 
+<a name="l00395"></a>00395             <span class="keywordtype">bool</span> equal( <span class="keyword">const</span> thread_key j, <span class="keyword">const</span> thread_key k)<span class="keyword"> const </span>{
+<a name="l00396"></a>00396                 <span class="keywordflow">return</span> j == k;
+<a name="l00397"></a>00397             }
+<a name="l00398"></a>00398             <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> hash(<span class="keyword">const</span> thread_key k)<span class="keyword"> const </span>{
+<a name="l00399"></a>00399                 <span class="keywordflow">return</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)k;
+<a name="l00400"></a>00400             }
+<a name="l00401"></a>00401         };
+<a name="l00402"></a>00402 
+<a name="l00403"></a>00403         <span class="comment">// storage for initialization function pointer</span>
+<a name="l00404"></a>00404         <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00405"></a>00405         <span class="keyword">struct </span>callback_base {
+<a name="l00406"></a>00406             <span class="keyword">virtual</span> T apply( ) = 0;
+<a name="l00407"></a>00407             <span class="keyword">virtual</span> <span class="keywordtype">void</span> destroy( ) = 0;
+<a name="l00408"></a>00408             <span class="comment">// need to be able to create copies of callback_base for copy constructor</span>
+<a name="l00409"></a>00409             <span class="keyword">virtual</span> callback_base* make_copy() = 0;
+<a name="l00410"></a>00410             <span class="comment">// need virtual destructor to satisfy GCC compiler warning</span>
+<a name="l00411"></a>00411             <span class="keyword">virtual</span> ~callback_base() { }
+<a name="l00412"></a>00412         };
+<a name="l00413"></a>00413 
+<a name="l00414"></a>00414         <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> Functor>
+<a name="l00415"></a>00415         <span class="keyword">struct </span>callback_leaf : <span class="keyword">public</span> callback_base<T> {
+<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="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             }
+<a name="l00423"></a>00423 
+<a name="l00424"></a>00424             <span class="keyword">static</span> callback_pointer new_callback(<span class="keyword">const</span> Functor& f_ ) {
+<a name="l00425"></a>00425                 <span class="keywordtype">void</span>* new_void = my_allocator_type().allocate(1);
+<a name="l00426"></a>00426                 callback_pointer new_cb = <span class="keyword">new</span> (new_void) callback_leaf<T,Functor>(f_); <span class="comment">// placement new</span>
+<a name="l00427"></a>00427                 <span class="keywordflow">return</span> new_cb;
+<a name="l00428"></a>00428             }
+<a name="l00429"></a>00429 
+<a name="l00430"></a>00430             <span class="comment">/* override */</span> callback_pointer make_copy() {
+<a name="l00431"></a>00431                 <span class="keywordflow">return</span> new_callback( f );
+<a name="l00432"></a>00432             }
+<a name="l00433"></a>00433 
+<a name="l00434"></a>00434              <span class="comment">/* override */</span> <span class="keywordtype">void</span> destroy( ) {
+<a name="l00435"></a>00435                  callback_pointer my_ptr = <span class="keyword">this</span>;
+<a name="l00436"></a>00436                  my_allocator_type().destroy(my_ptr);
+<a name="l00437"></a>00437                  my_allocator_type().deallocate(my_ptr,1);
+<a name="l00438"></a>00438              }
+<a name="l00439"></a>00439             <span class="comment">/* override */</span> T apply() { <span class="keywordflow">return</span> f(); }  <span class="comment">// does copy construction of returned value.</span>
+<a name="l00440"></a>00440         };
+<a name="l00441"></a>00441 
+<a name="l00442"></a>00442         <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HC, <span class="keyword">typename</span> A>
+<a name="l00443"></a>00443         <span class="keyword">class </span>ets_concurrent_hash_map : <span class="keyword">public</span> tbb::concurrent_hash_map<Key, T, HC, A> {
+<a name="l00444"></a>00444         <span class="keyword">public</span>:
+<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="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="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="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="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="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="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="l00769"></a>00769         }
+<a name="l00770"></a>00770 
+<a name="l00771"></a>00771     <span class="keyword">public</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="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>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00288.html b/doc/html/a00288.html
deleted file mode 100644
index 0e89e1d..0000000
--- a/doc/html/a00288.html
+++ /dev/null
@@ -1,149 +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_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>
-<!-- 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_allocator.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_tbb_allocator_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_allocator_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 "tbb_stddef.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 <span class="keyword">namespace </span>internal {
-<a name="l00031"></a>00031 
-<a name="l00033"></a>00033 
-<a name="l00034"></a>00034     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC deallocate_via_handler_v3( <span class="keywordtype">void</span> *p );
-<a name="l00035"></a>00035 
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC allocate_via_handler_v3( size_t n );
-<a name="l00039"></a>00039 
-<a name="l00041"></a>00041     <span class="keywordtype">bool</span> __TBB_EXPORTED_FUNC is_malloc_used_v3();
-<a name="l00042"></a>00042 }
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00046"></a>00046 <span class="preprocessor"></span>    <span class="comment">// Workaround for erroneous "unreferenced parameter" warning in method destroy.</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: 4100)</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="l00052"></a>00052 
-<a name="l00057"></a>00057 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00058"></a><a class="code" href="a00136.html">00058</a> <span class="keyword">class </span><a class="code" href="a00136.html">tbb_allocator</a> {
-<a name="l00059"></a>00059 <span class="keyword">public</span>:
-<a name="l00060"></a>00060     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_type<T>::value_type value_type;
-<a name="l00061"></a>00061     <span class="keyword">typedef</span> value_type* pointer;
-<a name="l00062"></a>00062     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type* const_pointer;
-<a name="l00063"></a>00063     <span class="keyword">typedef</span> value_type& reference;
-<a name="l00064"></a>00064     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type& const_reference;
-<a name="l00065"></a>00065     <span class="keyword">typedef</span> size_t size_type;
-<a name="l00066"></a>00066     <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00067"></a>00067     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00068"></a>00068         <span class="keyword">typedef</span> <a class="code" href="a00136.html">tbb_allocator<U></a> other;
-<a name="l00069"></a>00069     };
-<a name="l00070"></a>00070 
-<a name="l00072"></a><a class="code" href="a00136.html#09a7f81fb2c3055aaecf058b11538544">00072</a>     <span class="keyword">enum</span> <a class="code" href="a00136.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> {
-<a name="l00073"></a>00073         scalable, 
-<a name="l00074"></a>00074         standard
-<a name="l00075"></a>00075     };
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077     <a class="code" href="a00136.html">tbb_allocator</a>() throw() {}
-<a name="l00078"></a>00078     tbb_allocator( <span class="keyword">const</span> tbb_allocator& ) throw() {}
-<a name="l00079"></a>00079     <span class="keyword">template</span><<span class="keyword">typename</span> U> tbb_allocator(<span class="keyword">const</span> tbb_allocator<U>&) throw() {}
-<a name="l00080"></a>00080 
-<a name="l00081"></a>00081     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
-<a name="l00082"></a>00082     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
-<a name="l00083"></a>00083     
-<a name="l00085"></a><a class="code" href="a00136.html#f6cb487b1bdce0b581f265a77dca6d53">00085</a>     pointer <a class="code" href="a00136.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>00086         <span class="keywordflow">return</span> pointer(internal::allocate_via_handler_v3( n * <span class="keyword">sizeof</span>(value_type) ));
-<a name="l00087"></a>00087     }
-<a name="l00088"></a>00088 
-<a name="l00090"></a><a class="code" href="a00136.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">00090</a>     <span class="keywordtype">void</span> <a class="code" href="a00136.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a>( pointer p, size_type ) {
-<a name="l00091"></a>00091         internal::deallocate_via_handler_v3(p);        
-<a name="l00092"></a>00092     }
-<a name="l00093"></a>00093 
-<a name="l00095"></a><a class="code" href="a00136.html#f059ca2c96243024f0d562ee3a87a3a5">00095</a>     size_type <a class="code" href="a00136.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a>() const throw() {
-<a name="l00096"></a>00096         size_type max = static_cast<size_type>(-1) / <span class="keyword">sizeof</span> (value_type);
-<a name="l00097"></a>00097         <span class="keywordflow">return</span> (max > 0 ? max : 1);
-<a name="l00098"></a>00098     }
-<a name="l00099"></a>00099     
-<a name="l00101"></a><a class="code" href="a00136.html#ab228ab9e324ed041c2226e1d717df5f">00101</a>     <span class="keywordtype">void</span> <a class="code" href="a00136.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>00102 
-<a name="l00104"></a><a class="code" href="a00136.html#ef133522bf55f05a605bee0763208281">00104</a>     <span class="keywordtype">void</span> <a class="code" href="a00136.html#ef133522bf55f05a605bee0763208281">destroy</a>( pointer p ) {p->~value_type();}
-<a name="l00105"></a>00105 
-<a name="l00107"></a><a class="code" href="a00136.html#78701e7454ef8e1a25b5acd364367080">00107</a>     <span class="keyword">static</span> <a class="code" href="a00136.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> <a class="code" href="a00136.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a>() {
-<a name="l00108"></a>00108         <span class="keywordflow">return</span> internal::is_malloc_used_v3() ? standard : scalable;
-<a name="l00109"></a>00109     }
-<a name="l00110"></a>00110 };
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4100 is back</span>
-<a name="l00115"></a>00115 <span class="preprocessor"></span>
-<a name="l00117"></a>00117 
-<a name="l00118"></a>00118 <span class="keyword">template</span><> 
-<a name="l00119"></a><a class="code" href="a00137.html">00119</a> <span class="keyword">class </span><a class="code" href="a00136.html">tbb_allocator</a><void> {
-<a name="l00120"></a>00120 <span class="keyword">public</span>:
-<a name="l00121"></a>00121     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
-<a name="l00122"></a>00122     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
-<a name="l00123"></a>00123     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
-<a name="l00124"></a>00124     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00125"></a>00125         <span class="keyword">typedef</span> <a class="code" href="a00136.html">tbb_allocator<U></a> other;
-<a name="l00126"></a>00126     };
-<a name="l00127"></a>00127 };
-<a name="l00128"></a>00128 
-<a name="l00129"></a>00129 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00130"></a>00130 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00136.html">tbb_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00136.html">tbb_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00133"></a>00133 <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="l00134"></a>00134 
-<a name="l00135"></a>00135 } <span class="comment">// namespace tbb </span>
-<a name="l00136"></a>00136 
-<a name="l00137"></a>00137 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_allocator_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/a00289.html b/doc/html/a00289.html
deleted file mode 100644
index 6b2047b..0000000
--- a/doc/html/a00289.html
+++ /dev/null
@@ -1,221 +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="keyword">namespace </span>tbb {
-<a name="l00028"></a>00028 
-<a name="l00030"></a><a class="code" href="a00096.html">00030</a> <span class="keyword">class </span><a class="code" href="a00096.html">bad_last_alloc</a> : <span class="keyword">public</span> std::bad_alloc {
-<a name="l00031"></a>00031 <span class="keyword">public</span>:
-<a name="l00032"></a>00032     <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="l00033"></a>00033     <span class="keyword">virtual</span> ~<a class="code" href="a00096.html">bad_last_alloc</a>() <span class="keywordflow">throw</span>() {}
-<a name="l00034"></a>00034 };
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036 } <span class="comment">// namespace tbb</span>
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#include "tbb_allocator.h"</span>
-<a name="l00040"></a>00040 <span class="preprocessor">#include <exception></span>
-<a name="l00041"></a>00041 <span class="preprocessor">#include <typeinfo></span>
-<a name="l00042"></a>00042 <span class="preprocessor">#include <new></span>
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044 <span class="keyword">namespace </span>tbb {
-<a name="l00045"></a>00045 
-<a name="l00047"></a>00047 
-<a name="l00067"></a><a class="code" href="a00138.html">00067</a> <span class="keyword">class </span><a class="code" href="a00138.html">tbb_exception</a> : <span class="keyword">public</span> std::exception {
-<a name="l00068"></a>00068 <span class="keyword">public</span>:
-<a name="l00070"></a>00070 
-<a name="l00071"></a>00071     <span class="keyword">virtual</span> <a class="code" href="a00138.html">tbb_exception</a>* <a class="code" href="a00138.html#3e3482bf264d4ca4dde046cd9c02c766">move</a> () <span class="keywordflow">throw</span>() = 0;
-<a name="l00072"></a>00072     
-<a name="l00074"></a>00074 
-<a name="l00076"></a>00076     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00138.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a> () <span class="keywordflow">throw</span>() = 0;
-<a name="l00077"></a>00077 
-<a name="l00079"></a>00079 
-<a name="l00083"></a>00083     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00138.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a> () = 0;
-<a name="l00084"></a>00084 
-<a name="l00086"></a>00086     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00138.html#d00f6497e552fee978a02bfcbebf46e2">name</a>() <span class="keyword">const</span> <span class="keywordflow">throw</span>() = 0;
-<a name="l00087"></a>00087 
-<a name="l00089"></a>00089     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00138.html#e8157689ecb66bc6c72d3618bf3cc371">what</a>() <span class="keyword">const</span> <span class="keywordflow">throw</span>() = 0;
-<a name="l00090"></a>00090 };
-<a name="l00091"></a>00091 
-<a name="l00093"></a>00093 
-<a name="l00097"></a><a class="code" href="a00102.html">00097</a> <span class="keyword">class </span><a class="code" href="a00102.html">captured_exception</a> : <span class="keyword">public</span> <a class="code" href="a00138.html">tbb_exception</a>
-<a name="l00098"></a>00098 {
-<a name="l00099"></a>00099 <span class="keyword">public</span>:
-<a name="l00100"></a>00100     <a class="code" href="a00102.html">captured_exception</a> ( <span class="keyword">const</span> <a class="code" href="a00102.html">captured_exception</a>& src )
-<a name="l00101"></a>00101         : my_dynamic(<span class="keyword">false</span>)
-<a name="l00102"></a>00102     {
-<a name="l00103"></a>00103         set(src.<a class="code" href="a00102.html#6a57f9aa0bce72392492d109b9e1d941">my_exception_name</a>, src.<a class="code" href="a00102.html#788adf4e55cdad7abc178a48a1d47e69">my_exception_info</a>);
-<a name="l00104"></a>00104     }
-<a name="l00105"></a>00105 
-<a name="l00106"></a>00106     <a class="code" href="a00102.html">captured_exception</a> ( <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00102.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>, <span class="keyword">const</span> <span class="keywordtype">char</span>* info )
-<a name="l00107"></a>00107         : my_dynamic(<span class="keyword">false</span>)
-<a name="l00108"></a>00108     {
-<a name="l00109"></a>00109         set(name, info);
-<a name="l00110"></a>00110     }
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112     __TBB_EXPORTED_METHOD ~<a class="code" href="a00102.html">captured_exception</a> () <span class="keywordflow">throw</span>() {
-<a name="l00113"></a>00113         clear();
-<a name="l00114"></a>00114     }
-<a name="l00115"></a>00115 
-<a name="l00116"></a>00116     <a class="code" href="a00102.html">captured_exception</a>& operator= ( <span class="keyword">const</span> <a class="code" href="a00102.html">captured_exception</a>& src ) {
-<a name="l00117"></a>00117         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &src ) {
-<a name="l00118"></a>00118             clear();
-<a name="l00119"></a>00119             set(src.<a class="code" href="a00102.html#6a57f9aa0bce72392492d109b9e1d941">my_exception_name</a>, src.<a class="code" href="a00102.html#788adf4e55cdad7abc178a48a1d47e69">my_exception_info</a>);
-<a name="l00120"></a>00120         }
-<a name="l00121"></a>00121         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00122"></a>00122     }
-<a name="l00123"></a>00123 
-<a name="l00124"></a>00124     <span class="comment">/*override*/</span> 
-<a name="l00125"></a>00125     <a class="code" href="a00102.html">captured_exception</a>* <a class="code" href="a00102.html#df6bbb78a362fe862a341e81e2999810">move</a> () <span class="keywordflow">throw</span>();
-<a name="l00126"></a>00126 
-<a name="l00127"></a>00127     <span class="comment">/*override*/</span> 
-<a name="l00128"></a>00128     <span class="keywordtype">void</span> <a class="code" href="a00102.html#667812a82f1525e968c52593dea0ef4c">destroy</a> () <span class="keywordflow">throw</span>();
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130     <span class="comment">/*override*/</span> 
-<a name="l00131"></a><a class="code" href="a00102.html#2dd1be66ab32fa27e0ddef5707fa67ef">00131</a>     <span class="keywordtype">void</span> <a class="code" href="a00102.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a> () { <span class="keywordflow">throw</span> *<span class="keyword">this</span>; }
-<a name="l00132"></a>00132 
-<a name="l00133"></a>00133     <span class="comment">/*override*/</span> 
-<a name="l00134"></a>00134     <span class="keyword">const</span> <span class="keywordtype">char</span>* __TBB_EXPORTED_METHOD <a class="code" href="a00102.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>() const throw();
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136     <span class="comment">/*override*/</span> 
-<a name="l00137"></a>00137     const <span class="keywordtype">char</span>* __TBB_EXPORTED_METHOD <a class="code" href="a00102.html#6b5988ef74a1fe2a58998d110b3633e0">what</a>() const throw();
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139 private:
-<a name="l00141"></a>00141     <a class="code" href="a00102.html">captured_exception</a>() {}
-<a name="l00142"></a>00142 
-<a name="l00144"></a>00144     <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="l00145"></a>00145 
-<a name="l00146"></a>00146     <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="l00147"></a>00147     <span class="keywordtype">void</span> clear () throw();
-<a name="l00148"></a>00148 
-<a name="l00149"></a>00149     <span class="keywordtype">bool</span> my_dynamic;
-<a name="l00150"></a>00150     const <span class="keywordtype">char</span>* my_exception_name;
-<a name="l00151"></a>00151     const <span class="keywordtype">char</span>* my_exception_info;
-<a name="l00152"></a>00152 };
-<a name="l00153"></a>00153 
-<a name="l00155"></a>00155 
-<a name="l00159"></a>00159 template<typename ExceptionData>
-<a name="l00160"></a><a class="code" href="a00111.html">00160</a> class <a class="code" href="a00111.html">movable_exception</a> : public <a class="code" href="a00138.html">tbb_exception</a>
-<a name="l00161"></a>00161 {
-<a name="l00162"></a>00162     <span class="keyword">typedef</span> <a class="code" href="a00111.html">movable_exception<ExceptionData></a> <a class="code" href="a00111.html">self_type</a>;
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164 <span class="keyword">public</span>:
-<a name="l00165"></a>00165     <a class="code" href="a00111.html">movable_exception</a> ( <span class="keyword">const</span> ExceptionData& data ) 
-<a name="l00166"></a>00166         : my_exception_data(data)
-<a name="l00167"></a>00167         , my_dynamic(<span class="keyword">false</span>)
-<a name="l00168"></a>00168         , my_exception_name(<span class="keyword">typeid</span>(self_type).<a class="code" href="a00102.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>())
-<a name="l00169"></a>00169     {}
-<a name="l00170"></a>00170 
-<a name="l00171"></a>00171     <a class="code" href="a00111.html">movable_exception</a> ( <span class="keyword">const</span> <a class="code" href="a00111.html">movable_exception</a>& src ) <span class="keywordflow">throw</span> () 
-<a name="l00172"></a>00172         : my_exception_data(src.<a class="code" href="a00111.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>)
-<a name="l00173"></a>00173         , my_dynamic(<span class="keyword">false</span>)
-<a name="l00174"></a>00174         , my_exception_name(src.<a class="code" href="a00111.html#5f5843b501829ff824c9c8d28c8283eb">my_exception_name</a>)
-<a name="l00175"></a>00175     {}
-<a name="l00176"></a>00176 
-<a name="l00177"></a>00177     ~<a class="code" href="a00111.html">movable_exception</a> () <span class="keywordflow">throw</span>() {}
-<a name="l00178"></a>00178 
-<a name="l00179"></a>00179     <span class="keyword">const</span> <a class="code" href="a00111.html">movable_exception</a>& operator= ( <span class="keyword">const</span> <a class="code" href="a00111.html">movable_exception</a>& src ) {
-<a name="l00180"></a>00180         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &src ) {
-<a name="l00181"></a>00181             my_exception_data = src.<a class="code" href="a00111.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>;
-<a name="l00182"></a>00182             my_exception_name = src.<a class="code" href="a00111.html#5f5843b501829ff824c9c8d28c8283eb">my_exception_name</a>;
-<a name="l00183"></a>00183         }
-<a name="l00184"></a>00184         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00185"></a>00185     }
-<a name="l00186"></a>00186 
-<a name="l00187"></a>00187     ExceptionData& data () <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> my_exception_data; }
-<a name="l00188"></a>00188 
-<a name="l00189"></a>00189     <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="l00190"></a>00190 
-<a name="l00191"></a><a class="code" href="a00111.html#bc5f5c4739b17ac5211ac58226c2f5a5">00191</a>     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00102.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a> () const throw() { <span class="keywordflow">return</span> my_exception_name; }
-<a name="l00192"></a>00192 
-<a name="l00193"></a><a class="code" href="a00111.html#b33a89bccf0c63106f1270c7bfaaf54f">00193</a>     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00102.html#6b5988ef74a1fe2a58998d110b3633e0">what</a> () const throw() { <span class="keywordflow">return</span> <span class="stringliteral">"tbb::movable_exception"</span>; }
-<a name="l00194"></a>00194 
-<a name="l00195"></a>00195     <span class="comment">/*override*/</span> 
-<a name="l00196"></a><a class="code" href="a00111.html#1aea0ad179d6f0481fe7f3495f66adf9">00196</a>     <a class="code" href="a00111.html">movable_exception</a>* <a class="code" href="a00102.html#df6bbb78a362fe862a341e81e2999810">move</a> () throw() {
-<a name="l00197"></a>00197         <span class="keywordtype">void</span>* e = internal::allocate_via_handler_v3(<span class="keyword">sizeof</span>(<a class="code" href="a00111.html">movable_exception</a>));
-<a name="l00198"></a>00198         <span class="keywordflow">if</span> ( e ) {
-<a name="l00199"></a>00199             <span class="keyword">new</span> (e) movable_exception(*<span class="keyword">this</span>);
-<a name="l00200"></a>00200             ((movable_exception*)e)->my_dynamic = <span class="keyword">true</span>;
-<a name="l00201"></a>00201         }
-<a name="l00202"></a>00202         <span class="keywordflow">return</span> (movable_exception*)e;
-<a name="l00203"></a>00203     }
-<a name="l00204"></a>00204     <span class="comment">/*override*/</span> 
-<a name="l00205"></a><a class="code" href="a00111.html#7a46873119d9f85a7b0009c13e41a258">00205</a>     <span class="keywordtype">void</span> <a class="code" href="a00102.html#667812a82f1525e968c52593dea0ef4c">destroy</a> () throw() {
-<a name="l00206"></a>00206         __TBB_ASSERT ( my_dynamic, <span class="stringliteral">"Method destroy can be called only on dynamically allocated movable_exceptions"</span> );
-<a name="l00207"></a>00207         <span class="keywordflow">if</span> ( my_dynamic ) {
-<a name="l00208"></a>00208             this->~<a class="code" href="a00111.html">movable_exception</a>();
-<a name="l00209"></a>00209             internal::deallocate_via_handler_v3(<span class="keyword">this</span>);
-<a name="l00210"></a>00210         }
-<a name="l00211"></a>00211     }
-<a name="l00212"></a>00212     <span class="comment">/*override*/</span> 
-<a name="l00213"></a><a class="code" href="a00111.html#17cffba35811c92b7e65d63506b69602">00213</a>     <span class="keywordtype">void</span> <a class="code" href="a00102.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a> () {
-<a name="l00214"></a>00214         <span class="keywordflow">throw</span> *<span class="keyword">this</span>;
-<a name="l00215"></a>00215     }
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217 <span class="keyword">protected</span>:
-<a name="l00219"></a><a class="code" href="a00111.html#a8c0ae2089ae784b28907cf748b89416">00219</a>     ExceptionData  my_exception_data;
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221 <span class="keyword">private</span>:
-<a name="l00223"></a>00223     <span class="keywordtype">bool</span> my_dynamic;
-<a name="l00224"></a>00224 
-<a name="l00226"></a>00226 
-<a name="l00227"></a>00227     <span class="keyword">const</span> <span class="keywordtype">char</span>* my_exception_name;
-<a name="l00228"></a>00228 };
-<a name="l00229"></a>00229 
-<a name="l00230"></a>00230 } <span class="comment">// namespace tbb</span>
-<a name="l00231"></a>00231 
-<a name="l00232"></a>00232 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00233"></a>00233 
-<a name="l00234"></a>00234 <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/a00294.html b/doc/html/a00294.html
index a8091b3..e5ab4bd 100644
--- a/doc/html/a00294.html
+++ b/doc/html/a00294.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>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>tbb_stddef.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>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,229 +39,194 @@
 <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_mutex_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_mutex_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 1</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 3016</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="l00024"></a>00024 <span class="preprocessor">#if _WIN32||_WIN64</span>
+<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#include <windows.h></span>
+<a name="l00026"></a>00026 <span class="preprocessor">#if !defined(_WIN32_WINNT)</span>
+<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="comment">// The following Windows API function is declared explicitly;</span>
+<a name="l00028"></a>00028 <span class="comment">// otherwise any user would have to specify /D_WIN32_WINNT=0x0400</span>
+<a name="l00029"></a>00029 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION );
+<a name="l00030"></a>00030 <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)</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 _WIN32||_WIN64</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>
-<a name="l00135"></a>00135 <span class="preprocessor"></span>
-<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 _WIN32||_WIN64</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><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152 <span class="preprocessor">#ifndef TBB_USE_DEBUG</span>
-<a name="l00153"></a>00153 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_DO_ASSERT</span>
-<a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_DEBUG TBB_DO_ASSERT</span>
-<a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00156"></a>00156 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_DEBUG 0</span>
-<a name="l00157"></a>00157 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
-<a name="l00158"></a>00158 <span class="preprocessor">#else</span>
-<a name="l00159"></a>00159 <span class="preprocessor"></span><span class="preprocessor">#define TBB_DO_ASSERT TBB_USE_DEBUG</span>
-<a name="l00160"></a>00160 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_DEBUG */</span>
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162 <span class="preprocessor">#ifndef TBB_USE_ASSERT</span>
-<a name="l00163"></a>00163 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_DO_ASSERT</span>
-<a name="l00164"></a>00164 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_ASSERT TBB_DO_ASSERT</span>
-<a name="l00165"></a>00165 <span class="preprocessor"></span><span class="preprocessor">#else </span>
-<a name="l00166"></a>00166 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_ASSERT TBB_USE_DEBUG</span>
-<a name="l00167"></a>00167 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
-<a name="l00168"></a>00168 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00169"></a>00169 
-<a name="l00170"></a>00170 <span class="preprocessor">#ifndef TBB_USE_THREADING_TOOLS</span>
-<a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_DO_THREADING_TOOLS</span>
-<a name="l00172"></a>00172 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS</span>
-<a name="l00173"></a>00173 <span class="preprocessor"></span><span class="preprocessor">#else </span>
-<a name="l00174"></a>00174 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG</span>
-<a name="l00175"></a>00175 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS */</span>
-<a name="l00176"></a>00176 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
-<a name="l00177"></a>00177 
-<a name="l00178"></a>00178 <span class="preprocessor">#ifndef TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l00179"></a>00179 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_PERFORMANCE_WARNINGS</span>
-<a name="l00180"></a>00180 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS</span>
-<a name="l00181"></a>00181 <span class="preprocessor"></span><span class="preprocessor">#else </span>
-<a name="l00182"></a>00182 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG</span>
-<a name="l00183"></a>00183 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_PEFORMANCE_WARNINGS */</span>
-<a name="l00184"></a>00184 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_PERFORMANCE_WARNINGS */</span>
-<a name="l00185"></a>00185 
-<a name="l00186"></a>00186 <span class="keyword">namespace </span>tbb {
-<a name="l00188"></a><a class="code" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">00188</a>     <span class="keyword">typedef</span> void(*<a class="code" href="a00181.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="l00189"></a>00189 }
-<a name="l00190"></a>00190 
+<a name="l00032"></a>00032 <span class="preprocessor">#else </span><span class="comment">/* if not _WIN32||_WIN64 */</span>
+<a name="l00033"></a>00033 <span class="preprocessor">#include <pthread.h></span>
+<a name="l00034"></a>00034 <span class="keyword">namespace </span>tbb { <span class="keyword">namespace </span>internal {
+<a name="l00035"></a>00035 <span class="comment">// Use this internal TBB function to throw an exception</span>
+<a name="l00036"></a>00036 <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="l00037"></a>00037 } } <span class="comment">//namespaces</span>
+<a name="l00038"></a>00038 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00039"></a>00039 
+<a name="l00040"></a>00040 <span class="preprocessor">#include <new></span>
+<a name="l00041"></a>00041 <span class="preprocessor">#include "aligned_space.h"</span>
+<a name="l00042"></a>00042 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00043"></a>00043 <span class="preprocessor">#include "tbb_profiling.h"</span>
+<a name="l00044"></a>00044 
+<a name="l00045"></a>00045 <span class="keyword">namespace </span>tbb {
+<a name="l00046"></a>00046 
+<a name="l00048"></a>00048 
+<a name="l00050"></a><a class="code" href="a00142.html">00050</a> <span class="keyword">class </span><a class="code" href="a00142.html">mutex</a> {
+<a name="l00051"></a>00051 <span class="keyword">public</span>:
+<a name="l00053"></a><a class="code" href="a00142.html#05313cb77d4f85213103d4dab74ed454">00053</a>     <a class="code" href="a00142.html#05313cb77d4f85213103d4dab74ed454">mutex</a>() {
+<a name="l00054"></a>00054 <span class="preprocessor">#if TBB_USE_ASSERT || TBB_USE_THREADING_TOOLS</span>
+<a name="l00055"></a>00055 <span class="preprocessor"></span>    internal_construct();
+<a name="l00056"></a>00056 <span class="preprocessor">#else</span>
+<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00058"></a>00058 <span class="preprocessor"></span>        InitializeCriticalSection(&impl);
+<a name="l00059"></a>00059 <span class="preprocessor">  #else</span>
+<a name="l00060"></a>00060 <span class="preprocessor"></span>        <span class="keywordtype">int</span> error_code = pthread_mutex_init(&impl,NULL);
+<a name="l00061"></a>00061         <span class="keywordflow">if</span>( error_code )
+<a name="l00062"></a>00062             tbb::internal::handle_perror(error_code,<span class="stringliteral">"mutex: pthread_mutex_init failed"</span>);
+<a name="l00063"></a>00063 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64*/</span>
+<a name="l00064"></a>00064 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00065"></a>00065     };
+<a name="l00066"></a>00066 
+<a name="l00067"></a>00067     ~<a class="code" href="a00142.html">mutex</a>() {
+<a name="l00068"></a>00068 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00069"></a>00069 <span class="preprocessor"></span>        internal_destroy();
+<a name="l00070"></a>00070 <span class="preprocessor">#else</span>
+<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00072"></a>00072 <span class="preprocessor"></span>        DeleteCriticalSection(&impl);
+<a name="l00073"></a>00073 <span class="preprocessor">  #else</span>
+<a name="l00074"></a>00074 <span class="preprocessor"></span>        pthread_mutex_destroy(&impl); 
+<a name="l00075"></a>00075 
+<a name="l00076"></a>00076 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00077"></a>00077 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00078"></a>00078     };
+<a name="l00079"></a>00079 
+<a name="l00080"></a>00080     <span class="keyword">class </span>scoped_lock;
+<a name="l00081"></a>00081     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
+<a name="l00082"></a>00082 
+<a name="l00084"></a>00084 
+<a name="l00086"></a><a class="code" href="a00143.html">00086</a>     <span class="keyword">class </span><a class="code" href="a00143.html">scoped_lock</a> : internal::no_copy {
+<a name="l00087"></a>00087     <span class="keyword">public</span>:
+<a name="l00089"></a><a class="code" href="a00143.html#1d403ae51b484df5d86d85ae38f11e6e">00089</a>         <a class="code" href="a00143.html#1d403ae51b484df5d86d85ae38f11e6e">scoped_lock</a>() : my_mutex(NULL) {};
+<a name="l00090"></a>00090 
+<a name="l00092"></a>00092 
+<a name="l00093"></a><a class="code" href="a00143.html#605a6b9af0f8cdabdf81825e0de99600">00093</a>         <a class="code" href="a00143.html#1d403ae51b484df5d86d85ae38f11e6e">scoped_lock</a>( <a class="code" href="a00142.html">mutex</a>& <a class="code" href="a00142.html">mutex</a> ) {
+<a name="l00094"></a>00094             <a class="code" href="a00143.html#862e022841cdc522e4296a5533b22efd">acquire</a>( mutex );
+<a name="l00095"></a>00095         }
+<a name="l00096"></a>00096 
+<a name="l00098"></a><a class="code" href="a00143.html#0ebbbecaf4311e9df7362cb76ceaa368">00098</a>         <a class="code" href="a00143.html#0ebbbecaf4311e9df7362cb76ceaa368">~scoped_lock</a>() {
+<a name="l00099"></a>00099             <span class="keywordflow">if</span>( my_mutex ) 
+<a name="l00100"></a>00100                 <a class="code" href="a00143.html#0d51d18cd99df3b2e93bf07378d0992c">release</a>();
+<a name="l00101"></a>00101         }
+<a name="l00102"></a>00102 
+<a name="l00104"></a><a class="code" href="a00143.html#862e022841cdc522e4296a5533b22efd">00104</a>         <span class="keywordtype">void</span> <a class="code" href="a00143.html#862e022841cdc522e4296a5533b22efd">acquire</a>( <a class="code" href="a00142.html">mutex</a>& <a class="code" href="a00142.html">mutex</a> ) {
+<a name="l00105"></a>00105 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00106"></a>00106 <span class="preprocessor"></span>            internal_acquire(mutex);
+<a name="l00107"></a>00107 <span class="preprocessor">#else</span>
+<a name="l00108"></a>00108 <span class="preprocessor"></span>            mutex.<a class="code" href="a00142.html#4470e61c24c129a0299ca6c17240adbb">lock</a>();
+<a name="l00109"></a>00109             my_mutex = &mutex;
+<a name="l00110"></a>00110 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00111"></a>00111         }
+<a name="l00112"></a>00112 
+<a name="l00114"></a><a class="code" href="a00143.html#591e0c49b82bcedffcbe0923f1b915ec">00114</a>         <span class="keywordtype">bool</span> <a class="code" href="a00143.html#591e0c49b82bcedffcbe0923f1b915ec">try_acquire</a>( <a class="code" href="a00142.html">mutex</a>& <a class="code" href="a00142.html">mutex</a> ) {
+<a name="l00115"></a>00115 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00116"></a>00116 <span class="preprocessor"></span>            <span class="keywordflow">return</span> internal_try_acquire (mutex);
+<a name="l00117"></a>00117 <span class="preprocessor">#else</span>
+<a name="l00118"></a>00118 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result = mutex.<a class="code" href="a00142.html#4331652c79dea1c1131bd59ab161b234">try_lock</a>();
+<a name="l00119"></a>00119             <span class="keywordflow">if</span>( result )
+<a name="l00120"></a>00120                 my_mutex = &mutex;
+<a name="l00121"></a>00121             <span class="keywordflow">return</span> result;
+<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="a00143.html#0d51d18cd99df3b2e93bf07378d0992c">00126</a>         <span class="keywordtype">void</span> <a class="code" href="a00143.html#0d51d18cd99df3b2e93bf07378d0992c">release</a>() {
+<a name="l00127"></a>00127 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00128"></a>00128 <span class="preprocessor"></span>            internal_release ();
+<a name="l00129"></a>00129 <span class="preprocessor">#else</span>
+<a name="l00130"></a>00130 <span class="preprocessor"></span>            my_mutex-><a class="code" href="a00142.html#5fc9ef443ae75d966695546be399cc6b">unlock</a>();
+<a name="l00131"></a>00131             my_mutex = NULL;
+<a name="l00132"></a>00132 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00133"></a>00133         }
+<a name="l00134"></a>00134 
+<a name="l00135"></a>00135     <span class="keyword">private</span>:
+<a name="l00137"></a>00137         <a class="code" href="a00142.html">mutex</a>* my_mutex;
+<a name="l00138"></a>00138 
+<a name="l00140"></a>00140         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire( <a class="code" href="a00142.html">mutex</a>& m );
+<a name="l00141"></a>00141 
+<a name="l00143"></a>00143         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire( <a class="code" href="a00142.html">mutex</a>& m );
+<a name="l00144"></a>00144 
+<a name="l00146"></a>00146         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release();
+<a name="l00147"></a>00147 
+<a name="l00148"></a>00148         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00142.html">mutex</a>;
+<a name="l00149"></a>00149     };
+<a name="l00150"></a>00150 
+<a name="l00151"></a>00151     <span class="comment">// Mutex traits</span>
+<a name="l00152"></a>00152     <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="l00153"></a>00153     <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="l00154"></a>00154     <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="l00155"></a>00155 
+<a name="l00156"></a>00156     <span class="comment">// ISO C++0x compatibility methods</span>
+<a name="l00157"></a>00157 
+<a name="l00159"></a><a class="code" href="a00142.html#4470e61c24c129a0299ca6c17240adbb">00159</a>     <span class="keywordtype">void</span> <a class="code" href="a00142.html#4470e61c24c129a0299ca6c17240adbb">lock</a>() {
+<a name="l00160"></a>00160 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00161"></a>00161 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
+<a name="l00162"></a>00162         <span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00143.html">scoped_lock</a>(*<span class="keyword">this</span>);
+<a name="l00163"></a>00163 <span class="preprocessor">#else</span>
+<a name="l00164"></a>00164 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00165"></a>00165 <span class="preprocessor"></span>        EnterCriticalSection(&impl);
+<a name="l00166"></a>00166 <span class="preprocessor">  #else</span>
+<a name="l00167"></a>00167 <span class="preprocessor"></span>        pthread_mutex_lock(&impl);
+<a name="l00168"></a>00168 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00169"></a>00169 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00170"></a>00170     }
+<a name="l00171"></a>00171 
+<a name="l00173"></a>00173 
+<a name="l00174"></a><a class="code" href="a00142.html#4331652c79dea1c1131bd59ab161b234">00174</a>     <span class="keywordtype">bool</span> <a class="code" href="a00142.html#4331652c79dea1c1131bd59ab161b234">try_lock</a>() {
+<a name="l00175"></a>00175 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00176"></a>00176 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
+<a name="l00177"></a>00177         <a class="code" href="a00143.html">scoped_lock</a>& s = *tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>();
+<a name="l00178"></a>00178         s.<a class="code" href="a00143.html#be42c8fe11cce1af4fe1e9eaab717567">my_mutex</a> = NULL;
+<a name="l00179"></a>00179         <span class="keywordflow">return</span> s.<a class="code" href="a00143.html#e86ffb41a026694b16637f78aa337874">internal_try_acquire</a>(*<span class="keyword">this</span>);
+<a name="l00180"></a>00180 <span class="preprocessor">#else</span>
+<a name="l00181"></a>00181 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00182"></a>00182 <span class="preprocessor"></span>        <span class="keywordflow">return</span> TryEnterCriticalSection(&impl)!=0;
+<a name="l00183"></a>00183 <span class="preprocessor">  #else</span>
+<a name="l00184"></a>00184 <span class="preprocessor"></span>        <span class="keywordflow">return</span> pthread_mutex_trylock(&impl)==0;
+<a name="l00185"></a>00185 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</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="l00188"></a>00188 
+<a name="l00190"></a><a class="code" href="a00142.html#5fc9ef443ae75d966695546be399cc6b">00190</a>     <span class="keywordtype">void</span> <a class="code" href="a00142.html#5fc9ef443ae75d966695546be399cc6b">unlock</a>() {
 <a name="l00191"></a>00191 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00192"></a>00192 <span class="preprocessor"></span>
-<a name="l00194"></a>00194 
-<a name="l00197"></a>00197 <span class="preprocessor">#define __TBB_ASSERT(predicate,message) ((predicate)?((void)0):tbb::assertion_failure(__FILE__,__LINE__,#predicate,message))</span>
-<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_ASSERT_EX __TBB_ASSERT</span>
-<a name="l00199"></a>00199 <span class="preprocessor"></span>
-<a name="l00200"></a>00200 <span class="keyword">namespace </span>tbb {
-<a name="l00202"></a>00202     <a class="code" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> __TBB_EXPORTED_FUNC <a class="code" href="a00181.html#823fa1c15dd829d1d9167157450ddcd9">set_assertion_handler</a>( <a class="code" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> new_handler );
-<a name="l00203"></a>00203 
-<a name="l00205"></a>00205 
-<a name="l00208"></a>00208     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC <a class="code" href="a00181.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="l00209"></a>00209 } <span class="comment">// namespace tbb</span>
-<a name="l00210"></a>00210 
-<a name="l00211"></a>00211 <span class="preprocessor">#else</span>
-<a name="l00212"></a>00212 <span class="preprocessor"></span>
-<a name="l00214"></a>00214 <span class="preprocessor">#define __TBB_ASSERT(predicate,comment) ((void)0)</span>
-<a name="l00216"></a>00216 <span class="preprocessor">#define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate)))</span>
-<a name="l00217"></a>00217 <span class="preprocessor"></span>
-<a name="l00218"></a>00218 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00192"></a>00192 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
+<a name="l00193"></a>00193         <a class="code" href="a00143.html">scoped_lock</a>& s = *tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>();
+<a name="l00194"></a>00194         s.<a class="code" href="a00143.html#be42c8fe11cce1af4fe1e9eaab717567">my_mutex</a> = <span class="keyword">this</span>;
+<a name="l00195"></a>00195         s.<a class="code" href="a00143.html#448b7e9042afcdc455ea3f929ac4c594">internal_release</a>();
+<a name="l00196"></a>00196 <span class="preprocessor">#else</span>
+<a name="l00197"></a>00197 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00198"></a>00198 <span class="preprocessor"></span>        LeaveCriticalSection(&impl);
+<a name="l00199"></a>00199 <span class="preprocessor">  #else</span>
+<a name="l00200"></a>00200 <span class="preprocessor"></span>        pthread_mutex_unlock(&impl);
+<a name="l00201"></a>00201 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00202"></a>00202 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00203"></a>00203     }
+<a name="l00204"></a>00204 
+<a name="l00205"></a>00205 <span class="keyword">private</span>:
+<a name="l00206"></a>00206 <span class="preprocessor">#if _WIN32||_WIN64</span>
+<a name="l00207"></a>00207 <span class="preprocessor"></span>    CRITICAL_SECTION impl;    
+<a name="l00208"></a>00208     <span class="keyword">enum</span> state_t {
+<a name="l00209"></a>00209         INITIALIZED=0x1234,
+<a name="l00210"></a>00210         DESTROYED=0x789A,
+<a name="l00211"></a>00211         HELD=0x56CD
+<a name="l00212"></a>00212     } state;
+<a name="l00213"></a>00213 <span class="preprocessor">#else</span>
+<a name="l00214"></a>00214 <span class="preprocessor"></span>    pthread_mutex_t impl;
+<a name="l00215"></a>00215 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00216"></a>00216 
+<a name="l00218"></a>00218     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
 <a name="l00219"></a>00219 
-<a name="l00221"></a>00221 <span class="keyword">namespace </span>tbb {
-<a name="l00222"></a>00222 
-<a name="l00224"></a>00224 
-<a name="l00228"></a>00228 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00181.html#a6858b22e90041c9c4669674ff39b056">TBB_runtime_interface_version</a>();
-<a name="l00229"></a>00229 
-<a name="l00231"></a>00231 
-<a name="l00235"></a><a class="code" href="a00131.html">00235</a> <span class="keyword">class </span><a class="code" href="a00131.html">split</a> {
-<a name="l00236"></a>00236 };
-<a name="l00237"></a>00237 
-<a name="l00242"></a>00242 <span class="keyword">namespace </span>internal {
-<a name="l00243"></a>00243 
-<a name="l00244"></a>00244 <span class="keyword">using</span> std::size_t;
-<a name="l00245"></a>00245 
-<a name="l00247"></a>00247 
-<a name="l00249"></a>00249 <span class="keyword">typedef</span> size_t uintptr;
-<a name="l00250"></a>00250 
-<a name="l00252"></a>00252 
-<a name="l00254"></a>00254 <span class="keyword">typedef</span> std::ptrdiff_t intptr;
-<a name="l00255"></a>00255 
-<a name="l00257"></a>00257 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC runtime_warning( <span class="keyword">const</span> <span class="keywordtype">char</span>* format, ... );
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00261"></a>00261 <span class="preprocessor">template<typename T></span>
-<a name="l00262"></a>00262 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* & p ) {
-<a name="l00263"></a>00263     p = reinterpret_cast<T*>(-1);
-<a name="l00264"></a>00264 }
-<a name="l00265"></a>00265 <span class="preprocessor">#else</span>
-<a name="l00266"></a>00266 <span class="preprocessor"></span><span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00267"></a>00267 <span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* ) {<span class="comment">/*do nothing*/</span>}
-<a name="l00268"></a>00268 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00269"></a>00269 
-<a name="l00271"></a>00271 <span class="keyword">class </span>no_assign {
-<a name="l00272"></a>00272     <span class="comment">// Deny assignment</span>
-<a name="l00273"></a>00273     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> no_assign& );
-<a name="l00274"></a>00274 <span class="keyword">public</span>:
-<a name="l00275"></a>00275 <span class="preprocessor">#if __GNUC__</span>
-<a name="l00277"></a>00277 <span class="preprocessor">    no_assign() {}</span>
-<a name="l00278"></a>00278 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
-<a name="l00279"></a>00279 };
-<a name="l00280"></a>00280 
-<a name="l00282"></a>00282 <span class="keyword">class </span>no_copy: no_assign {
-<a name="l00284"></a>00284     no_copy( <span class="keyword">const</span> no_copy& );
-<a name="l00285"></a>00285 <span class="keyword">public</span>:
-<a name="l00287"></a>00287     no_copy() {}
-<a name="l00288"></a>00288 };
-<a name="l00289"></a>00289 
-<a name="l00291"></a>00291 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00292"></a>00292 <span class="keyword">struct </span>allocator_type {
-<a name="l00293"></a>00293     <span class="keyword">typedef</span> T value_type;
-<a name="l00294"></a>00294 };
-<a name="l00295"></a>00295 
-<a name="l00296"></a>00296 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00298"></a>00298 <span class="preprocessor">template<typename T></span>
-<a name="l00299"></a>00299 <span class="preprocessor"></span><span class="keyword">struct </span>allocator_type<const T> {
-<a name="l00300"></a>00300     <span class="keyword">typedef</span> T value_type;
-<a name="l00301"></a>00301 };
-<a name="l00302"></a>00302 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00303"></a>00303 
-<a name="l00304"></a>00304 <span class="comment">// Struct to be used as a version tag for inline functions.</span>
-<a name="l00307"></a>00307 <span class="comment"></span><span class="keyword">struct </span>version_tag_v3 {};
-<a name="l00308"></a>00308 
-<a name="l00309"></a>00309 <span class="keyword">typedef</span> version_tag_v3 version_tag;
-<a name="l00310"></a>00310 
-<a name="l00311"></a>00311 } <span class="comment">// internal</span>
-<a name="l00313"></a>00313 <span class="comment"></span>
-<a name="l00314"></a>00314 } <span class="comment">// tbb</span>
-<a name="l00315"></a>00315 
-<a name="l00316"></a>00316 <span class="preprocessor">#if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)</span>
-<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_EXCEPTIONS</span>
-<a name="l00318"></a>00318 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXCEPTIONS 1</span>
-<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00320"></a>00320 <span class="preprocessor">#endif</span>
-<a name="l00321"></a>00321 <span class="preprocessor"></span>
-<a name="l00322"></a>00322 <span class="preprocessor">#ifndef __TBB_SCHEDULER_OBSERVER</span>
-<a name="l00323"></a>00323 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_SCHEDULER_OBSERVER 1</span>
-<a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_SCHEDULER_OBSERVER */</span>
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326 <span class="preprocessor">#ifndef __TBB_NAMING_API_SUPPORT</span>
-<a name="l00327"></a>00327 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NAMING_API_SUPPORT 1</span>
-<a name="l00328"></a>00328 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_NAMING_API_SUPPORT */</span>
-<a name="l00329"></a>00329 
-<a name="l00330"></a>00330 
-<a name="l00331"></a>00331 <span class="preprocessor">#endif </span><span class="comment">/* RC_INVOKED */</span>
-<a name="l00332"></a>00332 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_stddef_H */</span>
+<a name="l00221"></a>00221     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_destroy();
+<a name="l00222"></a>00222 };
+<a name="l00223"></a>00223 
+<a name="l00224"></a>00224 __TBB_DEFINE_PROFILING_SET_NAME(mutex)
+<a name="l00225"></a>00225 
+<a name="l00226"></a>00226 } <span class="comment">// namespace tbb </span>
+<a name="l00227"></a>00227 
+<a name="l00228"></a>00228 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_mutex_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00229.html b/doc/html/a00296.html
similarity index 97%
copy from doc/html/a00229.html
copy to doc/html/a00296.html
index 046da71..f8e93a0 100644
--- a/doc/html/a00229.html
+++ b/doc/html/a00296.html
@@ -53,9 +53,9 @@
 <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="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( null_mutex& ) {}
+<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="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {}
+<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() {}
diff --git a/doc/html/a00299.html b/doc/html/a00299.html
index 18637fa..b4c4d79 100644
--- a/doc/html/a00299.html
+++ b/doc/html/a00299.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.h Source File</title>
+<title>null_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>tbb_thread.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>null_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,254 +39,38 @@
 <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_thread_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_thread_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_null_rw_mutex_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_null_rw_mutex_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><span class="preprocessor">#include <windows.h></span>
-<a name="l00026"></a>00026 <span class="preprocessor">#define __TBB_NATIVE_THREAD_ROUTINE unsigned WINAPI</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) unsigned (WINAPI* r)( void* )</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NATIVE_THREAD_ROUTINE void*</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) void* (*r)( void* )</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#include <pthread.h></span>
-<a name="l00032"></a>00032 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span>
-<a name="l00034"></a>00034 <span class="preprocessor">#include <iosfwd></span>
-<a name="l00035"></a>00035 <span class="preprocessor">#include <exception></span>             <span class="comment">// Need std::terminate from here.</span>
-<a name="l00036"></a>00036 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00037"></a>00037 <span class="preprocessor">#include "tick_count.h"</span>
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039 <span class="keyword">namespace </span>tbb {
-<a name="l00040"></a>00040 
-<a name="l00042"></a>00042 <span class="keyword">namespace </span>internal {
-<a name="l00043"></a>00043     
-<a name="l00044"></a>00044     <span class="keyword">class </span>tbb_thread_v3;
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 } <span class="comment">// namespace internal</span>
-<a name="l00047"></a>00047 
-<a name="l00048"></a>00048 <span class="keywordtype">void</span> swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ); 
-<a name="l00049"></a>00049 
-<a name="l00050"></a>00050 <span class="keyword">namespace </span>internal {
-<a name="l00051"></a>00051 
-<a name="l00053"></a>00053     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC allocate_closure_v3( size_t size );
-<a name="l00055"></a>00055     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC free_closure_v3( <span class="keywordtype">void</span>* );
-<a name="l00056"></a>00056    
-<a name="l00057"></a>00057     <span class="keyword">struct </span>thread_closure_base {
-<a name="l00058"></a>00058         <span class="keywordtype">void</span>* operator new( size_t size ) {<span class="keywordflow">return</span> allocate_closure_v3(size);}
-<a name="l00059"></a>00059         <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* ptr ) {free_closure_v3(ptr);}
-<a name="l00060"></a>00060     };
-<a name="l00061"></a>00061 
-<a name="l00062"></a>00062     <span class="keyword">template</span><<span class="keyword">class</span> F> <span class="keyword">struct </span>thread_closure_0: thread_closure_base {
-<a name="l00063"></a>00063         F function;
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065         <span class="keyword">static</span> __TBB_NATIVE_THREAD_ROUTINE start_routine( <span class="keywordtype">void</span>* c ) {
-<a name="l00066"></a>00066             thread_closure_0 *<span class="keyword">self</span> = static_cast<thread_closure_0*>(c);
-<a name="l00067"></a>00067             <span class="keywordflow">try</span> {
-<a name="l00068"></a>00068                 <span class="keyword">self</span>->function();
-<a name="l00069"></a>00069             } <span class="keywordflow">catch</span> ( ... ) {
-<a name="l00070"></a>00070                 std::terminate();
-<a name="l00071"></a>00071             }
-<a name="l00072"></a>00072             <span class="keyword">delete</span> <span class="keyword">self</span>;
-<a name="l00073"></a>00073             <span class="keywordflow">return</span> 0;
-<a name="l00074"></a>00074         }
-<a name="l00075"></a>00075         thread_closure_0( <span class="keyword">const</span> F& f ) : function(f) {}
-<a name="l00076"></a>00076     };
-<a name="l00078"></a>00078     <span class="keyword">template</span><<span class="keyword">class</span> F, <span class="keyword">class</span> X> <span class="keyword">struct </span>thread_closure_1: thread_closure_base {
-<a name="l00079"></a>00079         F function;
-<a name="l00080"></a>00080         X arg1;
-<a name="l00082"></a>00082         <span class="keyword">static</span> __TBB_NATIVE_THREAD_ROUTINE start_routine( <span class="keywordtype">void</span>* c ) {
-<a name="l00083"></a>00083             thread_closure_1 *<span class="keyword">self</span> = static_cast<thread_closure_1*>(c);
-<a name="l00084"></a>00084             <span class="keywordflow">try</span> {
-<a name="l00085"></a>00085                 <span class="keyword">self</span>->function(self->arg1);
-<a name="l00086"></a>00086             } <span class="keywordflow">catch</span> ( ... ) {
-<a name="l00087"></a>00087                 std::terminate();
-<a name="l00088"></a>00088             }
-<a name="l00089"></a>00089             <span class="keyword">delete</span> <span class="keyword">self</span>;
-<a name="l00090"></a>00090             <span class="keywordflow">return</span> 0;
-<a name="l00091"></a>00091         }
-<a name="l00092"></a>00092         thread_closure_1( <span class="keyword">const</span> F& f, <span class="keyword">const</span> X& x ) : function(f), arg1(x) {}
-<a name="l00093"></a>00093     };
-<a name="l00094"></a>00094     <span class="keyword">template</span><<span class="keyword">class</span> F, <span class="keyword">class</span> X, <span class="keyword">class</span> Y> <span class="keyword">struct </span>thread_closure_2: thread_closure_base {
-<a name="l00095"></a>00095         F function;
-<a name="l00096"></a>00096         X arg1;
-<a name="l00097"></a>00097         Y arg2;
-<a name="l00099"></a>00099         <span class="keyword">static</span> __TBB_NATIVE_THREAD_ROUTINE start_routine( <span class="keywordtype">void</span>* c ) {
-<a name="l00100"></a>00100             thread_closure_2 *<span class="keyword">self</span> = static_cast<thread_closure_2*>(c);
-<a name="l00101"></a>00101             <span class="keywordflow">try</span> {
-<a name="l00102"></a>00102                 <span class="keyword">self</span>->function(self->arg1, self->arg2);
-<a name="l00103"></a>00103             } <span class="keywordflow">catch</span> ( ... ) {
-<a name="l00104"></a>00104                 std::terminate();
-<a name="l00105"></a>00105             }
-<a name="l00106"></a>00106             <span class="keyword">delete</span> <span class="keyword">self</span>;
-<a name="l00107"></a>00107             <span class="keywordflow">return</span> 0;
-<a name="l00108"></a>00108         }
-<a name="l00109"></a>00109         thread_closure_2( <span class="keyword">const</span> F& f, <span class="keyword">const</span> X& x, <span class="keyword">const</span> Y& y ) : function(f), arg1(x), arg2(y) {}
-<a name="l00110"></a>00110     };
-<a name="l00111"></a>00111 
-<a name="l00113"></a>00113     <span class="keyword">class </span>tbb_thread_v3 {
-<a name="l00114"></a>00114         tbb_thread_v3(<span class="keyword">const</span> tbb_thread_v3&); <span class="comment">// = delete;   // Deny access</span>
-<a name="l00115"></a>00115     <span class="keyword">public</span>:
-<a name="l00116"></a>00116 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00117"></a>00117 <span class="preprocessor"></span>        <span class="keyword">typedef</span> HANDLE native_handle_type; 
-<a name="l00118"></a>00118 <span class="preprocessor">#else</span>
-<a name="l00119"></a>00119 <span class="preprocessor"></span>        <span class="keyword">typedef</span> pthread_t native_handle_type; 
-<a name="l00120"></a>00120 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
-<a name="l00121"></a>00121 <span class="preprocessor"></span>
-<a name="l00122"></a>00122         <span class="keyword">class </span>id;
-<a name="l00124"></a>00124         tbb_thread_v3() : my_handle(0)
-<a name="l00125"></a>00125 #if _WIN32||_WIN64
-<a name="l00126"></a>00126             , my_thread_id(0)
-<a name="l00127"></a>00127 #endif <span class="comment">// _WIN32||_WIN64</span>
-<a name="l00128"></a>00128         {}
-<a name="l00129"></a>00129         
-<a name="l00131"></a>00131         <span class="keyword">template</span> <<span class="keyword">class</span> F> <span class="keyword">explicit</span> tbb_thread_v3(F f) {
-<a name="l00132"></a>00132             <span class="keyword">typedef</span> internal::thread_closure_0<F> closure_type;
-<a name="l00133"></a>00133             internal_start(closure_type::start_routine, <span class="keyword">new</span> closure_type(f));
-<a name="l00134"></a>00134         }
-<a name="l00136"></a>00136         <span class="keyword">template</span> <<span class="keyword">class</span> F, <span class="keyword">class</span> X> tbb_thread_v3(F f, X x) {
-<a name="l00137"></a>00137             <span class="keyword">typedef</span> internal::thread_closure_1<F,X> closure_type;
-<a name="l00138"></a>00138             internal_start(closure_type::start_routine, <span class="keyword">new</span> closure_type(f,x));
-<a name="l00139"></a>00139         }
-<a name="l00141"></a>00141         <span class="keyword">template</span> <<span class="keyword">class</span> F, <span class="keyword">class</span> X, <span class="keyword">class</span> Y> tbb_thread_v3(F f, X x, Y y) {
-<a name="l00142"></a>00142             <span class="keyword">typedef</span> internal::thread_closure_2<F,X,Y> closure_type;
-<a name="l00143"></a>00143             internal_start(closure_type::start_routine, <span class="keyword">new</span> closure_type(f,x,y));
-<a name="l00144"></a>00144         }
-<a name="l00145"></a>00145 
-<a name="l00146"></a>00146         tbb_thread_v3& operator=(tbb_thread_v3& x) {
-<a name="l00147"></a>00147             <span class="keywordflow">if</span> (joinable()) detach();
-<a name="l00148"></a>00148             my_handle = x.my_handle;
-<a name="l00149"></a>00149             x.my_handle = 0;
-<a name="l00150"></a>00150 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00151"></a>00151 <span class="preprocessor"></span>            my_thread_id = x.my_thread_id;
-<a name="l00152"></a>00152             x.my_thread_id = 0;
-<a name="l00153"></a>00153 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
-<a name="l00154"></a>00154 <span class="preprocessor"></span>            <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00155"></a>00155         }
-<a name="l00156"></a>00156         <span class="keywordtype">bool</span> joinable()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_handle!=0; }
-<a name="l00158"></a>00158         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD join();
-<a name="l00160"></a>00160         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD detach();
-<a name="l00161"></a>00161         ~tbb_thread_v3() {<span class="keywordflow">if</span>( joinable() ) detach();}
-<a name="l00162"></a>00162         <span class="keyword">inline</span> <span class="keywordtype">id</span> get_id() <span class="keyword">const</span>;
-<a name="l00163"></a>00163         native_handle_type native_handle() { <span class="keywordflow">return</span> my_handle; }
-<a name="l00164"></a>00164     
-<a name="l00166"></a>00166         <span class="keyword">static</span> <span class="keywordtype">unsigned</span> __TBB_EXPORTED_FUNC hardware_concurrency();
-<a name="l00167"></a>00167     <span class="keyword">private</span>:
-<a name="l00168"></a>00168         native_handle_type my_handle; 
-<a name="l00169"></a>00169 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00170"></a>00170 <span class="preprocessor"></span>        DWORD my_thread_id;
-<a name="l00171"></a>00171 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
-<a name="l00172"></a>00172 <span class="preprocessor"></span>
-<a name="l00174"></a>00174         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), 
-<a name="l00175"></a>00175                              <span class="keywordtype">void</span>* closure );
-<a name="l00176"></a>00176         <span class="keyword">friend</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 );
-<a name="l00177"></a>00177         <span class="keyword">friend</span> <span class="keywordtype">void</span> tbb::swap( tbb_thread_v3& t1, tbb_thread_v3& t2 ); 
-<a name="l00178"></a>00178     };
-<a name="l00179"></a>00179         
-<a name="l00180"></a>00180     <span class="keyword">class </span>tbb_thread_v3::id { 
-<a name="l00181"></a>00181 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00182"></a>00182 <span class="preprocessor"></span>        DWORD my_id;
-<a name="l00183"></a>00183         id( DWORD my_id ) : my_id(my_id) {}
-<a name="l00184"></a>00184 <span class="preprocessor">#else</span>
-<a name="l00185"></a>00185 <span class="preprocessor"></span>        pthread_t my_id;
-<a name="l00186"></a>00186         id( pthread_t my_id ) : my_id(my_id) {}
-<a name="l00187"></a>00187 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
-<a name="l00188"></a>00188 <span class="preprocessor"></span>        <span class="keyword">friend</span> <span class="keyword">class </span>tbb_thread_v3;
-<a name="l00189"></a>00189     <span class="keyword">public</span>:
-<a name="l00190"></a>00190         id() : my_id(0) {}
-<a name="l00191"></a>00191 
-<a name="l00192"></a>00192         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( tbb_thread_v3::id x, tbb_thread_v3::id y );
-<a name="l00193"></a>00193         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( tbb_thread_v3::id x, tbb_thread_v3::id y );
-<a name="l00194"></a>00194         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<( tbb_thread_v3::id x, tbb_thread_v3::id y );
-<a name="l00195"></a>00195         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<=( tbb_thread_v3::id x, tbb_thread_v3::id y );
-<a name="l00196"></a>00196         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator>( tbb_thread_v3::id x, tbb_thread_v3::id y );
-<a name="l00197"></a>00197         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator>=( tbb_thread_v3::id x, tbb_thread_v3::id y );
-<a name="l00198"></a>00198         
-<a name="l00199"></a>00199         <span class="keyword">template</span><<span class="keyword">class</span> <span class="keywordtype">char</span>T, <span class="keyword">class</span> traits>
-<a name="l00200"></a>00200         <span class="keyword">friend</span> std::basic_ostream<charT, traits>&
-<a name="l00201"></a>00201         operator<< (std::basic_ostream<charT, traits> &out, 
-<a name="l00202"></a>00202                     tbb_thread_v3::id id)
-<a name="l00203"></a>00203         {
-<a name="l00204"></a>00204             out << <span class="keywordtype">id</span>.my_id;
-<a name="l00205"></a>00205             <span class="keywordflow">return</span> out;
-<a name="l00206"></a>00206         }
-<a name="l00207"></a>00207         <span class="keyword">friend</span> tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3();
-<a name="l00208"></a>00208     }; <span class="comment">// tbb_thread_v3::id</span>
-<a name="l00209"></a>00209 
-<a name="l00210"></a>00210     tbb_thread_v3::id tbb_thread_v3::get_id()<span class="keyword"> const </span>{
-<a name="l00211"></a>00211 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00212"></a>00212 <span class="preprocessor"></span>        <span class="keywordflow">return</span> id(my_thread_id);
-<a name="l00213"></a>00213 <span class="preprocessor">#else</span>
-<a name="l00214"></a>00214 <span class="preprocessor"></span>        <span class="keywordflow">return</span> id(my_handle);
-<a name="l00215"></a>00215 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
-<a name="l00216"></a>00216 <span class="preprocessor"></span>    }
-<a name="l00217"></a>00217     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 );
-<a name="l00218"></a>00218     tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3();
-<a name="l00219"></a>00219     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC thread_yield_v3();
-<a name="l00220"></a>00220     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC thread_sleep_v3(<span class="keyword">const</span> tick_count::interval_t &i);
-<a name="l00221"></a>00221 
-<a name="l00222"></a>00222     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(tbb_thread_v3::id x, tbb_thread_v3::id y)
-<a name="l00223"></a>00223     {
-<a name="l00224"></a>00224         <span class="keywordflow">return</span> x.my_id == y.my_id;
-<a name="l00225"></a>00225     }
-<a name="l00226"></a>00226     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(tbb_thread_v3::id x, tbb_thread_v3::id y)
-<a name="l00227"></a>00227     {
-<a name="l00228"></a>00228         <span class="keywordflow">return</span> x.my_id != y.my_id;
-<a name="l00229"></a>00229     }
-<a name="l00230"></a>00230     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator<(tbb_thread_v3::id x, tbb_thread_v3::id y)
-<a name="l00231"></a>00231     {
-<a name="l00232"></a>00232         <span class="keywordflow">return</span> x.my_id < y.my_id;
-<a name="l00233"></a>00233     }
-<a name="l00234"></a>00234     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator<=(tbb_thread_v3::id x, tbb_thread_v3::id y)
-<a name="l00235"></a>00235     {
-<a name="l00236"></a>00236         <span class="keywordflow">return</span> x.my_id <= y.my_id;
-<a name="l00237"></a>00237     }
-<a name="l00238"></a>00238     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator>(tbb_thread_v3::id x, tbb_thread_v3::id y)
-<a name="l00239"></a>00239     {
-<a name="l00240"></a>00240         <span class="keywordflow">return</span> x.my_id > y.my_id;
-<a name="l00241"></a>00241     }
-<a name="l00242"></a>00242     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator>=(tbb_thread_v3::id x, tbb_thread_v3::id y)
-<a name="l00243"></a>00243     {
-<a name="l00244"></a>00244         <span class="keywordflow">return</span> x.my_id >= y.my_id;
-<a name="l00245"></a>00245     }
-<a name="l00246"></a>00246 
-<a name="l00247"></a>00247 } <span class="comment">// namespace internal;</span>
-<a name="l00248"></a>00248 
-<a name="l00250"></a>00250 <span class="keyword">typedef</span> internal::tbb_thread_v3 tbb_thread;
-<a name="l00251"></a>00251 
-<a name="l00252"></a>00252 <span class="keyword">using</span> internal::operator==;
-<a name="l00253"></a>00253 <span class="keyword">using</span> internal::operator!=;
-<a name="l00254"></a>00254 <span class="keyword">using</span> internal::operator<;
-<a name="l00255"></a>00255 <span class="keyword">using</span> internal::operator>;
-<a name="l00256"></a>00256 <span class="keyword">using</span> internal::operator<=;
-<a name="l00257"></a>00257 <span class="keyword">using</span> internal::operator>=;
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259 <span class="keyword">inline</span> <span class="keywordtype">void</span> move( tbb_thread& t1, tbb_thread& t2 ) {
-<a name="l00260"></a>00260     internal::move_v3(t1, t2);
-<a name="l00261"></a>00261 }
-<a name="l00262"></a>00262 
-<a name="l00263"></a>00263 <span class="keyword">inline</span> <span class="keywordtype">void</span> swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ) {
-<a name="l00264"></a>00264     tbb::tbb_thread::native_handle_type h = t1.my_handle;
-<a name="l00265"></a>00265     t1.my_handle = t2.my_handle;
-<a name="l00266"></a>00266     t2.my_handle = h;
-<a name="l00267"></a>00267 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00268"></a>00268 <span class="preprocessor"></span>    DWORD i = t1.my_thread_id;
-<a name="l00269"></a>00269     t1.my_thread_id = t2.my_thread_id;
-<a name="l00270"></a>00270     t2.my_thread_id = i;
-<a name="l00271"></a>00271 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00272"></a>00272 }
-<a name="l00273"></a>00273 
-<a name="l00274"></a>00274 <span class="keyword">namespace </span>this_tbb_thread {
-<a name="l00275"></a>00275     <span class="keyword">inline</span> tbb_thread::id get_id() { <span class="keywordflow">return</span> internal::thread_get_id_v3(); }
-<a name="l00277"></a>00277     <span class="keyword">inline</span> <span class="keywordtype">void</span> yield() { internal::thread_yield_v3(); }
-<a name="l00279"></a>00279     <span class="keyword">inline</span> <span class="keywordtype">void</span> sleep(<span class="keyword">const</span> tick_count::interval_t &i) { 
-<a name="l00280"></a>00280         internal::thread_sleep_v3(i);  
-<a name="l00281"></a>00281     }
-<a name="l00282"></a>00282 }  <span class="comment">// namespace this_tbb_thread</span>
-<a name="l00283"></a>00283 
-<a name="l00284"></a>00284 } <span class="comment">// namespace tbb</span>
-<a name="l00285"></a>00285 
-<a name="l00286"></a>00286 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_thread_H */</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>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00234.html b/doc/html/a00301.html
similarity index 97%
copy from doc/html/a00234.html
copy to doc/html/a00301.html
index 75f354d..4c8e61f 100644
--- a/doc/html/a00234.html
+++ b/doc/html/a00301.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="a00114.html">00060</a> <span class="keyword">class </span><a class="code" href="a00114.html">parallel_do_feeder</a>: internal::no_copy
+<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="l00061"></a>00061 {
-<a name="l00062"></a>00062     <a class="code" href="a00114.html">parallel_do_feeder</a>() {}
-<a name="l00063"></a>00063     <span class="keyword">virtual</span> ~<a class="code" href="a00114.html">parallel_do_feeder</a> () {}
+<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="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="a00114.html#40baaf0f6856f4491dd0adf896c93516">00068</a>     <span class="keywordtype">void</span> <a class="code" href="a00114.html#40baaf0f6856f4491dd0adf896c93516">add</a>( <span class="keyword">const</span> Item& item ) {internal_add(item);}
+<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="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="a00132.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="a00162.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="a00132.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>() ) empty_task();
+<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="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="a00133.html">tbb::task_group_context</a> &context)
+<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="l00173"></a>00173         {
-<a name="l00174"></a>00174             my_barrier = <span class="keyword">new</span>( <a class="code" href="a00132.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="a00162.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="a00183.html#g3383e2703977012b6f384d673410f1f7">00470</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& 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="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="a00133.html">task_group_context</a> context;
+<a name="l00475"></a>00475 <span class="preprocessor"></span>    <a class="code" href="a00163.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="a00183.html#g2617dc9b88b3285a7212599d49f74228">00488</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00183.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& body, <a class="code" href="a00133.html">task_group_context</a>& context  )
+<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="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/a00310.html
new file mode 100644
index 0000000..8f91b57
--- /dev/null
+++ b/doc/html/a00310.html
@@ -0,0 +1,226 @@
+<!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>parallel_for.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>parallel_for.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_parallel_for_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_for_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 "partitioner.h"</span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include "blocked_range.h"</span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include <new></span>
+<a name="l00028"></a>00028 <span class="preprocessor">#include <stdexcept></span> <span class="comment">// std::invalid_argument</span>
+<a name="l00029"></a>00029 <span class="preprocessor">#include <string></span> <span class="comment">// std::invalid_argument text</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 <span class="keyword">namespace </span>internal {
+<a name="l00035"></a>00035 
+<a name="l00037"></a>00037 
+<a name="l00038"></a>00038     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
+<a name="l00039"></a>00039     <span class="keyword">class </span>start_for: <span class="keyword">public</span> task {
+<a name="l00040"></a>00040         Range my_range;
+<a name="l00041"></a>00041         <span class="keyword">const</span> Body my_body;
+<a name="l00042"></a>00042         <span class="keyword">typename</span> Partitioner::partition_type my_partition;
+<a name="l00043"></a>00043         <span class="comment">/*override*/</span> task* execute();
+<a name="l00044"></a>00044 
+<a name="l00046"></a>00046         start_for( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, Partitioner& partitioner ) :
+<a name="l00047"></a>00047             my_range(range),    
+<a name="l00048"></a>00048             my_body(body),
+<a name="l00049"></a>00049             my_partition(partitioner)
+<a name="l00050"></a>00050         {
+<a name="l00051"></a>00051         }
+<a name="l00053"></a>00053 
+<a name="l00054"></a>00054         start_for( start_for& parent, split ) :
+<a name="l00055"></a>00055             my_range(parent.my_range,split()),    
+<a name="l00056"></a>00056             my_body(parent.my_body),
+<a name="l00057"></a>00057             my_partition(parent.my_partition,split())
+<a name="l00058"></a>00058         {
+<a name="l00059"></a>00059             my_partition.set_affinity(*<span class="keyword">this</span>);
+<a name="l00060"></a>00060         }
+<a name="l00062"></a>00062         <span class="comment">/*override*/</span> <span class="keywordtype">void</span> note_affinity( affinity_id <span class="keywordtype">id</span> ) {
+<a name="l00063"></a>00063             my_partition.note_affinity( <span class="keywordtype">id</span> );
+<a name="l00064"></a>00064         }
+<a name="l00065"></a>00065     <span class="keyword">public</span>:
+<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="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="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="l00084"></a>00084             }
+<a name="l00085"></a>00085         }
+<a name="l00086"></a>00086 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00087"></a>00087     };
+<a name="l00088"></a>00088 
+<a name="l00089"></a>00089     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
+<a name="l00090"></a>00090     task* start_for<Range,Body,Partitioner>::execute() {
+<a name="l00091"></a>00091         <span class="keywordflow">if</span>( !my_range.is_divisible() || my_partition.should_execute_range(*<span class="keyword">this</span>) ) {
+<a name="l00092"></a>00092             my_body( my_range );
+<a name="l00093"></a>00093             <span class="keywordflow">return</span> my_partition.continue_after_execute_range(*<span class="keyword">this</span>); 
+<a name="l00094"></a>00094         } <span class="keywordflow">else</span> {
+<a name="l00095"></a>00095             empty_task& c = *<span class="keyword">new</span>( this->allocate_continuation() ) empty_task;
+<a name="l00096"></a>00096             recycle_as_child_of(c);
+<a name="l00097"></a>00097             c.set_ref_count(2);
+<a name="l00098"></a>00098             <span class="keywordtype">bool</span> delay = my_partition.decide_whether_to_delay();
+<a name="l00099"></a>00099             start_for& b = *<span class="keyword">new</span>( c.allocate_child() ) start_for(*<span class="keyword">this</span>,split());
+<a name="l00100"></a>00100             my_partition.spawn_or_delay(delay,*<span class="keyword">this</span>,b);
+<a name="l00101"></a>00101             <span class="keywordflow">return</span> <span class="keyword">this</span>;
+<a name="l00102"></a>00102         }
+<a name="l00103"></a>00103     } 
+<a name="l00104"></a>00104 } <span class="comment">// namespace internal</span>
+<a name="l00106"></a>00106 <span class="comment"></span>
+<a name="l00107"></a>00107 
+<a name="l00108"></a>00108 <span class="comment">// Requirements on Range concept are documented in blocked_range.h</span>
+<a name="l00109"></a>00109 
+<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="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="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="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="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="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="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="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>
+<a name="l00171"></a>00171 
+<a name="l00172"></a>00172 
+<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="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="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>{
+<a name="l00186"></a>00186         <span class="keywordflow">for</span>( Index i = r.<a class="code" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin</a>(),  k = my_begin + i * my_step; i < r.<a class="code" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>(); i++, k = k + my_step)
+<a name="l00187"></a>00187             my_func( k );
+<a name="l00188"></a>00188     }
+<a name="l00189"></a>00189 };
+<a name="l00190"></a>00190 } <span class="comment">// namespace internal</span>
+<a name="l00192"></a>00192 <span class="comment"></span>
+<a name="l00193"></a>00193 <span class="keyword">namespace </span>strict_ppl {
+<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="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="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) {
+<a name="l00207"></a>00207         Index end = (last - first) / step;
+<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="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="l00224"></a>00224 
+</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/a00314.html b/doc/html/a00314.html
new file mode 100644
index 0000000..51fd807
--- /dev/null
+++ b/doc/html/a00314.html
@@ -0,0 +1,94 @@
+<!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>parallel_for_each.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>parallel_for_each.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_parallel_for_each_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_for_each_H</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include "parallel_do.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="l00029"></a>00029 <span class="keyword">namespace </span>internal {
+<a name="l00030"></a>00030     <span class="comment">// The class calls user function in operator()</span>
+<a name="l00031"></a>00031     <span class="keyword">template</span> <<span class="keyword">typename</span> Function, <span class="keyword">typename</span> Iterator>
+<a name="l00032"></a>00032     <span class="keyword">class </span>parallel_for_each_body : internal::no_assign {
+<a name="l00033"></a>00033         Function &my_func;
+<a name="l00034"></a>00034     <span class="keyword">public</span>:
+<a name="l00035"></a>00035         parallel_for_each_body(Function &_func) : my_func(_func) {}
+<a name="l00036"></a>00036         parallel_for_each_body(<span class="keyword">const</span> parallel_for_each_body<Function, Iterator> &_caller) : my_func(_caller.my_func) {}
+<a name="l00037"></a>00037 
+<a name="l00038"></a>00038         <span class="keywordtype">void</span> operator() ( <span class="keyword">typename</span> std::iterator_traits<Iterator>::value_type value )<span class="keyword"> const </span>{
+<a name="l00039"></a>00039             my_func(value);
+<a name="l00040"></a>00040         }
+<a name="l00041"></a>00041     };
+<a name="l00042"></a>00042 } <span class="comment">// namespace internal</span>
+<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="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="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="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="l00065"></a>00065 }
+<a name="l00066"></a>00066 
+<a name="l00068"></a>00068 
+<a name="l00069"></a>00069 } <span class="comment">// namespace</span>
+<a name="l00070"></a>00070 
+<a name="l00071"></a>00071 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_for_each_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/a00316.html b/doc/html/a00316.html
new file mode 100644
index 0000000..66fcbe0
--- /dev/null
+++ b/doc/html/a00316.html
@@ -0,0 +1,348 @@
+<!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>parallel_invoke.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>parallel_invoke.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_parallel_invoke_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_invoke_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="l00029"></a>00029 <span class="keyword">namespace </span>internal {
+<a name="l00030"></a>00030     <span class="comment">// Simple task object, executing user method</span>
+<a name="l00031"></a>00031     <span class="keyword">template</span><<span class="keyword">typename</span> function>
+<a name="l00032"></a>00032     <span class="keyword">class </span>function_invoker : <span class="keyword">public</span> task{
+<a name="l00033"></a>00033     <span class="keyword">public</span>:
+<a name="l00034"></a>00034         function_invoker(function& _function) : my_function(_function) {}
+<a name="l00035"></a>00035     <span class="keyword">private</span>:
+<a name="l00036"></a>00036         function &my_function;
+<a name="l00037"></a>00037         <span class="comment">/*override*/</span>
+<a name="l00038"></a>00038         task* execute()
+<a name="l00039"></a>00039         {
+<a name="l00040"></a>00040             my_function();
+<a name="l00041"></a>00041             <span class="keywordflow">return</span> NULL;
+<a name="l00042"></a>00042         }
+<a name="l00043"></a>00043     };
+<a name="l00044"></a>00044 
+<a name="l00045"></a>00045     <span class="comment">// The class spawns two or three child tasks</span>
+<a name="l00046"></a>00046     <span class="keyword">template</span> <size_t N, <span class="keyword">typename</span> function1, <span class="keyword">typename</span> function2, <span class="keyword">typename</span> function3>
+<a name="l00047"></a>00047     <span class="keyword">class </span>spawner : <span class="keyword">public</span> task {
+<a name="l00048"></a>00048     <span class="keyword">private</span>:
+<a name="l00049"></a>00049         function1& my_func1;
+<a name="l00050"></a>00050         function2& my_func2;
+<a name="l00051"></a>00051         function3& my_func3;
+<a name="l00052"></a>00052         <span class="keywordtype">bool</span> is_recycled;
+<a name="l00053"></a>00053 
+<a name="l00054"></a>00054         task* execute (){
+<a name="l00055"></a>00055             <span class="keywordflow">if</span>(is_recycled){
+<a name="l00056"></a>00056                 <span class="keywordflow">return</span> NULL;
+<a name="l00057"></a>00057             }<span class="keywordflow">else</span>{
+<a name="l00058"></a>00058                 __TBB_ASSERT(N==2 || N==3, <span class="stringliteral">"Number of arguments passed to spawner is wrong"</span>);
+<a name="l00059"></a>00059                 set_ref_count(N);
+<a name="l00060"></a>00060                 recycle_as_safe_continuation();
+<a name="l00061"></a>00061                 internal::function_invoker<function2>* invoker2 = <span class="keyword">new</span> (allocate_child()) internal::function_invoker<function2>(my_func2);
+<a name="l00062"></a>00062                 __TBB_ASSERT(invoker2, <span class="stringliteral">"Child task allocation failed"</span>);
+<a name="l00063"></a>00063                 spawn(*invoker2);
+<a name="l00064"></a>00064                 size_t n = N; <span class="comment">// To prevent compiler warnings</span>
+<a name="l00065"></a>00065                 <span class="keywordflow">if</span> (n>2) {
+<a name="l00066"></a>00066                     internal::function_invoker<function3>* invoker3 = <span class="keyword">new</span> (allocate_child()) internal::function_invoker<function3>(my_func3);
+<a name="l00067"></a>00067                     __TBB_ASSERT(invoker3, <span class="stringliteral">"Child task allocation failed"</span>);
+<a name="l00068"></a>00068                     spawn(*invoker3);
+<a name="l00069"></a>00069                 }
+<a name="l00070"></a>00070                 my_func1();
+<a name="l00071"></a>00071                 is_recycled = <span class="keyword">true</span>;
+<a name="l00072"></a>00072                 <span class="keywordflow">return</span> NULL;
+<a name="l00073"></a>00073             }
+<a name="l00074"></a>00074         } <span class="comment">// execute</span>
+<a name="l00075"></a>00075 
+<a name="l00076"></a>00076     <span class="keyword">public</span>:
+<a name="l00077"></a>00077         spawner(function1& _func1, function2& _func2, function3& _func3) : my_func1(_func1), my_func2(_func2), my_func3(_func3), is_recycled(false) {}
+<a name="l00078"></a>00078     };
+<a name="l00079"></a>00079 
+<a name="l00080"></a>00080     <span class="comment">// Creates and spawns child tasks</span>
+<a name="l00081"></a>00081     <span class="keyword">class </span>parallel_invoke_helper : <span class="keyword">public</span> empty_task {
+<a name="l00082"></a>00082     <span class="keyword">public</span>:
+<a name="l00083"></a>00083         <span class="comment">// Dummy functor class</span>
+<a name="l00084"></a>00084         <span class="keyword">class </span>parallel_invoke_noop {
+<a name="l00085"></a>00085         <span class="keyword">public</span>:
+<a name="l00086"></a>00086             <span class="keywordtype">void</span> operator() ()<span class="keyword"> const </span>{}
+<a name="l00087"></a>00087         };
+<a name="l00088"></a>00088         <span class="comment">// Creates a helper object with user-defined number of children expected</span>
+<a name="l00089"></a>00089         parallel_invoke_helper(<span class="keywordtype">int</span> number_of_children)
+<a name="l00090"></a>00090         {
+<a name="l00091"></a>00091             set_ref_count(number_of_children + 1);
+<a name="l00092"></a>00092         }
+<a name="l00093"></a>00093         <span class="comment">// Adds child task and spawns it</span>
+<a name="l00094"></a>00094         <span class="keyword">template</span> <<span class="keyword">typename</span> function>
+<a name="l00095"></a>00095         <span class="keywordtype">void</span> add_child (function &_func)
+<a name="l00096"></a>00096         {
+<a name="l00097"></a>00097             internal::function_invoker<function>* invoker = <span class="keyword">new</span> (allocate_child()) internal::function_invoker<function>(_func);
+<a name="l00098"></a>00098             __TBB_ASSERT(invoker, <span class="stringliteral">"Child task allocation failed"</span>);
+<a name="l00099"></a>00099             spawn(*invoker);
+<a name="l00100"></a>00100         }
+<a name="l00101"></a>00101 
+<a name="l00102"></a>00102         <span class="comment">// Adds a task with multiple child tasks and spawns it</span>
+<a name="l00103"></a>00103         <span class="comment">// two arguments</span>
+<a name="l00104"></a>00104         <span class="keyword">template</span> <<span class="keyword">typename</span> function1, <span class="keyword">typename</span> function2>
+<a name="l00105"></a>00105         <span class="keywordtype">void</span> add_children (function1& _func1, function2& _func2)
+<a name="l00106"></a>00106         {
+<a name="l00107"></a>00107             <span class="comment">// The third argument is dummy, it is ignored actually.</span>
+<a name="l00108"></a>00108             parallel_invoke_noop noop;
+<a name="l00109"></a>00109             internal::spawner<2, function1, function2, parallel_invoke_noop>& sub_root = *<span class="keyword">new</span>(allocate_child())internal::spawner<2, function1, function2, parallel_invoke_noop>(_func1, _func2, noop);
+<a name="l00110"></a>00110             spawn(sub_root);
+<a name="l00111"></a>00111         }
+<a name="l00112"></a>00112         <span class="comment">// three arguments</span>
+<a name="l00113"></a>00113         <span class="keyword">template</span> <<span class="keyword">typename</span> function1, <span class="keyword">typename</span> function2, <span class="keyword">typename</span> function3>
+<a name="l00114"></a>00114         <span class="keywordtype">void</span> add_children (function1& _func1, function2& _func2, function3& _func3)
+<a name="l00115"></a>00115         {
+<a name="l00116"></a>00116             internal::spawner<3, function1, function2, function3>& sub_root = *<span class="keyword">new</span>(allocate_child())internal::spawner<3, function1, function2, function3>(_func1, _func2, _func3);
+<a name="l00117"></a>00117             spawn(sub_root);
+<a name="l00118"></a>00118         }
+<a name="l00119"></a>00119 
+<a name="l00120"></a>00120         <span class="comment">// Waits for all child tasks</span>
+<a name="l00121"></a>00121         <span class="keyword">template</span> <<span class="keyword">typename</span> F0>
+<a name="l00122"></a>00122         <span class="keywordtype">void</span> run_and_finish(F0& f0)
+<a name="l00123"></a>00123         {
+<a name="l00124"></a>00124             internal::function_invoker<F0>* invoker = <span class="keyword">new</span> (allocate_child()) internal::function_invoker<F0>(f0);
+<a name="l00125"></a>00125             __TBB_ASSERT(invoker, <span class="stringliteral">"Child task allocation failed"</span>);
+<a name="l00126"></a>00126             spawn_and_wait_for_all(*invoker);
+<a name="l00127"></a>00127         }
+<a name="l00128"></a>00128     };
+<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="l00133"></a>00133         {}
+<a name="l00134"></a>00134         ~parallel_invoke_cleaner(){
+<a name="l00135"></a>00135             root.destroy(root);
+<a name="l00136"></a>00136         }
+<a name="l00137"></a>00137         internal::parallel_invoke_helper& root;
+<a name="l00138"></a>00138     };
+<a name="l00139"></a>00139 } <span class="comment">// namespace internal</span>
+<a name="l00141"></a>00141 <span class="comment"></span>
+<a name="l00145"></a>00145 
+<a name="l00146"></a>00146 
+<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="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 
+<a name="l00155"></a>00155     root.add_child(f1);
+<a name="l00156"></a>00156 
+<a name="l00157"></a>00157     root.run_and_finish(f0);
+<a name="l00158"></a>00158 }
+<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="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 
+<a name="l00166"></a>00166     root.add_child(f2);
+<a name="l00167"></a>00167     root.add_child(f1);
+<a name="l00168"></a>00168 
+<a name="l00169"></a>00169     root.run_and_finish(f0);
+<a name="l00170"></a>00170 }
+<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="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 
+<a name="l00178"></a>00178     root.add_child(f3);
+<a name="l00179"></a>00179     root.add_child(f2);
+<a name="l00180"></a>00180     root.add_child(f1);
+<a name="l00181"></a>00181 
+<a name="l00182"></a>00182     root.run_and_finish(f0);
+<a name="l00183"></a>00183 }
+<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="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 
+<a name="l00191"></a>00191     root.add_children(f4, f3);
+<a name="l00192"></a>00192     root.add_children(f2, f1);
+<a name="l00193"></a>00193 
+<a name="l00194"></a>00194     root.run_and_finish(f0);
+<a name="l00195"></a>00195 }
+<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="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 
+<a name="l00203"></a>00203     root.add_children(f5, f4, f3);
+<a name="l00204"></a>00204     root.add_children(f2, f1);
+<a name="l00205"></a>00205 
+<a name="l00206"></a>00206     root.run_and_finish(f0);
+<a name="l00207"></a>00207 }
+<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="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 
+<a name="l00215"></a>00215     root.add_children(f6, f5, f4);
+<a name="l00216"></a>00216     root.add_children(f3, f2, f1);
+<a name="l00217"></a>00217 
+<a name="l00218"></a>00218     root.run_and_finish(f0);
+<a name="l00219"></a>00219 }
+<a name="l00220"></a>00220 
+<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="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 
+<a name="l00228"></a>00228     root.add_children(f7, f6, f5);
+<a name="l00229"></a>00229     root.add_children(f4, f3);
+<a name="l00230"></a>00230     root.add_children(f2, f1);
+<a name="l00231"></a>00231 
+<a name="l00232"></a>00232     root.run_and_finish(f0);
+<a name="l00233"></a>00233 }
+<a name="l00234"></a>00234 
+<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="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 
+<a name="l00242"></a>00242     root.add_children(f8, f7, f6);
+<a name="l00243"></a>00243     root.add_children(f5, f4, f3);
+<a name="l00244"></a>00244     root.add_children(f2, f1);
+<a name="l00245"></a>00245 
+<a name="l00246"></a>00246     root.run_and_finish(f0);
+<a name="l00247"></a>00247 }
+<a name="l00248"></a>00248 
+<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="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 
+<a name="l00256"></a>00256     root.add_children(f9, f8, f7);
+<a name="l00257"></a>00257     root.add_children(f6, f5, f4);
+<a name="l00258"></a>00258     root.add_children(f3, f2, f1);
+<a name="l00259"></a>00259 
+<a name="l00260"></a>00260     root.run_and_finish(f0);
+<a name="l00261"></a>00261 }
+<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="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="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="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="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="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="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="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="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="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 }
+<a name="l00320"></a>00320 
+<a name="l00322"></a>00322 
+<a name="l00323"></a>00323 } <span class="comment">// namespace</span>
+<a name="l00324"></a>00324 
+<a name="l00325"></a>00325 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_invoke_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/a00322.html b/doc/html/a00322.html
new file mode 100644
index 0000000..00bed61
--- /dev/null
+++ b/doc/html/a00322.html
@@ -0,0 +1,359 @@
+<!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>parallel_reduce.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>parallel_reduce.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_parallel_reduce_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_reduce_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 "aligned_space.h"</span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include "partitioner.h"</span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include <new></span>
+<a name="l00028"></a>00028 
+<a name="l00029"></a>00029 <span class="keyword">namespace </span>tbb {
+<a name="l00030"></a>00030 
+<a name="l00032"></a>00032 <span class="keyword">namespace </span>internal {
+<a name="l00033"></a>00033 
+<a name="l00035"></a>00035     <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="l00036"></a>00036 
+<a name="l00038"></a>00038     <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="l00039"></a>00039 
+<a name="l00040"></a>00040     <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">inline</span> <span class="keywordtype">void</span> parallel_reduce_store_body( T*& dst, T* src ) {
+<a name="l00041"></a>00041 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00042"></a>00042 <span class="preprocessor"></span>        itt_store_pointer_with_release_v3(&dst,src);
+<a name="l00043"></a>00043 <span class="preprocessor">#else</span>
+<a name="l00044"></a>00044 <span class="preprocessor"></span>        __TBB_store_with_release(dst,src);
+<a name="l00045"></a>00045 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
+<a name="l00046"></a>00046     }
+<a name="l00047"></a>00047 
+<a name="l00048"></a>00048     <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">inline</span> T* parallel_reduce_load_body( T*& src ) {
+<a name="l00049"></a>00049 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00050"></a>00050 <span class="preprocessor"></span>        <span class="keywordflow">return</span> static_cast<T*>(itt_load_pointer_with_acquire_v3(&src));
+<a name="l00051"></a>00051 <span class="preprocessor">#else</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span>        <span class="keywordflow">return</span> __TBB_load_with_acquire(src);
+<a name="l00053"></a>00053 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
+<a name="l00054"></a>00054     }
+<a name="l00055"></a>00055 
+<a name="l00057"></a>00057 
+<a name="l00058"></a>00058     <span class="keyword">typedef</span> <span class="keywordtype">char</span> reduction_context;
+<a name="l00059"></a>00059 
+<a name="l00061"></a>00061 
+<a name="l00062"></a>00062     <span class="keyword">template</span><<span class="keyword">typename</span> Body>
+<a name="l00063"></a>00063     <span class="keyword">class </span>finish_reduce: <span class="keyword">public</span> task {
+<a name="l00065"></a>00065         Body* my_body;
+<a name="l00066"></a>00066         <span class="keywordtype">bool</span> has_right_zombie;
+<a name="l00067"></a>00067         <span class="keyword">const</span> reduction_context my_context;
+<a name="l00068"></a>00068         aligned_space<Body,1> zombie_space;
+<a name="l00069"></a>00069         finish_reduce( <span class="keywordtype">char</span> context ) : 
+<a name="l00070"></a>00070             my_body(NULL),
+<a name="l00071"></a>00071             has_right_zombie(false),
+<a name="l00072"></a>00072             my_context(context)
+<a name="l00073"></a>00073         {
+<a name="l00074"></a>00074         }
+<a name="l00075"></a>00075         task* execute() {
+<a name="l00076"></a>00076             <span class="keywordflow">if</span>( has_right_zombie ) {
+<a name="l00077"></a>00077                 <span class="comment">// Right child was stolen.</span>
+<a name="l00078"></a>00078                 Body* s = zombie_space.begin();
+<a name="l00079"></a>00079                 my_body->join( *s );
+<a name="l00080"></a>00080                 s->~Body();
+<a name="l00081"></a>00081             }
+<a name="l00082"></a>00082             <span class="keywordflow">if</span>( my_context==1 ) 
+<a name="l00083"></a>00083                 parallel_reduce_store_body( static_cast<finish_reduce*>(parent())->my_body, my_body );
+<a name="l00084"></a>00084             <span class="keywordflow">return</span> NULL;
+<a name="l00085"></a>00085         }       
+<a name="l00086"></a>00086         <span class="keyword">template</span><<span class="keyword">typename</span> Range,<span class="keyword">typename</span> Body_, <span class="keyword">typename</span> Partitioner>
+<a name="l00087"></a>00087         <span class="keyword">friend</span> <span class="keyword">class </span>start_reduce;
+<a name="l00088"></a>00088     };
+<a name="l00089"></a>00089 
+<a name="l00091"></a>00091 
+<a name="l00092"></a>00092     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
+<a name="l00093"></a>00093     <span class="keyword">class </span>start_reduce: <span class="keyword">public</span> task {
+<a name="l00094"></a>00094         <span class="keyword">typedef</span> finish_reduce<Body> finish_type;
+<a name="l00095"></a>00095         Body* my_body;
+<a name="l00096"></a>00096         Range my_range;
+<a name="l00097"></a>00097         <span class="keyword">typename</span> Partitioner::partition_type my_partition;
+<a name="l00098"></a>00098         reduction_context my_context;
+<a name="l00099"></a>00099         <span class="comment">/*override*/</span> task* execute();
+<a name="l00100"></a>00100         <span class="keyword">template</span><<span class="keyword">typename</span> Body_>
+<a name="l00101"></a>00101         <span class="keyword">friend</span> <span class="keyword">class </span>finish_reduce;
+<a name="l00102"></a>00102     
+<a name="l00104"></a>00104         start_reduce( <span class="keyword">const</span> Range& range, Body* body, Partitioner& partitioner ) :
+<a name="l00105"></a>00105             my_body(body),
+<a name="l00106"></a>00106             my_range(range),
+<a name="l00107"></a>00107             my_partition(partitioner),
+<a name="l00108"></a>00108             my_context(0)
+<a name="l00109"></a>00109         {
+<a name="l00110"></a>00110         }
+<a name="l00112"></a>00112 
+<a name="l00113"></a>00113         start_reduce( start_reduce& parent, split ) :
+<a name="l00114"></a>00114             my_body(parent.my_body),
+<a name="l00115"></a>00115             my_range(parent.my_range,split()),
+<a name="l00116"></a>00116             my_partition(parent.my_partition,split()),
+<a name="l00117"></a>00117             my_context(2)
+<a name="l00118"></a>00118         {
+<a name="l00119"></a>00119             my_partition.set_affinity(*<span class="keyword">this</span>);
+<a name="l00120"></a>00120             parent.my_context = 1;
+<a name="l00121"></a>00121         }
+<a name="l00123"></a>00123         <span class="comment">/*override*/</span> <span class="keywordtype">void</span> note_affinity( affinity_id <span class="keywordtype">id</span> ) {
+<a name="l00124"></a>00124             my_partition.note_affinity( <span class="keywordtype">id</span> );
+<a name="l00125"></a>00125         }
+<a name="l00126"></a>00126 
+<a name="l00127"></a>00127 <span class="keyword">public</span>:
+<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="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="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="l00144"></a>00144         }
+<a name="l00145"></a>00145 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00146"></a>00146     };
+<a name="l00147"></a>00147 
+<a name="l00148"></a>00148     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
+<a name="l00149"></a>00149     task* start_reduce<Range,Body,Partitioner>::execute() {
+<a name="l00150"></a>00150         <span class="keywordflow">if</span>( my_context==2 ) {
+<a name="l00151"></a>00151             finish_type* p = static_cast<finish_type*>(parent() );
+<a name="l00152"></a>00152             <span class="keywordflow">if</span>( !parallel_reduce_load_body(p->my_body) ) {
+<a name="l00153"></a>00153                 my_body = <span class="keyword">new</span>( p->zombie_space.begin() ) Body(*my_body,split());
+<a name="l00154"></a>00154                 p->has_right_zombie = <span class="keyword">true</span>;
+<a name="l00155"></a>00155             } 
+<a name="l00156"></a>00156         }
+<a name="l00157"></a>00157         <span class="keywordflow">if</span>( !my_range.is_divisible() || my_partition.should_execute_range(*<span class="keyword">this</span>) ) {
+<a name="l00158"></a>00158             (*my_body)( my_range );
+<a name="l00159"></a>00159             <span class="keywordflow">if</span>( my_context==1 ) 
+<a name="l00160"></a>00160                 parallel_reduce_store_body(static_cast<finish_type*>(parent())->my_body, my_body );
+<a name="l00161"></a>00161             <span class="keywordflow">return</span> my_partition.continue_after_execute_range(*<span class="keyword">this</span>);
+<a name="l00162"></a>00162         } <span class="keywordflow">else</span> {
+<a name="l00163"></a>00163             finish_type& c = *<span class="keyword">new</span>( allocate_continuation()) finish_type(my_context);
+<a name="l00164"></a>00164             recycle_as_child_of(c);
+<a name="l00165"></a>00165             c.set_ref_count(2);    
+<a name="l00166"></a>00166             <span class="keywordtype">bool</span> delay = my_partition.decide_whether_to_delay();
+<a name="l00167"></a>00167             start_reduce& b = *<span class="keyword">new</span>( c.allocate_child() ) start_reduce(*<span class="keyword">this</span>,split());
+<a name="l00168"></a>00168             my_partition.spawn_or_delay(delay,*<span class="keyword">this</span>,b);
+<a name="l00169"></a>00169             <span class="keywordflow">return</span> <span class="keyword">this</span>;
+<a name="l00170"></a>00170         }
+<a name="l00171"></a>00171     } 
+<a name="l00172"></a>00172 
+<a name="l00174"></a>00174 
+<a name="l00178"></a>00178     <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="l00179"></a>00179     <span class="keyword">class </span>lambda_reduce_body {
+<a name="l00180"></a>00180 
+<a name="l00181"></a>00181 <span class="comment">//FIXME: decide if my_real_body, my_reduction, and identity_element should be copied or referenced</span>
+<a name="l00182"></a>00182 <span class="comment">//       (might require some performance measurements)</span>
+<a name="l00183"></a>00183 
+<a name="l00184"></a>00184         <span class="keyword">const</span> Value&     identity_element;
+<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="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="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 
+</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/a00251.html b/doc/html/a00326.html
similarity index 92%
rename from doc/html/a00251.html
rename to doc/html/a00326.html
index 2fcce3a..460de7a 100644
--- a/doc/html/a00251.html
+++ b/doc/html/a00326.html
@@ -50,12 +50,12 @@
 <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="a00117.html">00033</a> <span class="keyword">struct </span><a class="code" href="a00117.html">pre_scan_tag</a> {
+<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="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 
 <a name="l00038"></a>00038 
-<a name="l00039"></a><a class="code" href="a00110.html">00039</a> <span class="keyword">struct </span><a class="code" href="a00110.html">final_scan_tag</a> {
+<a name="l00039"></a><a class="code" href="a00140.html">00039</a> <span class="keyword">struct </span><a class="code" href="a00140.html">final_scan_tag</a> {
 <a name="l00040"></a>00040     <span class="keyword">static</span> <span class="keywordtype">bool</span> is_final_scan() {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
 <a name="l00041"></a>00041 };
 <a name="l00042"></a>00042 
@@ -63,15 +63,15 @@
 <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="a00132.html">task</a> {
+<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="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>:
-<a name="l00053"></a>00053         <a class="code" href="a00092.html">aligned_space<Range,1></a> range;
+<a name="l00053"></a>00053         <a class="code" href="a00116.html">aligned_space<Range,1></a> range;
 <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="a00131.html">split</a>())
+<a name="l00058"></a>00058             body(body_,<a class="code" href="a00161.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="a00132.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="a00132.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="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="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="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( pass1 );
+<a name="l00233"></a>00233                 <a class="code" href="a00162.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="a00132.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *root );
+<a name="l00238"></a>00238                     <a class="code" href="a00162.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="a00132.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="a00162.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,20 +310,26 @@
 <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="a00183.html#gdf44892aacffa7360018e96ebdaae2ba">00321</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#gdf44892aacffa7360018e96ebdaae2ba">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00126.html">simple_partitioner</a>& partitioner=<a class="code" href="a00126.html">simple_partitioner</a>() ) {
-<a name="l00322"></a>00322     internal::start_scan<Range,Body,simple_partitioner>::run(range,body,partitioner);
+<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="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="a00183.html#g62fde400a37bbca1a2fddc8e3d22f556">00328</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#gdf44892aacffa7360018e96ebdaae2ba">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00095.html">auto_partitioner</a>& partitioner ) {
-<a name="l00329"></a>00329     internal::start_scan<Range,Body,auto_partitioner>::run(range,body,partitioner);
+<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="l00329"></a>00329     internal::start_scan<Range,Body,simple_partitioner>::run(range,body,partitioner);
 <a name="l00330"></a>00330 }
-<a name="l00332"></a>00332 
-<a name="l00333"></a>00333 } <span class="comment">// namespace tbb</span>
-<a name="l00334"></a>00334 
-<a name="l00335"></a>00335 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_scan_H */</span>
-<a name="l00336"></a>00336 
+<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="l00336"></a>00336     internal::start_scan<Range,Body,auto_partitioner>::run(range,body,partitioner);
+<a name="l00337"></a>00337 }
+<a name="l00339"></a>00339 
+<a name="l00340"></a>00340 } <span class="comment">// namespace tbb</span>
+<a name="l00341"></a>00341 
+<a name="l00342"></a>00342 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_scan_H */</span>
+<a name="l00343"></a>00343 
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00256.html b/doc/html/a00331.html
similarity index 95%
rename from doc/html/a00256.html
rename to doc/html/a00331.html
index d3892ff..e190654 100644
--- a/doc/html/a00256.html
+++ b/doc/html/a00331.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="a00132.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>();
+<a name="l00116"></a>00116         task &my_task = <a class="code" href="a00162.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="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">parallel_for</a>( blocked_range<RandomAccessIterator>(k+1, end),
+<a name="l00158"></a>00158     <a class="code" href="a00228.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="a00183.html#g2e90dde1b5dfe6cb03e64c7d7cd0d778">parallel_for</a>( quick_sort_range<RandomAccessIterator,Compare>(begin, end-begin, comp ), 
+<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="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="a00183.html#g49edcf9447cd91a9527a3f8e8512b7aa">00189</a> <span class="keywordtype">void</span> <a class="code" href="a00183.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( RandomAccessIterator begin, RandomAccessIterator end, <span class="keyword">const</span> Compare& comp) { 
+<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="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="a00183.html#g16c3eb77d0e530834c51ce3857f01012">00203</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00183.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( RandomAccessIterator begin, RandomAccessIterator end ) { 
-<a name="l00204"></a>00204     <a class="code" href="a00183.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="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="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="a00183.html#gc7576f82fdedc8a701a6c17ad9415926">00210</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00183.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( T * begin, T * end ) {
-<a name="l00211"></a>00211     <a class="code" href="a00183.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( begin, end, std::less< 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="l00212"></a>00212 }   
 <a name="l00214"></a>00214 
 <a name="l00215"></a>00215 
diff --git a/doc/html/a00260.html b/doc/html/a00335.html
similarity index 88%
rename from doc/html/a00260.html
rename to doc/html/a00335.html
index bac2afd..4b66f00 100644
--- a/doc/html/a00260.html
+++ b/doc/html/a00335.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="a00115.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="a00145.html">tbb::parallel_while</a><Body>;
 <a name="l00053"></a>00053     };
 <a name="l00054"></a>00054 
 <a name="l00056"></a>00056 
@@ -127,59 +127,59 @@
 <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="a00115.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="a00145.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="a00115.html">00129</a> <span class="keyword">class </span><a class="code" href="a00115.html">parallel_while</a>: internal::no_copy {
+<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="l00130"></a>00130 <span class="keyword">public</span>:
-<a name="l00132"></a><a class="code" href="a00115.html#36e26ba3880c7bcf804a97ba0cbe133f">00132</a>     <a class="code" href="a00115.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a>() : my_body(NULL), my_barrier(NULL) {}
+<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="l00133"></a>00133 
-<a name="l00135"></a><a class="code" href="a00115.html#6fcfc973cc56b79c6d0fbb8a31be7e84">00135</a>     <a class="code" href="a00115.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a>() {
+<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="l00136"></a>00136         <span class="keywordflow">if</span>( my_barrier ) {
-<a name="l00137"></a>00137             my_barrier-><a class="code" href="a00132.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(*my_barrier);    
+<a name="l00137"></a>00137             my_barrier-><a class="code" href="a00162.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="a00115.html#fa297e53d3af2a101e712bc200233e9c">00143</a>     <span class="keyword">typedef</span> <span class="keyword">typename</span> Body::argument_type <a class="code" href="a00115.html#fa297e53d3af2a101e712bc200233e9c">value_type</a>;
+<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="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="a00115.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="a00145.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="a00115.html#e131c560057a58229992b61eb8dba4c6">add</a>( <span class="keyword">const</span> <a class="code" href="a00115.html#fa297e53d3af2a101e712bc200233e9c">value_type</a>& item );
+<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="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;
-<a name="l00158"></a>00158     <a class="code" href="a00108.html">empty_task</a>* my_barrier;
+<a name="l00158"></a>00158     <a class="code" href="a00137.html">empty_task</a>* my_barrier;
 <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> 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="a00115.html#b32a0a6e5e09ebb7fad3e6652c19afe5">00163</a> <span class="keywordtype">void</span> <a class="code" href="a00115.html">parallel_while<Body>::run</a>( Stream& stream, <span class="keyword">const</span> Body& body ) {
+<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="l00164"></a>00164     <span class="keyword">using namespace </span>internal;
-<a name="l00165"></a>00165     <a class="code" href="a00108.html">empty_task</a>& barrier = *<span class="keyword">new</span>( <a class="code" href="a00132.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>() ) <a class="code" href="a00108.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="a00162.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="a00132.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="a00132.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a>() ) while_task<Stream,Body>( stream, body, barrier );
-<a name="l00170"></a>00170     my_barrier-><a class="code" href="a00132.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a>(w);
-<a name="l00171"></a>00171     my_barrier-><a class="code" href="a00132.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(*my_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="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="a00115.html#e131c560057a58229992b61eb8dba4c6">00177</a> <span class="keywordtype">void</span> <a class="code" href="a00115.html">parallel_while<Body>::add</a>( <span class="keyword">const</span> value_type& item ) {
+<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="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="a00132.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().<a class="code" href="a00132.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a>(*my_barrier) ) iteration_type(item,*my_body);
-<a name="l00181"></a>00181     <a class="code" href="a00132.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().<a class="code" href="a00132.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a>( i );
+<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="l00182"></a>00182 }
 <a name="l00183"></a>00183 
 <a name="l00184"></a>00184 } <span class="comment">// namespace </span>
diff --git a/doc/html/a00264.html b/doc/html/a00339.html
similarity index 70%
copy from doc/html/a00264.html
copy to doc/html/a00339.html
index 1a52b0a..341f2e5 100644
--- a/doc/html/a00264.html
+++ b/doc/html/a00339.html
@@ -52,7 +52,7 @@
 <a name="l00032"></a>00032 
 <a name="l00034"></a>00034 
 <a name="l00035"></a>00035 <span class="keyword">class </span>affinity_partitioner_base_v3: no_copy {
-<a name="l00036"></a>00036     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00091.html">tbb::affinity_partitioner</a>;
+<a name="l00036"></a>00036     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00115.html">tbb::affinity_partitioner</a>;
 <a name="l00038"></a>00038 
 <a name="l00039"></a>00039     affinity_id* my_array;
 <a name="l00041"></a>00041     size_t my_size;
@@ -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="a00132.html#d61bb32389d3857bf7511d69beaafb76">task::affinity_id</a> ) {}
+<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="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="a00126.html">00077</a> <span class="keyword">class </span><a class="code" href="a00126.html">simple_partitioner</a> {
+<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="l00078"></a>00078 <span class="keyword">public</span>:
-<a name="l00079"></a>00079     <a class="code" href="a00126.html">simple_partitioner</a>() {}
+<a name="l00079"></a>00079     <a class="code" href="a00156.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,16 +94,16 @@
 <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="a00132.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="a00126.html">simple_partitioner</a>& ) {}
-<a name="l00089"></a>00089         partition_type( <span class="keyword">const</span> partition_type&, <a class="code" href="a00131.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="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="l00090"></a>00090     };
 <a name="l00091"></a>00091 };
 <a name="l00092"></a>00092 
 <a name="l00094"></a>00094 
-<a name="l00097"></a><a class="code" href="a00095.html">00097</a> <span class="keyword">class </span><a class="code" href="a00095.html">auto_partitioner</a> {
+<a name="l00097"></a><a class="code" href="a00120.html">00097</a> <span class="keyword">class </span><a class="code" href="a00120.html">auto_partitioner</a> {
 <a name="l00098"></a>00098 <span class="keyword">public</span>:
-<a name="l00099"></a>00099     <a class="code" href="a00095.html">auto_partitioner</a>() {}
+<a name="l00099"></a>00099     <a class="code" href="a00120.html">auto_partitioner</a>() {}
 <a name="l00100"></a>00100 
 <a name="l00101"></a>00101 <span class="keyword">private</span>:
 <a name="l00102"></a>00102     <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;
@@ -114,112 +114,113 @@
 <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="a00132.html">task</a> &t) {
-<a name="l00111"></a>00111             <span class="keywordflow">if</span>( num_chunks<VICTIM_CHUNKS && t.<a class="code" href="a00132.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="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="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="a00095.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="a00131.html">split</a> ) {
+<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="l00117"></a>00117             num_chunks = pt.num_chunks /= 2u;
 <a name="l00118"></a>00118         }
 <a name="l00119"></a>00119     };
 <a name="l00120"></a>00120 };
 <a name="l00121"></a>00121 
-<a name="l00123"></a><a class="code" href="a00091.html">00123</a> <span class="keyword">class </span><a class="code" href="a00091.html">affinity_partitioner</a>: internal::affinity_partitioner_base_v3 {
+<a name="l00123"></a><a class="code" href="a00115.html">00123</a> <span class="keyword">class </span><a class="code" href="a00115.html">affinity_partitioner</a>: internal::affinity_partitioner_base_v3 {
 <a name="l00124"></a>00124 <span class="keyword">public</span>:
-<a name="l00125"></a>00125     <a class="code" href="a00091.html">affinity_partitioner</a>() {}
+<a name="l00125"></a>00125     <a class="code" href="a00115.html">affinity_partitioner</a>() {}
 <a name="l00126"></a>00126 
 <a name="l00127"></a>00127 <span class="keyword">private</span>:
 <a name="l00128"></a>00128     <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="l00129"></a>00129     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body> <span class="keyword">friend</span> <span class="keyword">class </span>internal::start_reduce_with_affinity;
-<a name="l00130"></a>00130     <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_scan;
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132     <span class="keyword">typedef</span> internal::affinity_partition_type partition_type;
-<a name="l00133"></a>00133     <span class="keyword">friend</span> <span class="keyword">class </span>internal::affinity_partition_type;
-<a name="l00134"></a>00134 };
-<a name="l00135"></a>00135 
-<a name="l00137"></a>00137 <span class="keyword">namespace </span>internal {
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139 <span class="keyword">class </span>affinity_partition_type: <span class="keyword">public</span> no_copy {
-<a name="l00141"></a>00141     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> factor = 16;
-<a name="l00142"></a>00142     <span class="keyword">static</span> <span class="keyword">const</span> size_t VICTIM_CHUNKS = 4;
-<a name="l00143"></a>00143 
-<a name="l00144"></a>00144     internal::affinity_id* my_array;
-<a name="l00145"></a>00145     <a class="code" href="a00134.html">task_list</a> delay_list;
-<a name="l00146"></a>00146     <span class="keywordtype">unsigned</span> map_begin, map_end;
-<a name="l00147"></a>00147     size_t num_chunks;
-<a name="l00148"></a>00148 <span class="keyword">public</span>:
-<a name="l00149"></a>00149     affinity_partition_type( <a class="code" href="a00091.html">affinity_partitioner</a>& ap ) {
-<a name="l00150"></a>00150         __TBB_ASSERT( (factor&(factor-1))==0, <span class="stringliteral">"factor must be power of two"</span> ); 
-<a name="l00151"></a>00151         ap.resize(factor);
-<a name="l00152"></a>00152         my_array = ap.my_array;
-<a name="l00153"></a>00153         map_begin = 0;
-<a name="l00154"></a>00154         map_end = unsigned(ap.my_size);
-<a name="l00155"></a>00155         num_chunks = internal::get_initial_auto_partitioner_divisor();
-<a name="l00156"></a>00156     }
-<a name="l00157"></a>00157     affinity_partition_type(affinity_partition_type& p, split) : my_array(p.my_array) {
-<a name="l00158"></a>00158         __TBB_ASSERT( p.map_end-p.map_begin<factor || (p.map_end-p.map_begin)%factor==0, NULL );
-<a name="l00159"></a>00159         num_chunks = p.num_chunks /= 2;
-<a name="l00160"></a>00160         <span class="keywordtype">unsigned</span> e = p.map_end;
-<a name="l00161"></a>00161         <span class="keywordtype">unsigned</span> d = (e - p.map_begin)/2;
-<a name="l00162"></a>00162         <span class="keywordflow">if</span>( d>factor ) 
-<a name="l00163"></a>00163             d &= 0u-factor;
-<a name="l00164"></a>00164         map_end = e;
-<a name="l00165"></a>00165         map_begin = p.map_end = e-d;
-<a name="l00166"></a>00166     }
-<a name="l00167"></a>00167 
-<a name="l00168"></a>00168     <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> task &t) {
-<a name="l00169"></a>00169         <span class="keywordflow">if</span>( num_chunks < VICTIM_CHUNKS && t.is_stolen_task() )
-<a name="l00170"></a>00170             num_chunks = VICTIM_CHUNKS;
-<a name="l00171"></a>00171         <span class="keywordflow">return</span> num_chunks == 1;
-<a name="l00172"></a>00172     }
-<a name="l00173"></a>00173 
-<a name="l00174"></a>00174     <span class="keywordtype">void</span> set_affinity( task &t ) {
-<a name="l00175"></a>00175         <span class="keywordflow">if</span>( map_begin<map_end )
-<a name="l00176"></a>00176             t.set_affinity( my_array[map_begin] );
-<a name="l00177"></a>00177     }
-<a name="l00178"></a>00178     <span class="keywordtype">void</span> note_affinity( <a class="code" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">task::affinity_id</a> <span class="keywordtype">id</span> ) {
-<a name="l00179"></a>00179         <span class="keywordflow">if</span>( map_begin<map_end ) 
-<a name="l00180"></a>00180             my_array[map_begin] = id;
-<a name="l00181"></a>00181     }
-<a name="l00182"></a>00182     task* continue_after_execute_range( task& t ) {
-<a name="l00183"></a>00183         task* first = NULL;
-<a name="l00184"></a>00184         <span class="keywordflow">if</span>( !delay_list.empty() ) {
-<a name="l00185"></a>00185             first = &delay_list.pop_front();
-<a name="l00186"></a>00186             <span class="keywordflow">while</span>( !delay_list.empty() ) {
-<a name="l00187"></a>00187                 t.spawn(*first);
-<a name="l00188"></a>00188                 first = &delay_list.pop_front();
-<a name="l00189"></a>00189             }
-<a name="l00190"></a>00190         }
-<a name="l00191"></a>00191         <span class="keywordflow">return</span> first;
-<a name="l00192"></a>00192     }
-<a name="l00193"></a>00193     <span class="keywordtype">bool</span> decide_whether_to_delay() {
-<a name="l00194"></a>00194         <span class="comment">// The possible underflow caused by "-1u" is deliberate</span>
-<a name="l00195"></a>00195         <span class="keywordflow">return</span> (map_begin&(factor-1))==0 && map_end-map_begin-1u<factor;
-<a name="l00196"></a>00196     }
-<a name="l00197"></a>00197     <span class="keywordtype">void</span> spawn_or_delay( <span class="keywordtype">bool</span> delay, task& a, task& b ) {
-<a name="l00198"></a>00198         <span class="keywordflow">if</span>( delay )  
-<a name="l00199"></a>00199             delay_list.push_back(b);
-<a name="l00200"></a>00200         <span class="keywordflow">else</span> 
-<a name="l00201"></a>00201             a.spawn(b);
-<a name="l00202"></a>00202     }
-<a name="l00203"></a>00203 
-<a name="l00204"></a>00204     ~affinity_partition_type() {
-<a name="l00205"></a>00205         <span class="comment">// The delay_list can be non-empty if an exception is thrown.</span>
-<a name="l00206"></a>00206         <span class="keywordflow">while</span>( !delay_list.empty() ) {
-<a name="l00207"></a>00207             task& t = delay_list.pop_front();
-<a name="l00208"></a>00208             t.destroy(t);
-<a name="l00209"></a>00209         } 
-<a name="l00210"></a>00210     }
-<a name="l00211"></a>00211 };
-<a name="l00212"></a>00212 
-<a name="l00213"></a>00213 } <span class="comment">// namespace internal</span>
-<a name="l00215"></a>00215 <span class="comment"></span>
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217 } <span class="comment">// namespace tbb</span>
-<a name="l00218"></a>00218 
-<a name="l00219"></a>00219 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_partitioner_H */</span>
+<a name="l00129"></a>00129     <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;
+<a name="l00130"></a>00130     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body> <span class="keyword">friend</span> <span class="keyword">class </span>internal::start_reduce_with_affinity;
+<a name="l00131"></a>00131     <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_scan;
+<a name="l00132"></a>00132 
+<a name="l00133"></a>00133     <span class="keyword">typedef</span> internal::affinity_partition_type partition_type;
+<a name="l00134"></a>00134     <span class="keyword">friend</span> <span class="keyword">class </span>internal::affinity_partition_type;
+<a name="l00135"></a>00135 };
+<a name="l00136"></a>00136 
+<a name="l00138"></a>00138 <span class="keyword">namespace </span>internal {
+<a name="l00139"></a>00139 
+<a name="l00140"></a>00140 <span class="keyword">class </span>affinity_partition_type: <span class="keyword">public</span> no_copy {
+<a name="l00142"></a>00142     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> factor = 16;
+<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="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>:
+<a name="l00150"></a>00150     affinity_partition_type( <a class="code" href="a00115.html">affinity_partitioner</a>& ap ) {
+<a name="l00151"></a>00151         __TBB_ASSERT( (factor&(factor-1))==0, <span class="stringliteral">"factor must be power of two"</span> ); 
+<a name="l00152"></a>00152         ap.resize(factor);
+<a name="l00153"></a>00153         my_array = ap.my_array;
+<a name="l00154"></a>00154         map_begin = 0;
+<a name="l00155"></a>00155         map_end = unsigned(ap.my_size);
+<a name="l00156"></a>00156         num_chunks = internal::get_initial_auto_partitioner_divisor();
+<a name="l00157"></a>00157     }
+<a name="l00158"></a>00158     affinity_partition_type(affinity_partition_type& p, split) : my_array(p.my_array) {
+<a name="l00159"></a>00159         __TBB_ASSERT( p.map_end-p.map_begin<factor || (p.map_end-p.map_begin)%factor==0, NULL );
+<a name="l00160"></a>00160         num_chunks = p.num_chunks /= 2;
+<a name="l00161"></a>00161         <span class="keywordtype">unsigned</span> e = p.map_end;
+<a name="l00162"></a>00162         <span class="keywordtype">unsigned</span> d = (e - p.map_begin)/2;
+<a name="l00163"></a>00163         <span class="keywordflow">if</span>( d>factor ) 
+<a name="l00164"></a>00164             d &= 0u-factor;
+<a name="l00165"></a>00165         map_end = e;
+<a name="l00166"></a>00166         map_begin = p.map_end = e-d;
+<a name="l00167"></a>00167     }
+<a name="l00168"></a>00168 
+<a name="l00169"></a>00169     <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> task &t) {
+<a name="l00170"></a>00170         <span class="keywordflow">if</span>( num_chunks < VICTIM_CHUNKS && t.is_stolen_task() )
+<a name="l00171"></a>00171             num_chunks = VICTIM_CHUNKS;
+<a name="l00172"></a>00172         <span class="keywordflow">return</span> num_chunks == 1;
+<a name="l00173"></a>00173     }
+<a name="l00174"></a>00174 
+<a name="l00175"></a>00175     <span class="keywordtype">void</span> set_affinity( task &t ) {
+<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="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     }
+<a name="l00183"></a>00183     task* continue_after_execute_range( task& t ) {
+<a name="l00184"></a>00184         task* first = NULL;
+<a name="l00185"></a>00185         <span class="keywordflow">if</span>( !delay_list.empty() ) {
+<a name="l00186"></a>00186             first = &delay_list.pop_front();
+<a name="l00187"></a>00187             <span class="keywordflow">while</span>( !delay_list.empty() ) {
+<a name="l00188"></a>00188                 t.spawn(*first);
+<a name="l00189"></a>00189                 first = &delay_list.pop_front();
+<a name="l00190"></a>00190             }
+<a name="l00191"></a>00191         }
+<a name="l00192"></a>00192         <span class="keywordflow">return</span> first;
+<a name="l00193"></a>00193     }
+<a name="l00194"></a>00194     <span class="keywordtype">bool</span> decide_whether_to_delay() {
+<a name="l00195"></a>00195         <span class="comment">// The possible underflow caused by "-1u" is deliberate</span>
+<a name="l00196"></a>00196         <span class="keywordflow">return</span> (map_begin&(factor-1))==0 && map_end-map_begin-1u<factor;
+<a name="l00197"></a>00197     }
+<a name="l00198"></a>00198     <span class="keywordtype">void</span> spawn_or_delay( <span class="keywordtype">bool</span> delay, task& a, task& b ) {
+<a name="l00199"></a>00199         <span class="keywordflow">if</span>( delay )  
+<a name="l00200"></a>00200             delay_list.push_back(b);
+<a name="l00201"></a>00201         <span class="keywordflow">else</span> 
+<a name="l00202"></a>00202             a.spawn(b);
+<a name="l00203"></a>00203     }
+<a name="l00204"></a>00204 
+<a name="l00205"></a>00205     ~affinity_partition_type() {
+<a name="l00206"></a>00206         <span class="comment">// The delay_list can be non-empty if an exception is thrown.</span>
+<a name="l00207"></a>00207         <span class="keywordflow">while</span>( !delay_list.empty() ) {
+<a name="l00208"></a>00208             task& t = delay_list.pop_front();
+<a name="l00209"></a>00209             t.destroy(t);
+<a name="l00210"></a>00210         } 
+<a name="l00211"></a>00211     }
+<a name="l00212"></a>00212 };
+<a name="l00213"></a>00213 
+<a name="l00214"></a>00214 } <span class="comment">// namespace internal</span>
+<a name="l00216"></a>00216 <span class="comment"></span>
+<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_partitioner_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00344.html b/doc/html/a00344.html
new file mode 100644
index 0000000..181fbc8
--- /dev/null
+++ b/doc/html/a00344.html
@@ -0,0 +1,237 @@
+<!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/a00270.html b/doc/html/a00345.html
similarity index 83%
rename from doc/html/a00270.html
rename to doc/html/a00345.html
index 94646d9..db30309 100644
--- a/doc/html/a00270.html
+++ b/doc/html/a00345.html
@@ -49,9 +49,9 @@
 <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="a00118.html">00032</a> <span class="keyword">class </span><a class="code" href="a00118.html">queuing_mutex</a> {
+<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="a00118.html#b389ad9c4db7293e4bdb5b8cda69ec04">00035</a>     <a class="code" href="a00118.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a>() {
+<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();
@@ -59,37 +59,37 @@
 <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="a00119.html">00045</a>     <span class="keyword">class </span><a class="code" href="a00119.html">scoped_lock</a>: internal::no_copy {
+<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="a00112.html">mutex</a> = NULL;
+<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="a00119.html#db0fa3967491014572e24d6607bdc971">00056</a>         <a class="code" href="a00119.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a>() {initialize();}
+<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="a00119.html#9b51ef972f5618ac17caadb58841ab6d">00060</a>         <a class="code" href="a00119.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a>( <a class="code" href="a00118.html">queuing_mutex</a>& m ) {
+<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="a00119.html#533e4fc8355ee321206a0609c42d909d">acquire</a>(m);
+<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="a00119.html#ac2c576a93570957d694192a5f491443">00066</a>         <a class="code" href="a00119.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a>() {
-<a name="l00067"></a>00067             <span class="keywordflow">if</span>( <a class="code" href="a00112.html">mutex</a> ) <a class="code" href="a00119.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a>();
+<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="a00119.html#533e4fc8355ee321206a0609c42d909d">acquire</a>( <a class="code" href="a00118.html">queuing_mutex</a>& m );
+<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="a00119.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a>( <a class="code" href="a00118.html">queuing_mutex</a>& m );
+<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="a00119.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a>();
+<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="a00118.html">queuing_mutex</a>* <a class="code" href="a00112.html">mutex</a>;
+<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="a00119.html">scoped_lock</a> *next;
+<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;
@@ -104,7 +104,7 @@
 <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="a00093.html">atomic<scoped_lock*></a> q_tail;
+<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 
diff --git a/doc/html/a00271.html b/doc/html/a00346.html
similarity index 84%
rename from doc/html/a00271.html
rename to doc/html/a00346.html
index 0b6a33a..0997a93 100644
--- a/doc/html/a00271.html
+++ b/doc/html/a00346.html
@@ -49,16 +49,16 @@
 <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="a00120.html">00034</a> <span class="keyword">class </span><a class="code" href="a00120.html">queuing_rw_mutex</a> {
+<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="a00120.html#85c90877c3447690ac4e2ac4ff8dea5e">00037</a>     <a class="code" href="a00120.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_mutex</a>() {
+<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="a00120.html#1ba73e3d95cfdf8323880bc623af9099">00045</a>     <a class="code" href="a00120.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</a>() {
+<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>
@@ -68,9 +68,9 @@
 <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="a00121.html">00057</a>     <span class="keyword">class </span><a class="code" href="a00121.html">scoped_lock</a>: internal::no_copy {
+<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="a00112.html">mutex</a> = NULL;
+<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);
@@ -79,37 +79,37 @@
 <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="a00121.html#c62e365be7bcbba091c9ea7454a4d22c">00070</a>         <a class="code" href="a00121.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>() {initialize();}
+<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="a00121.html#fbb8798792d3aebb136c46fc63d2529e">00074</a>         <a class="code" href="a00121.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>( <a class="code" href="a00120.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> ) {
+<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="a00121.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>(m,write);
+<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="a00121.html#32c7d67a660d23ebbaab1a1d2826d31a">00080</a>         <a class="code" href="a00121.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a>() {
-<a name="l00081"></a>00081             <span class="keywordflow">if</span>( <a class="code" href="a00112.html">mutex</a> ) <a class="code" href="a00121.html#67ae221109ddc69510ab593874e435d4">release</a>();
+<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="a00121.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>( <a class="code" href="a00120.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> );
+<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="a00121.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a>( <a class="code" href="a00120.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> );
+<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="a00121.html#67ae221109ddc69510ab593874e435d4">release</a>();
+<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="a00121.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a>();
+<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="a00121.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a>();
+<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="a00120.html">queuing_rw_mutex</a>* <a class="code" href="a00112.html">mutex</a>;
+<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="a00121.html">scoped_lock</a> * prev, * next;
+<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="a00093.html">atomic<state_t></a> state;
+<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;
@@ -136,7 +136,7 @@
 <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="a00093.html">atomic<scoped_lock*></a> q_tail;
+<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 
diff --git a/doc/html/a00347.html b/doc/html/a00347.html
new file mode 100644
index 0000000..e53eed0
--- /dev/null
+++ b/doc/html/a00347.html
@@ -0,0 +1,247 @@
+<!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>
+<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>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>
+<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_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">#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="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="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="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="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="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="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="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.
+<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/a00273.html b/doc/html/a00348.html
similarity index 86%
rename from doc/html/a00273.html
rename to doc/html/a00348.html
index 1067224..b97bcfa 100644
--- a/doc/html/a00273.html
+++ b/doc/html/a00348.html
@@ -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="a00167.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>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>
 <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>
@@ -59,21 +59,21 @@
 <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="a00185.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a> (size_t size);
+<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="a00185.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a> (<span class="keywordtype">void</span>* ptr);
+<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="a00185.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_realloc</a> (<span class="keywordtype">void</span>* ptr, size_t size);
+<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="a00185.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_calloc</a> (size_t nobj, size_t size);
+<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="l00057"></a>00057 
-<a name="l00060"></a>00060 <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00185.html#g05dcec987480bb2c82ecdead6a085899">scalable_posix_memalign</a> (<span class="keywordtype">void</span>** memptr, size_t alignment, size_t size);
+<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="a00185.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_aligned_malloc</a> (size_t size, size_t alignment);
+<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="a00185.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_aligned_realloc</a> (<span class="keywordtype">void</span>* ptr, size_t size, size_t alignment);
+<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="l00069"></a>00069 
-<a name="l00072"></a>00072 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC <a class="code" href="a00185.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</a> (<span class="keywordtype">void</span>* ptr);
+<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>
@@ -103,7 +103,7 @@
 <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="a00124.html">00105</a> <span class="keyword">class </span><a class="code" href="a00124.html">scalable_allocator</a> {
+<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;
@@ -113,25 +113,25 @@
 <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="a00124.html">scalable_allocator<U></a> other;
+<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="a00124.html">scalable_allocator</a>() <span class="keywordflow">throw</span>() {}
-<a name="l00119"></a>00119     <a class="code" href="a00124.html">scalable_allocator</a>( <span class="keyword">const</span> <a class="code" href="a00124.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="a00124.html">scalable_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00124.html">scalable_allocator<U></a>&) <span class="keywordflow">throw</span>() {}
+<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="a00124.html#726b1586d05d44665a36e1c7b2699bfd">00126</a>     pointer <a class="code" href="a00124.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="a00185.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a>( n * <span class="keyword">sizeof</span>(value_type) ) );
+<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="a00124.html#f806a238c18cbcfb531e1e0a0d2ec59d">00131</a>     <span class="keywordtype">void</span> <a class="code" href="a00124.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a>( pointer p, size_type ) {
-<a name="l00132"></a>00132         <a class="code" href="a00185.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a>( p );
+<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="a00124.html#880e766f1d913988c21973dbdd874fd5">00136</a>     size_type <a class="code" href="a00124.html#880e766f1d913988c21973dbdd874fd5">max_size</a>() const throw() {
+<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     }
@@ -145,18 +145,18 @@
 <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="a00125.html">00151</a> <span class="keyword">class </span><a class="code" href="a00124.html">scalable_allocator</a><void> {
+<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="a00124.html">scalable_allocator<U></a> other;
+<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="a00124.html">scalable_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00124.html">scalable_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
+<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>;}
@@ -175,15 +175,17 @@
 <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><span class="preprocessor">#endif</span>
-<a name="l00182"></a>00182 <span class="preprocessor"></span>
-<a name="l00183"></a>00183 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
-<a name="l00184"></a>00184 
-<a name="l00185"></a>00185 <span class="preprocessor">#if !defined(__cplusplus) && __ICC==1100</span>
-<a name="l00186"></a>00186 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00187"></a>00187 <span class="preprocessor"></span><span class="preprocessor">#endif // ICC 11.0 warning 991 is back</span>
-<a name="l00188"></a>00188 <span class="preprocessor"></span>
-<a name="l00189"></a>00189 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_scalable_allocator_H */</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>
 </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
new file mode 100644
index 0000000..2deb090
--- /dev/null
+++ b/doc/html/a00349.html
@@ -0,0 +1,192 @@
+<!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>
+<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>spin_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_spin_mutex_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_spin_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="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="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="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="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="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="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="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="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="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>
+</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/a00275.html b/doc/html/a00350.html
similarity index 69%
rename from doc/html/a00275.html
rename to doc/html/a00350.html
index a564271..cc37f5d 100644
--- a/doc/html/a00275.html
+++ b/doc/html/a00350.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="a00129.html">00035</a> <span class="keyword">class </span><a class="code" href="a00129.html">spin_rw_mutex_v3</a> {
+<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="l00040"></a>00040 
@@ -73,88 +73,88 @@
 <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="a00129.html#61332b2756de89f3f5f69310cbb6e70c">00067</a>     <a class="code" href="a00129.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a>() : state(0) {
+<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="a00129.html#9a815fb2759e55072ed413f1b6970cf3">00075</a> <span class="preprocessor">    ~spin_rw_mutex_v3() {</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="a00130.html">00083</a>     <span class="keyword">class </span><a class="code" href="a00130.html">scoped_lock</a> : internal::no_copy {
+<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="a00130.html#d6ea60dee5563f702379bf5e51aa8806">00087</a>         <a class="code" href="a00130.html">scoped_lock</a>() : <a class="code" href="a00112.html">mutex</a>(NULL) {}
+<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="a00130.html#42a92d4f8fdde425b111cfa8a9228071">00091</a>         <a class="code" href="a00130.html">scoped_lock</a>( <a class="code" href="a00129.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) : <a class="code" href="a00112.html">mutex</a>(NULL) {
-<a name="l00092"></a>00092             <a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>(m, write);
+<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="l00094"></a>00094 
-<a name="l00096"></a><a class="code" href="a00130.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">00096</a>         ~<a class="code" href="a00130.html">scoped_lock</a>() {
-<a name="l00097"></a>00097             <span class="keywordflow">if</span>( <a class="code" href="a00112.html">mutex</a> ) <a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>();
+<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="a00130.html#b0b646ec5be02a127d159bbb7ca65353">00101</a>         <span class="keywordtype">void</span> <a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( <a class="code" href="a00129.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="a00112.html">mutex</a>, <span class="stringliteral">"holding mutex already"</span> );
+<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="a00112.html">mutex</a> = &m;
-<a name="l00105"></a>00105             <span class="keywordflow">if</span>( write ) <a class="code" href="a00112.html">mutex</a>->internal_acquire_writer();
-<a name="l00106"></a>00106             <span class="keywordflow">else</span>        <a class="code" href="a00112.html">mutex</a>->internal_acquire_reader();
+<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="l00107"></a>00107         }
 <a name="l00108"></a>00108 
 <a name="l00110"></a>00110 
-<a name="l00111"></a><a class="code" href="a00130.html#3f0b1e3f2efab63336400348bd070226">00111</a>         <span class="keywordtype">bool</span> upgrade_to_writer() {
-<a name="l00112"></a>00112             __TBB_ASSERT( <a class="code" href="a00112.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
+<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="a00112.html">mutex</a>->internal_upgrade();
+<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="a00130.html#61b14d00a78185c9b2d206ebfc379124">00119</a>         <span class="keywordtype">void</span> <a class="code" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {
-<a name="l00120"></a>00120             __TBB_ASSERT( <a class="code" href="a00112.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
-<a name="l00121"></a>00121             <a class="code" href="a00129.html">spin_rw_mutex</a> *m = <a class="code" href="a00112.html">mutex</a>; 
-<a name="l00122"></a>00122             <a class="code" href="a00112.html">mutex</a> = NULL;
+<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="a00129.html#621b900d5fef23d2e401aabcbb777c76">state</a>, READERS ); 
-<a name="l00128"></a>00128             <span class="keywordflow">else</span>            __TBB_FetchAndAddWrelease( &m-><a class="code" href="a00129.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="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="a00130.html#c2c2c38a08cb9080e87099fac3e5bc94">00133</a>         <span class="keywordtype">bool</span> downgrade_to_reader() {
+<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="a00112.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</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="a00112.html">mutex</a>->internal_downgrade();
+<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="a00112.html">mutex</a>->state, ((intptr_t)ONE_READER-WRITER));
+<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="a00130.html#9879626968d9b9a04cd2ec0fb2e84ae1">00147</a>         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00129.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="a00112.html">mutex</a>, <span class="stringliteral">"holding mutex already"</span> );
+<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="a00112.html">mutex</a> = &m;
+<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="a00129.html">spin_rw_mutex</a>* <a class="code" href="a00112.html">mutex</a>;
+<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;
@@ -165,24 +165,48 @@
 <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="keyword">private</span>:
-<a name="l00173"></a>00173     <span class="keyword">typedef</span> intptr_t state_t;
-<a name="l00174"></a>00174     <span class="keyword">static</span> <span class="keyword">const</span> state_t WRITER = 1;
-<a name="l00175"></a>00175     <span class="keyword">static</span> <span class="keyword">const</span> state_t WRITER_PENDING = 2;
-<a name="l00176"></a>00176     <span class="keyword">static</span> <span class="keyword">const</span> state_t READERS = ~(WRITER | WRITER_PENDING);
-<a name="l00177"></a>00177     <span class="keyword">static</span> <span class="keyword">const</span> state_t ONE_READER = 4;
-<a name="l00178"></a>00178     <span class="keyword">static</span> <span class="keyword">const</span> state_t BUSY = WRITER | READERS;
+<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="l00183"></a>00183     state_t state;
-<a name="l00184"></a>00184 
-<a name="l00185"></a>00185     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
-<a name="l00186"></a>00186 };
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188 __TBB_DEFINE_PROFILING_SET_NAME(spin_rw_mutex)
-<a name="l00189"></a>00189 
-<a name="l00190"></a>00190 } <span class="comment">// namespace tbb</span>
+<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="preprocessor">#endif </span><span class="comment">/* __TBB_spin_rw_mutex_H */</span>
+<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="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>
 </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
new file mode 100644
index 0000000..c562166
--- /dev/null
+++ b/doc/html/a00351.html
@@ -0,0 +1,656 @@
+<!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="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="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="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="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="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="l00172"></a>00172 
+<a name="l00173"></a>00173         affinity_id affinity;
+<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>
+</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
new file mode 100644
index 0000000..7b69551
--- /dev/null
+++ b/doc/html/a00360.html
@@ -0,0 +1,242 @@
+<!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/a00285.html b/doc/html/a00368.html
similarity index 84%
rename from doc/html/a00285.html
rename to doc/html/a00368.html
index 29c28de..e2cc58d 100644
--- a/doc/html/a00285.html
+++ b/doc/html/a00368.html
@@ -54,35 +54,35 @@
 <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="a00135.html">00042</a> <span class="keyword">class </span><a class="code" href="a00135.html">task_scheduler_init</a>: internal::no_copy {
+<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="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">00048</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> = -1;
+<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="a00135.html#e6c860f1e559026ff3ef4599c0d6c514">00051</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="a00135.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a> = -2;
+<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="a00135.html#d476053cc712e572554823492a5229ce">initialize</a>( <span class="keywordtype">int</span> number_of_threads=<a class="code" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> );
+<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="a00135.html#d476053cc712e572554823492a5229ce">initialize</a>( <span class="keywordtype">int</span> number_of_threads, stack_size_type thread_stack_size );
+<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="a00135.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>();
+<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="a00135.html#421600bf9bf9338bcf937063f2ff0e90">00072</a>     <a class="code" href="a00135.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a>( <span class="keywordtype">int</span> number_of_threads=<a class="code" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>, stack_size_type thread_stack_size=0 ) : my_scheduler(NULL)  {
-<a name="l00073"></a>00073         <a class="code" href="a00135.html#d476053cc712e572554823492a5229ce">initialize</a>( number_of_threads, thread_stack_size );
+<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="a00135.html#4da6c86292d80c703a66c1f6f5299488">00077</a>     <a class="code" href="a00135.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a>() {
+<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="a00135.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>();
+<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="a00135.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a> ();
+<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="a00135.html#12752282977029f23416642bc03e8b74">00093</a>     <span class="keywordtype">bool</span> <a class="code" href="a00135.html#12752282977029f23416642bc03e8b74">is_active</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_scheduler != NULL; }
+<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>
diff --git a/doc/html/a00286.html b/doc/html/a00369.html
similarity index 100%
copy from doc/html/a00286.html
copy to doc/html/a00369.html
diff --git a/doc/html/a00286.html b/doc/html/a00371.html
similarity index 50%
copy from doc/html/a00286.html
copy to doc/html/a00371.html
index 87886d1..3de030a 100644
--- a/doc/html/a00286.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>task_scheduler_observer.h Source File</title>
+<title>tbb.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.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,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_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_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_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="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="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="l00067"></a>00067 
+<a name="l00068"></a>00068 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_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
new file mode 100644
index 0000000..d496f47
--- /dev/null
+++ b/doc/html/a00372.html
@@ -0,0 +1,201 @@
+<!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>
+<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_allocator.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_tbb_allocator_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_allocator_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="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="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>
+</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/a00376.html
new file mode 100644
index 0000000..881fb63
--- /dev/null
+++ b/doc/html/a00376.html
@@ -0,0 +1,166 @@
+<!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_config.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_config.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_tbb_config_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_config_H</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span>
+<a name="l00033"></a>00033 <span class="preprocessor">#ifndef TBB_USE_DEBUG</span>
+<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_DO_ASSERT</span>
+<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_DEBUG TBB_DO_ASSERT</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_DEBUG 0</span>
+<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+<a name="l00039"></a>00039 <span class="preprocessor">#else</span>
+<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define TBB_DO_ASSERT TBB_USE_DEBUG</span>
+<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_DEBUG */</span>
+<a name="l00042"></a>00042 
+<a name="l00043"></a>00043 <span class="preprocessor">#ifndef TBB_USE_ASSERT</span>
+<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_DO_ASSERT</span>
+<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_ASSERT TBB_DO_ASSERT</span>
+<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#else </span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_ASSERT TBB_USE_DEBUG</span>
+<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+<a name="l00049"></a>00049 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00050"></a>00050 
+<a name="l00051"></a>00051 <span class="preprocessor">#ifndef TBB_USE_THREADING_TOOLS</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_DO_THREADING_TOOLS</span>
+<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS</span>
+<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#else </span>
+<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG</span>
+<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS */</span>
+<a name="l00057"></a>00057 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
+<a name="l00058"></a>00058 
+<a name="l00059"></a>00059 <span class="preprocessor">#ifndef TBB_USE_PERFORMANCE_WARNINGS</span>
+<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_PERFORMANCE_WARNINGS</span>
+<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS</span>
+<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#else </span>
+<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG</span>
+<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_PEFORMANCE_WARNINGS */</span>
+<a name="l00065"></a>00065 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_PERFORMANCE_WARNINGS */</span>
+<a name="l00066"></a>00066 
+<a name="l00067"></a>00067 
+<a name="l00070"></a>00070 <span class="preprocessor">#ifndef __TBB_EXCEPTIONS</span>
+<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXCEPTIONS 1</span>
+<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00073"></a>00073 
+<a name="l00074"></a>00074 <span class="preprocessor">#ifndef __TBB_SCHEDULER_OBSERVER</span>
+<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="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="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="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="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="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>
+</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/a00377.html b/doc/html/a00377.html
new file mode 100644
index 0000000..4591196
--- /dev/null
+++ b/doc/html/a00377.html
@@ -0,0 +1,254 @@
+<!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/a00290.html b/doc/html/a00378.html
similarity index 54%
rename from doc/html/a00290.html
rename to doc/html/a00378.html
index f08fefc..88ca0c2 100644
--- a/doc/html/a00290.html
+++ b/doc/html/a00378.html
@@ -50,532 +50,549 @@
 <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 defined(_M_IX86)</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include "machine/windows_ia32.h"</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#elif defined(_M_AMD64) </span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#include "machine/windows_em64t.h"</span>
-<a name="l00036"></a>00036 <span class="preprocessor">#else</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#error Unsupported platform</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span>
-<a name="l00040"></a>00040 <span class="preprocessor">#ifdef _MANAGED</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#pragma managed(pop)</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">#elif __linux__ || __FreeBSD__</span>
-<a name="l00045"></a>00045 <span class="preprocessor"></span>
-<a name="l00046"></a>00046 <span class="preprocessor">#if __i386__</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
-<a name="l00048"></a>00048 <span class="preprocessor">#elif __x86_64__</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_em64t.h"</span>
-<a name="l00050"></a>00050 <span class="preprocessor">#elif __ia64__</span>
-<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_itanium.h"</span>
-<a name="l00052"></a>00052 <span class="preprocessor">#endif</span>
-<a name="l00053"></a>00053 <span class="preprocessor"></span>
-<a name="l00054"></a>00054 <span class="preprocessor">#elif __APPLE__</span>
-<a name="l00055"></a>00055 <span class="preprocessor"></span>
-<a name="l00056"></a>00056 <span class="preprocessor">#if __i386__</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
-<a name="l00058"></a>00058 <span class="preprocessor">#elif __x86_64__</span>
-<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_em64t.h"</span>
-<a name="l00060"></a>00060 <span class="preprocessor">#elif __POWERPC__</span>
-<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#include "machine/mac_ppc.h"</span>
-<a name="l00062"></a>00062 <span class="preprocessor">#endif</span>
-<a name="l00063"></a>00063 <span class="preprocessor"></span>
-<a name="l00064"></a>00064 <span class="preprocessor">#elif _AIX</span>
-<a name="l00065"></a>00065 <span class="preprocessor"></span>
-<a name="l00066"></a>00066 <span class="preprocessor">#include "machine/ibm_aix51.h"</span>
-<a name="l00067"></a>00067 
-<a name="l00068"></a>00068 <span class="preprocessor">#elif __sun || __SUNPRO_CC</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">#define __asm__ asm </span>
-<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#define __volatile__ volatile</span>
-<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#if __i386  || __i386__</span>
-<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
-<a name="l00074"></a>00074 <span class="preprocessor">#elif __x86_64__</span>
-<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_em64t.h"</span>
-<a name="l00076"></a>00076 <span class="preprocessor">#endif</span>
-<a name="l00077"></a>00077 <span class="preprocessor"></span>
-<a name="l00078"></a>00078 <span class="preprocessor">#endif</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span>
-<a name="l00080"></a>00080 <span class="preprocessor">#if !defined(__TBB_CompareAndSwap4) || !defined(__TBB_CompareAndSwap8) || !defined(__TBB_Yield)</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#error Minimal requirements for tbb_machine.h not satisfied </span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#endif</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">#ifndef __TBB_load_with_acquire</span>
-<a name="l00086"></a>00086 <span class="preprocessor">    template<typename T></span>
-<a name="l00087"></a>00087 <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="l00088"></a>00088         T temp = location;
-<a name="l00089"></a>00089 <span class="preprocessor">#ifdef __TBB_fence_for_acquire </span>
-<a name="l00090"></a>00090 <span class="preprocessor"></span>        __TBB_fence_for_acquire();
-<a name="l00091"></a>00091 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_fence_for_acquire */</span>
-<a name="l00092"></a>00092         <span class="keywordflow">return</span> temp;
-<a name="l00093"></a>00093     }
-<a name="l00094"></a>00094 <span class="preprocessor">#endif</span>
-<a name="l00095"></a>00095 <span class="preprocessor"></span>
-<a name="l00096"></a>00096 <span class="preprocessor">#ifndef __TBB_store_with_release</span>
-<a name="l00098"></a>00098 <span class="preprocessor">    template<typename T, typename V></span>
-<a name="l00099"></a>00099 <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="l00100"></a>00100 <span class="preprocessor">#ifdef __TBB_fence_for_release</span>
-<a name="l00101"></a>00101 <span class="preprocessor"></span>        __TBB_fence_for_release();
-<a name="l00102"></a>00102 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_fence_for_release */</span>
-<a name="l00103"></a>00103         location = T(value); 
-<a name="l00104"></a>00104     }
-<a name="l00105"></a>00105 <span class="preprocessor">#endif</span>
-<a name="l00106"></a>00106 <span class="preprocessor"></span>
-<a name="l00107"></a>00107 <span class="preprocessor">#ifndef __TBB_Pause</span>
-<a name="l00108"></a>00108 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_Pause(int32_t) {
-<a name="l00109"></a>00109         __TBB_Yield();
-<a name="l00110"></a>00110     }
-<a name="l00111"></a>00111 <span class="preprocessor">#endif</span>
-<a name="l00112"></a>00112 <span class="preprocessor"></span>
-<a name="l00113"></a>00113 <span class="keyword">namespace </span>tbb {
-<a name="l00114"></a>00114 <span class="keyword">namespace </span>internal {
-<a name="l00115"></a>00115 
-<a name="l00117"></a>00117 
-<a name="l00118"></a><a class="code" href="a00094.html">00118</a> <span class="keyword">class </span><a class="code" href="a00094.html">AtomicBackoff</a> {
+<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="l00122"></a>00122     <span class="keyword">static</span> <span class="keyword">const</span> int32_t LOOPS_BEFORE_YIELD = 16;
-<a name="l00123"></a>00123     int32_t count;
-<a name="l00124"></a>00124 <span class="keyword">public</span>:
-<a name="l00125"></a>00125     <a class="code" href="a00094.html">AtomicBackoff</a>() : count(1) {}
-<a name="l00126"></a>00126 
-<a name="l00128"></a><a class="code" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">00128</a>     <span class="keywordtype">void</span> <a class="code" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">pause</a>() {
-<a name="l00129"></a>00129         <span class="keywordflow">if</span>( count<=LOOPS_BEFORE_YIELD ) {
-<a name="l00130"></a>00130             __TBB_Pause(count);
-<a name="l00131"></a>00131             <span class="comment">// Pause twice as long the next time.</span>
-<a name="l00132"></a>00132             count*=2;
-<a name="l00133"></a>00133         } <span class="keywordflow">else</span> {
-<a name="l00134"></a>00134             <span class="comment">// Pause is so long that we might as well yield CPU to scheduler.</span>
-<a name="l00135"></a>00135             __TBB_Yield();
-<a name="l00136"></a>00136         }
-<a name="l00137"></a>00137     }
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139     <span class="comment">// pause for a few times and then return false immediately.</span>
-<a name="l00140"></a>00140     <span class="keywordtype">bool</span> bounded_pause() {
-<a name="l00141"></a>00141         <span class="keywordflow">if</span>( count<=LOOPS_BEFORE_YIELD ) {
-<a name="l00142"></a>00142             __TBB_Pause(count);
-<a name="l00143"></a>00143             <span class="comment">// Pause twice as long the next time.</span>
-<a name="l00144"></a>00144             count*=2;
-<a name="l00145"></a>00145             <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00146"></a>00146         } <span class="keywordflow">else</span> {
-<a name="l00147"></a>00147             <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00148"></a>00148         }
-<a name="l00149"></a>00149     }
-<a name="l00150"></a>00150 
-<a name="l00151"></a>00151     <span class="keywordtype">void</span> reset() {
-<a name="l00152"></a>00152         count = 1;
-<a name="l00153"></a>00153     }
-<a name="l00154"></a>00154 };
-<a name="l00155"></a>00155 
-<a name="l00156"></a>00156 <span class="comment">// T should be unsigned, otherwise sign propagation will break correctness of bit manipulations.</span>
-<a name="l00157"></a>00157 <span class="comment">// S should be either 1 or 2, for the mask calculation to work correctly.</span>
-<a name="l00158"></a>00158 <span class="comment">// Together, these rules limit applicability of Masked CAS to unsigned char and unsigned short.</span>
-<a name="l00159"></a>00159 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
-<a name="l00160"></a>00160 <span class="keyword">inline</span> T __TBB_MaskedCompareAndSwap (<span class="keyword">volatile</span> T *ptr, T value, T comparand ) {
-<a name="l00161"></a>00161     <span class="keyword">volatile</span> uint32_t * base = (uint32_t*)( (uintptr_t)ptr & ~(uintptr_t)0x3 );
-<a name="l00162"></a>00162 <span class="preprocessor">#if __TBB_BIG_ENDIAN</span>
-<a name="l00163"></a>00163 <span class="preprocessor"></span>    <span class="keyword">const</span> uint8_t bitoffset = uint8_t( 8*( 4-S - (uintptr_t(ptr) & 0x3) ) );
-<a name="l00164"></a>00164 <span class="preprocessor">#else</span>
-<a name="l00165"></a>00165 <span class="preprocessor"></span>    <span class="keyword">const</span> uint8_t bitoffset = uint8_t( 8*((uintptr_t)ptr & 0x3) );
-<a name="l00166"></a>00166 <span class="preprocessor">#endif</span>
-<a name="l00167"></a>00167 <span class="preprocessor"></span>    <span class="keyword">const</span> uint32_t mask = ( (1<<(S*8)) - 1 )<<bitoffset;
-<a name="l00168"></a>00168     AtomicBackoff b;
-<a name="l00169"></a>00169     uint32_t result;
-<a name="l00170"></a>00170     <span class="keywordflow">for</span>(;;) {
-<a name="l00171"></a>00171         result = *base; <span class="comment">// reload the base value which might change during the pause</span>
-<a name="l00172"></a>00172         uint32_t old_value = ( result & ~mask ) | ( comparand << bitoffset );
-<a name="l00173"></a>00173         uint32_t new_value = ( result & ~mask ) | ( value << bitoffset );
-<a name="l00174"></a>00174         <span class="comment">// __TBB_CompareAndSwap4 presumed to have full fence. </span>
-<a name="l00175"></a>00175         result = __TBB_CompareAndSwap4( base, new_value, old_value );
-<a name="l00176"></a>00176         <span class="keywordflow">if</span>(  result==old_value               <span class="comment">// CAS succeeded</span>
-<a name="l00177"></a>00177           || ((result^old_value)&mask)!=0 )  <span class="comment">// CAS failed and the bits of interest have changed</span>
-<a name="l00178"></a>00178             <span class="keywordflow">break</span>;
-<a name="l00179"></a>00179         <span class="keywordflow">else</span>                                 <span class="comment">// CAS failed but the bits of interest left unchanged</span>
-<a name="l00180"></a>00180             b.pause();
-<a name="l00181"></a>00181     }
-<a name="l00182"></a>00182     <span class="keywordflow">return</span> T((result & mask) >> bitoffset);
-<a name="l00183"></a>00183 }
-<a name="l00184"></a>00184 
-<a name="l00185"></a>00185 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
-<a name="l00186"></a>00186 <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="l00187"></a>00187     <span class="keywordflow">return</span> __TBB_CompareAndSwapW((T *)ptr,value,comparand);
-<a name="l00188"></a>00188 }
-<a name="l00189"></a>00189 
-<a name="l00190"></a>00190 <span class="keyword">template</span><>
-<a name="l00191"></a>00191 <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="l00192"></a>00192 #ifdef __TBB_CompareAndSwap1
-<a name="l00193"></a>00193     <span class="keywordflow">return</span> __TBB_CompareAndSwap1(ptr,value,comparand);
-<a name="l00194"></a>00194 <span class="preprocessor">#else</span>
-<a name="l00195"></a>00195 <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="l00196"></a>00196 <span class="preprocessor">#endif</span>
-<a name="l00197"></a>00197 <span class="preprocessor"></span>}
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199 <span class="keyword">template</span><>
-<a name="l00200"></a>00200 <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="l00201"></a>00201 #ifdef __TBB_CompareAndSwap2
-<a name="l00202"></a>00202     <span class="keywordflow">return</span> __TBB_CompareAndSwap2(ptr,value,comparand);
-<a name="l00203"></a>00203 <span class="preprocessor">#else</span>
-<a name="l00204"></a>00204 <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="l00205"></a>00205 <span class="preprocessor">#endif</span>
-<a name="l00206"></a>00206 <span class="preprocessor"></span>}
-<a name="l00207"></a>00207 
-<a name="l00208"></a>00208 <span class="keyword">template</span><>
-<a name="l00209"></a>00209 <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="l00210"></a>00210     <span class="keywordflow">return</span> __TBB_CompareAndSwap4(ptr,value,comparand);
-<a name="l00211"></a>00211 }
-<a name="l00212"></a>00212 
-<a name="l00213"></a>00213 <span class="keyword">template</span><>
-<a name="l00214"></a>00214 <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="l00215"></a>00215     <span class="keywordflow">return</span> __TBB_CompareAndSwap8(ptr,value,comparand);
-<a name="l00216"></a>00216 }
+<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><size_t S, <span class="keyword">typename</span> T>
-<a name="l00219"></a>00219 <span class="keyword">inline</span> T __TBB_FetchAndAddGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T addend) {
-<a name="l00220"></a>00220     AtomicBackoff b;
-<a name="l00221"></a>00221     T result;
-<a name="l00222"></a>00222     <span class="keywordflow">for</span>(;;) {
-<a name="l00223"></a>00223         result = *reinterpret_cast<volatile T *>(ptr);
-<a name="l00224"></a>00224         <span class="comment">// __TBB_CompareAndSwapGeneric presumed to have full fence. </span>
-<a name="l00225"></a>00225         <span class="keywordflow">if</span>( __TBB_CompareAndSwapGeneric<S,T> ( ptr, result+addend, result )==result ) 
-<a name="l00226"></a>00226             <span class="keywordflow">break</span>;
-<a name="l00227"></a>00227         b.pause();
-<a name="l00228"></a>00228     }
-<a name="l00229"></a>00229     <span class="keywordflow">return</span> result;
+<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><size_t S, <span class="keyword">typename</span> T>
-<a name="l00233"></a>00233 <span class="keyword">inline</span> T __TBB_FetchAndStoreGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T value) {
-<a name="l00234"></a>00234     AtomicBackoff b;
-<a name="l00235"></a>00235     T result;
-<a name="l00236"></a>00236     <span class="keywordflow">for</span>(;;) {
-<a name="l00237"></a>00237         result = *reinterpret_cast<volatile T *>(ptr);
-<a name="l00238"></a>00238         <span class="comment">// __TBB_CompareAndSwapGeneric presumed to have full fence.</span>
-<a name="l00239"></a>00239         <span class="keywordflow">if</span>( __TBB_CompareAndSwapGeneric<S,T> ( ptr, value, result )==result ) 
-<a name="l00240"></a>00240             <span class="keywordflow">break</span>;
-<a name="l00241"></a>00241         b.pause();
-<a name="l00242"></a>00242     }
-<a name="l00243"></a>00243     <span class="keywordflow">return</span> result;
-<a name="l00244"></a>00244 }
-<a name="l00245"></a>00245 
-<a name="l00246"></a>00246 <span class="comment">// Macro __TBB_TypeWithAlignmentAtLeastAsStrict(T) should be a type with alignment at least as </span>
-<a name="l00247"></a>00247 <span class="comment">// strict as type T.  Type type should have a trivial default constructor and destructor, so that</span>
-<a name="l00248"></a>00248 <span class="comment">// arrays of that type can be declared without initializers.  </span>
-<a name="l00249"></a>00249 <span class="comment">// It is correct (but perhaps a waste of space) if __TBB_TypeWithAlignmentAtLeastAsStrict(T) expands</span>
-<a name="l00250"></a>00250 <span class="comment">// to a type bigger than T.</span>
-<a name="l00251"></a>00251 <span class="comment">// The default definition here works on machines where integers are naturally aligned and the</span>
-<a name="l00252"></a>00252 <span class="comment">// strictest alignment is 16.</span>
-<a name="l00253"></a>00253 <span class="preprocessor">#ifndef __TBB_TypeWithAlignmentAtLeastAsStrict</span>
-<a name="l00254"></a>00254 <span class="preprocessor"></span>
-<a name="l00255"></a>00255 <span class="preprocessor">#if __GNUC__ || __SUNPRO_CC</span>
-<a name="l00256"></a>00256 <span class="preprocessor"></span><span class="keyword">struct </span>__TBB_machine_type_with_strictest_alignment {
-<a name="l00257"></a>00257     <span class="keywordtype">int</span> member[4];
-<a name="l00258"></a>00258 } __attribute__((aligned(16)));
-<a name="l00259"></a>00259 <span class="preprocessor">#elif _MSC_VER</span>
-<a name="l00260"></a>00260 <span class="preprocessor"></span>__declspec(align(16)) struct __TBB_machine_type_with_strictest_alignment {
-<a name="l00261"></a>00261     <span class="keywordtype">int</span> member[4];
-<a name="l00262"></a>00262 };
-<a name="l00263"></a>00263 <span class="preprocessor">#else</span>
-<a name="l00264"></a>00264 <span class="preprocessor"></span><span class="preprocessor">#error Must define __TBB_TypeWithAlignmentAtLeastAsStrict(T) or __TBB_machine_type_with_strictest_alignment</span>
-<a name="l00265"></a>00265 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00266"></a>00266 <span class="preprocessor"></span>
-<a name="l00267"></a>00267 <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="l00268"></a>00268 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<1> { <span class="keywordtype">char</span> member; };
-<a name="l00269"></a>00269 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<2> { uint16_t member; };
-<a name="l00270"></a>00270 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<4> { uint32_t member; };
-<a name="l00271"></a>00271 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<8> { uint64_t member; };
-<a name="l00272"></a>00272 
-<a name="l00273"></a>00273 <span class="preprocessor">#if _MSC_VER||defined(__GNUC__)&&__GNUC__==3 && __GNUC_MINOR__<=2  </span>
-<a name="l00275"></a>00275 <span class="preprocessor"></span>
-<a name="l00277"></a>00277 <span class="preprocessor">template<size_t Size, typename T> </span>
-<a name="l00278"></a><a class="code" href="a00142.html">00278</a> <span class="preprocessor"></span><span class="keyword">struct </span><a class="code" href="a00142.html">work_around_alignment_bug</a> {
-<a name="l00279"></a>00279 <span class="preprocessor">#if _MSC_VER</span>
-<a name="l00280"></a>00280 <span class="preprocessor"></span>    <span class="keyword">static</span> <span class="keyword">const</span> size_t alignment = __alignof(T);
-<a name="l00281"></a>00281 <span class="preprocessor">#else</span>
-<a name="l00282"></a>00282 <span class="preprocessor"></span>    <span class="keyword">static</span> <span class="keyword">const</span> size_t alignment = __alignof__(T);
-<a name="l00283"></a>00283 <span class="preprocessor">#endif</span>
-<a name="l00284"></a>00284 <span class="preprocessor"></span>};
-<a name="l00285"></a>00285 <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="l00286"></a>00286 <span class="preprocessor"></span><span class="preprocessor">#elif __GNUC__ || __SUNPRO_CC</span>
-<a name="l00287"></a>00287 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<__alignof__(T)></span>
-<a name="l00288"></a>00288 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00289"></a>00289 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) __TBB_machine_type_with_strictest_alignment</span>
-<a name="l00290"></a>00290 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00291"></a>00291 <span class="preprocessor"></span><span class="preprocessor">#endif  </span><span class="comment">/* ____TBB_TypeWithAlignmentAtLeastAsStrict */</span>
-<a name="l00292"></a>00292 
-<a name="l00293"></a>00293 } <span class="comment">// namespace internal</span>
-<a name="l00294"></a>00294 } <span class="comment">// namespace tbb</span>
-<a name="l00295"></a>00295 
-<a name="l00296"></a>00296 <span class="preprocessor">#ifndef __TBB_CompareAndSwap1</span>
-<a name="l00297"></a>00297 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1 tbb::internal::__TBB_CompareAndSwapGeneric<1,uint8_t></span>
-<a name="l00298"></a>00298 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00299"></a>00299 <span class="preprocessor"></span>
-<a name="l00300"></a>00300 <span class="preprocessor">#ifndef __TBB_CompareAndSwap2 </span>
-<a name="l00301"></a>00301 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2 tbb::internal::__TBB_CompareAndSwapGeneric<2,uint16_t></span>
-<a name="l00302"></a>00302 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00303"></a>00303 <span class="preprocessor"></span>
-<a name="l00304"></a>00304 <span class="preprocessor">#ifndef __TBB_CompareAndSwapW</span>
-<a name="l00305"></a>00305 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwapW tbb::internal::__TBB_CompareAndSwapGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
-<a name="l00306"></a>00306 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00307"></a>00307 <span class="preprocessor"></span>
-<a name="l00308"></a>00308 <span class="preprocessor">#ifndef __TBB_FetchAndAdd1</span>
-<a name="l00309"></a>00309 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1 tbb::internal::__TBB_FetchAndAddGeneric<1,uint8_t></span>
-<a name="l00310"></a>00310 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00311"></a>00311 <span class="preprocessor"></span>
-<a name="l00312"></a>00312 <span class="preprocessor">#ifndef __TBB_FetchAndAdd2</span>
-<a name="l00313"></a>00313 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2 tbb::internal::__TBB_FetchAndAddGeneric<2,uint16_t></span>
-<a name="l00314"></a>00314 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00315"></a>00315 <span class="preprocessor"></span>
-<a name="l00316"></a>00316 <span class="preprocessor">#ifndef __TBB_FetchAndAdd4</span>
-<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4 tbb::internal::__TBB_FetchAndAddGeneric<4,uint32_t></span>
-<a name="l00318"></a>00318 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00319"></a>00319 <span class="preprocessor"></span>
-<a name="l00320"></a>00320 <span class="preprocessor">#ifndef __TBB_FetchAndAdd8</span>
-<a name="l00321"></a>00321 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8 tbb::internal::__TBB_FetchAndAddGeneric<8,uint64_t></span>
-<a name="l00322"></a>00322 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00323"></a>00323 <span class="preprocessor"></span>
-<a name="l00324"></a>00324 <span class="preprocessor">#ifndef __TBB_FetchAndAddW</span>
-<a name="l00325"></a>00325 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAddW tbb::internal::__TBB_FetchAndAddGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
-<a name="l00326"></a>00326 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00327"></a>00327 <span class="preprocessor"></span>
-<a name="l00328"></a>00328 <span class="preprocessor">#ifndef __TBB_FetchAndStore1</span>
-<a name="l00329"></a>00329 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1 tbb::internal::__TBB_FetchAndStoreGeneric<1,uint8_t></span>
-<a name="l00330"></a>00330 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00331"></a>00331 <span class="preprocessor"></span>
-<a name="l00332"></a>00332 <span class="preprocessor">#ifndef __TBB_FetchAndStore2</span>
-<a name="l00333"></a>00333 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2 tbb::internal::__TBB_FetchAndStoreGeneric<2,uint16_t></span>
-<a name="l00334"></a>00334 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00335"></a>00335 <span class="preprocessor"></span>
-<a name="l00336"></a>00336 <span class="preprocessor">#ifndef __TBB_FetchAndStore4</span>
-<a name="l00337"></a>00337 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4 tbb::internal::__TBB_FetchAndStoreGeneric<4,uint32_t></span>
-<a name="l00338"></a>00338 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00339"></a>00339 <span class="preprocessor"></span>
-<a name="l00340"></a>00340 <span class="preprocessor">#ifndef __TBB_FetchAndStore8</span>
-<a name="l00341"></a>00341 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8 tbb::internal::__TBB_FetchAndStoreGeneric<8,uint64_t></span>
-<a name="l00342"></a>00342 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00343"></a>00343 <span class="preprocessor"></span>
-<a name="l00344"></a>00344 <span class="preprocessor">#ifndef __TBB_FetchAndStoreW</span>
-<a name="l00345"></a>00345 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStoreW tbb::internal::__TBB_FetchAndStoreGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
-<a name="l00346"></a>00346 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00347"></a>00347 <span class="preprocessor"></span>
-<a name="l00348"></a>00348 <span class="preprocessor">#if __TBB_DECL_FENCED_ATOMICS</span>
-<a name="l00349"></a>00349 <span class="preprocessor"></span>
-<a name="l00350"></a>00350 <span class="preprocessor">#ifndef __TBB_CompareAndSwap1__TBB_full_fence</span>
-<a name="l00351"></a>00351 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1__TBB_full_fence __TBB_CompareAndSwap1</span>
-<a name="l00352"></a>00352 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00353"></a>00353 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap1acquire</span>
-<a name="l00354"></a>00354 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1acquire __TBB_CompareAndSwap1__TBB_full_fence</span>
-<a name="l00355"></a>00355 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00356"></a>00356 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap1release</span>
-<a name="l00357"></a>00357 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1release __TBB_CompareAndSwap1__TBB_full_fence</span>
-<a name="l00358"></a>00358 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00359"></a>00359 <span class="preprocessor"></span>
-<a name="l00360"></a>00360 <span class="preprocessor">#ifndef __TBB_CompareAndSwap2__TBB_full_fence</span>
-<a name="l00361"></a>00361 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2__TBB_full_fence __TBB_CompareAndSwap2</span>
-<a name="l00362"></a>00362 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00363"></a>00363 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap2acquire</span>
-<a name="l00364"></a>00364 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2acquire __TBB_CompareAndSwap2__TBB_full_fence</span>
+<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><span class="preprocessor">#ifndef __TBB_CompareAndSwap2release</span>
-<a name="l00367"></a>00367 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2release __TBB_CompareAndSwap2__TBB_full_fence</span>
-<a name="l00368"></a>00368 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00369"></a>00369 <span class="preprocessor"></span>
-<a name="l00370"></a>00370 <span class="preprocessor">#ifndef __TBB_CompareAndSwap4__TBB_full_fence</span>
-<a name="l00371"></a>00371 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4__TBB_full_fence __TBB_CompareAndSwap4</span>
-<a name="l00372"></a>00372 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00373"></a>00373 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap4acquire</span>
-<a name="l00374"></a>00374 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4acquire __TBB_CompareAndSwap4__TBB_full_fence</span>
-<a name="l00375"></a>00375 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00376"></a>00376 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap4release</span>
-<a name="l00377"></a>00377 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4release __TBB_CompareAndSwap4__TBB_full_fence</span>
-<a name="l00378"></a>00378 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00379"></a>00379 <span class="preprocessor"></span>
-<a name="l00380"></a>00380 <span class="preprocessor">#ifndef __TBB_CompareAndSwap8__TBB_full_fence</span>
-<a name="l00381"></a>00381 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8__TBB_full_fence __TBB_CompareAndSwap8</span>
-<a name="l00382"></a>00382 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00383"></a>00383 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap8acquire</span>
-<a name="l00384"></a>00384 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8acquire __TBB_CompareAndSwap8__TBB_full_fence</span>
-<a name="l00385"></a>00385 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00386"></a>00386 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap8release</span>
-<a name="l00387"></a>00387 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8release __TBB_CompareAndSwap8__TBB_full_fence</span>
-<a name="l00388"></a>00388 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00389"></a>00389 <span class="preprocessor"></span>
-<a name="l00390"></a>00390 <span class="preprocessor">#ifndef __TBB_FetchAndAdd1__TBB_full_fence</span>
-<a name="l00391"></a>00391 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1__TBB_full_fence __TBB_FetchAndAdd1</span>
-<a name="l00392"></a>00392 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00393"></a>00393 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd1acquire</span>
-<a name="l00394"></a>00394 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1acquire __TBB_FetchAndAdd1__TBB_full_fence</span>
-<a name="l00395"></a>00395 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00396"></a>00396 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd1release</span>
-<a name="l00397"></a>00397 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1release __TBB_FetchAndAdd1__TBB_full_fence</span>
-<a name="l00398"></a>00398 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00399"></a>00399 <span class="preprocessor"></span>
-<a name="l00400"></a>00400 <span class="preprocessor">#ifndef __TBB_FetchAndAdd2__TBB_full_fence</span>
-<a name="l00401"></a>00401 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2__TBB_full_fence __TBB_FetchAndAdd2</span>
-<a name="l00402"></a>00402 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00403"></a>00403 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd2acquire</span>
-<a name="l00404"></a>00404 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2acquire __TBB_FetchAndAdd2__TBB_full_fence</span>
-<a name="l00405"></a>00405 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00406"></a>00406 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd2release</span>
-<a name="l00407"></a>00407 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2release __TBB_FetchAndAdd2__TBB_full_fence</span>
-<a name="l00408"></a>00408 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00409"></a>00409 <span class="preprocessor"></span>
-<a name="l00410"></a>00410 <span class="preprocessor">#ifndef __TBB_FetchAndAdd4__TBB_full_fence</span>
-<a name="l00411"></a>00411 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4__TBB_full_fence __TBB_FetchAndAdd4</span>
-<a name="l00412"></a>00412 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00413"></a>00413 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd4acquire</span>
-<a name="l00414"></a>00414 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4acquire __TBB_FetchAndAdd4__TBB_full_fence</span>
-<a name="l00415"></a>00415 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00416"></a>00416 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd4release</span>
-<a name="l00417"></a>00417 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4release __TBB_FetchAndAdd4__TBB_full_fence</span>
-<a name="l00418"></a>00418 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00419"></a>00419 <span class="preprocessor"></span>
-<a name="l00420"></a>00420 <span class="preprocessor">#ifndef __TBB_FetchAndAdd8__TBB_full_fence</span>
-<a name="l00421"></a>00421 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8__TBB_full_fence __TBB_FetchAndAdd8</span>
-<a name="l00422"></a>00422 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00423"></a>00423 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd8acquire</span>
-<a name="l00424"></a>00424 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8acquire __TBB_FetchAndAdd8__TBB_full_fence</span>
-<a name="l00425"></a>00425 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00426"></a>00426 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd8release</span>
-<a name="l00427"></a>00427 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8release __TBB_FetchAndAdd8__TBB_full_fence</span>
-<a name="l00428"></a>00428 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00429"></a>00429 <span class="preprocessor"></span>
-<a name="l00430"></a>00430 <span class="preprocessor">#ifndef __TBB_FetchAndStore1__TBB_full_fence</span>
-<a name="l00431"></a>00431 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1__TBB_full_fence __TBB_FetchAndStore1</span>
-<a name="l00432"></a>00432 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00433"></a>00433 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore1acquire</span>
-<a name="l00434"></a>00434 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1acquire __TBB_FetchAndStore1__TBB_full_fence</span>
-<a name="l00435"></a>00435 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00436"></a>00436 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore1release</span>
-<a name="l00437"></a>00437 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1release __TBB_FetchAndStore1__TBB_full_fence</span>
-<a name="l00438"></a>00438 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00439"></a>00439 <span class="preprocessor"></span>
-<a name="l00440"></a>00440 <span class="preprocessor">#ifndef __TBB_FetchAndStore2__TBB_full_fence</span>
-<a name="l00441"></a>00441 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2__TBB_full_fence __TBB_FetchAndStore2</span>
-<a name="l00442"></a>00442 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00443"></a>00443 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore2acquire</span>
-<a name="l00444"></a>00444 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2acquire __TBB_FetchAndStore2__TBB_full_fence</span>
-<a name="l00445"></a>00445 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00446"></a>00446 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore2release</span>
-<a name="l00447"></a>00447 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2release __TBB_FetchAndStore2__TBB_full_fence</span>
-<a name="l00448"></a>00448 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00449"></a>00449 <span class="preprocessor"></span>
-<a name="l00450"></a>00450 <span class="preprocessor">#ifndef __TBB_FetchAndStore4__TBB_full_fence</span>
-<a name="l00451"></a>00451 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4__TBB_full_fence __TBB_FetchAndStore4</span>
-<a name="l00452"></a>00452 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00453"></a>00453 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore4acquire</span>
-<a name="l00454"></a>00454 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4acquire __TBB_FetchAndStore4__TBB_full_fence</span>
-<a name="l00455"></a>00455 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00456"></a>00456 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore4release</span>
-<a name="l00457"></a>00457 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4release __TBB_FetchAndStore4__TBB_full_fence</span>
-<a name="l00458"></a>00458 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00459"></a>00459 <span class="preprocessor"></span>
-<a name="l00460"></a>00460 <span class="preprocessor">#ifndef __TBB_FetchAndStore8__TBB_full_fence</span>
-<a name="l00461"></a>00461 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8__TBB_full_fence __TBB_FetchAndStore8</span>
-<a name="l00462"></a>00462 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00463"></a>00463 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore8acquire</span>
-<a name="l00464"></a>00464 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8acquire __TBB_FetchAndStore8__TBB_full_fence</span>
-<a name="l00465"></a>00465 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00466"></a>00466 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore8release</span>
-<a name="l00467"></a>00467 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8release __TBB_FetchAndStore8__TBB_full_fence</span>
-<a name="l00468"></a>00468 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00469"></a>00469 <span class="preprocessor"></span>
-<a name="l00470"></a>00470 <span class="preprocessor">#endif // __TBB_DECL_FENCED_ATOMICS</span>
-<a name="l00471"></a>00471 <span class="preprocessor"></span>
-<a name="l00472"></a>00472 <span class="comment">// Special atomic functions</span>
-<a name="l00473"></a>00473 <span class="preprocessor">#ifndef __TBB_FetchAndAddWrelease</span>
-<a name="l00474"></a>00474 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAddWrelease __TBB_FetchAndAddW</span>
-<a name="l00475"></a>00475 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00476"></a>00476 <span class="preprocessor"></span>
-<a name="l00477"></a>00477 <span class="preprocessor">#ifndef __TBB_FetchAndIncrementWacquire</span>
-<a name="l00478"></a>00478 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndIncrementWacquire(P) __TBB_FetchAndAddW(P,1)</span>
-<a name="l00479"></a>00479 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00480"></a>00480 <span class="preprocessor"></span>
-<a name="l00481"></a>00481 <span class="preprocessor">#ifndef __TBB_FetchAndDecrementWrelease</span>
-<a name="l00482"></a>00482 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,(-1))</span>
-<a name="l00483"></a>00483 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00484"></a>00484 <span class="preprocessor"></span>
-<a name="l00485"></a>00485 <span class="preprocessor">#if __TBB_WORDSIZE==4</span>
-<a name="l00486"></a>00486 <span class="preprocessor"></span><span class="comment">// On 32-bit platforms, "atomic.h" requires definition of __TBB_Store8 and __TBB_Load8</span>
-<a name="l00487"></a>00487 <span class="preprocessor">#ifndef __TBB_Store8</span>
-<a name="l00488"></a>00488 <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="l00489"></a>00489     <a class="code" href="a00094.html">tbb::internal::AtomicBackoff</a> b;
-<a name="l00490"></a>00490     <span class="keywordflow">for</span>(;;) {
-<a name="l00491"></a>00491         int64_t result = *(int64_t *)ptr;
-<a name="l00492"></a>00492         <span class="keywordflow">if</span>( __TBB_CompareAndSwap8(ptr,value,result)==result ) <span class="keywordflow">break</span>;
-<a name="l00493"></a>00493         b.<a class="code" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">pause</a>();
-<a name="l00494"></a>00494     }
-<a name="l00495"></a>00495 }
-<a name="l00496"></a>00496 <span class="preprocessor">#endif</span>
-<a name="l00497"></a>00497 <span class="preprocessor"></span>
-<a name="l00498"></a>00498 <span class="preprocessor">#ifndef __TBB_Load8</span>
-<a name="l00499"></a>00499 <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="l00500"></a>00500     int64_t result = *(int64_t *)ptr;
-<a name="l00501"></a>00501     result = __TBB_CompareAndSwap8((<span class="keyword">volatile</span> <span class="keywordtype">void</span> *)ptr,result,result);
-<a name="l00502"></a>00502     <span class="keywordflow">return</span> result;
-<a name="l00503"></a>00503 }
-<a name="l00504"></a>00504 <span class="preprocessor">#endif</span>
-<a name="l00505"></a>00505 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_WORDSIZE==4 */</span>
-<a name="l00506"></a>00506 
-<a name="l00507"></a>00507 <span class="preprocessor">#ifndef __TBB_Log2</span>
-<a name="l00508"></a>00508 <span class="preprocessor"></span><span class="keyword">inline</span> intptr_t __TBB_Log2( uintptr_t x ) {
-<a name="l00509"></a>00509     <span class="keywordflow">if</span>( x==0 ) <span class="keywordflow">return</span> -1;
-<a name="l00510"></a>00510     intptr_t result = 0;
-<a name="l00511"></a>00511     uintptr_t tmp;
-<a name="l00512"></a>00512 <span class="preprocessor">#if __TBB_WORDSIZE>=8</span>
-<a name="l00513"></a>00513 <span class="preprocessor"></span>    <span class="keywordflow">if</span>( (tmp = x>>32) ) { x=tmp; result += 32; }
-<a name="l00514"></a>00514 <span class="preprocessor">#endif</span>
-<a name="l00515"></a>00515 <span class="preprocessor"></span>    <span class="keywordflow">if</span>( (tmp = x>>16) ) { x=tmp; result += 16; }
-<a name="l00516"></a>00516     <span class="keywordflow">if</span>( (tmp = x>>8) )  { x=tmp; result += 8; }
-<a name="l00517"></a>00517     <span class="keywordflow">if</span>( (tmp = x>>4) )  { x=tmp; result += 4; }
-<a name="l00518"></a>00518     <span class="keywordflow">if</span>( (tmp = x>>2) )  { x=tmp; result += 2; }
-<a name="l00519"></a>00519     <span class="keywordflow">return</span> (x&2)? result+1: result;
-<a name="l00520"></a>00520 }
-<a name="l00521"></a>00521 <span class="preprocessor">#endif</span>
-<a name="l00522"></a>00522 <span class="preprocessor"></span>
-<a name="l00523"></a>00523 <span class="preprocessor">#ifndef __TBB_AtomicOR</span>
-<a name="l00524"></a>00524 <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="l00525"></a>00525     <a class="code" href="a00094.html">tbb::internal::AtomicBackoff</a> b;
-<a name="l00526"></a>00526     <span class="keywordflow">for</span>(;;) {
-<a name="l00527"></a>00527         uintptr_t tmp = *(<span class="keyword">volatile</span> uintptr_t *)operand;
-<a name="l00528"></a>00528         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp);
-<a name="l00529"></a>00529         <span class="keywordflow">if</span>( result==tmp ) <span class="keywordflow">break</span>;
-<a name="l00530"></a>00530         b.<a class="code" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">pause</a>();
-<a name="l00531"></a>00531     }
-<a name="l00532"></a>00532 }
+<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>
-<a name="l00535"></a>00535 <span class="preprocessor">#ifndef __TBB_AtomicAND</span>
-<a name="l00536"></a>00536 <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="l00537"></a>00537     <a class="code" href="a00094.html">tbb::internal::AtomicBackoff</a> b;
-<a name="l00538"></a>00538     <span class="keywordflow">for</span>(;;) {
-<a name="l00539"></a>00539         uintptr_t tmp = *(<span class="keyword">volatile</span> uintptr_t *)operand;
-<a name="l00540"></a>00540         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp&addend, tmp);
-<a name="l00541"></a>00541         <span class="keywordflow">if</span>( result==tmp ) <span class="keywordflow">break</span>;
-<a name="l00542"></a>00542         b.<a class="code" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">pause</a>();
-<a name="l00543"></a>00543     }
-<a name="l00544"></a>00544 }
-<a name="l00545"></a>00545 <span class="preprocessor">#endif</span>
-<a name="l00546"></a>00546 <span class="preprocessor"></span>
-<a name="l00547"></a>00547 <span class="preprocessor">#ifndef __TBB_TryLockByte</span>
-<a name="l00548"></a>00548 <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="l00549"></a>00549     <span class="keywordflow">return</span> __TBB_CompareAndSwap1(&flag,1,0)==0;
-<a name="l00550"></a>00550 }
-<a name="l00551"></a>00551 <span class="preprocessor">#endif</span>
-<a name="l00552"></a>00552 <span class="preprocessor"></span>
-<a name="l00553"></a>00553 <span class="preprocessor">#ifndef __TBB_LockByte</span>
-<a name="l00554"></a>00554 <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="l00555"></a>00555     <span class="keywordflow">if</span> ( !__TBB_TryLockByte(flag) ) {
-<a name="l00556"></a>00556         <a class="code" href="a00094.html">tbb::internal::AtomicBackoff</a> b;
-<a name="l00557"></a>00557         <span class="keywordflow">do</span> {
-<a name="l00558"></a>00558             b.<a class="code" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">pause</a>();
-<a name="l00559"></a>00559         } <span class="keywordflow">while</span> ( !__TBB_TryLockByte(flag) );
-<a name="l00560"></a>00560     }
-<a name="l00561"></a>00561     <span class="keywordflow">return</span> 0;
-<a name="l00562"></a>00562 }
-<a name="l00563"></a>00563 <span class="preprocessor">#endif</span>
-<a name="l00564"></a>00564 <span class="preprocessor"></span>
-<a name="l00565"></a>00565 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_machine_H */</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/a00293.html b/doc/html/a00381.html
similarity index 98%
rename from doc/html/a00293.html
rename to doc/html/a00381.html
index 3b4f5ec..34ef897 100644
--- a/doc/html/a00293.html
+++ b/doc/html/a00381.html
@@ -43,12 +43,12 @@
 <a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_profiling_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 && __TBB_NAMING_API_SUPPORT</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/tbb_stddef.h"</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 {
diff --git a/doc/html/a00294.html b/doc/html/a00382.html
similarity index 56%
copy from doc/html/a00294.html
copy to doc/html/a00382.html
index a8091b3..cd0e86e 100644
--- a/doc/html/a00294.html
+++ b/doc/html/a00382.html
@@ -44,10 +44,10 @@
 <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 1</span>
+<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 3016</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="l00031"></a>00031 <span class="preprocessor"></span>
 <a name="l00032"></a>00032 <span class="comment">// The oldest major interface version still supported</span>
@@ -68,7 +68,7 @@
 <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)</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>
@@ -86,7 +86,7 @@
 <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 _WIN32||_WIN64</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 {
@@ -102,8 +102,8 @@
 <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>
-<a name="l00135"></a>00135 <span class="preprocessor"></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>
@@ -114,154 +114,107 @@
 <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 _WIN32||_WIN64</span>
+<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><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152 <span class="preprocessor">#ifndef TBB_USE_DEBUG</span>
-<a name="l00153"></a>00153 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_DO_ASSERT</span>
-<a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_DEBUG TBB_DO_ASSERT</span>
-<a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00156"></a>00156 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_DEBUG 0</span>
-<a name="l00157"></a>00157 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
-<a name="l00158"></a>00158 <span class="preprocessor">#else</span>
-<a name="l00159"></a>00159 <span class="preprocessor"></span><span class="preprocessor">#define TBB_DO_ASSERT TBB_USE_DEBUG</span>
-<a name="l00160"></a>00160 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_DEBUG */</span>
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162 <span class="preprocessor">#ifndef TBB_USE_ASSERT</span>
-<a name="l00163"></a>00163 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_DO_ASSERT</span>
-<a name="l00164"></a>00164 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_ASSERT TBB_DO_ASSERT</span>
-<a name="l00165"></a>00165 <span class="preprocessor"></span><span class="preprocessor">#else </span>
-<a name="l00166"></a>00166 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_ASSERT TBB_USE_DEBUG</span>
-<a name="l00167"></a>00167 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
-<a name="l00168"></a>00168 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00169"></a>00169 
-<a name="l00170"></a>00170 <span class="preprocessor">#ifndef TBB_USE_THREADING_TOOLS</span>
-<a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_DO_THREADING_TOOLS</span>
-<a name="l00172"></a>00172 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS</span>
-<a name="l00173"></a>00173 <span class="preprocessor"></span><span class="preprocessor">#else </span>
-<a name="l00174"></a>00174 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG</span>
-<a name="l00175"></a>00175 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS */</span>
-<a name="l00176"></a>00176 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
-<a name="l00177"></a>00177 
-<a name="l00178"></a>00178 <span class="preprocessor">#ifndef TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l00179"></a>00179 <span class="preprocessor"></span><span class="preprocessor">#ifdef TBB_PERFORMANCE_WARNINGS</span>
-<a name="l00180"></a>00180 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS</span>
-<a name="l00181"></a>00181 <span class="preprocessor"></span><span class="preprocessor">#else </span>
-<a name="l00182"></a>00182 <span class="preprocessor"></span><span class="preprocessor">#define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG</span>
-<a name="l00183"></a>00183 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_PEFORMANCE_WARNINGS */</span>
-<a name="l00184"></a>00184 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_PERFORMANCE_WARNINGS */</span>
-<a name="l00185"></a>00185 
-<a name="l00186"></a>00186 <span class="keyword">namespace </span>tbb {
-<a name="l00188"></a><a class="code" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">00188</a>     <span class="keyword">typedef</span> void(*<a class="code" href="a00181.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="l00189"></a>00189 }
+<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="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="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="l00191"></a>00191 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00192"></a>00192 <span class="preprocessor"></span>
-<a name="l00194"></a>00194 
-<a name="l00197"></a>00197 <span class="preprocessor">#define __TBB_ASSERT(predicate,message) ((predicate)?((void)0):tbb::assertion_failure(__FILE__,__LINE__,#predicate,message))</span>
-<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_ASSERT_EX __TBB_ASSERT</span>
-<a name="l00199"></a>00199 <span class="preprocessor"></span>
-<a name="l00200"></a>00200 <span class="keyword">namespace </span>tbb {
-<a name="l00202"></a>00202     <a class="code" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> __TBB_EXPORTED_FUNC <a class="code" href="a00181.html#823fa1c15dd829d1d9167157450ddcd9">set_assertion_handler</a>( <a class="code" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> new_handler );
-<a name="l00203"></a>00203 
+<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="l00208"></a>00208     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC <a class="code" href="a00181.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="l00209"></a>00209 } <span class="comment">// namespace tbb</span>
-<a name="l00210"></a>00210 
-<a name="l00211"></a>00211 <span class="preprocessor">#else</span>
-<a name="l00212"></a>00212 <span class="preprocessor"></span>
-<a name="l00214"></a>00214 <span class="preprocessor">#define __TBB_ASSERT(predicate,comment) ((void)0)</span>
-<a name="l00216"></a>00216 <span class="preprocessor">#define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate)))</span>
-<a name="l00217"></a>00217 <span class="preprocessor"></span>
-<a name="l00218"></a>00218 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00219"></a>00219 
-<a name="l00221"></a>00221 <span class="keyword">namespace </span>tbb {
-<a name="l00222"></a>00222 
-<a name="l00224"></a>00224 
-<a name="l00228"></a>00228 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00181.html#a6858b22e90041c9c4669674ff39b056">TBB_runtime_interface_version</a>();
-<a name="l00229"></a>00229 
-<a name="l00231"></a>00231 
-<a name="l00235"></a><a class="code" href="a00131.html">00235</a> <span class="keyword">class </span><a class="code" href="a00131.html">split</a> {
-<a name="l00236"></a>00236 };
+<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="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="l00242"></a>00242 <span class="keyword">namespace </span>internal {
-<a name="l00243"></a>00243 
-<a name="l00244"></a>00244 <span class="keyword">using</span> std::size_t;
-<a name="l00245"></a>00245 
-<a name="l00247"></a>00247 
-<a name="l00249"></a>00249 <span class="keyword">typedef</span> size_t uintptr;
-<a name="l00250"></a>00250 
-<a name="l00252"></a>00252 
-<a name="l00254"></a>00254 <span class="keyword">typedef</span> std::ptrdiff_t intptr;
-<a name="l00255"></a>00255 
-<a name="l00257"></a>00257 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC runtime_warning( <span class="keyword">const</span> <span class="keywordtype">char</span>* format, ... );
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00261"></a>00261 <span class="preprocessor">template<typename T></span>
-<a name="l00262"></a>00262 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* & p ) {
-<a name="l00263"></a>00263     p = reinterpret_cast<T*>(-1);
-<a name="l00264"></a>00264 }
-<a name="l00265"></a>00265 <span class="preprocessor">#else</span>
-<a name="l00266"></a>00266 <span class="preprocessor"></span><span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00267"></a>00267 <span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* ) {<span class="comment">/*do nothing*/</span>}
-<a name="l00268"></a>00268 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00269"></a>00269 
-<a name="l00271"></a>00271 <span class="keyword">class </span>no_assign {
-<a name="l00272"></a>00272     <span class="comment">// Deny assignment</span>
-<a name="l00273"></a>00273     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> no_assign& );
-<a name="l00274"></a>00274 <span class="keyword">public</span>:
-<a name="l00275"></a>00275 <span class="preprocessor">#if __GNUC__</span>
-<a name="l00277"></a>00277 <span class="preprocessor">    no_assign() {}</span>
-<a name="l00278"></a>00278 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
-<a name="l00279"></a>00279 };
-<a name="l00280"></a>00280 
-<a name="l00282"></a>00282 <span class="keyword">class </span>no_copy: no_assign {
-<a name="l00284"></a>00284     no_copy( <span class="keyword">const</span> no_copy& );
-<a name="l00285"></a>00285 <span class="keyword">public</span>:
-<a name="l00287"></a>00287     no_copy() {}
-<a name="l00288"></a>00288 };
-<a name="l00289"></a>00289 
-<a name="l00291"></a>00291 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00292"></a>00292 <span class="keyword">struct </span>allocator_type {
-<a name="l00293"></a>00293     <span class="keyword">typedef</span> T value_type;
-<a name="l00294"></a>00294 };
-<a name="l00295"></a>00295 
-<a name="l00296"></a>00296 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00298"></a>00298 <span class="preprocessor">template<typename T></span>
-<a name="l00299"></a>00299 <span class="preprocessor"></span><span class="keyword">struct </span>allocator_type<const T> {
-<a name="l00300"></a>00300     <span class="keyword">typedef</span> T value_type;
-<a name="l00301"></a>00301 };
-<a name="l00302"></a>00302 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00303"></a>00303 
-<a name="l00304"></a>00304 <span class="comment">// Struct to be used as a version tag for inline functions.</span>
-<a name="l00307"></a>00307 <span class="comment"></span><span class="keyword">struct </span>version_tag_v3 {};
-<a name="l00308"></a>00308 
-<a name="l00309"></a>00309 <span class="keyword">typedef</span> version_tag_v3 version_tag;
-<a name="l00310"></a>00310 
-<a name="l00311"></a>00311 } <span class="comment">// internal</span>
-<a name="l00313"></a>00313 <span class="comment"></span>
-<a name="l00314"></a>00314 } <span class="comment">// tbb</span>
-<a name="l00315"></a>00315 
-<a name="l00316"></a>00316 <span class="preprocessor">#if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)</span>
-<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_EXCEPTIONS</span>
-<a name="l00318"></a>00318 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXCEPTIONS 1</span>
-<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00320"></a>00320 <span class="preprocessor">#endif</span>
-<a name="l00321"></a>00321 <span class="preprocessor"></span>
-<a name="l00322"></a>00322 <span class="preprocessor">#ifndef __TBB_SCHEDULER_OBSERVER</span>
-<a name="l00323"></a>00323 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_SCHEDULER_OBSERVER 1</span>
-<a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_SCHEDULER_OBSERVER */</span>
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326 <span class="preprocessor">#ifndef __TBB_NAMING_API_SUPPORT</span>
-<a name="l00327"></a>00327 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NAMING_API_SUPPORT 1</span>
-<a name="l00328"></a>00328 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_NAMING_API_SUPPORT */</span>
-<a name="l00329"></a>00329 
-<a name="l00330"></a>00330 
-<a name="l00331"></a>00331 <span class="preprocessor">#endif </span><span class="comment">/* RC_INVOKED */</span>
-<a name="l00332"></a>00332 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_stddef_H */</span>
+<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>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00299.html b/doc/html/a00387.html
similarity index 100%
copy from doc/html/a00299.html
copy to doc/html/a00387.html
diff --git a/doc/html/a00395.html b/doc/html/a00395.html
new file mode 100644
index 0000000..ab1f0b2
--- /dev/null
+++ b/doc/html/a00395.html
@@ -0,0 +1,96 @@
+<!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>tbbmalloc_proxy.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>tbbmalloc_proxy.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="comment">/*</span>
+<a name="l00022"></a>00022 <span class="comment">Replacing the standard memory allocation routines in Microsoft* C/C++ RTL </span>
+<a name="l00023"></a>00023 <span class="comment">(malloc/free, global new/delete, etc.) with the TBB memory allocator. </span>
+<a name="l00024"></a>00024 <span class="comment"></span>
+<a name="l00025"></a>00025 <span class="comment">Include the following header to a source of any binary which is loaded during </span>
+<a name="l00026"></a>00026 <span class="comment">application startup</span>
+<a name="l00027"></a>00027 <span class="comment"></span>
+<a name="l00028"></a>00028 <span class="comment">#include "tbb/tbbmalloc_proxy.h"</span>
+<a name="l00029"></a>00029 <span class="comment"></span>
+<a name="l00030"></a>00030 <span class="comment">or add following parameters to the linker options for the binary which is </span>
+<a name="l00031"></a>00031 <span class="comment">loaded during application startup. It can be either exe-file or dll.</span>
+<a name="l00032"></a>00032 <span class="comment"></span>
+<a name="l00033"></a>00033 <span class="comment">For win32</span>
+<a name="l00034"></a>00034 <span class="comment">tbbmalloc_proxy.lib /INCLUDE:"___TBB_malloc_proxy"</span>
+<a name="l00035"></a>00035 <span class="comment">win64</span>
+<a name="l00036"></a>00036 <span class="comment">tbbmalloc_proxy.lib /INCLUDE:"__TBB_malloc_proxy"</span>
+<a name="l00037"></a>00037 <span class="comment">*/</span>
+<a name="l00038"></a>00038 
+<a name="l00039"></a>00039 <span class="preprocessor">#ifndef __TBB_tbbmalloc_proxy_H</span>
+<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbbmalloc_proxy_H</span>
+<a name="l00041"></a>00041 <span class="preprocessor"></span>
+<a name="l00042"></a>00042 <span class="preprocessor">#if _MSC_VER</span>
+<a name="l00043"></a>00043 <span class="preprocessor"></span>
+<a name="l00044"></a>00044 <span class="preprocessor">#ifdef _DEBUG</span>
+<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">    #pragma comment(lib, "tbbmalloc_proxy_debug.lib")</span>
+<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">    #pragma comment(lib, "tbbmalloc_proxy.lib")</span>
+<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00049"></a>00049 <span class="preprocessor"></span>
+<a name="l00050"></a>00050 <span class="preprocessor">#if defined(_WIN64)</span>
+<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">    #pragma comment(linker, "/include:__TBB_malloc_proxy")</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">    #pragma comment(linker, "/include:___TBB_malloc_proxy")</span>
+<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00055"></a>00055 <span class="preprocessor"></span>
+<a name="l00056"></a>00056 <span class="preprocessor">#else</span>
+<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="comment">/* Primarily to support MinGW */</span>
+<a name="l00058"></a>00058 
+<a name="l00059"></a>00059 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> <span class="keywordtype">void</span> __TBB_malloc_proxy();
+<a name="l00060"></a>00060 <span class="keyword">struct </span>__TBB_malloc_proxy_caller {
+<a name="l00061"></a>00061     __TBB_malloc_proxy_caller() { __TBB_malloc_proxy(); }
+<a name="l00062"></a>00062 } <span class="keyword">volatile</span> __TBB_malloc_proxy_helper_object;
+<a name="l00063"></a>00063 
+<a name="l00064"></a>00064 <span class="preprocessor">#endif // _MSC_VER</span>
+<a name="l00065"></a>00065 <span class="preprocessor"></span>
+<a name="l00066"></a>00066 <span class="preprocessor">#endif //__TBB_tbbmalloc_proxy_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/a00307.html b/doc/html/a00397.html
similarity index 76%
rename from doc/html/a00307.html
rename to doc/html/a00397.html
index cb9b531..a53ea4e 100644
--- a/doc/html/a00307.html
+++ b/doc/html/a00397.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="a00140.html">00038</a> <span class="keyword">class </span><a class="code" href="a00140.html">tick_count</a> {
+<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="l00039"></a>00039 <span class="keyword">public</span>:
-<a name="l00041"></a><a class="code" href="a00141.html">00041</a>     <span class="keyword">class </span><a class="code" href="a00141.html">interval_t</a> {
+<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="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="a00141.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="a00173.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="a00141.html#75a9a0949f8a8a84d6758835f1b48dad">00046</a>         <a class="code" href="a00141.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>() : value(0) {};
+<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="l00047"></a>00047 
-<a name="l00049"></a>00049         <span class="keyword">explicit</span> <a class="code" href="a00141.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="a00173.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="a00141.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a>() <span class="keyword">const</span>;
+<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="l00053"></a>00053 
-<a name="l00054"></a>00054         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00140.html">tbb::tick_count</a>;
+<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="l00055"></a>00055 
-<a name="l00057"></a>00057         <span class="keyword">friend</span> <a class="code" href="a00141.html">interval_t</a> <a class="code" href="a00141.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00140.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00140.html">tick_count</a>& t0 );
+<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="l00058"></a>00058 
-<a name="l00060"></a><a class="code" href="a00141.html#5871ead1ca230efbe52a5008470e6428">00060</a>         <span class="keyword">friend</span> <a class="code" href="a00141.html">interval_t</a> <a class="code" href="a00141.html#5871ead1ca230efbe52a5008470e6428">operator+</a>( <span class="keyword">const</span> <a class="code" href="a00141.html">interval_t</a>& i, <span class="keyword">const</span> <a class="code" href="a00141.html">interval_t</a>& j ) {
-<a name="l00061"></a>00061             <span class="keywordflow">return</span> <a class="code" href="a00141.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>(i.<a class="code" href="a00141.html#beea71acda120af3e3e29f10e8cb5c10">value</a>+j.<a class="code" href="a00141.html#beea71acda120af3e3e29f10e8cb5c10">value</a>);
+<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="l00062"></a>00062         }
 <a name="l00063"></a>00063 
-<a name="l00065"></a><a class="code" href="a00141.html#fa509691e1d689830931e36edd274f76">00065</a>         <span class="keyword">friend</span> <a class="code" href="a00141.html">interval_t</a> <a class="code" href="a00141.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00141.html">interval_t</a>& i, <span class="keyword">const</span> <a class="code" href="a00141.html">interval_t</a>& j ) {
-<a name="l00066"></a>00066             <span class="keywordflow">return</span> <a class="code" href="a00141.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>(i.<a class="code" href="a00141.html#beea71acda120af3e3e29f10e8cb5c10">value</a>-j.<a class="code" href="a00141.html#beea71acda120af3e3e29f10e8cb5c10">value</a>);
+<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="l00067"></a>00067         }
 <a name="l00068"></a>00068 
-<a name="l00070"></a><a class="code" href="a00141.html#cd9814947902e26463a69a111530f81b">00070</a>         <a class="code" href="a00141.html">interval_t</a>& <a class="code" href="a00141.html#cd9814947902e26463a69a111530f81b">operator+=</a>( <span class="keyword">const</span> <a class="code" href="a00141.html">interval_t</a>& i ) {value += i.<a class="code" href="a00141.html#beea71acda120af3e3e29f10e8cb5c10">value</a>; <span class="keywordflow">return</span> *<span class="keyword [...]
+<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="l00071"></a>00071 
-<a name="l00073"></a><a class="code" href="a00141.html#35ff7eaf7c2031b4a991402ac9ecb940">00073</a>         <a class="code" href="a00141.html">interval_t</a>& <a class="code" href="a00141.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a>( <span class="keyword">const</span> <a class="code" href="a00141.html">interval_t</a>& i ) {value -= i.<a class="code" href="a00141.html#beea71acda120af3e3e29f10e8cb5c10">value</a>; <span class="keywordflow">return</span> *<span class="keyword [...]
+<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="l00074"></a>00074     };
 <a name="l00075"></a>00075     
-<a name="l00077"></a><a class="code" href="a00140.html#34593326ae4191e02a13c7cbdab9de4c">00077</a>     <a class="code" href="a00140.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a>() : my_count(0) {};
+<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="l00078"></a>00078 
-<a name="l00080"></a>00080     <span class="keyword">static</span> <a class="code" href="a00140.html">tick_count</a> <a class="code" href="a00140.html#fb7f78ca61cf28398645ace66e284473">now</a>();
+<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="l00081"></a>00081     
-<a name="l00083"></a>00083     <span class="keyword">friend</span> interval_t <a class="code" href="a00140.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00140.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00140.html">tick_count</a>& t0 );
+<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="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="a00140.html#fb7f78ca61cf28398645ace66e284473">00089</a> <span class="keyword">inline</span> <a class="code" href="a00140.html">tick_count</a> <a class="code" href="a00140.html#fb7f78ca61cf28398645ace66e284473">tick_count::now</a>() {
-<a name="l00090"></a>00090     <a class="code" href="a00140.html">tick_count</a> result;
+<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="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="a00140.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> = qpcnt.QuadPart;
+<a name="l00094"></a>00094     result.<a class="code" href="a00172.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="a00140.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="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="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="a00140.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="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="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="a00141.html#1a21a428e00cced2e6a49e0f5f2258bf">00115</a> <span class="keyword">inline</span> <a class="code" href="a00141.html#75a9a0949f8a8a84d6758835f1b48dad">tick_count::interval_t::interval_t</a>( <span class="keywordtype">double</span> sec )
+<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="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="a00140.html#09dde78a4100800c11bb883d6204b586">00128</a> <span class="keyword">inline</span> <a class="code" href="a00141.html">tick_count::interval_t</a> <a class="code" href="a00140.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00140.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00140.html">tick_count</a>& t0 ) {
-<a name="l00129"></a>00129     <span class="keywordflow">return</span> <a class="code" href="a00141.html">tick_count::interval_t</a>( t1.<a class="code" href="a00140.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a>-t0.<a class="code" href="a00140.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> );
+<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="l00130"></a>00130 }
 <a name="l00131"></a>00131 
-<a name="l00132"></a><a class="code" href="a00141.html#d5d8429c0bc59cf6131b2abc7929fa59">00132</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="a00141.html#d5d8429c0bc59cf6131b2abc7929fa59">tick_count::interval_t::seconds</a>()<span class="keyword"> const </span>{
+<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="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 041f9b5..9103f6e 100644
--- a/doc/html/annotated.html
+++ b/doc/html/annotated.html
@@ -21,58 +21,68 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <h1>Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
-  <tr><td class="indexkey"><a class="el" href="a00091.html">tbb::affinity_partitioner</a></td><td class="indexvalue">An affinity partitioner </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00092.html">tbb::aligned_space< T, N ></a></td><td class="indexvalue">Block of space aligned sufficiently to construct an array T with N elements </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00093.html">tbb::atomic< T ></a></td><td class="indexvalue">Primary template for atomic </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a></td><td class="indexvalue">Class that implements exponential backoff </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00095.html">tbb::auto_partitioner</a></td><td class="indexvalue">An auto partitioner </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00096.html">tbb::bad_last_alloc</a></td><td class="indexvalue">Exception for concurrent containers </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00097.html">tbb::blocked_range< Value ></a></td><td class="indexvalue">A range over which to iterate </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td class="indexvalue">A 2-dimensional range that models the Range concept </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td class="indexvalue">A 3-dimensional range that models the Range concept </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00100.html">tbb::cache_aligned_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="a00101.html">tbb::cache_aligned_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="a00102.html">tbb::captured_exception</a></td><td class="indexvalue">This class is used by TBB to propagate information about unhandled exceptions into the root thread </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td class="indexvalue">Unordered map from Key to T </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00104.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a></td><td class="indexvalue">Allows write access to elements and combines data access, locking, and garbage collection </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td class="indexvalue">Combines data access, locking, and garbage collection </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a></td><td class="indexvalue">A high-performance thread-safe queue </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a></td><td class="indexvalue">Concurrent vector container </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00108.html">tbb::empty_task</a></td><td class="indexvalue">Task that does nothing. Useful for synchronization </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00109.html">tbb::filter</a></td><td class="indexvalue">A stage in a pipeline </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00110.html">tbb::final_scan_tag</a></td><td class="indexvalue">Used to indicate that the final scan is being performed </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00111.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="a00112.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="a00113.html">tbb::mutex::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00114.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="a00115.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="a00116.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="a00117.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="a00118.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="a00119.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="a00120.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="a00121.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="a00122.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="a00123.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="a00124.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="a00125.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="a00126.html">tbb::simple_partitioner</a></td><td class="indexvalue">A simple partitioner </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00127.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="a00128.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="a00129.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="a00130.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="a00131.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="a00132.html">tbb::task</a></td><td class="indexvalue">Base class for user-defined tasks </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00133.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="a00134.html">tbb::task_list</a></td><td class="indexvalue">A list of children </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00135.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="a00136.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="a00137.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="a00138.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="a00139.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="a00140.html">tbb::tick_count</a></td><td class="indexvalue">Absolute timestamp </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00141.html">tbb::tick_count::interval_t</a></td><td class="indexvalue">Relative time interval </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00142.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="a00115.html">tbb::affinity_partitioner</a></td><td class="indexvalue">An affinity partitioner </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00116.html">tbb::aligned_space< T, N ></a></td><td class="indexvalue">Block of space aligned sufficiently to construct an array T with N elements </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00117.html">tbb::atomic< T ></a></td><td class="indexvalue">Primary template for atomic </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00118.html">tbb::atomic< void * ></a></td><td class="indexvalue">Specialization for <a class="el" href="a00118.html">atomic<void*></a>, for sake of not allowing arithmetic or operator-> </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00119.html">tbb::internal::atomic_backoff</a></td><td class="indexvalue">Class that implements exponential backoff </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00120.html">tbb::auto_partitioner</a></td><td class="indexvalue">An auto partitioner </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00121.html">tbb::bad_last_alloc</a></td><td class="indexvalue">Exception for concurrent containers </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td><td class="indexvalue">A range over which to iterate </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td class="indexvalue">A 2-dimensional range that models the Range concept </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td class="indexvalue">A 3-dimensional range that models the Range concept </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00125.html">tbb::cache_aligned_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="a00126.html">tbb::cache_aligned_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="a00127.html">tbb::captured_exception</a></td><td class="indexvalue">This class is used by TBB to propagate information about unhandled exceptions into the root thread </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00128.html">tbb::combinable< T ></a></td><td class="indexvalue">Thread-local storage with optional reduction </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td><td class="indexvalue">A high-performance thread-safe blocking concurrent bounded queue </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td class="indexvalue">Unordered map from Key to T </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00131.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a></td><td class="indexvalue">Allows write access to elements and combines data access, locking, and garbage collection </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a></td><td class="indexvalue">Bucket accessor is to find, rehash, acquire a lock, and access a bucket </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a></td><td class="indexvalue">Combines data access, locking, and garbage collection </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td><td class="indexvalue">A high-performance thread-safe non-blocking concurrent queue </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td><td class="indexvalue">A high-performance thread-safe blocking concurrent bounded queue </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td><td class="indexvalue">Concurrent vector container </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00137.html">tbb::empty_task</a></td><td class="indexvalue">Task that does nothing. Useful for synchronization </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a></td><td class="indexvalue">The thread local class template </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00139.html">tbb::filter</a></td><td class="indexvalue">A stage in a pipeline </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00140.html">tbb::final_scan_tag</a></td><td class="indexvalue">Used to indicate that the final scan is being performed </td></tr>
+  <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>
 </table>
 <hr>
 <p></p>
diff --git a/doc/html/deprecated.html b/doc/html/deprecated.html
index 48d9466..4edaa4c 100644
--- a/doc/html/deprecated.html
+++ b/doc/html/deprecated.html
@@ -15,7 +15,12 @@
     <li><a href="pages.html"><span>Related Pages</span></a></li>
   </ul></div>
 <h1><a class="anchor" name="deprecated">Deprecated List</a></h1><a class="anchor" name="_deprecated000001"></a> <dl>
-<dt>Member <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">tbb::filter::serial</a>  </dt>
+<dt>Member <a class="el" href="a00135.html#48da3536245318af6cb5fd58bac78039">tbb::deprecated::concurrent_queue::pop_if_present</a> (T &destination) </dt>
+<dd>Use try_pop() </dd>
+</dl>
+<p>
+<a class="anchor" name="_deprecated000002"></a> <dl>
+<dt>Member <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">tbb::filter::serial</a>  </dt>
 <dd>use serial_in_order instead </dd>
 </dl>
 <hr>
diff --git a/doc/html/files.html b/doc/html/files.html
index 0553d16..1ef30c3 100644
--- a/doc/html/files.html
+++ b/doc/html/files.html
@@ -20,43 +20,52 @@
     <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>_tbb_windef.h</b> <a href="a00189.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>aligned_space.h</b> <a href="a00191.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>atomic.h</b> <a href="a00193.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>blocked_range.h</b> <a href="a00200.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>blocked_range2d.h</b> <a href="a00201.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>blocked_range3d.h</b> <a href="a00202.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>cache_aligned_allocator.h</b> <a href="a00203.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>concurrent_hash_map.h</b> <a href="a00205.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>concurrent_queue.h</b> <a href="a00213.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>concurrent_vector.h</b> <a href="a00219.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>mutex.h</b> <a href="a00228.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>null_mutex.h</b> <a href="a00229.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>null_rw_mutex.h</b> <a href="a00232.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_do.h</b> <a href="a00234.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_for.h</b> <a href="a00243.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_reduce.h</b> <a href="a00245.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_scan.h</b> <a href="a00251.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_sort.h</b> <a href="a00256.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_while.h</b> <a href="a00260.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>partitioner.h</b> <a href="a00264.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>pipeline.h</b> <a href="a00269.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>queuing_mutex.h</b> <a href="a00270.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>queuing_rw_mutex.h</b> <a href="a00271.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>recursive_mutex.h</b> <a href="a00272.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00167.html">scalable_allocator.h</a> <a href="a00273.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>spin_mutex.h</b> <a href="a00274.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>spin_rw_mutex.h</b> <a href="a00275.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>task.h</b> <a href="a00276.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>task_scheduler_init.h</b> <a href="a00285.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>task_scheduler_observer.h</b> <a href="a00286.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_allocator.h</b> <a href="a00288.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_exception.h</b> <a href="a00289.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_machine.h</b> <a href="a00290.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_profiling.h</b> <a href="a00293.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_stddef.h</b> <a href="a00294.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_thread.h</b> <a href="a00299.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tick_count.h</b> <a href="a00307.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <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>
 </table>
 <hr>
 <p></p>
diff --git a/doc/html/functions.html b/doc/html/functions.html
index 7069415..e741e27 100644
--- a/doc/html/functions.html
+++ b/doc/html/functions.html
@@ -41,6 +41,7 @@
     <li><a href="#index_f"><span>f</span></a></li>
     <li><a href="#index_g"><span>g</span></a></li>
     <li><a href="#index_i"><span>i</span></a></li>
+    <li><a href="#index_l"><span>l</span></a></li>
     <li><a href="#index_m"><span>m</span></a></li>
     <li><a href="#index_n"><span>n</span></a></li>
     <li><a href="#index_o"><span>o</span></a></li>
@@ -61,205 +62,240 @@ 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="a00130.html#b0b646ec5be02a127d159bbb7ca65353">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#3ee3c338732b1f64b0b32a757807a30d">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#7fb04da37cccf8c99b1f9102d9074f9a">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#a8dd5ab8686e76de21587544dbb681e0">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#533e4fc8355ee321206a0609c42d909d">tbb::qu [...]
-: <a class="el" href="a00115.html#e131c560057a58229992b61eb8dba4c6">tbb::parallel_while< Body ></a>, <a class="el" href="a00114.html#40baaf0f6856f4491dd0adf896c93516">tbb::parallel_do_feeder< Item ></a><li>add_filter()
-: <a class="el" href="a00116.html#38fb5c9c8395dd6f89a4ae2011a83e0d">tbb::pipeline</a><li>add_to_depth()
-: <a class="el" href="a00132.html#b0f98c633647fc73b978fe4cd2277ac4">tbb::task</a><li>affinity()
-: <a class="el" href="a00132.html#3a920a56b0bcf2801518fb45b2c9d2be">tbb::task</a><li>affinity_id
-: <a class="el" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">tbb::task</a><li>allocate()
-: <a class="el" href="a00136.html#f6cb487b1bdce0b581f265a77dca6d53">tbb::tbb_allocator< T ></a>, <a class="el" href="a00124.html#726b1586d05d44665a36e1c7b2699bfd">tbb::scalable_allocator< T ></a>, <a class="el" href="a00100.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">tbb::cache_aligned_allocator< T ></a><li>allocate_additional_child_of()
-: <a class="el" href="a00132.html#43bfe64c0e9333c0ca895cc0c375512b">tbb::task</a><li>allocate_child()
-: <a class="el" href="a00132.html#1ff794f7053cd9148d5f280fbf07377f">tbb::task</a><li>allocate_continuation()
-: <a class="el" href="a00132.html#1434c79a5138993269d034008bff7329">tbb::task</a><li>allocate_root()
-: <a class="el" href="a00132.html#8ccc518caf31075a3e073996d2d240a4">tbb::task</a><li>allocated
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">tbb::task</a><li>allocator_type
-: <a class="el" href="a00136.html#78701e7454ef8e1a25b5acd364367080">tbb::tbb_allocator< T ></a>, <a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">tbb::concurrent_queue< T, A ></a><li>assign()
-: <a class="el" href="a00107.html#93a06b3112cb804f42f40efb5e7387b4">tbb::concurrent_vector< T, A ></a><li>at()
-: <a class="el" href="a00107.html#23e14a38af748edff96a7adc3a0f1c58">tbb::concurrent_vector< T, A ></a><li>automatic
-: <a class="el" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">tbb::task_scheduler_init</a></ul>
+: <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="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>
 <h3><a class="anchor" name="index_b">- b -</a></h3><ul>
 <li>back()
-: <a class="el" href="a00107.html#bd518e204107d07fd08d0ec5bdfd383d">tbb::concurrent_vector< T, A ></a><li>begin()
-: <a class="el" href="a00107.html#78a06182276ff758788d4c0623ae0d71">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00097.html#18d2258400756ac1446dac7676b18df3">tbb::blocked_range< Value ></a>, <a class="el" href="a00092.html#0d702fc6b9e9d061ace3501b3c861cdf">tbb::aligned_space< T, N ></a><li>blocked_range()
-: <a class="el" href="a00097.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">tbb::blocked_range< Value ></a></ul>
+: <a class="el" href="a00136.html#bd518e204107d07fd08d0ec5bdfd383d">tbb::concurrent_vector< T, A ></a><li>begin()
+: <a class="el" href="a00138.html#ba6674c6102a6faf8f96d131497654b3">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#78a06182276ff758788d4c0623ae0d71">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00122.html#18d2258400756ac1446dac7676b18df3">tbb::blocked_range< Value ></a>, <a class="el" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">tbb::aligned_space< T, N ></a><li>blocked_range()
+: <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="a00132.html#0f3fb4aac549ab642022450a4bd13326">tbb::task</a>, <a class="el" href="a00133.html#8bcdfdf4e6bfb76125b6de15c00b571d">tbb::task_group_context</a><li>capacity()
-: <a class="el" href="a00107.html#3ed6b9ae7217af5103d974045b6f5cd5">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#95796a6ad29ea6fe102ac1663a776d07">tbb::concurrent_queue< T, A ></a><li>clear()
-: <a class="el" href="a00134.html#fce446ee13e025969945328f3ff59b95">tbb::task_list</a>, <a class="el" href="a00116.html#2c84aef5b834b555ee220b176e25931e">tbb::pipeline</a>, <a class="el" href="a00107.html#26f937a359a66b6aae904c3cd9a3c444">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#8a6a8a7a8d977d86ae8bd254b9794af1">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00103.html#36bcd50fd5383f3682032323b2d74333">tbb::concurrent_hash_map< Key, T, H [...]
-: <a class="el" href="a00099.html#3336ba9480fd6c43e158f9beb024c050">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00098.html#392a46759af2c884957115771affa7f4">tbb::blocked_range2d< RowValue, ColValue ></a><li>compact()
-: <a class="el" href="a00107.html#1693d1da41b1a8235871be9c6633be35">tbb::concurrent_vector< T, A ></a><li>concurrent_hash_map()
-: <a class="el" href="a00103.html#51cccc7b42e83884462dcadede034822">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>concurrent_queue()
-: <a class="el" href="a00106.html#d3ec1af9c793007ec2ecbdcf637f8ec5">tbb::concurrent_queue< T, A ></a><li>concurrent_vector()
-: <a class="el" href="a00107.html#4450de83c5862ea4bcd9443fd7e67419">tbb::concurrent_vector< T, A ></a><li>const_accessor()
-: <a class="el" href="a00105.html#2a73cc49914e218e579eb77d3d9d6551">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>const_iterator
-: <a class="el" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">tbb::blocked_range< Value ></a><li>const_reference
-: <a class="el" href="a00106.html#981c7c13a4aef3d03f35797ebe214d59">tbb::concurrent_queue< T, A ></a><li>construct()
-: <a class="el" href="a00136.html#ab228ab9e324ed041c2226e1d717df5f">tbb::tbb_allocator< T ></a>, <a class="el" href="a00100.html#958ee8745c86c275bfc9533af565e017">tbb::cache_aligned_allocator< T ></a><li>count()
-: <a class="el" href="a00103.html#345daf26f2f7e2b4d93382fea80b3a7f">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></ul>
+: <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="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="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()
+: <a class="el" href="a00130.html#b5132202dff9ee3d619bef6b1d84edea">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>concurrent_queue()
+: <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>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="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="a00136.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">tbb::tbb_allocator< T ></a>, <a class="el" href="a00124.html#f806a238c18cbcfb531e1e0a0d2ec59d">tbb::scalable_allocator< T ></a>, <a class="el" href="a00100.html#3d4eadf188f7d85d3805ae534e0b8e1c">tbb::cache_aligned_allocator< T ></a><li>default_num_threads()
-: <a class="el" href="a00135.html#ba00714c33a41a3c2216f48613971cab">tbb::task_scheduler_init</a><li>deferred
-: <a class="el" href="a00135.html#e6c860f1e559026ff3ef4599c0d6c514">tbb::task_scheduler_init</a><li>depth()
-: <a class="el" href="a00132.html#5be823a972b3c3b9901c5963eeb050fd">tbb::task</a><li>depth_type
-: <a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">tbb::task</a><li>destroy()
-: <a class="el" href="a00111.html#7a46873119d9f85a7b0009c13e41a258">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#667812a82f1525e968c52593dea0ef4c">tbb::captured_exception</a>, <a class="el" href="a00138.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>, <a class="el" href="a00136.html#ef133522bf55f05a605bee0763208281">tbb::tbb_allocator< T ></a>, <a class="el" href="a00132.html#a57def00c8e9d932dbea0b3ee23991b9">tbb::task</a>, <a cla [...]
-: <a class="el" href="a00106.html#3c0b5f19b820719ab4f69eeb9bf75afc">tbb::concurrent_queue< T, A ></a><li>downgrade_to_reader()
-: <a class="el" href="a00130.html#c2c2c38a08cb9080e87099fac3e5bc94">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00121.html#0d2f93edf7b15ec4bcee138823220c52">tbb::queuing_rw_mutex::scoped_lock</a></ul>
+: <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="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>
 <h3><a class="anchor" name="index_e">- e -</a></h3><ul>
 <li>empty()
-: <a class="el" href="a00134.html#f3ac31e092814b90929f81bb30441959">tbb::task_list</a>, <a class="el" href="a00107.html#c6426cb93cf20d3af40f3c90f1f0481a">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#313c369998b69de6e039b9afb9ca3237">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00103.html#b9599dd587892366ed31dea23e5c5837">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00105.html#38712b9809d23d2fba5e4780bb3c4 [...]
-: <a class="el" href="a00107.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">tbb::blocked_range< Value ></a>, <a class="el" href="a00092.html#024be075c23c0394c9a2518d993bcd9e">tbb::aligned_space< T, N ></a><li>erase()
-: <a class="el" href="a00103.html#b5bd8c8f49f8d0e72afedca53caa6b15">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>execute()
-: <a class="el" href="a00132.html#22c298cd40937a431a06777423f002f6">tbb::task</a><li>executing
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">tbb::task</a></ul>
+: <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="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>
 <h3><a class="anchor" name="index_f">- f -</a></h3><ul>
 <li>finalize()
-: <a class="el" href="a00109.html#56275eb889c77c4807967133e21401bd">tbb::filter</a><li>find()
-: <a class="el" href="a00103.html#68a6bd5b8a0bc2d5066e5eb175fd5ba9">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>freed
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">tbb::task</a><li>front()
-: <a class="el" href="a00107.html#502615a858eb9fa0390ee59169065e90">tbb::concurrent_vector< T, A ></a></ul>
+: <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="a00136.html#502615a858eb9fa0390ee59169065e90">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_g">- g -</a></h3><ul>
 <li>get_allocator()
-: <a class="el" href="a00107.html#2fdba8e90de6a4d2300222236d46758e">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#11a088eee45cc1cb0c0b32adadbff92e">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00103.html#14255f38f7b10bb892b233fce283fbce">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>grainsize()
-: <a class="el" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">tbb::blocked_range< Value ></a><li>grow_by()
-: <a class="el" href="a00107.html#38274ab3f772ecba600c7daca7690102">tbb::concurrent_vector< T, A ></a><li>grow_to_at_least()
-: <a class="el" href="a00107.html#47fe588214dd5fa06ab6e8ab78d83874">tbb::concurrent_vector< T, A ></a></ul>
+: <a class="el" href="a00136.html#2fdba8e90de6a4d2300222236d46758e">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#415eb87e53b1c6a266de06ecbc490d16">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#f034f70caef445fe8abc9113ec926a8d">tbb::strict_ppl::concurrent_queue< T, A ></a>, <a class="el" href="a00130.html#79d1e5c3b975dbd38b43138266fe4c0e">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>grainsize()
+: <a class="el" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">tbb::blocked_range< Value ></a><li>grow_by()
+: <a class="el" href="a00136.html#473a59a4c9308b93411b898b3110d26c">tbb::concurrent_vector< T, A ></a><li>grow_to_at_least()
+: <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>init()
-: <a class="el" href="a00133.html#49a55352084fd44b8863d182e839e6dc">tbb::task_group_context</a><li>initialize()
-: <a class="el" href="a00135.html#d5ed214a8bb53b0466ed91ff4734b9a3">tbb::task_scheduler_init</a><li>insert()
-: <a class="el" href="a00103.html#06a95a56a40fcbdf3897051d22aaab19">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>interval_t()
-: <a class="el" href="a00141.html#1a21a428e00cced2e6a49e0f5f2258bf">tbb::tick_count::interval_t</a><li>is_active()
-: <a class="el" href="a00135.html#12752282977029f23416642bc03e8b74">tbb::task_scheduler_init</a><li>is_cancelled()
-: <a class="el" href="a00132.html#025f18118c057c4c8db87ff2ce8df975">tbb::task</a><li>is_divisible()
-: <a class="el" href="a00099.html#39d69191721c488e737ae5d9c5336b9c">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00098.html#ad36a9b38e4fef26d376f99552ce2d92">tbb::blocked_range2d< RowValue, ColValue ></a>, <a class="el" href="a00097.html#41a58b703d574b6e1ca155df3576f578">tbb::blocked_range< Value ></a><li>is_group_execution_cancelled()
-: <a class="el" href="a00133.html#4db72f16210b0a991b2c134d6763a4cc">tbb::task_group_context</a><li>is_owned_by_current_thread()
-: <a class="el" href="a00132.html#c26718b3b247cd13deb1a741902e7105">tbb::task</a><li>is_serial()
-: <a class="el" href="a00109.html#fcfec27656a69ff2072802ac001e936f">tbb::filter</a><li>is_stolen_task()
-: <a class="el" href="a00132.html#f9169402702f56bf519448aaf34450aa">tbb::task</a></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="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="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="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="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="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="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="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="a00136.html#09a7f81fb2c3055aaecf058b11538544">tbb::tbb_allocator< T ></a><li>max_size()
-: <a class="el" href="a00136.html#f059ca2c96243024f0d562ee3a87a3a5">tbb::tbb_allocator< T ></a>, <a class="el" href="a00124.html#880e766f1d913988c21973dbdd874fd5">tbb::scalable_allocator< T ></a>, <a class="el" href="a00107.html#2c248a017f0576df3e7cd99627836fd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00103.html#62d1fdc2c4d37d84b0dca1cd45f1cf1f">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00100.html#fb23b687b4c0429 [...]
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf">tbb::filter</a><li>move()
-: <a class="el" href="a00111.html#1aea0ad179d6f0481fe7f3495f66adf9">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#df6bbb78a362fe862a341e81e2999810">tbb::captured_exception</a>, <a class="el" href="a00138.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a><li>mutex()
-: <a class="el" href="a00112.html#05313cb77d4f85213103d4dab74ed454">tbb::mutex</a><li>my_exception_data
-: <a class="el" href="a00111.html#a8c0ae2089ae784b28907cf748b89416">tbb::movable_exception< ExceptionData ></a></ul>
+: <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="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="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="a00111.html#bc5f5c4739b17ac5211ac58226c2f5a5">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#5af82fd677449c5ca727fa1d7e16f9f5">tbb::captured_exception</a>, <a class="el" href="a00138.html#d00f6497e552fee978a02bfcbebf46e2">tbb::tbb_exception</a><li>note_affinity()
-: <a class="el" href="a00132.html#713c338c8eeaebdc5a6b10a69c039b06">tbb::task</a><li>now()
-: <a class="el" href="a00140.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="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>
 <h3><a class="anchor" name="index_o">- o -</a></h3><ul>
 <li>operator *()
-: <a class="el" href="a00104.html#52334dd5411e7b95635b90527d7d6062">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00105.html#ea4d48e45dd039a2be10178df9336001">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>operator()()
-: <a class="el" href="a00109.html#fa1b3dc1f4f47563ccab7f4d92f5b543">tbb::filter</a><li>operator+
-: <a class="el" href="a00141.html#5871ead1ca230efbe52a5008470e6428">tbb::tick_count::interval_t</a><li>operator+=()
-: <a class="el" href="a00141.html#cd9814947902e26463a69a111530f81b">tbb::tick_count::interval_t</a><li>operator-
-: <a class="el" href="a00140.html#09dde78a4100800c11bb883d6204b586">tbb::tick_count</a>, <a class="el" href="a00141.html#fa509691e1d689830931e36edd274f76">tbb::tick_count::interval_t</a><li>operator-=()
-: <a class="el" href="a00141.html#35ff7eaf7c2031b4a991402ac9ecb940">tbb::tick_count::interval_t</a><li>operator->()
-: <a class="el" href="a00104.html#0fae0495144540e2b011a6530f68f1cb">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00105.html#def170ba3b18905cd4e9d90f8a9a9cd9">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>operator=()
-: <a class="el" href="a00107.html#19f4ab88a01b0fd056af3bba463e7bd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00103.html#d70ad33f97ce38d004620580bb1b09ba">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>operator[]()
-: <a class="el" href="a00107.html#c6fade5c732cc95274d1d8277ea619d1">tbb::concurrent_vector< T, A ></a></ul>
+: <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="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="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>page_range_type
-: <a class="el" href="a00099.html#b8ebf17a552ba47825e9b3887855b719">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>pages()
-: <a class="el" href="a00099.html#cf971430aa12361d3ed245344b7c6764">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>parallel
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">tbb::filter</a><li>parallel_while()
-: <a class="el" href="a00115.html#36e26ba3880c7bcf804a97ba0cbe133f">tbb::parallel_while< Body ></a><li>parent()
-: <a class="el" href="a00132.html#314e98ee4347ccec83efcb9ee22e8596">tbb::task</a><li>pause()
-: <a class="el" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">tbb::internal::AtomicBackoff</a><li>pipeline()
-: <a class="el" href="a00116.html#596dc3beba27099c4c8581cb419e1a59">tbb::pipeline</a><li>pop()
-: <a class="el" href="a00106.html#170ab4b57a20f0ff00fb8642d4f55e5c">tbb::concurrent_queue< T, A ></a><li>pop_front()
-: <a class="el" href="a00134.html#5fe85df5ed524418389d34051750347d">tbb::task_list</a><li>pop_if_present()
-: <a class="el" href="a00106.html#7088b06d6c226c44a07a310c12176a0c">tbb::concurrent_queue< T, A ></a><li>push()
-: <a class="el" href="a00106.html#28259b68d5ba6cc77abf72b8d7d22e69">tbb::concurrent_queue< T, A ></a><li>push_back()
-: <a class="el" href="a00134.html#4cd34756bc4763dafb8c84838a0124ff">tbb::task_list</a>, <a class="el" href="a00107.html#e0087c0f58b49e43b6322ff1ec0bc98d">tbb::concurrent_vector< T, A ></a><li>push_if_not_full()
-: <a class="el" href="a00106.html#0a91166177c0ceb5a1ddd22827509345">tbb::concurrent_queue< T, A ></a></ul>
+: <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="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="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="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="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="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="a00118.html#b389ad9c4db7293e4bdb5b8cda69ec04">tbb::queuing_mutex</a><li>queuing_rw_mutex()
-: <a class="el" href="a00120.html#85c90877c3447690ac4e2ac4ff8dea5e">tbb::queuing_rw_mutex</a></ul>
+: <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>
 <h3><a class="anchor" name="index_r">- r -</a></h3><ul>
 <li>range()
-: <a class="el" href="a00107.html#3d09ccfb581b879ae64203741035e193">tbb::concurrent_vector< T, A ></a><li>rbegin()
-: <a class="el" href="a00107.html#9f9c103e18d5f212703805354074ad44">tbb::concurrent_vector< T, A ></a><li>ready
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">tbb::task</a><li>recursive_mutex()
-: <a class="el" href="a00122.html#d2fceb7f95c24a8cd1457d4527e4b8c6">tbb::recursive_mutex</a><li>recycle
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">tbb::task</a><li>recycle_as_child_of()
-: <a class="el" href="a00132.html#db399855177438bbc9cc61d508dae8d2">tbb::task</a><li>recycle_as_continuation()
-: <a class="el" href="a00132.html#a67a79e18f62b43a623a00cfbd76db4c">tbb::task</a><li>recycle_as_safe_continuation()
-: <a class="el" href="a00132.html#3b290d14109704e2b69dc1ac980a7a76">tbb::task</a><li>recycle_to_reexecute()
-: <a class="el" href="a00132.html#4f1be9bbcdb487830dbe298b68d85144">tbb::task</a><li>reexecute
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">tbb::task</a><li>ref_count()
-: <a class="el" href="a00132.html#ad774f55eaec008ae02b236423209ced">tbb::task</a><li>reference
-: <a class="el" href="a00106.html#ea0fab9094080138fef0802125160739">tbb::concurrent_queue< T, A ></a><li>release()
-: <a class="el" href="a00130.html#61b14d00a78185c9b2d206ebfc379124">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#eeb615e68e963e6bf8d9c11402d0ce8e">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#ac480ea0e9d5ea0345a67d57008b6263">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#67ae221109ddc69510ab593874e435d4">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#3bf2b8c87ff22115be9b2eac179f2d30">tbb::qu [...]
-: <a class="el" href="a00107.html#d438b9b32ea3a8ffb703015b6dce055b">tbb::concurrent_vector< T, A ></a><li>reserve()
-: <a class="el" href="a00107.html#5a0ce05026994b010018f72cfdeb72c1">tbb::concurrent_vector< T, A ></a><li>reset()
-: <a class="el" href="a00133.html#6d30d16bf1cd22f86c6afaf29c2b430c">tbb::task_group_context</a><li>row_range_type
-: <a class="el" href="a00098.html#a807a22fe658ec38b8edfd69521d0383">tbb::blocked_range2d< RowValue, ColValue ></a><li>rows()
-: <a class="el" href="a00099.html#1584623e59ff32a8aa82006827508be4">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00098.html#f496e7348a82652fba581203477cc07c">tbb::blocked_range2d< RowValue, ColValue ></a><li>run()
-: <a class="el" href="a00116.html#93d7fec8cd607b803dd2d79fb46bd260">tbb::pipeline</a>, <a class="el" href="a00115.html#b32a0a6e5e09ebb7fad3e6652c19afe5">tbb::parallel_while< Body ></a></ul>
+: <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="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="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="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>
 <h3><a class="anchor" name="index_s">- s -</a></h3><ul>
 <li>scoped_lock()
-: <a class="el" href="a00130.html#42a92d4f8fdde425b111cfa8a9228071">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#5ce6807050a9e8f87bcb4a65dccb12ef">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#dec17713c4c1321ac8fec66816d0c602">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#fbb8798792d3aebb136c46fc63d2529e">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#9b51ef972f5618ac17caadb58841ab6d">tbb::qu [...]
-: <a class="el" href="a00141.html#d5d8429c0bc59cf6131b2abc7929fa59">tbb::tick_count::interval_t</a><li>self()
-: <a class="el" href="a00132.html#bd43e8d6249738efafd12d6a4c72c5e3">tbb::task</a><li>serial
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">tbb::filter</a><li>serial_in_order
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">tbb::filter</a><li>serial_out_of_order
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">tbb::filter</a><li>set_affinity()
-: <a class="el" href="a00132.html#dca19d7a45487a7d67a0db517e2b57c9">tbb::task</a><li>set_capacity()
-: <a class="el" href="a00106.html#92977e1eb9af259f3aef69f0181476c1">tbb::concurrent_queue< T, A ></a><li>set_depth()
-: <a class="el" href="a00132.html#fc4d4e61a56823aa1efdbb5d59e42973">tbb::task</a><li>set_ref_count()
-: <a class="el" href="a00132.html#06a4206a57e8e12a439b14d6d41cfd92">tbb::task</a><li>size()
-: <a class="el" href="a00107.html#715fe313c4a9c22731cc404dd80c9ec9">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#94499bca8d540a1927f9368b386dabea">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00103.html#75bb57a153952ffadfcf2e4c73deabb1">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">tbb::blocked_range< Value ></a><li>size_type
-: <a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">tbb::blocked_range< Value ></a><li>spawn()
-: <a class="el" href="a00132.html#db841c647eb6d754440c2f4e4a73c80b">tbb::task</a><li>spawn_and_wait_for_all()
-: <a class="el" href="a00132.html#894ab68378e502776d8220eea7ce9fa1">tbb::task</a><li>spawn_root_and_wait()
-: <a class="el" href="a00132.html#c33c7edbaec67aa8a56f48986a9dc69f">tbb::task</a><li>spin_mutex()
-: <a class="el" href="a00127.html#3d8fb44644fd8d41ada1fbeba7409be3">tbb::spin_mutex</a><li>spin_rw_mutex_v3()
-: <a class="el" href="a00129.html#61332b2756de89f3f5f69310cbb6e70c">tbb::spin_rw_mutex_v3</a><li>state()
-: <a class="el" href="a00132.html#0af7b2d7e6e8b4333b2accfce3dfb374">tbb::task</a><li>state_type
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e">tbb::task</a><li>swap()
-: <a class="el" href="a00107.html#96c9c4bd968ed3edb8dd276854d2dae0">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00103.html#74990f452286f35ad6aa08cab6c5a8cd">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></ul>
+: <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="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="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="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="a00132.html#2bce8ec6e44706e70128f5cf91b76e67">tbb::task</a><li>task_group_context()
-: <a class="el" href="a00133.html#6fc0ba6f3abcdb4d43277c05bd67bdd4">tbb::task_group_context</a><li>task_list()
-: <a class="el" href="a00134.html#416341c2047eaef50417b41eaf7e9de6">tbb::task_list</a><li>task_scheduler_init()
-: <a class="el" href="a00135.html#421600bf9bf9338bcf937063f2ff0e90">tbb::task_scheduler_init</a><li>terminate()
-: <a class="el" href="a00135.html#f73257e04cb7fb9bd5be2b635d9016f1">tbb::task_scheduler_init</a><li>throw_self()
-: <a class="el" href="a00111.html#17cffba35811c92b7e65d63506b69602">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, <a class="el" href="a00138.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a><li>tick_count()
-: <a class="el" href="a00140.html#34593326ae4191e02a13c7cbdab9de4c">tbb::tick_count</a><li>try_acquire()
-: <a class="el" href="a00130.html#9879626968d9b9a04cd2ec0fb2e84ae1">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#9297ec188534b45dc0ca48f2f39a0501">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#36bfc3e93e3ef6340abef4901444d340">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#2e4ff6c9ec2fee6682f95290d1f42baa">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#e5a014fb817599386a87170cf2cf51a9">tbb::qu [...]
+: <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="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="a00129.html#2bd6232531279fb3ccbd296bea23066b">tbb::concurrent_bounded_queue< T, A ></a></ul>
 <h3><a class="anchor" name="index_u">- u -</a></h3><ul>
-<li>upgrade_to_writer()
-: <a class="el" href="a00130.html#3f0b1e3f2efab63336400348bd070226">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00121.html#11ba1da4a722c9e6f73339a52c487e82">tbb::queuing_rw_mutex::scoped_lock</a></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="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>
 <h3><a class="anchor" name="index_v">- v -</a></h3><ul>
 <li>value_type
-: <a class="el" href="a00115.html#fa297e53d3af2a101e712bc200233e9c">tbb::parallel_while< Body ></a>, <a class="el" href="a00106.html#ec587adbe0da968d828c0178b2d863b0">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00104.html#8bc15c9c07f3e21583ab1a4ad0901ce5">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00105.html#b5fe45b58ccc252b8ce70ac6c896c648">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></ul>
+: <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 [...]
 <h3><a class="anchor" name="index_w">- w -</a></h3><ul>
 <li>wait_for_all()
-: <a class="el" href="a00132.html#53d2615ad9c38859b4c8080936600283">tbb::task</a><li>what()
-: <a class="el" href="a00111.html#b33a89bccf0c63106f1270c7bfaaf54f">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#6b5988ef74a1fe2a58998d110b3633e0">tbb::captured_exception</a>, <a class="el" href="a00138.html#e8157689ecb66bc6c72d3618bf3cc371">tbb::tbb_exception</a></ul>
+: <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>
 <h3><a class="anchor" name="index_~">- ~ -</a></h3><ul>
-<li>~concurrent_hash_map()
-: <a class="el" href="a00103.html#5a683e8db50438b9976e46e7d4f60e65">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>~concurrent_queue()
-: <a class="el" href="a00106.html#43480ba7f4ba2401d1213ee23248e4cd">tbb::concurrent_queue< T, A ></a><li>~concurrent_vector()
-: <a class="el" href="a00107.html#da2444b28bb840d38f60d0030333a5fc">tbb::concurrent_vector< T, A ></a><li>~const_accessor()
-: <a class="el" href="a00105.html#9b3fdcb8850d6f6dc749b72dbf2d593d">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>~filter()
-: <a class="el" href="a00109.html#66d159f362293e3964ba3da8bc1d2604">tbb::filter</a><li>~parallel_while()
-: <a class="el" href="a00115.html#6fcfc973cc56b79c6d0fbb8a31be7e84">tbb::parallel_while< Body ></a><li>~pipeline()
-: <a class="el" href="a00116.html#49513c6c24f9d5bbbb27edca5efe01c9">tbb::pipeline</a><li>~queuing_rw_mutex()
-: <a class="el" href="a00120.html#1ba73e3d95cfdf8323880bc623af9099">tbb::queuing_rw_mutex</a><li>~scoped_lock()
-: <a class="el" href="a00130.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#ac6fa425d1f06c56d8b70abc51aac844">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#c1197ffb8f3cd9d4fed71d7e06265b7c">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#32c7d67a660d23ebbaab1a1d2826d31a">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#ac2c576a93570957d694192a5f491443">tbb::qu [...]
-: <a class="el" href="a00129.html#9a815fb2759e55072ed413f1b6970cf3">tbb::spin_rw_mutex_v3</a><li>~task()
-: <a class="el" href="a00132.html#98245ee0473f84cb19dbbf8c81134908">tbb::task</a><li>~task_list()
-: <a class="el" href="a00134.html#6d438f1499a02db1e59c24ab6043e5ba">tbb::task_list</a><li>~task_scheduler_init()
-: <a class="el" href="a00135.html#4da6c86292d80c703a66c1f6f5299488">tbb::task_scheduler_init</a></ul>
+<li>~combinable()
+: <a class="el" href="a00128.html#2c87e79ae98588a5780f708773388843">tbb::combinable< T ></a><li>~concurrent_bounded_queue()
+: <a class="el" href="a00129.html#acaf5b510dc0dfc7780b8c956cf773cf">tbb::concurrent_bounded_queue< T, A ></a><li>~concurrent_hash_map()
+: <a class="el" href="a00130.html#5e96649f71f68f3b6bf3b1eee6b441a7">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>~concurrent_queue()
+: <a class="el" href="a00134.html#830b33753d6b149c366344e29b2edd8c">tbb::strict_ppl::concurrent_queue< T, A ></a><li>~concurrent_vector()
+: <a class="el" href="a00136.html#da2444b28bb840d38f60d0030333a5fc">tbb::concurrent_vector< T, A ></a><li>~const_accessor()
+: <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>
 <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 58d6696..92695b8 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="a00136.html#09a7f81fb2c3055aaecf058b11538544">tbb::tbb_allocator< T ></a><li>mode
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf">tbb::filter</a><li>state_type
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e">tbb::task</a></ul>
+: <a class="el" href="a00166.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>
 <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 9821f89..525c14c 100644
--- a/doc/html/functions_eval.html
+++ b/doc/html/functions_eval.html
@@ -35,16 +35,16 @@
 <p>
 <ul>
 <li>allocated
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">tbb::task</a><li>executing
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">tbb::task</a><li>freed
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">tbb::task</a><li>parallel
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">tbb::filter</a><li>ready
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">tbb::task</a><li>recycle
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">tbb::task</a><li>reexecute
-: <a class="el" href="a00132.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">tbb::task</a><li>serial
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">tbb::filter</a><li>serial_in_order
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">tbb::filter</a><li>serial_out_of_order
-: <a class="el" href="a00109.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">tbb::filter</a></ul>
+: <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="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="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>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/functions_func.html b/doc/html/functions_func.html
index 34610e2..8bca288 100644
--- a/doc/html/functions_func.html
+++ b/doc/html/functions_func.html
@@ -41,6 +41,7 @@
     <li><a href="#index_f"><span>f</span></a></li>
     <li><a href="#index_g"><span>g</span></a></li>
     <li><a href="#index_i"><span>i</span></a></li>
+    <li><a href="#index_l"><span>l</span></a></li>
     <li><a href="#index_m"><span>m</span></a></li>
     <li><a href="#index_n"><span>n</span></a></li>
     <li><a href="#index_o"><span>o</span></a></li>
@@ -60,175 +61,210 @@
 <p>
 <h3><a class="anchor" name="index_a">- a -</a></h3><ul>
 <li>acquire()
-: <a class="el" href="a00130.html#b0b646ec5be02a127d159bbb7ca65353">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#3ee3c338732b1f64b0b32a757807a30d">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#7fb04da37cccf8c99b1f9102d9074f9a">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#a8dd5ab8686e76de21587544dbb681e0">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#533e4fc8355ee321206a0609c42d909d">tbb::qu [...]
-: <a class="el" href="a00115.html#e131c560057a58229992b61eb8dba4c6">tbb::parallel_while< Body ></a>, <a class="el" href="a00114.html#40baaf0f6856f4491dd0adf896c93516">tbb::parallel_do_feeder< Item ></a><li>add_filter()
-: <a class="el" href="a00116.html#38fb5c9c8395dd6f89a4ae2011a83e0d">tbb::pipeline</a><li>add_to_depth()
-: <a class="el" href="a00132.html#b0f98c633647fc73b978fe4cd2277ac4">tbb::task</a><li>affinity()
-: <a class="el" href="a00132.html#3a920a56b0bcf2801518fb45b2c9d2be">tbb::task</a><li>allocate()
-: <a class="el" href="a00136.html#f6cb487b1bdce0b581f265a77dca6d53">tbb::tbb_allocator< T ></a>, <a class="el" href="a00124.html#726b1586d05d44665a36e1c7b2699bfd">tbb::scalable_allocator< T ></a>, <a class="el" href="a00100.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">tbb::cache_aligned_allocator< T ></a><li>allocate_additional_child_of()
-: <a class="el" href="a00132.html#43bfe64c0e9333c0ca895cc0c375512b">tbb::task</a><li>allocate_child()
-: <a class="el" href="a00132.html#1ff794f7053cd9148d5f280fbf07377f">tbb::task</a><li>allocate_continuation()
-: <a class="el" href="a00132.html#1434c79a5138993269d034008bff7329">tbb::task</a><li>allocate_root()
-: <a class="el" href="a00132.html#8ccc518caf31075a3e073996d2d240a4">tbb::task</a><li>allocator_type()
-: <a class="el" href="a00136.html#78701e7454ef8e1a25b5acd364367080">tbb::tbb_allocator< T ></a>, <a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">tbb::concurrent_queue< T, A ></a><li>assign()
-: <a class="el" href="a00107.html#93a06b3112cb804f42f40efb5e7387b4">tbb::concurrent_vector< T, A ></a><li>at()
-: <a class="el" href="a00107.html#23e14a38af748edff96a7adc3a0f1c58">tbb::concurrent_vector< T, A ></a></ul>
+: <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="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>
 <li>back()
-: <a class="el" href="a00107.html#bd518e204107d07fd08d0ec5bdfd383d">tbb::concurrent_vector< T, A ></a><li>begin()
-: <a class="el" href="a00107.html#78a06182276ff758788d4c0623ae0d71">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00097.html#18d2258400756ac1446dac7676b18df3">tbb::blocked_range< Value ></a>, <a class="el" href="a00092.html#0d702fc6b9e9d061ace3501b3c861cdf">tbb::aligned_space< T, N ></a><li>blocked_range()
-: <a class="el" href="a00097.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">tbb::blocked_range< Value ></a></ul>
+: <a class="el" href="a00136.html#bd518e204107d07fd08d0ec5bdfd383d">tbb::concurrent_vector< T, A ></a><li>begin()
+: <a class="el" href="a00138.html#ba6674c6102a6faf8f96d131497654b3">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#78a06182276ff758788d4c0623ae0d71">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00122.html#18d2258400756ac1446dac7676b18df3">tbb::blocked_range< Value ></a>, <a class="el" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">tbb::aligned_space< T, N ></a><li>blocked_range()
+: <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="a00132.html#0f3fb4aac549ab642022450a4bd13326">tbb::task</a>, <a class="el" href="a00133.html#8bcdfdf4e6bfb76125b6de15c00b571d">tbb::task_group_context</a><li>capacity()
-: <a class="el" href="a00107.html#3ed6b9ae7217af5103d974045b6f5cd5">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#95796a6ad29ea6fe102ac1663a776d07">tbb::concurrent_queue< T, A ></a><li>clear()
-: <a class="el" href="a00134.html#fce446ee13e025969945328f3ff59b95">tbb::task_list</a>, <a class="el" href="a00116.html#2c84aef5b834b555ee220b176e25931e">tbb::pipeline</a>, <a class="el" href="a00107.html#26f937a359a66b6aae904c3cd9a3c444">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#8a6a8a7a8d977d86ae8bd254b9794af1">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00103.html#36bcd50fd5383f3682032323b2d74333">tbb::concurrent_hash_map< Key, T, H [...]
-: <a class="el" href="a00099.html#3336ba9480fd6c43e158f9beb024c050">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00098.html#392a46759af2c884957115771affa7f4">tbb::blocked_range2d< RowValue, ColValue ></a><li>compact()
-: <a class="el" href="a00107.html#1693d1da41b1a8235871be9c6633be35">tbb::concurrent_vector< T, A ></a><li>concurrent_hash_map()
-: <a class="el" href="a00103.html#51cccc7b42e83884462dcadede034822">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>concurrent_queue()
-: <a class="el" href="a00106.html#d3ec1af9c793007ec2ecbdcf637f8ec5">tbb::concurrent_queue< T, A ></a><li>concurrent_vector()
-: <a class="el" href="a00107.html#4450de83c5862ea4bcd9443fd7e67419">tbb::concurrent_vector< T, A ></a><li>const_accessor()
-: <a class="el" href="a00105.html#2a73cc49914e218e579eb77d3d9d6551">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>construct()
-: <a class="el" href="a00136.html#ab228ab9e324ed041c2226e1d717df5f">tbb::tbb_allocator< T ></a>, <a class="el" href="a00100.html#958ee8745c86c275bfc9533af565e017">tbb::cache_aligned_allocator< T ></a><li>count()
-: <a class="el" href="a00103.html#345daf26f2f7e2b4d93382fea80b3a7f">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></ul>
+: <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="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="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()
+: <a class="el" href="a00130.html#b5132202dff9ee3d619bef6b1d84edea">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>concurrent_queue()
+: <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="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="a00136.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">tbb::tbb_allocator< T ></a>, <a class="el" href="a00124.html#f806a238c18cbcfb531e1e0a0d2ec59d">tbb::scalable_allocator< T ></a>, <a class="el" href="a00100.html#3d4eadf188f7d85d3805ae534e0b8e1c">tbb::cache_aligned_allocator< T ></a><li>default_num_threads()
-: <a class="el" href="a00135.html#ba00714c33a41a3c2216f48613971cab">tbb::task_scheduler_init</a><li>depth()
-: <a class="el" href="a00132.html#5be823a972b3c3b9901c5963eeb050fd">tbb::task</a><li>destroy()
-: <a class="el" href="a00111.html#7a46873119d9f85a7b0009c13e41a258">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#667812a82f1525e968c52593dea0ef4c">tbb::captured_exception</a>, <a class="el" href="a00138.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>, <a class="el" href="a00136.html#ef133522bf55f05a605bee0763208281">tbb::tbb_allocator< T ></a>, <a class="el" href="a00132.html#a57def00c8e9d932dbea0b3ee23991b9">tbb::task</a>, <a cla [...]
-: <a class="el" href="a00130.html#c2c2c38a08cb9080e87099fac3e5bc94">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00121.html#0d2f93edf7b15ec4bcee138823220c52">tbb::queuing_rw_mutex::scoped_lock</a></ul>
+: <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>
 <h3><a class="anchor" name="index_e">- e -</a></h3><ul>
 <li>empty()
-: <a class="el" href="a00134.html#f3ac31e092814b90929f81bb30441959">tbb::task_list</a>, <a class="el" href="a00107.html#c6426cb93cf20d3af40f3c90f1f0481a">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#313c369998b69de6e039b9afb9ca3237">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00103.html#b9599dd587892366ed31dea23e5c5837">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00105.html#38712b9809d23d2fba5e4780bb3c4 [...]
-: <a class="el" href="a00107.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00097.html#8b929d93ddc13f148b11bceef3a3bdf8">tbb::blocked_range< Value ></a>, <a class="el" href="a00092.html#024be075c23c0394c9a2518d993bcd9e">tbb::aligned_space< T, N ></a><li>erase()
-: <a class="el" href="a00103.html#b5bd8c8f49f8d0e72afedca53caa6b15">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>execute()
-: <a class="el" href="a00132.html#22c298cd40937a431a06777423f002f6">tbb::task</a></ul>
+: <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="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>
 <h3><a class="anchor" name="index_f">- f -</a></h3><ul>
 <li>finalize()
-: <a class="el" href="a00109.html#56275eb889c77c4807967133e21401bd">tbb::filter</a><li>find()
-: <a class="el" href="a00103.html#68a6bd5b8a0bc2d5066e5eb175fd5ba9">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>front()
-: <a class="el" href="a00107.html#502615a858eb9fa0390ee59169065e90">tbb::concurrent_vector< T, A ></a></ul>
+: <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="a00136.html#502615a858eb9fa0390ee59169065e90">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_g">- g -</a></h3><ul>
 <li>get_allocator()
-: <a class="el" href="a00107.html#2fdba8e90de6a4d2300222236d46758e">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#11a088eee45cc1cb0c0b32adadbff92e">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00103.html#14255f38f7b10bb892b233fce283fbce">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>grainsize()
-: <a class="el" href="a00097.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">tbb::blocked_range< Value ></a><li>grow_by()
-: <a class="el" href="a00107.html#38274ab3f772ecba600c7daca7690102">tbb::concurrent_vector< T, A ></a><li>grow_to_at_least()
-: <a class="el" href="a00107.html#47fe588214dd5fa06ab6e8ab78d83874">tbb::concurrent_vector< T, A ></a></ul>
+: <a class="el" href="a00136.html#2fdba8e90de6a4d2300222236d46758e">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#415eb87e53b1c6a266de06ecbc490d16">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#f034f70caef445fe8abc9113ec926a8d">tbb::strict_ppl::concurrent_queue< T, A ></a>, <a class="el" href="a00130.html#79d1e5c3b975dbd38b43138266fe4c0e">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>grainsize()
+: <a class="el" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">tbb::blocked_range< Value ></a><li>grow_by()
+: <a class="el" href="a00136.html#473a59a4c9308b93411b898b3110d26c">tbb::concurrent_vector< T, A ></a><li>grow_to_at_least()
+: <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>init()
-: <a class="el" href="a00133.html#49a55352084fd44b8863d182e839e6dc">tbb::task_group_context</a><li>initialize()
-: <a class="el" href="a00135.html#d5ed214a8bb53b0466ed91ff4734b9a3">tbb::task_scheduler_init</a><li>insert()
-: <a class="el" href="a00103.html#06a95a56a40fcbdf3897051d22aaab19">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>interval_t()
-: <a class="el" href="a00141.html#1a21a428e00cced2e6a49e0f5f2258bf">tbb::tick_count::interval_t</a><li>is_active()
-: <a class="el" href="a00135.html#12752282977029f23416642bc03e8b74">tbb::task_scheduler_init</a><li>is_cancelled()
-: <a class="el" href="a00132.html#025f18118c057c4c8db87ff2ce8df975">tbb::task</a><li>is_divisible()
-: <a class="el" href="a00099.html#39d69191721c488e737ae5d9c5336b9c">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00098.html#ad36a9b38e4fef26d376f99552ce2d92">tbb::blocked_range2d< RowValue, ColValue ></a>, <a class="el" href="a00097.html#41a58b703d574b6e1ca155df3576f578">tbb::blocked_range< Value ></a><li>is_group_execution_cancelled()
-: <a class="el" href="a00133.html#4db72f16210b0a991b2c134d6763a4cc">tbb::task_group_context</a><li>is_owned_by_current_thread()
-: <a class="el" href="a00132.html#c26718b3b247cd13deb1a741902e7105">tbb::task</a><li>is_serial()
-: <a class="el" href="a00109.html#fcfec27656a69ff2072802ac001e936f">tbb::filter</a><li>is_stolen_task()
-: <a class="el" href="a00132.html#f9169402702f56bf519448aaf34450aa">tbb::task</a></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="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="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="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="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="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="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="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="a00136.html#f059ca2c96243024f0d562ee3a87a3a5">tbb::tbb_allocator< T ></a>, <a class="el" href="a00124.html#880e766f1d913988c21973dbdd874fd5">tbb::scalable_allocator< T ></a>, <a class="el" href="a00107.html#2c248a017f0576df3e7cd99627836fd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00103.html#62d1fdc2c4d37d84b0dca1cd45f1cf1f">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00100.html#fb23b687b4c0429 [...]
-: <a class="el" href="a00111.html#1aea0ad179d6f0481fe7f3495f66adf9">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#df6bbb78a362fe862a341e81e2999810">tbb::captured_exception</a>, <a class="el" href="a00138.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a><li>mutex()
-: <a class="el" href="a00112.html#05313cb77d4f85213103d4dab74ed454">tbb::mutex</a></ul>
+: <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="a00142.html#05313cb77d4f85213103d4dab74ed454">tbb::mutex</a></ul>
 <h3><a class="anchor" name="index_n">- n -</a></h3><ul>
 <li>name()
-: <a class="el" href="a00111.html#bc5f5c4739b17ac5211ac58226c2f5a5">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#5af82fd677449c5ca727fa1d7e16f9f5">tbb::captured_exception</a>, <a class="el" href="a00138.html#d00f6497e552fee978a02bfcbebf46e2">tbb::tbb_exception</a><li>note_affinity()
-: <a class="el" href="a00132.html#713c338c8eeaebdc5a6b10a69c039b06">tbb::task</a><li>now()
-: <a class="el" href="a00140.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="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>
 <h3><a class="anchor" name="index_o">- o -</a></h3><ul>
 <li>operator *()
-: <a class="el" href="a00104.html#52334dd5411e7b95635b90527d7d6062">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00105.html#ea4d48e45dd039a2be10178df9336001">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>operator()()
-: <a class="el" href="a00109.html#fa1b3dc1f4f47563ccab7f4d92f5b543">tbb::filter</a><li>operator+=()
-: <a class="el" href="a00141.html#cd9814947902e26463a69a111530f81b">tbb::tick_count::interval_t</a><li>operator-=()
-: <a class="el" href="a00141.html#35ff7eaf7c2031b4a991402ac9ecb940">tbb::tick_count::interval_t</a><li>operator->()
-: <a class="el" href="a00104.html#0fae0495144540e2b011a6530f68f1cb">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00105.html#def170ba3b18905cd4e9d90f8a9a9cd9">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>operator=()
-: <a class="el" href="a00107.html#19f4ab88a01b0fd056af3bba463e7bd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00103.html#d70ad33f97ce38d004620580bb1b09ba">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>operator[]()
-: <a class="el" href="a00107.html#c6fade5c732cc95274d1d8277ea619d1">tbb::concurrent_vector< T, A ></a></ul>
+: <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="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="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="a00099.html#cf971430aa12361d3ed245344b7c6764">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>parallel_while()
-: <a class="el" href="a00115.html#36e26ba3880c7bcf804a97ba0cbe133f">tbb::parallel_while< Body ></a><li>parent()
-: <a class="el" href="a00132.html#314e98ee4347ccec83efcb9ee22e8596">tbb::task</a><li>pause()
-: <a class="el" href="a00094.html#cb1ca420dfc4aa21eca699d3fa4711c7">tbb::internal::AtomicBackoff</a><li>pipeline()
-: <a class="el" href="a00116.html#596dc3beba27099c4c8581cb419e1a59">tbb::pipeline</a><li>pop()
-: <a class="el" href="a00106.html#170ab4b57a20f0ff00fb8642d4f55e5c">tbb::concurrent_queue< T, A ></a><li>pop_front()
-: <a class="el" href="a00134.html#5fe85df5ed524418389d34051750347d">tbb::task_list</a><li>pop_if_present()
-: <a class="el" href="a00106.html#7088b06d6c226c44a07a310c12176a0c">tbb::concurrent_queue< T, A ></a><li>push()
-: <a class="el" href="a00106.html#28259b68d5ba6cc77abf72b8d7d22e69">tbb::concurrent_queue< T, A ></a><li>push_back()
-: <a class="el" href="a00134.html#4cd34756bc4763dafb8c84838a0124ff">tbb::task_list</a>, <a class="el" href="a00107.html#e0087c0f58b49e43b6322ff1ec0bc98d">tbb::concurrent_vector< T, A ></a><li>push_if_not_full()
-: <a class="el" href="a00106.html#0a91166177c0ceb5a1ddd22827509345">tbb::concurrent_queue< T, A ></a></ul>
+: <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="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="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="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="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="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="a00118.html#b389ad9c4db7293e4bdb5b8cda69ec04">tbb::queuing_mutex</a><li>queuing_rw_mutex()
-: <a class="el" href="a00120.html#85c90877c3447690ac4e2ac4ff8dea5e">tbb::queuing_rw_mutex</a></ul>
+: <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>
 <h3><a class="anchor" name="index_r">- r -</a></h3><ul>
 <li>range()
-: <a class="el" href="a00107.html#3d09ccfb581b879ae64203741035e193">tbb::concurrent_vector< T, A ></a><li>rbegin()
-: <a class="el" href="a00107.html#9f9c103e18d5f212703805354074ad44">tbb::concurrent_vector< T, A ></a><li>recursive_mutex()
-: <a class="el" href="a00122.html#d2fceb7f95c24a8cd1457d4527e4b8c6">tbb::recursive_mutex</a><li>recycle_as_child_of()
-: <a class="el" href="a00132.html#db399855177438bbc9cc61d508dae8d2">tbb::task</a><li>recycle_as_continuation()
-: <a class="el" href="a00132.html#a67a79e18f62b43a623a00cfbd76db4c">tbb::task</a><li>recycle_as_safe_continuation()
-: <a class="el" href="a00132.html#3b290d14109704e2b69dc1ac980a7a76">tbb::task</a><li>recycle_to_reexecute()
-: <a class="el" href="a00132.html#4f1be9bbcdb487830dbe298b68d85144">tbb::task</a><li>ref_count()
-: <a class="el" href="a00132.html#ad774f55eaec008ae02b236423209ced">tbb::task</a><li>release()
-: <a class="el" href="a00130.html#61b14d00a78185c9b2d206ebfc379124">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#eeb615e68e963e6bf8d9c11402d0ce8e">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#ac480ea0e9d5ea0345a67d57008b6263">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#67ae221109ddc69510ab593874e435d4">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#3bf2b8c87ff22115be9b2eac179f2d30">tbb::qu [...]
-: <a class="el" href="a00107.html#d438b9b32ea3a8ffb703015b6dce055b">tbb::concurrent_vector< T, A ></a><li>reserve()
-: <a class="el" href="a00107.html#5a0ce05026994b010018f72cfdeb72c1">tbb::concurrent_vector< T, A ></a><li>reset()
-: <a class="el" href="a00133.html#6d30d16bf1cd22f86c6afaf29c2b430c">tbb::task_group_context</a><li>rows()
-: <a class="el" href="a00099.html#1584623e59ff32a8aa82006827508be4">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00098.html#f496e7348a82652fba581203477cc07c">tbb::blocked_range2d< RowValue, ColValue ></a><li>run()
-: <a class="el" href="a00116.html#93d7fec8cd607b803dd2d79fb46bd260">tbb::pipeline</a>, <a class="el" href="a00115.html#b32a0a6e5e09ebb7fad3e6652c19afe5">tbb::parallel_while< Body ></a></ul>
+: <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="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="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>
 <h3><a class="anchor" name="index_s">- s -</a></h3><ul>
 <li>scoped_lock()
-: <a class="el" href="a00130.html#42a92d4f8fdde425b111cfa8a9228071">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#5ce6807050a9e8f87bcb4a65dccb12ef">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#dec17713c4c1321ac8fec66816d0c602">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#fbb8798792d3aebb136c46fc63d2529e">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#9b51ef972f5618ac17caadb58841ab6d">tbb::qu [...]
-: <a class="el" href="a00141.html#d5d8429c0bc59cf6131b2abc7929fa59">tbb::tick_count::interval_t</a><li>self()
-: <a class="el" href="a00132.html#bd43e8d6249738efafd12d6a4c72c5e3">tbb::task</a><li>set_affinity()
-: <a class="el" href="a00132.html#dca19d7a45487a7d67a0db517e2b57c9">tbb::task</a><li>set_capacity()
-: <a class="el" href="a00106.html#92977e1eb9af259f3aef69f0181476c1">tbb::concurrent_queue< T, A ></a><li>set_depth()
-: <a class="el" href="a00132.html#fc4d4e61a56823aa1efdbb5d59e42973">tbb::task</a><li>set_ref_count()
-: <a class="el" href="a00132.html#06a4206a57e8e12a439b14d6d41cfd92">tbb::task</a><li>size()
-: <a class="el" href="a00107.html#715fe313c4a9c22731cc404dd80c9ec9">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00106.html#94499bca8d540a1927f9368b386dabea">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00103.html#75bb57a153952ffadfcf2e4c73deabb1">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00097.html#9eaa0b6beff1420f688570bbf6b8c462">tbb::blocked_range< Value ></a><li>spawn()
-: <a class="el" href="a00132.html#db841c647eb6d754440c2f4e4a73c80b">tbb::task</a><li>spawn_and_wait_for_all()
-: <a class="el" href="a00132.html#894ab68378e502776d8220eea7ce9fa1">tbb::task</a><li>spawn_root_and_wait()
-: <a class="el" href="a00132.html#c33c7edbaec67aa8a56f48986a9dc69f">tbb::task</a><li>spin_mutex()
-: <a class="el" href="a00127.html#3d8fb44644fd8d41ada1fbeba7409be3">tbb::spin_mutex</a><li>spin_rw_mutex_v3()
-: <a class="el" href="a00129.html#61332b2756de89f3f5f69310cbb6e70c">tbb::spin_rw_mutex_v3</a><li>state()
-: <a class="el" href="a00132.html#0af7b2d7e6e8b4333b2accfce3dfb374">tbb::task</a><li>swap()
-: <a class="el" href="a00107.html#96c9c4bd968ed3edb8dd276854d2dae0">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00103.html#74990f452286f35ad6aa08cab6c5a8cd">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></ul>
+: <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="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="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="a00132.html#2bce8ec6e44706e70128f5cf91b76e67">tbb::task</a><li>task_group_context()
-: <a class="el" href="a00133.html#6fc0ba6f3abcdb4d43277c05bd67bdd4">tbb::task_group_context</a><li>task_list()
-: <a class="el" href="a00134.html#416341c2047eaef50417b41eaf7e9de6">tbb::task_list</a><li>task_scheduler_init()
-: <a class="el" href="a00135.html#421600bf9bf9338bcf937063f2ff0e90">tbb::task_scheduler_init</a><li>terminate()
-: <a class="el" href="a00135.html#f73257e04cb7fb9bd5be2b635d9016f1">tbb::task_scheduler_init</a><li>throw_self()
-: <a class="el" href="a00111.html#17cffba35811c92b7e65d63506b69602">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, <a class="el" href="a00138.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a><li>tick_count()
-: <a class="el" href="a00140.html#34593326ae4191e02a13c7cbdab9de4c">tbb::tick_count</a><li>try_acquire()
-: <a class="el" href="a00130.html#9879626968d9b9a04cd2ec0fb2e84ae1">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#9297ec188534b45dc0ca48f2f39a0501">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#36bfc3e93e3ef6340abef4901444d340">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#2e4ff6c9ec2fee6682f95290d1f42baa">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#e5a014fb817599386a87170cf2cf51a9">tbb::qu [...]
+: <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="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="a00129.html#2bd6232531279fb3ccbd296bea23066b">tbb::concurrent_bounded_queue< T, A ></a></ul>
 <h3><a class="anchor" name="index_u">- u -</a></h3><ul>
-<li>upgrade_to_writer()
-: <a class="el" href="a00130.html#3f0b1e3f2efab63336400348bd070226">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00121.html#11ba1da4a722c9e6f73339a52c487e82">tbb::queuing_rw_mutex::scoped_lock</a></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="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>
 <h3><a class="anchor" name="index_w">- w -</a></h3><ul>
 <li>wait_for_all()
-: <a class="el" href="a00132.html#53d2615ad9c38859b4c8080936600283">tbb::task</a><li>what()
-: <a class="el" href="a00111.html#b33a89bccf0c63106f1270c7bfaaf54f">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00102.html#6b5988ef74a1fe2a58998d110b3633e0">tbb::captured_exception</a>, <a class="el" href="a00138.html#e8157689ecb66bc6c72d3618bf3cc371">tbb::tbb_exception</a></ul>
+: <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>
 <h3><a class="anchor" name="index_~">- ~ -</a></h3><ul>
-<li>~concurrent_hash_map()
-: <a class="el" href="a00103.html#5a683e8db50438b9976e46e7d4f60e65">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>~concurrent_queue()
-: <a class="el" href="a00106.html#43480ba7f4ba2401d1213ee23248e4cd">tbb::concurrent_queue< T, A ></a><li>~concurrent_vector()
-: <a class="el" href="a00107.html#da2444b28bb840d38f60d0030333a5fc">tbb::concurrent_vector< T, A ></a><li>~const_accessor()
-: <a class="el" href="a00105.html#9b3fdcb8850d6f6dc749b72dbf2d593d">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>~filter()
-: <a class="el" href="a00109.html#66d159f362293e3964ba3da8bc1d2604">tbb::filter</a><li>~parallel_while()
-: <a class="el" href="a00115.html#6fcfc973cc56b79c6d0fbb8a31be7e84">tbb::parallel_while< Body ></a><li>~pipeline()
-: <a class="el" href="a00116.html#49513c6c24f9d5bbbb27edca5efe01c9">tbb::pipeline</a><li>~queuing_rw_mutex()
-: <a class="el" href="a00120.html#1ba73e3d95cfdf8323880bc623af9099">tbb::queuing_rw_mutex</a><li>~scoped_lock()
-: <a class="el" href="a00130.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00128.html#ac6fa425d1f06c56d8b70abc51aac844">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00123.html#c1197ffb8f3cd9d4fed71d7e06265b7c">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00121.html#32c7d67a660d23ebbaab1a1d2826d31a">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00119.html#ac2c576a93570957d694192a5f491443">tbb::qu [...]
-: <a class="el" href="a00129.html#9a815fb2759e55072ed413f1b6970cf3">tbb::spin_rw_mutex_v3</a><li>~task()
-: <a class="el" href="a00132.html#98245ee0473f84cb19dbbf8c81134908">tbb::task</a><li>~task_list()
-: <a class="el" href="a00134.html#6d438f1499a02db1e59c24ab6043e5ba">tbb::task_list</a><li>~task_scheduler_init()
-: <a class="el" href="a00135.html#4da6c86292d80c703a66c1f6f5299488">tbb::task_scheduler_init</a></ul>
+<li>~combinable()
+: <a class="el" href="a00128.html#2c87e79ae98588a5780f708773388843">tbb::combinable< T ></a><li>~concurrent_bounded_queue()
+: <a class="el" href="a00129.html#acaf5b510dc0dfc7780b8c956cf773cf">tbb::concurrent_bounded_queue< T, A ></a><li>~concurrent_hash_map()
+: <a class="el" href="a00130.html#5e96649f71f68f3b6bf3b1eee6b441a7">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>~concurrent_queue()
+: <a class="el" href="a00134.html#830b33753d6b149c366344e29b2edd8c">tbb::strict_ppl::concurrent_queue< T, A ></a><li>~concurrent_vector()
+: <a class="el" href="a00136.html#da2444b28bb840d38f60d0030333a5fc">tbb::concurrent_vector< T, A ></a><li>~const_accessor()
+: <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>
 <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 a6c5769..3957bf8 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="a00141.html#5871ead1ca230efbe52a5008470e6428">tbb::tick_count::interval_t</a><li>operator-
-: <a class="el" href="a00140.html#09dde78a4100800c11bb883d6204b586">tbb::tick_count</a>, <a class="el" href="a00141.html#fa509691e1d689830931e36edd274f76">tbb::tick_count::interval_t</a></ul>
+: <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>
 <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 4ae18cb..b11b146 100644
--- a/doc/html/functions_type.html
+++ b/doc/html/functions_type.html
@@ -35,17 +35,17 @@
 <p>
 <ul>
 <li>affinity_id
-: <a class="el" href="a00132.html#d61bb32389d3857bf7511d69beaafb76">tbb::task</a><li>allocator_type
-: <a class="el" href="a00136.html#78701e7454ef8e1a25b5acd364367080">tbb::tbb_allocator< T ></a>, <a class="el" href="a00106.html#94ef8d1e9a05c53e3b637ea5eb553a6d">tbb::concurrent_queue< T, A ></a><li>const_iterator
-: <a class="el" href="a00097.html#1a8d05842c2b3dfc177bc4d347e4cef7">tbb::blocked_range< Value ></a><li>const_reference
-: <a class="el" href="a00106.html#981c7c13a4aef3d03f35797ebe214d59">tbb::concurrent_queue< T, A ></a><li>depth_type
-: <a class="el" href="a00132.html#d8815c39bb61bd7e2d2691c476ed03b9">tbb::task</a><li>difference_type
-: <a class="el" href="a00106.html#3c0b5f19b820719ab4f69eeb9bf75afc">tbb::concurrent_queue< T, A ></a><li>page_range_type
-: <a class="el" href="a00099.html#b8ebf17a552ba47825e9b3887855b719">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>reference
-: <a class="el" href="a00106.html#ea0fab9094080138fef0802125160739">tbb::concurrent_queue< T, A ></a><li>row_range_type
-: <a class="el" href="a00098.html#a807a22fe658ec38b8edfd69521d0383">tbb::blocked_range2d< RowValue, ColValue ></a><li>size_type
-: <a class="el" href="a00106.html#75868c28b0e431caa3ac36404adff4cf">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00097.html#f5707bffea38eee5c9680f37358afb8e">tbb::blocked_range< Value ></a><li>value_type
-: <a class="el" href="a00115.html#fa297e53d3af2a101e712bc200233e9c">tbb::parallel_while< Body ></a>, <a class="el" href="a00106.html#ec587adbe0da968d828c0178b2d863b0">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00104.html#8bc15c9c07f3e21583ab1a4ad0901ce5">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00105.html#b5fe45b58ccc252b8ce70ac6c896c648">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></ul>
+: <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="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#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 [...]
 <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 c1b38db..afd2df1 100644
--- a/doc/html/functions_vars.html
+++ b/doc/html/functions_vars.html
@@ -35,9 +35,9 @@
 <p>
 <ul>
 <li>automatic
-: <a class="el" href="a00135.html#8f5988e2b0fbb2d533fcbb7f2583743f">tbb::task_scheduler_init</a><li>deferred
-: <a class="el" href="a00135.html#e6c860f1e559026ff3ef4599c0d6c514">tbb::task_scheduler_init</a><li>my_exception_data
-: <a class="el" href="a00111.html#a8c0ae2089ae784b28907cf748b89416">tbb::movable_exception< ExceptionData ></a></ul>
+: <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="a00141.html#a8c0ae2089ae784b28907cf748b89416">tbb::movable_exception< ExceptionData ></a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/globals.html b/doc/html/globals.html
index d371b16..03a285c 100644
--- a/doc/html/globals.html
+++ b/doc/html/globals.html
@@ -29,14 +29,14 @@ Here is a list of all documented file members with links to the documentation:
 <p>
 <ul>
 <li>scalable_aligned_free()
-: <a class="el" href="a00185.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_allocator.h</a><li>scalable_aligned_malloc()
-: <a class="el" href="a00185.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_allocator.h</a><li>scalable_aligned_realloc()
-: <a class="el" href="a00185.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_allocator.h</a><li>scalable_calloc()
-: <a class="el" href="a00185.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_allocator.h</a><li>scalable_free()
-: <a class="el" href="a00185.html#gca3579c21244dba9f0c351e5984d4565">scalable_allocator.h</a><li>scalable_malloc()
-: <a class="el" href="a00185.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_allocator.h</a><li>scalable_posix_memalign()
-: <a class="el" href="a00185.html#g05dcec987480bb2c82ecdead6a085899">scalable_allocator.h</a><li>scalable_realloc()
-: <a class="el" href="a00185.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_allocator.h</a></ul>
+: <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>
 <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 fb986db..bc561cb 100644
--- a/doc/html/globals_func.html
+++ b/doc/html/globals_func.html
@@ -29,14 +29,14 @@
 <p>
 <ul>
 <li>scalable_aligned_free()
-: <a class="el" href="a00185.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_allocator.h</a><li>scalable_aligned_malloc()
-: <a class="el" href="a00185.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_allocator.h</a><li>scalable_aligned_realloc()
-: <a class="el" href="a00185.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_allocator.h</a><li>scalable_calloc()
-: <a class="el" href="a00185.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_allocator.h</a><li>scalable_free()
-: <a class="el" href="a00185.html#gca3579c21244dba9f0c351e5984d4565">scalable_allocator.h</a><li>scalable_malloc()
-: <a class="el" href="a00185.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_allocator.h</a><li>scalable_posix_memalign()
-: <a class="el" href="a00185.html#g05dcec987480bb2c82ecdead6a085899">scalable_allocator.h</a><li>scalable_realloc()
-: <a class="el" href="a00185.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_allocator.h</a></ul>
+: <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>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html
index b39b46b..35cec48 100644
--- a/doc/html/hierarchy.html
+++ b/doc/html/hierarchy.html
@@ -21,65 +21,79 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <h1>Class Hierarchy</h1>This inheritance list is sorted roughly, but not completely, alphabetically:<ul>
-<li><a class="el" href="a00091.html">tbb::affinity_partitioner</a>
-<li><a class="el" href="a00092.html">tbb::aligned_space< T, N ></a>
-<li><a class="el" href="a00093.html">tbb::atomic< T ></a>
-<li><a class="el" href="a00094.html">tbb::internal::AtomicBackoff</a>
-<li><a class="el" href="a00095.html">tbb::auto_partitioner</a>
-<li><a class="el" href="a00096.html">tbb::bad_last_alloc</a>
-<li><a class="el" href="a00097.html">tbb::blocked_range< Value ></a>
-<li><a class="el" href="a00098.html">tbb::blocked_range2d< RowValue, ColValue ></a>
-<li><a class="el" href="a00099.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>
-<li><a class="el" href="a00097.html">tbb::blocked_range< I ></a>
-<li><a class="el" href="a00100.html">tbb::cache_aligned_allocator< T ></a>
-<li><a class="el" href="a00101.html">tbb::cache_aligned_allocator< void ></a>
-<li><a class="el" href="a00103.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>
-<li><a class="el" href="a00105.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>
+<li><a class="el" href="a00115.html">tbb::affinity_partitioner</a>
+<li><a class="el" href="a00116.html">tbb::aligned_space< T, N ></a>
+<li><a class="el" href="a00117.html">tbb::atomic< T ></a>
+<li><a class="el" href="a00118.html">tbb::atomic< void * ></a>
+<li><a class="el" href="a00119.html">tbb::internal::atomic_backoff</a>
+<li><a class="el" href="a00120.html">tbb::auto_partitioner</a>
+<li><a class="el" href="a00121.html">tbb::bad_last_alloc</a>
+<li><a class="el" href="a00122.html">tbb::blocked_range< Value ></a>
+<li><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a>
+<li><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>
+<li><a class="el" href="a00122.html">tbb::blocked_range< I ></a>
+<li><a class="el" href="a00125.html">tbb::cache_aligned_allocator< T ></a>
+<li><a class="el" href="a00126.html">tbb::cache_aligned_allocator< void ></a>
+<li><a class="el" href="a00128.html">tbb::combinable< T ></a>
+<li><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a>
 <ul>
-<li><a class="el" href="a00104.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>
+<li><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>
 </ul>
-<li><a class="el" href="a00106.html">tbb::concurrent_queue< T, A ></a>
-<li><a class="el" href="a00107.html">tbb::concurrent_vector< T, A ></a>
-<li><a class="el" href="a00109.html">tbb::filter</a>
-<li><a class="el" href="a00110.html">tbb::final_scan_tag</a>
-<li><a class="el" href="a00112.html">tbb::mutex</a>
-<li><a class="el" href="a00113.html">tbb::mutex::scoped_lock</a>
-<li><a class="el" href="a00114.html">tbb::parallel_do_feeder< Item ></a>
-<li><a class="el" href="a00115.html">tbb::parallel_while< Body ></a>
-<li><a class="el" href="a00116.html">tbb::pipeline</a>
-<li><a class="el" href="a00117.html">tbb::pre_scan_tag</a>
-<li><a class="el" href="a00118.html">tbb::queuing_mutex</a>
-<li><a class="el" href="a00119.html">tbb::queuing_mutex::scoped_lock</a>
-<li><a class="el" href="a00120.html">tbb::queuing_rw_mutex</a>
-<li><a class="el" href="a00121.html">tbb::queuing_rw_mutex::scoped_lock</a>
-<li><a class="el" href="a00122.html">tbb::recursive_mutex</a>
-<li><a class="el" href="a00123.html">tbb::recursive_mutex::scoped_lock</a>
-<li><a class="el" href="a00124.html">tbb::scalable_allocator< T ></a>
-<li><a class="el" href="a00125.html">tbb::scalable_allocator< void ></a>
-<li><a class="el" href="a00126.html">tbb::simple_partitioner</a>
-<li><a class="el" href="a00127.html">tbb::spin_mutex</a>
-<li><a class="el" href="a00128.html">tbb::spin_mutex::scoped_lock</a>
-<li><a class="el" href="a00129.html">tbb::spin_rw_mutex_v3</a>
-<li><a class="el" href="a00130.html">tbb::spin_rw_mutex_v3::scoped_lock</a>
-<li><a class="el" href="a00131.html">tbb::split</a>
-<li><a class="el" href="a00132.html">tbb::task</a>
+<li><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>
+<li><a class="el" href="a00132.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a>
+<li><a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a>
 <ul>
-<li><a class="el" href="a00108.html">tbb::empty_task</a>
+<li><a class="el" href="a00131.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>
 </ul>
-<li><a class="el" href="a00133.html">tbb::task_group_context</a>
-<li><a class="el" href="a00134.html">tbb::task_list</a>
-<li><a class="el" href="a00135.html">tbb::task_scheduler_init</a>
-<li><a class="el" href="a00136.html">tbb::tbb_allocator< T ></a>
-<li><a class="el" href="a00137.html">tbb::tbb_allocator< void ></a>
-<li><a class="el" href="a00138.html">tbb::tbb_exception</a>
+<li><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a>
+<li><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a>
+<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="a00102.html">tbb::captured_exception</a>
-<li><a class="el" href="a00111.html">tbb::movable_exception< ExceptionData ></a>
+<li><a class="el" href="a00171.html">tbb::thread_bound_filter</a>
 </ul>
-<li><a class="el" href="a00139.html">tbb::tbb_hash_compare< T ></a>
-<li><a class="el" href="a00140.html">tbb::tick_count</a>
-<li><a class="el" href="a00141.html">tbb::tick_count::interval_t</a>
-<li><a class="el" href="a00142.html">tbb::internal::work_around_alignment_bug< Size, T ></a>
+<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>
+<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>
+<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>
 </ul>
 <hr>
 <p></p>
diff --git a/doc/html/modules.html b/doc/html/modules.html
index 44f7763..cdea1f2 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="a00183.html">Algorithms</a>
-<li><a class="el" href="a00184.html">Containers</a>
-<li><a class="el" href="a00185.html">Memory Allocation</a>
-<li><a class="el" href="a00186.html">Synchronization</a>
-<li><a class="el" href="a00187.html">Timing</a>
-<li><a class="el" href="a00188.html">Task Scheduling</a>
+<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>
 </ul>
 <hr>
 <p></p>
diff --git a/doc/html/namespacemembers.html b/doc/html/namespacemembers.html
index 4c2f73f..8e6c440 100644
--- a/doc/html/namespacemembers.html
+++ b/doc/html/namespacemembers.html
@@ -23,6 +23,7 @@
   <ul>
     <li id="current"><a href="namespacemembers.html"><span>All</span></a></li>
     <li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
+    <li><a href="namespacemembers_vars.html"><span>Variables</span></a></li>
     <li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
     <li><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
     <li><a href="namespacemembers_eval.html"><span>Enumerator</span></a></li>
@@ -31,20 +32,26 @@
 Here is a list of all documented namespace members with links to the namespaces they belong to:
 <p>
 <ul>
-<li>__TBB_full_fence
-: <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">tbb</a><li>acquire
-: <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">tbb</a><li>assertion_failure()
-: <a class="el" href="a00181.html#3d1252787be39b4aef311f1cadaff9e8">tbb</a><li>assertion_handler_type
-: <a class="el" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">tbb</a><li>memory_semantics
-: <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fef">tbb</a><li>parallel_do()
-: <a class="el" href="a00183.html#g2617dc9b88b3285a7212599d49f74228">tbb</a><li>parallel_for()
-: <a class="el" href="a00183.html#g04b4696b67370c01353ff5974c8f1196">tbb</a><li>parallel_reduce()
-: <a class="el" href="a00183.html#g496bd7eadb3b97495ccb5655ef90319e">tbb</a><li>parallel_scan()
-: <a class="el" href="a00183.html#g62fde400a37bbca1a2fddc8e3d22f556">tbb</a><li>parallel_sort()
-: <a class="el" href="a00183.html#gc7576f82fdedc8a701a6c17ad9415926">tbb</a><li>release
-: <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">tbb</a><li>set_assertion_handler()
-: <a class="el" href="a00181.html#823fa1c15dd829d1d9167157450ddcd9">tbb</a><li>TBB_runtime_interface_version()
-: <a class="el" href="a00181.html#a6858b22e90041c9c4669674ff39b056">tbb</a></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>
 <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 5281a39..dd59a56 100644
--- a/doc/html/namespacemembers_enum.html
+++ b/doc/html/namespacemembers_enum.html
@@ -23,6 +23,7 @@
   <ul>
     <li><a href="namespacemembers.html"><span>All</span></a></li>
     <li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
+    <li><a href="namespacemembers_vars.html"><span>Variables</span></a></li>
     <li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
     <li id="current"><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
     <li><a href="namespacemembers_eval.html"><span>Enumerator</span></a></li>
@@ -31,8 +32,9 @@
  
 <p>
 <ul>
-<li>memory_semantics
-: <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fef">tbb</a></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>
 <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 ec77e63..14a5e20 100644
--- a/doc/html/namespacemembers_eval.html
+++ b/doc/html/namespacemembers_eval.html
@@ -23,6 +23,7 @@
   <ul>
     <li><a href="namespacemembers.html"><span>All</span></a></li>
     <li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
+    <li><a href="namespacemembers_vars.html"><span>Variables</span></a></li>
     <li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
     <li><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
     <li id="current"><a href="namespacemembers_eval.html"><span>Enumerator</span></a></li>
@@ -32,9 +33,9 @@
 <p>
 <ul>
 <li>__TBB_full_fence
-: <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">tbb</a><li>acquire
-: <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">tbb</a><li>release
-: <a class="el" href="a00181.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">tbb</a></ul>
+: <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>
 <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 3618eed..7c641f0 100644
--- a/doc/html/namespacemembers_func.html
+++ b/doc/html/namespacemembers_func.html
@@ -23,6 +23,7 @@
   <ul>
     <li><a href="namespacemembers.html"><span>All</span></a></li>
     <li id="current"><a href="namespacemembers_func.html"><span>Functions</span></a></li>
+    <li><a href="namespacemembers_vars.html"><span>Variables</span></a></li>
     <li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
     <li><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
     <li><a href="namespacemembers_eval.html"><span>Enumerator</span></a></li>
@@ -31,15 +32,19 @@
  
 <p>
 <ul>
-<li>assertion_failure()
-: <a class="el" href="a00181.html#3d1252787be39b4aef311f1cadaff9e8">tbb</a><li>parallel_do()
-: <a class="el" href="a00183.html#g2617dc9b88b3285a7212599d49f74228">tbb</a><li>parallel_for()
-: <a class="el" href="a00183.html#g04b4696b67370c01353ff5974c8f1196">tbb</a><li>parallel_reduce()
-: <a class="el" href="a00183.html#g496bd7eadb3b97495ccb5655ef90319e">tbb</a><li>parallel_scan()
-: <a class="el" href="a00183.html#g62fde400a37bbca1a2fddc8e3d22f556">tbb</a><li>parallel_sort()
-: <a class="el" href="a00183.html#gc7576f82fdedc8a701a6c17ad9415926">tbb</a><li>set_assertion_handler()
-: <a class="el" href="a00181.html#823fa1c15dd829d1d9167157450ddcd9">tbb</a><li>TBB_runtime_interface_version()
-: <a class="el" href="a00181.html#a6858b22e90041c9c4669674ff39b056">tbb</a></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>
 <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 0c1c3cb..af5b03d 100644
--- a/doc/html/namespacemembers_type.html
+++ b/doc/html/namespacemembers_type.html
@@ -23,6 +23,7 @@
   <ul>
     <li><a href="namespacemembers.html"><span>All</span></a></li>
     <li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
+    <li><a href="namespacemembers_vars.html"><span>Variables</span></a></li>
     <li id="current"><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
     <li><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
     <li><a href="namespacemembers_eval.html"><span>Enumerator</span></a></li>
@@ -32,7 +33,7 @@
 <p>
 <ul>
 <li>assertion_handler_type
-: <a class="el" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">tbb</a></ul>
+: <a class="el" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">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_vars.html
similarity index 86%
copy from doc/html/namespacemembers_type.html
copy to doc/html/namespacemembers_vars.html
index 0c1c3cb..4f5a231 100644
--- a/doc/html/namespacemembers_type.html
+++ b/doc/html/namespacemembers_vars.html
@@ -23,7 +23,8 @@
   <ul>
     <li><a href="namespacemembers.html"><span>All</span></a></li>
     <li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
-    <li id="current"><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
+    <li id="current"><a href="namespacemembers_vars.html"><span>Variables</span></a></li>
+    <li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
     <li><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
     <li><a href="namespacemembers_eval.html"><span>Enumerator</span></a></li>
   </ul>
@@ -31,8 +32,8 @@
  
 <p>
 <ul>
-<li>assertion_handler_type
-: <a class="el" href="a00181.html#ed375248ff6019a70ca0f9da528e5d0b">tbb</a></ul>
+<li>hash_multiplier
+: <a class="el" href="a00224.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 bfeef55..dbfc429 100644
--- a/doc/html/namespaces.html
+++ b/doc/html/namespaces.html
@@ -20,7 +20,7 @@
     <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="a00181.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="a00224.html">tbb</a></td><td class="indexvalue">The namespace tbb contains all components of the library </td></tr>
 </table>
 <hr>
 <p></p>
diff --git a/examples/GettingStarted/sub_string_finder/Makefile b/examples/GettingStarted/sub_string_finder/Makefile
index fbefe9c..34ba0e8 100644
--- a/examples/GettingStarted/sub_string_finder/Makefile
+++ b/examples/GettingStarted/sub_string_finder/Makefile
@@ -44,7 +44,7 @@ debug: *.cpp
 	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o sub_string_finder_pretty sub_string_finder_pretty.cpp -ltbb_debug $(LIBS)
 
 clean:
-	rm -f sub_string_finder sub_string_finder_extended sub_string_finder_pretty *.o *.d
+	$(RM) sub_string_finder sub_string_finder_extended sub_string_finder_pretty *.o *.d
 
 test:
 	./$(PROG) $(ARGS)
diff --git a/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp b/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp
index 6add9ef..674abf6 100644
--- a/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp
+++ b/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp
@@ -29,7 +29,7 @@
 #include <iostream>
 #include <string>
 #include <algorithm>
-#include "tbb/task_scheduler_init.h"
+
 #include "tbb/parallel_for.h"
 #include "tbb/blocked_range.h"
 
@@ -66,7 +66,7 @@ class SubStringFinder {
 };
 
 int main(int argc, char *argv[]) {
- task_scheduler_init init;
+ 
 
  string str[N] = { string("a"), string("b") };
  for (size_t i = 2; i < N; ++i) str[i] = str[i-1]+str[i-2];
diff --git a/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp b/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp
index 8d45529..d52f629 100644
--- a/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp
+++ b/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp
@@ -29,7 +29,7 @@
 #include <iostream>
 #include <string>
 #include <algorithm>
-#include "tbb/task_scheduler_init.h"
+
 #include "tbb/parallel_for.h"
 #include "tbb/blocked_range.h"
 #include "tbb/tick_count.h"
@@ -85,7 +85,7 @@ class SubStringFinder {
 };
 
 int main(int argc, char *argv[]) {
- task_scheduler_init init;
+ 
 
  string str[N] = { string("a"), string("b") };
  for (size_t i = 2; i < N; ++i) str[i] = str[i-1]+str[i-2];
diff --git a/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp b/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp
index f61ffc2..67f649f 100644
--- a/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp
+++ b/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp
@@ -29,7 +29,7 @@
 #include <iostream>
 #include <string>
 #include <algorithm>
-#include "tbb/task_scheduler_init.h"
+
 #include "tbb/parallel_for.h"
 #include "tbb/blocked_range.h"
 
@@ -64,7 +64,7 @@ class SubStringFinder {
 };
 
 int main(int argc, char *argv[]) {
- task_scheduler_init init;
+ 
 
  std::string str[N] = { std::string("a"), std::string("b") };
  for (size_t i = 2; i < N; ++i) str[i] = str[i-1]+str[i-2];
diff --git a/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder.vcproj b/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder.vcproj
index 8b8fdf6..f63add3 100644
--- a/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder.vcproj
+++ b/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,8 +41,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -80,7 +80,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -91,8 +91,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder_extended.vcproj b/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder_extended.vcproj
index 9d1ac49..176e625 100644
--- a/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder_extended.vcproj
+++ b/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder_extended.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,8 +41,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -80,7 +80,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -91,8 +91,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder_pretty.vcproj b/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder_pretty.vcproj
index cd7ff98..80e8d09 100644
--- a/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder_pretty.vcproj
+++ b/examples/GettingStarted/sub_string_finder/vc7.1/sub_string_finder_pretty.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,8 +41,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -80,7 +80,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -91,8 +91,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder.vcproj b/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder.vcproj
index 7cf35a7..325ad09 100644
--- a/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder.vcproj
+++ b/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -249,8 +249,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -297,7 +297,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -328,8 +328,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder_extended.vcproj b/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder_extended.vcproj
index 9a44ef5..91702f4 100644
--- a/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder_extended.vcproj
+++ b/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder_extended.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -249,8 +249,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -297,7 +297,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -328,8 +328,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder_pretty.vcproj b/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder_pretty.vcproj
index 297a4e5..8588144 100644
--- a/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder_pretty.vcproj
+++ b/examples/GettingStarted/sub_string_finder/vc8/sub_string_finder_pretty.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -249,8 +249,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -297,7 +297,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -328,8 +328,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder.vcproj b/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder.vcproj
index 9aaa560..bf46161 100644
--- a/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder.vcproj
+++ b/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -168,8 +168,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,8 +246,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -325,8 +325,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder_extended.vcproj b/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder_extended.vcproj
index 63e46a5..30fea84 100644
--- a/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder_extended.vcproj
+++ b/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder_extended.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -168,8 +168,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,8 +246,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -325,8 +325,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder_pretty.vcproj b/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder_pretty.vcproj
index 41a4cbc..e6d9177 100644
--- a/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder_pretty.vcproj
+++ b/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder_pretty.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -168,8 +168,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,8 +246,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -325,8 +325,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/Makefile b/examples/Makefile
index ddbda8a..c6368c7 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -41,27 +41,36 @@ include ../build/common.inc
 ifeq ($(filter /% $(SLASH)%, $(subst :, ,$(tbb_root)) ),)
     # also changes related variables like work_dir
     override tbb_root := $(CWD)$(SLASH)..
-    export TBB21_INSTALL_DIR := $(tbb_root)
+    export TBB22_INSTALL_DIR := $(tbb_root)
 endif
 
 ifeq ($(tbb_os),windows)
-    EXAMPLE_MAKEFILE = Makefile.windows
-    EXAMPLES = $(wildcard */*/$(EXAMPLE_MAKEFILE))
-    EXAMPLE_MAKEFILE := $(if $(EXAMPLES),Makefile.windows,Makefile)
+    ifeq ($(compiler),gcc)
+        EXAMPLE_MAKEFILE = Makefile
+        EXAMPLES = $(wildcard */*/$(EXAMPLE_MAKEFILE))
+        export CPATH := $(CPATH);$(tbb_root)/include
+        export LIBRARY_PATH := $(LIBRARY_PATH);$(work_dir)_release;$(work_dir)_debug
+        export CXXFLAGS += -Wl,--enable-auto-import
+        export RM = cmd /C del /Q /F
+    else
+        EXAMPLE_MAKEFILE = Makefile.windows
+        EXAMPLES = $(wildcard */*/$(EXAMPLE_MAKEFILE))
+        EXAMPLE_MAKEFILE := $(if $(EXAMPLES),Makefile.windows,Makefile)
+        export INCLUDE := $(tbb_root)$(SLASH)include;$(INCLUDE)
+        export LIB := $(work_dir)_release;$(work_dir)_debug;$(LIB)
+    endif
     work_dir := $(subst /,$(SLASH),$(work_dir))
     export PATH := $(work_dir)_release;$(work_dir)_debug;$(PATH)
-    export LIB := $(work_dir)_release;$(work_dir)_debug;$(LIB)
-    export INCLUDE := $(tbb_root)$(SLASH)include;$(INCLUDE)
     export TBB_ARCH_PLATFORM = $(arch)\$(runtime)
 else
     EXAMPLE_MAKEFILE = Makefile
     EXAMPLES := $(wildcard */*/$(EXAMPLE_MAKEFILE))
     # platform-specific settings
-    ifeq ($(arch),itanium)
+    ifeq ($(arch),ia64)
         override CXXFLAGS += $(PIC_KEY)
     endif
     ifeq ($(compiler),gcc)
-        ifeq ($(arch),em64t)
+        ifeq ($(arch),intel64)
             override CXXFLAGS += -m64
         endif
         ifeq ($(arch),ia32)
@@ -79,7 +88,7 @@ else
     endif
     ifeq ($(compiler),suncc)
         override CXXFLAGS += -I$(tbb_root)$(SLASH)include -library=stlport4 -M$(tbb_root)/build/suncc.map.pause
-        ifeq ($(arch),em64t)
+        ifeq ($(arch),intel64)
             override CXXFLAGS += -m64
         endif
         ifeq ($(arch),ia32)
@@ -91,7 +100,7 @@ else
     endif
     ifeq ($(tbb_os),macos)
         # GUI for examples does not support 64-bit platforms
-        ifeq ($(arch),em64t)
+        ifeq ($(arch),intel64)
             export UI=con
         endif
         ifeq ($(arch),ppc64)
diff --git a/examples/parallel_for/seismic/Makefile b/examples/common/gui/Makefile.gmake
similarity index 63%
copy from examples/parallel_for/seismic/Makefile
copy to examples/common/gui/Makefile.gmake
index f9c86bb..07d470d 100644
--- a/examples/parallel_for/seismic/Makefile
+++ b/examples/common/gui/Makefile.gmake
@@ -24,13 +24,19 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
-# GNU Makefile that builds and runs example.
-NAME=seismic
-ARGS=- 300
-
 # The C++ compiler
 #CXX=g++
 
+# detecting MS Windows (for MinGW support)
+ifeq ($(OS), Windows_NT)
+RM = cmd /C del /Q /F
+RD = cmd /C rmdir
+UI = con
+EXE = $(NAME)$(SUFFIX).exe
+
+else
+RM = rm -f
+RD = rmdir -r
 # detecting x64
 ifeq ($(shell uname -m),x86_64)
 x64 ?= 64
@@ -42,9 +48,8 @@ else
 UI ?= $(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libX11.so -o -f /usr/lib$(x64)/libX11.so ] && echo x || echo con")
 endif
 
-
 ifeq ($(UI),x)
-EXE=./$(NAME)
+EXE = $(NAME)$(SUFFIX)
 CXXFLAGS += -I/usr/X11R6/include
 LIBS += -lpthread -L/usr/X11R6/lib$(x64) -lX11
 # detect if libXext can be found
@@ -53,45 +58,26 @@ LIBS += -lXext
 else  # no libXext
 CXXFLAGS += -DX_NOSHMEM
 endif # libXext
-else # ! X
-
-ifeq ($(UI),mac)
-TBBLIBSPATH = /Library/Frameworks/TBB.framework/Libraries
-CXXFLAGS += -L$(TBBLIBSPATH) -arch i386 -mmacosx-version-min=10.4 -msse3 -ftree-vectorize
-LIBS += -framework OpenGL -framework AGL -framework Carbon
-APPRES = $(NAME).app/Contents/Resources
-EXE = ./$(NAME).app/Contents/MacOS/$(NAME)
-# look in /System and /Developer (for Xcode 3)
-PBXCP = $(wildcard /[SD]*/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp) -resolve-src-symlinks -exclude .DS_Store -exclude CVS -exclude .svn
-else # ! Mac
-UI=con
-EXE=./$(NAME)
-endif # Mac
-endif # X
-
-all:	release test
 
-resources:
+else # ! X
 ifeq ($(UI),mac)
-	mkdir -p $(APPRES)/English.lproj $(NAME).app/Contents/MacOS
-	$(PBXCP) xcode/Info.plist $(APPRES)
+TBBLIBSPATH ?= /Library/Frameworks/TBB.framework/Libraries
+CXXFLAGS += -arch i386 -mmacosx-version-min=10.4 -msse3 -ftree-vectorize
+LIBS += -framework OpenGL -framework AGL -framework Carbon -L$(TBBLIBSPATH)
+APPRES = $(NAME)$(SUFFIX).app/Contents/Resources
+EXE = $(NAME)$(SUFFIX).app/Contents/MacOS/$(NAME)$(SUFFIX)
+ifneq (,$(shell xcode-select -print-path 2>/dev/null))
+PBXCP = $(shell xcode-select -print-path)/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp
+else
+# look in /System and /Developer
+PBXCP = $(wildcard /[SD]*/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp)
 endif
+PBXCP +=  -resolve-src-symlinks -exclude .DS_Store -exclude CVS -exclude .svn
 
-release: ../../common/gui/$(UI)video.cpp SeismicSimulation.cpp resources
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(EXE) $< SeismicSimulation.cpp -ltbb $(LIBS)
-
-debug: ../../common/gui/$(UI)video.cpp SeismicSimulation.cpp resources
-	$(CXX) -g -O0 -DTBB_USE_DEBUG $(CXXFLAGS) -o $(EXE) $< SeismicSimulation.cpp -ltbb_debug $(LIBS)
-
-clean:
-	rm -f $(EXE) *.o *.d
-ifeq ($(UI),mac)
-	rm -rf $(NAME).app
-endif
+else # ! Mac
+UI = con
+EXE = $(NAME)$(SUFFIX)
 
-test:
-ifeq ($(UI),mac)
-	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; $(EXE) $(ARGS)
-else
-	$(EXE) $(ARGS)
-endif
+endif # Mac
+endif # X
+endif # Windows vs. other
diff --git a/examples/concurrent_hash_map/count_strings/Makefile b/examples/concurrent_hash_map/count_strings/Makefile
index 22a4893..b24370c 100644
--- a/examples/concurrent_hash_map/count_strings/Makefile
+++ b/examples/concurrent_hash_map/count_strings/Makefile
@@ -40,7 +40,7 @@ debug: *.cpp
 	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
-	rm -f $(PROG) *.o *.d
+	$(RM) $(PROG) *.o *.d
 
 test:
 	./$(PROG) $(ARGS)
diff --git a/examples/concurrent_hash_map/count_strings/count_strings.cpp b/examples/concurrent_hash_map/count_strings/count_strings.cpp
index d39649f..1c8ade6 100644
--- a/examples/concurrent_hash_map/count_strings/count_strings.cpp
+++ b/examples/concurrent_hash_map/count_strings/count_strings.cpp
@@ -35,6 +35,7 @@
 #include <cstring>
 #include <cctype>
 #include <cstdlib>
+#include <cstdio>
 #include "tbb/concurrent_hash_map.h"
 #include "tbb/blocked_range.h"
 #include "tbb/parallel_for.h"
@@ -42,6 +43,7 @@
 #include "tbb/task_scheduler_init.h"
 #include "tbb/tbb_allocator.h"
 
+
 //! String type with scalable allocator.
 /** On platforms with non-scalable default memory allocators, the example scales 
     better if the string allocator is changed to tbb::tbb_allocator<char>. */
@@ -62,23 +64,8 @@ const int size_factor = 2;
 
 //! Indicates if the number of threads wasn't set explicitly
 static bool is_number_of_threads_set = false;
-
-//! Structure that defines hashing and comparison operations for user's type.
-struct MyHashCompare {
-    static size_t hash( const MyString& x ) {
-        size_t h = 0;
-        for( const char* s = x.c_str(); *s; s++ )
-            h = (h*16777179)^*s;
-        return h;
-    }
-    //! True if strings are equal
-    static bool equal( const MyString& x, const MyString& y ) {
-        return x==y;
-    }
-};
-
 //! A concurrent hash table that maps strings to ints.
-typedef concurrent_hash_map<MyString,int,MyHashCompare> StringTable;
+typedef concurrent_hash_map<MyString,int> StringTable;
 
 //! Function object for counting occurrences of strings.
 struct Tally {
diff --git a/examples/concurrent_hash_map/count_strings/vc7.1/count_strings.vcproj b/examples/concurrent_hash_map/count_strings/vc7.1/count_strings.vcproj
index d32f131..931c2ea 100644
--- a/examples/concurrent_hash_map/count_strings/vc7.1/count_strings.vcproj
+++ b/examples/concurrent_hash_map/count_strings/vc7.1/count_strings.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,8 +41,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -80,7 +80,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -91,8 +91,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/concurrent_hash_map/count_strings/vc8/count_strings.vcproj b/examples/concurrent_hash_map/count_strings/vc8/count_strings.vcproj
index ffd4c97..52f8719 100644
--- a/examples/concurrent_hash_map/count_strings/vc8/count_strings.vcproj
+++ b/examples/concurrent_hash_map/count_strings/vc8/count_strings.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -249,8 +249,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -297,7 +297,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -328,8 +328,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/concurrent_hash_map/count_strings/vc9/count_strings.vcproj b/examples/concurrent_hash_map/count_strings/vc9/count_strings.vcproj
index 07bd1b9..28e518b 100644
--- a/examples/concurrent_hash_map/count_strings/vc9/count_strings.vcproj
+++ b/examples/concurrent_hash_map/count_strings/vc9/count_strings.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -168,8 +168,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,8 +246,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -325,8 +325,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/index.html b/examples/index.html
index fee9b58..aba1d27 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -122,14 +122,14 @@ during installation, or you wish to build for an alternate architecture or Micro
 it may be set up, for a given type of shell window, by using one of the following commands:
 <DL>
 <DT>For cmd.exe (command prompt):
-<DD><TT><<I>installdir</I>>\{ia32,em64t}\{vc7.1,vc8}\bin\tbbvars.bat</TT>
+<DD><TT><<I>installdir</I>>\{ia32,intel64}\{vc7.1,vc8}\bin\tbbvars.bat</TT>
 <DT>For sh, bash, ksh (or compatibles):
-<DD><TT>. <<I>installdir</I>>\{ia32,em64t}\{vc7.1,vc8}\bin\tbbvars.sh</TT>
+<DD><TT>. <<I>installdir</I>>\{ia32,intel64}\{vc7.1,vc8}\bin\tbbvars.sh</TT>
 <DT>For csh (or compatibles):
-<DD><TT>source <<I>installdir</I>>\{ia32,em64t}\{vc7.1,vc8}\bin\tbbvars.csh</TT>
+<DD><TT>source <<I>installdir</I>>\{ia32,intel64}\{vc7.1,vc8}\bin\tbbvars.csh</TT>
 <DT><I>Notes:</I>
 <DD><I><SL>
-    <LI>Choose one of {ia32,em64t} depending on the architecture to be used.
+    <LI>Choose one of {ia32,intel64} depending on the architecture to be used.
     <LI>Choose one of {vc7.1,vc8} depending on whether Microsoft* Visual Studio* .NET 2003 or
 	Microsoft* Visual Studio* 2005 is to be used.
     <LI>Environment setup need only be performed once per shell window to be used.
@@ -145,15 +145,15 @@ The environment may be set up, for a given type of shell window, by using one of
 <DT>For csh (or compatibles):
 <DD>source <<I>installdir</I>>/tbbvars.csh
 <DT>For sh, bash, ksh (or compatibles), when using an alternate architecture or platform:
-<DD>. <<I>installdir</I>>/{ia32,em64t,itanium}/cc<<I>gccversion</I>>_libc<<I>libcversion</I>>_kernel<<I>kernelversion</I>>/bin/tbbvars.sh
+<DD>. <<I>installdir</I>>/{ia32,intel64,ia64}/cc<<I>gccversion</I>>_libc<<I>libcversion</I>>_kernel<<I>kernelversion</I>>/bin/tbbvars.sh
 <DT>For csh (or compatibles), when using an alternate architecture or platform:
-<DD>source <<I>installdir</I>>/{ia32,em64t,itanium}/cc<<I>gccversion</I>>_libc<<I>libcversion</I>>_kernel<<I>kernelversion</I>>/bin/tbbvars.csh
+<DD>source <<I>installdir</I>>/{ia32,intel64,ia64}/cc<<I>gccversion</I>>_libc<<I>libcversion</I>>_kernel<<I>kernelversion</I>>/bin/tbbvars.csh
 <DT><I>Notes:</I>
 <DD><I><SL>
-    <LI>Choose one of {ia32,em64t,itanium} depending on the architecture to be used.
+    <LI>Choose one of {ia32,intel64,ia64} depending on the architecture to be used.
     <LI>Choose a cc<<I>gccversion</I>>_libc<<I>libcversion</I>>_kernel<<I>kernelversion</I>>
 	value, from among the available platforms installed with Threading Building Blocks
-	(for <A HREF=../ia32>ia32</A>, <A HREF=../em64t>em64t</A> or <A HREF=../itanium>itanium</A>),
+	(for <A HREF=../ia32>ia32</A>, <A HREF=../intel64>intel64</A> or <A HREF=../ia64>ia64</A>),
 	depending on the platform to be used.
     <LI>Environment setup need only be performed once per shell window to be used.
     <LI>Always source tbbvars.sh or tbbvars.csh rather than executing them directly.
diff --git a/examples/parallel_do/parallel_preorder/Makefile b/examples/parallel_do/parallel_preorder/Makefile
index 251ce6e..c4bba0c 100644
--- a/examples/parallel_do/parallel_preorder/Makefile
+++ b/examples/parallel_do/parallel_preorder/Makefile
@@ -40,7 +40,7 @@ debug: *.cpp
 	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
-	rm -f $(PROG) *.o *.d
+	$(RM) $(PROG) *.o *.d
 
 test:
 	./$(PROG) $(ARGS)
diff --git a/examples/parallel_do/parallel_preorder/parallel_preorder.cpp b/examples/parallel_do/parallel_preorder/parallel_preorder.cpp
index de4ea52..e0e55fc 100644
--- a/examples/parallel_do/parallel_preorder/parallel_preorder.cpp
+++ b/examples/parallel_do/parallel_preorder/parallel_preorder.cpp
@@ -34,6 +34,7 @@
 #include <vector>
 #include <algorithm>
 #include <cstring>
+#include <cstdio>
 #include "Graph.h"
 
 using namespace std;
diff --git a/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.vcproj b/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.vcproj
index 2b666a3..5b7c292 100644
--- a/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.vcproj
+++ b/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,8 +41,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -80,7 +80,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -91,8 +91,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.vcproj b/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.vcproj
index 67460ba..1141985 100644
--- a/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.vcproj
+++ b/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -249,8 +249,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -297,7 +297,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -328,8 +328,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.vcproj b/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.vcproj
index ea32d82..d9e48f5 100644
--- a/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.vcproj
+++ b/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -168,8 +168,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,8 +246,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -325,8 +325,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_do/parallel_preorder/Makefile b/examples/parallel_for/game_of_life.NET/Makefile
similarity index 81%
copy from examples/parallel_do/parallel_preorder/Makefile
copy to examples/parallel_for/game_of_life.NET/Makefile
index 251ce6e..c9d4125 100644
--- a/examples/parallel_do/parallel_preorder/Makefile
+++ b/examples/parallel_for/game_of_life.NET/Makefile
@@ -25,19 +25,16 @@
 # the GNU General Public License.
 
 # GNU Makefile that builds and runs example.
-PROG=parallel_preorder
-ARGS=1:4
-
-# The C++ compiler
-#CXX=g++
+PROG=game_of_life
+ARGS=2:4 -t 5
 
 all:	release test
 
-release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
+release: src/Evolution.cpp src/Update_state.cpp src/Game_of_life.cpp
+	$(CXX) -O2 -DNDEBUG -D_CONSOLE $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
 
-debug: *.cpp
-	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
+debug: src/Evolution.cpp src/Update_state.cpp src/Game_of_life.cpp
+	$(CXX) -O0 -D_CONSOLE -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
 	rm -f $(PROG) *.o *.d
diff --git a/examples/parallel_do/parallel_preorder/Makefile b/examples/parallel_for/game_of_life.NET/Makefile.windows
similarity index 63%
copy from examples/parallel_do/parallel_preorder/Makefile
copy to examples/parallel_for/game_of_life.NET/Makefile.windows
index 251ce6e..b657750 100644
--- a/examples/parallel_do/parallel_preorder/Makefile
+++ b/examples/parallel_for/game_of_life.NET/Makefile.windows
@@ -24,23 +24,23 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
-# GNU Makefile that builds and runs example.
-PROG=parallel_preorder
-ARGS=1:4
+# Common Makefile that builds and runs example.
 
-# The C++ compiler
-#CXX=g++
+# Just specify your program basename
+PROG=game_of_life
+ARGS=2:4 -t 5
 
-all:	release test
-
-release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
-
-debug: *.cpp
-	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
+# The C++ compiler options
+CXX = cl.exe
+MYCXXFLAGS = /TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS)
+MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
 
+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
 clean:
-	rm -f $(PROG) *.o *.d
-
+	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
 test:
-	./$(PROG) $(ARGS)
+	$(PROG) $(ARGS)
diff --git a/examples/parallel_for/game_of_life.NET/index.html b/examples/parallel_for/game_of_life.NET/index.html
new file mode 100644
index 0000000..0c950a6
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/index.html
@@ -0,0 +1,53 @@
+<HTML>
+<BODY>
+
+<H2>Overview</H2>
+The "Game of life" example demonstrates interoperability of TBB and .NET. 
+<br>This program runs 2 simultaneous instances of the classic Conway's "Game of Life". 
+One of these instances uses serial calculations to update the board. The other one calculates in parallel with TBB.
+The visualization is written in managed C++ and uses .NET CLR.
+
+<H2>Source Files</H2>
+<DL>
+<DT><A HREF="src/Form1.h">Form1.h</A>, <A HREF="src/Board.h">Board.h</A>
+<DD>Header files for GUI classes.
+<DT><A HREF="src/Evolution.h">Evolution.h</A>, <A HREF="src/Evolution.cpp">Evolution.cpp</A>
+<DD>Contain class hierarchy to implement game evolution in serial and parallel.
+<DT><A HREF="src/Update_state.cpp">Update_state.cpp </A>
+<DD>Implements 2 approaches for calculating steps in the program: with the use of SSE intrinsics, and ordinary C++ code.
+<DT><A HREF="src/Game_of_life.cpp">Game_of_life.cpp </A>
+<DD>Contains program entry point and other source not related to logical structure of the example.
+</DL>
+
+<H2>Directories</H2>
+<DL>
+<DT><A HREF="src">src</A>
+<DD>Contains source files mentioned above.
+<DT><A HREF="vc8">vc8</A>
+<DD>Contains Microsoft* Visual Studio* 2005 workspace for building and running the example.
+<DT><A HREF="vc9">vc9</A>
+<DD>Contains Microsoft* Visual Studio* 2008 workspace for building and running the example.
+</DL>
+
+<H2>To Build</H2>
+General build directions can be found <A HREF=../../index.html#build>here</A>.
+<P></P>
+
+<H2>Usage</H2>
+<DL>
+For Windows* systems, Microsoft* Visual Studio* projects are provided for each of the above versions. 
+</DL>
+
+<HR>
+<A HREF="../index.html">Up to parent directory</A>
+<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.
+</BODY>
+</HTML>
+
diff --git a/src/test/harness_assert.h b/examples/parallel_for/game_of_life.NET/src/AssemblyInfo.cpp
similarity index 52%
copy from src/test/harness_assert.h
copy to examples/parallel_for/game_of_life.NET/src/AssemblyInfo.cpp
index 1605330..bc5d63d 100644
--- a/src/test/harness_assert.h
+++ b/examples/parallel_for/game_of_life.NET/src/AssemblyInfo.cpp
@@ -26,22 +26,41 @@
     the GNU General Public License.
 */
 
-// Just the assertion portion of the harness.
-// This is useful for writing portions of tests that include
-// the minimal number of necessary header files.
+using namespace System;
+using namespace System::Reflection;
+using namespace System::Runtime::CompilerServices;
+using namespace System::Runtime::InteropServices;
+using namespace System::Security::Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
 //
-// The full "harness.h" must be included later.
+[assembly:AssemblyTitleAttribute("Automata")];
+[assembly:AssemblyDescriptionAttribute("")];
+[assembly:AssemblyConfigurationAttribute("")];
+[assembly:AssemblyCompanyAttribute("")];
+[assembly:AssemblyProductAttribute("Automata")];
+[assembly:AssemblyCopyrightAttribute("Copyright (c)  2007")];
+[assembly:AssemblyTrademarkAttribute("")];
+[assembly:AssemblyCultureAttribute("")];
 
-#ifndef harness_assert_H
-#define harness_assert_H
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the value or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
 
-static void ReportError( int line, const char* expression, const char* message, bool is_error = true ); 
+[assembly:AssemblyVersionAttribute("1.0.*")];
 
-#define ASSERT(p,message) ((p)?(void)0:ReportError(__LINE__,#p,message))
-#define ASSERT_WARNING(p,message) ((p)?(void)0:ReportError(__LINE__,#p,message, false))
+[assembly:ComVisible(false)];
 
-//! Compile-time error if x and y have different types
-template<typename T>
-void AssertSameType( const T& /*x*/, const T& /*y*/ ) {}
+[assembly:CLSCompliantAttribute(true)];
 
-#endif /* harness_assert_H */
+[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];
diff --git a/examples/parallel_for/game_of_life.NET/src/Board.h b/examples/parallel_for/game_of_life.NET/src/Board.h
new file mode 100644
index 0000000..1a5d680
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/src/Board.h
@@ -0,0 +1,124 @@
+/*
+    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 __BOARD_H__ 
+#define __BOARD_H__
+
+#define WIN32_LEAN_AND_MEAN
+
+#ifndef _CONSOLE
+#include <windows.h>
+
+using namespace System;
+using namespace System::ComponentModel;
+using namespace System::Collections;
+using namespace System::Windows::Forms;
+using namespace System::Data;
+using namespace System::Drawing;
+#define LabelPtr Label^
+#define BoardPtr Board^
+#else
+#define LabelPtr int*
+#define BoardPtr Board*
+#endif
+
+struct Matrix 
+{
+    int width;
+    int height;
+    char* data;
+};
+
+#ifndef _CONSOLE
+public ref class Board : public System::Windows::Forms::UserControl
+#else
+class Board
+#endif
+    {
+    public:
+        Board(int width, int height, int squareSize, LabelPtr counter);        
+        virtual ~Board()
+        {
+#ifndef _CONSOLE
+            if (components)
+            {
+                delete components;
+            }
+#endif
+        }
+
+        void seed(int s);
+        void seed(const BoardPtr s);
+#ifndef _CONSOLE
+    protected: 
+        virtual void OnPaint(PaintEventArgs^ e) override;        
+        void Board::draw(Graphics^ g);
+
+    private:
+        System::ComponentModel::Container ^components;
+
+#pragma region Windows Form Designer generated code
+        void InitializeComponent(void)
+        {
+            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
+        }
+#pragma endregion
+
+    private: delegate void drawDelegate(Int32);
+    public:
+        //! Called from the Evolution thread
+        void draw( Int32 nCurIteration )
+        {
+            if (this->InvokeRequired)
+            {
+                drawDelegate^ d = gcnew drawDelegate(this, &Board::draw);
+                IAsyncResult^ result = BeginInvoke(d, nCurIteration);
+                EndInvoke(result);
+                return;
+            }
+            m_counter->Text = nCurIteration.ToString();
+            Invalidate();
+        }
+#endif
+    public:
+        Matrix *m_matrix;    
+
+    private:
+#ifndef _CONSOLE
+        SolidBrush^ m_occupiedBrush;
+        SolidBrush^ m_freeBrush;
+        Graphics^ m_graphics;
+        Graphics^ m_mem_dc;
+        Bitmap^ m_bmp;
+#endif
+        int m_width;
+        int m_height;
+        int m_squareSize;
+        LabelPtr m_counter;
+    };
+#endif
diff --git a/examples/parallel_for/game_of_life.NET/src/Evolution.cpp b/examples/parallel_for/game_of_life.NET/src/Evolution.cpp
new file mode 100644
index 0000000..763d203
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/src/Evolution.cpp
@@ -0,0 +1,248 @@
+/*
+    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.
+*/
+
+/*
+    Evolution.cpp: implementation file for evolution classes; evolution 
+                  classes do looped evolution of patterns in a defined 
+                  2 dimensional space
+*/
+
+#include "Evolution.h"
+#include "Board.h"
+
+#ifdef USE_SSE
+#define GRAIN_SIZE 14
+#else
+#define GRAIN_SIZE 4000
+#endif
+#define TIME_SLICE 330
+
+/*
+    Evolution
+*/
+
+/**
+    Evolution::UpdateMatrix() - moves the calculated destination data 
+    to the source data block. No destination zeroing is required since it will 
+    be completely overwritten during the next calculation cycle.
+**/
+void Evolution::UpdateMatrix()
+{
+    memcpy(m_matrix->data, m_dest, m_size);
+}
+
+/*
+    SequentialEvolution
+*/
+
+//! SequentialEvolution::Run - begins looped evolution
+#ifndef _CONSOLE
+void SequentialEvolution::Run()
+{
+#else
+void SequentialEvolution::Run(double execution_time, int nthread)
+{
+    printf("Starting game (Sequential evolution)\n");
+#endif
+
+    m_nIteration = 0;
+    m_serial_time = 0;
+    tbb::tick_count t0 = tbb::tick_count::now();
+    while (!m_done)
+    {
+        if( !is_paused ) 
+        {
+            tbb::tick_count t = tbb::tick_count::now();
+            Step();
+            tbb::tick_count t1 = tbb::tick_count::now();
+            ++m_nIteration;
+            double  work_time = (t1-t0).seconds();
+#ifndef _CONSOLE
+            if ( work_time * 1000 < TIME_SLICE )
+                continue;
+            m_serial_time += work_time;
+            m_board->draw(m_nIteration);
+#else
+            m_serial_time += work_time;
+#endif
+        }
+        //! Let the parallel algorithm work uncontended almost the same time
+        //! as the serial one. See ParallelEvolution::Run() as well.
+#ifndef _CONSOLE
+        m_evt_start_parallel->Set();
+        m_evt_start_serial->WaitOne();
+        t0 = tbb::tick_count::now();
+#else
+        t0 = tbb::tick_count::now();
+        if(m_serial_time > execution_time)
+        {
+            printf("iterations count = %d time = %g\n", m_nIteration, m_serial_time);
+            break;
+        }
+#endif
+    }
+}
+
+//! SequentialEvolution::Step() - override of step method
+void SequentialEvolution::Step()
+{
+        if( !is_paused ) 
+    {
+#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);
+    UpdateMatrix();
+#endif
+        }
+}
+
+/*
+    ParallelEvolution
+*/
+
+//! SequentialEvolution::Run - begins looped evolution
+#ifndef _CONSOLE
+void ParallelEvolution::Run()
+{
+#else
+void ParallelEvolution::Run(double execution_time, int nthread)
+{
+    printf("Starting game (Parallel evolution for %d thread(s))\n", nthread);
+#endif
+
+    m_nIteration = 0;
+    m_parallel_time = 0;
+
+#ifndef _CONSOLE
+    //! start task scheduler as necessary
+    if (m_pInit == NULL)
+    {
+        m_pInit = new tbb::task_scheduler_init();
+    }
+    m_evt_start_parallel->WaitOne();
+#else
+    tbb::task_scheduler_init init(nthread);
+#endif
+
+    double  work_time = m_serial_time;
+    tbb::tick_count t0 = tbb::tick_count::now();
+
+    while (!m_done)
+    {
+        if( !is_paused ) 
+        {
+            tbb::tick_count t = tbb::tick_count::now();
+            Step();
+            tbb::tick_count t1 = tbb::tick_count::now();
+            ++m_nIteration;
+            double real_work_time = (t1-t0).seconds();
+#ifndef _CONSOLE
+            if ( real_work_time < work_time )
+                continue;
+            m_parallel_time += real_work_time;
+            m_board->draw(m_nIteration); 
+#else
+            m_parallel_time += real_work_time;
+#endif
+        }
+        //! Let the serial algorithm work the same time as the parallel one.
+#ifndef _CONSOLE
+        m_evt_start_serial->Set();
+        m_evt_start_parallel->WaitOne();
+
+        work_time = m_serial_time - m_parallel_time;
+        t0 = tbb::tick_count::now();
+#else
+        t0 = tbb::tick_count::now();
+        if(m_parallel_time > execution_time)
+        {
+            printf("iterations count = %d time = %g\n", m_nIteration, m_parallel_time);
+            init.terminate();
+            break;
+        }
+#endif
+    }
+}
+
+/**
+    class tbb_parallel_task
+    
+    TBB requires a class for parallel loop implementations. The actual 
+    loop "chunks" are performed using the () operator of the class. 
+    The blocked_range contains the range to calculate. Please see the 
+    TBB documentation for more information.
+**/
+#ifndef _CONSOLE
+public class tbb_parallel_task
+#else
+class tbb_parallel_task
+#endif
+{
+public:
+    static void set_values (Matrix* source, char* dest)
+    {
+        m_source = source;
+        m_dest = dest;
+        return;
+    }
+
+    void operator()( const tbb::blocked_range<size_t>& r ) const 
+    {
+        int begin = (int)r.begin();            //! capture lower range number for this chunk
+        int end = (int)r.end();                //! capture upper range number for this chunk
+        UpdateState(m_source, m_dest, begin, end);
+    }
+
+    tbb_parallel_task () {}
+
+private:
+    static Matrix* m_source;
+    static char* m_dest;
+};
+
+Matrix* tbb_parallel_task::m_source;
+char* tbb_parallel_task::m_dest;
+
+//! ParallelEvolution::Step() - override of Step method
+void ParallelEvolution::Step()
+{
+    size_t begin = 0;                   //! beginning cell position
+#ifdef USE_SSE
+    size_t end = m_matrix->height;      //! ending cell position
+#else
+    size_t end = m_size-1;              //! ending cell position
+#endif
+
+    //! set matrix pointers
+    tbb_parallel_task::set_values(m_matrix, m_dest);
+
+    //! do calculation loop
+    parallel_for (tbb::blocked_range<size_t> (begin, end, GRAIN_SIZE), tbb_parallel_task());
+    UpdateMatrix();
+}
diff --git a/examples/parallel_for/game_of_life.NET/src/Evolution.h b/examples/parallel_for/game_of_life.NET/src/Evolution.h
new file mode 100644
index 0000000..1b98d3e
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/src/Evolution.h
@@ -0,0 +1,201 @@
+/*
+    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.
+*/
+
+/** 
+    Evolution.h: Header file for evolution classes; evolution classes do 
+    looped evolution of patterns in a defined 2 dimensional space 
+**/
+
+#ifndef __EVOLUTION_H__
+#define __EVOLUTION_H__
+
+#include "Board.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#define WIN32_LEAN_AND_MEAN
+
+//! Threading Building Blocks includes
+#include "tbb/task_scheduler_init.h"
+#include "tbb/blocked_range.h"
+#include "tbb/parallel_for.h"
+#include "tbb/tick_count.h"
+
+#ifndef _CONSOLE
+#include <windows.h>
+using namespace System::Threading;
+#else
+typedef unsigned int Int32;
+#endif
+
+void UpdateState(Matrix * m_matrix, char * dest ,int begin, int end);
+
+/**
+    class Evolution - base class for SequentialEvolution and ParallelEvolution
+**/
+#ifndef _CONSOLE
+public ref class Evolution abstract
+#else
+class Evolution
+#endif
+{
+public:
+    Evolution( Matrix *m,                //! beginning matrix including initial pattern
+               BoardPtr board              //! the board to update
+             ) : m_matrix(m), m_board(board), 
+                 m_size(m_matrix->height * m_matrix->width), m_done(false)
+    {
+        //! allocate memory for second matrix data block
+        m_dest = new char[m_size];
+        is_paused = false;
+    }
+
+    virtual ~Evolution()
+    {
+        delete[] m_dest;
+    }
+
+    //! Run() - begins looped evolution
+#ifndef _CONSOLE
+    virtual void Run() = 0;
+#else
+    virtual void Run(double execution_time, int nthread) = 0;
+#endif
+
+    //! Quit() - tell the thread to terminate
+    virtual void Quit() { m_done = true; }
+    
+    //! Step() - performs a single evolutionary generation computation on the game matrix
+    virtual void Step() = 0;
+
+    //! SetPause() - change condition of variable is_paused
+    virtual void SetPause(bool condition)
+    {
+        if ( condition == true )
+            is_paused = true;
+        else
+            is_paused = false;
+    }
+    
+protected:
+    /** 
+        UpdateMatrix() - moves the previous destination data to the source 
+        data block and zeros out destination.
+    **/
+    void UpdateMatrix();
+
+protected:
+    Matrix*         m_matrix;       //! Pointer to initial matrix
+    char*           m_dest;         //! Pointer to calculation destination data    
+    BoardPtr        m_board;        //! The game board to update
+    int             m_size;         //! size of the matrix data block
+    volatile bool   m_done;         //! a flag used to terminate the thread
+    Int32           m_nIteration;   //! current calculation cycle index
+    volatile bool   is_paused;      //! is needed to perform next iteration
+    
+    //! Calculation time of the sequential version (since the start), seconds.
+    /**
+        This member is updated by the sequential version and read by parallel,
+        so no synchronization is necessary.
+    **/
+#ifndef _CONSOLE
+    static volatile double m_serial_time = 0;
+
+    static System::Threading::AutoResetEvent    ^m_evt_start_serial = gcnew AutoResetEvent(false),
+                                                ^m_evt_start_parallel = gcnew AutoResetEvent(false);
+#else
+    double m_serial_time;
+#endif
+};
+
+/**
+    class SequentialEvolution - derived from Evolution - calculate life generations serially
+**/
+#ifndef _CONSOLE
+public ref class SequentialEvolution: public Evolution
+#else
+class SequentialEvolution: public Evolution
+#endif
+{
+public:
+    SequentialEvolution(Matrix *m, BoardPtr board)
+                       : Evolution(m, board)
+    {}
+#ifndef _CONSOLE        
+    virtual void Run() override;
+    virtual void Step() override;
+#else
+    virtual void Run(double execution_time, int nthread);
+    virtual void Step();
+#endif
+
+};
+
+/**
+    class ParallelEvolution - derived from Evolution - calculate life generations
+    in parallel using Intel's TBB package
+**/
+#ifndef _CONSOLE
+public ref class ParallelEvolution: public Evolution
+#else
+class ParallelEvolution: public Evolution
+#endif
+{
+public:
+
+    ParallelEvolution(Matrix *m, BoardPtr board)
+                     : Evolution(m, board),
+                       m_parallel_time(0)
+    {
+        // instantiate a task_scheduler_init object and save a pointer to it
+        m_pInit = NULL;
+    }
+    
+    ~ParallelEvolution()
+    {
+        //! delete task_scheduler_init object
+        if (m_pInit != NULL)
+            delete m_pInit;
+    }
+#ifndef _CONSOLE
+    virtual void Run() override;
+    virtual void Step() override;
+#else
+    virtual void Run(double execution_time, int nthread);
+    virtual void Step();
+#endif
+    
+
+private:
+    tbb::task_scheduler_init* m_pInit;
+
+    double m_parallel_time;
+};
+
+#endif
diff --git a/examples/parallel_for/game_of_life.NET/src/Form1.h b/examples/parallel_for/game_of_life.NET/src/Form1.h
new file mode 100644
index 0000000..972b78f
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/src/Form1.h
@@ -0,0 +1,314 @@
+/*
+    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 _CONSOLE
+#ifndef __FORM1_H__
+#define __FORM1_H__
+
+#include <time.h>
+#include "Board.h"
+#include "Evolution.h"
+
+#define BOARD_SQUARE_SIZE 2
+
+    using namespace System;
+    using namespace System::ComponentModel;
+    using namespace System::Collections;
+    using namespace System::Windows::Forms;
+    using namespace System::Data;
+    using namespace System::Drawing;
+
+    public ref class Form1 : public System::Windows::Forms::Form
+    {
+    public:
+        Form1(void)
+        {
+            InitializeComponent();
+
+            FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedDialog;
+            ClientSize = System::Drawing::Size(1206, 600+m_ribbonHeight+menuStrip1->Height);
+
+            int boardWidth = (ClientRectangle.Width/2-m_sepWidth/2)/BOARD_SQUARE_SIZE;
+            int boardHeight = (ClientRectangle.Height-menuStrip1->Height-m_ribbonHeight)/BOARD_SQUARE_SIZE;
+
+            m_board1 = gcnew Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, seqGen);
+            m_board2 = gcnew Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, parGen);
+            
+            Controls->Add(m_board1);
+            Controls->Add(m_board2);
+
+            m_board1->Location = System::Drawing::Point(2, m_ribbonHeight + menuStrip1->Height);
+            m_board2->Location = System::Drawing::Point(2 + boardWidth*BOARD_SQUARE_SIZE + m_sepWidth/2, m_ribbonHeight + menuStrip1->Height);
+
+            m_seq = gcnew SequentialEvolution(m_board1->m_matrix, m_board1);
+            m_par = gcnew ParallelEvolution(m_board2->m_matrix, m_board2);
+
+            m_seqThread = gcnew Thread(gcnew ThreadStart(m_seq, &SequentialEvolution::Run));
+            m_parThread = gcnew Thread(gcnew ThreadStart(m_par, &ParallelEvolution::Run));        
+
+            Thread::CurrentThread->Priority = ThreadPriority::AboveNormal;
+
+            m_suspend = true;
+        }
+    protected:
+        ~Form1()
+        {
+            if (components)
+            {
+                delete components;
+            }
+        }
+    private: System::Windows::Forms::MenuStrip^  menuStrip1;
+    private: System::Windows::Forms::ToolStripMenuItem^  fileToolStripMenuItem;
+    private: System::Windows::Forms::ToolStripMenuItem^  exitToolStripMenuItem;
+    private: System::Windows::Forms::ToolStripMenuItem^  gameToolStripMenuItem;
+    private: System::Windows::Forms::ToolStripMenuItem^  seedToolStripMenuItem;
+    private: System::Windows::Forms::ToolStripMenuItem^  runToolStripMenuItem;
+    private: System::Windows::Forms::ToolStripMenuItem^  pauseToolStripMenuItem;
+    private: Board^ m_board1;
+    private: Board^ m_board2;
+    private: System::Windows::Forms::Label^  Sequential;
+    private: System::Windows::Forms::Label^  label1;
+    private: static const int m_sepWidth = 5;
+    private: static const int m_ribbonHeight = 26;
+    private: SequentialEvolution^ m_seq;
+    private: ParallelEvolution^ m_par;
+    private: Thread^ m_seqThread;
+    private: Thread^ m_parThread;
+    private: System::Windows::Forms::Label^  seqGen;
+    private: System::Windows::Forms::Label^  parGen;
+    private: bool m_suspend;
+
+    private:
+        System::ComponentModel::Container ^components;
+
+#pragma region Windows Form Designer generated code
+        void InitializeComponent(void)
+        {
+            this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
+            this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
+            this->exitToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
+            this->gameToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
+            this->seedToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
+            this->runToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
+            this->pauseToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
+            this->Sequential = (gcnew System::Windows::Forms::Label());
+            this->label1 = (gcnew System::Windows::Forms::Label());
+            this->seqGen = (gcnew System::Windows::Forms::Label());
+            this->parGen = (gcnew System::Windows::Forms::Label());
+            this->menuStrip1->SuspendLayout();
+            this->SuspendLayout();
+            // 
+            // menuStrip1
+            // 
+            this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) 
+                {this->fileToolStripMenuItem, this->gameToolStripMenuItem});
+            this->menuStrip1->Location = System::Drawing::Point(0, 0);
+            this->menuStrip1->Name = L"menuStrip1";
+            this->menuStrip1->Padding = System::Windows::Forms::Padding(8, 2, 0, 2);
+            this->menuStrip1->Size = System::Drawing::Size(1600, 26);
+            this->menuStrip1->TabIndex = 0;
+            this->menuStrip1->Text = L"menuStrip1";
+            this->menuStrip1->ItemClicked += gcnew System::Windows::Forms::ToolStripItemClickedEventHandler(this, &Form1::menuStrip1_ItemClicked);
+            // 
+            // fileToolStripMenuItem
+            // 
+            this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(1) {this->exitToolStripMenuItem});
+            this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem";
+            this->fileToolStripMenuItem->Size = System::Drawing::Size(40, 22);
+            this->fileToolStripMenuItem->Text = L"File";
+            // 
+            // exitToolStripMenuItem
+            // 
+            this->exitToolStripMenuItem->Name = L"exitToolStripMenuItem";
+            this->exitToolStripMenuItem->Size = System::Drawing::Size(99, 22);
+            this->exitToolStripMenuItem->Text = L"Exit";
+            this->exitToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::OnExit);
+            // 
+            // gameToolStripMenuItem
+            // 
+            this->gameToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(3) {this->seedToolStripMenuItem, 
+                this->runToolStripMenuItem, this->pauseToolStripMenuItem});
+            this->gameToolStripMenuItem->Name = L"gameToolStripMenuItem";
+            this->gameToolStripMenuItem->Size = System::Drawing::Size(59, 22);
+            this->gameToolStripMenuItem->Text = L"Game";
+            // 
+            // seedToolStripMenuItem
+            // 
+            this->seedToolStripMenuItem->Name = L"seedToolStripMenuItem";
+            this->seedToolStripMenuItem->Size = System::Drawing::Size(115, 22);
+            this->seedToolStripMenuItem->Text = L"Seed";
+            this->seedToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::OnSeed);
+            // 
+            // runToolStripMenuItem
+            // 
+            this->runToolStripMenuItem->Enabled = false;
+            this->runToolStripMenuItem->Name = L"runToolStripMenuItem";
+            this->runToolStripMenuItem->Size = System::Drawing::Size(115, 22);
+            this->runToolStripMenuItem->Text = L"Run";
+            this->runToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::OnRun);
+            // 
+            // pauseToolStripMenuItem
+            // 
+            this->pauseToolStripMenuItem->Enabled = false;
+            this->pauseToolStripMenuItem->Name = L"pauseToolStripMenuItem";
+            this->pauseToolStripMenuItem->Size = System::Drawing::Size(115, 22);
+            this->pauseToolStripMenuItem->Text = L"Pause";
+            this->pauseToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::OnPauseResume);
+            // 
+            // Sequential
+            // 
+            this->Sequential->AutoSize = true;
+            this->Sequential->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
+                static_cast<System::Byte>(0)));
+            this->Sequential->Location = System::Drawing::Point(12, 32);
+            this->Sequential->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
+            this->Sequential->Name = L"Sequential";
+            this->Sequential->Size = System::Drawing::Size(239, 18);
+            this->Sequential->TabIndex = 1;
+            this->Sequential->Text = L"Sequential Algorithm      generation:";
+            // 
+            // label1
+            // 
+            this->label1->AutoSize = true;
+            this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
+                static_cast<System::Byte>(0)));
+            this->label1->Location = System::Drawing::Point(813, 32);
+            this->label1->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
+            this->label1->Name = L"label1";
+            this->label1->Size = System::Drawing::Size(219, 18);
+            this->label1->TabIndex = 2;
+            this->label1->Text = L"Parallel Algorithm     generation: ";
+            // 
+            // seqGen
+            // 
+            this->seqGen->AutoSize = true;
+            this->seqGen->Location = System::Drawing::Point(289, 35);
+            this->seqGen->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
+            this->seqGen->Name = L"seqGen";
+            this->seqGen->Size = System::Drawing::Size(16, 17);
+            this->seqGen->TabIndex = 3;
+            this->seqGen->Text = L"0";
+            // 
+            // parGen
+            // 
+            this->parGen->AutoSize = true;
+            this->parGen->Location = System::Drawing::Point(1068, 35);
+            this->parGen->Margin = System::Windows::Forms::Padding(4, 0, 4, 0);
+            this->parGen->Name = L"parGen";
+            this->parGen->Size = System::Drawing::Size(16, 17);
+            this->parGen->TabIndex = 4;
+            this->parGen->Text = L"0";
+            // 
+            // Form1
+            // 
+            this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
+            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
+            this->ClientSize = System::Drawing::Size(1600, 738);
+            this->Controls->Add(this->parGen);
+            this->Controls->Add(this->seqGen);
+            this->Controls->Add(this->label1);
+            this->Controls->Add(this->Sequential);
+            this->Controls->Add(this->menuStrip1);
+            this->MainMenuStrip = this->menuStrip1;
+            this->Margin = System::Windows::Forms::Padding(4);
+            this->MaximizeBox = false;
+            this->Name = L"Form1";
+            this->Text = L"Game of Life";
+            this->menuStrip1->ResumeLayout(false);
+            this->menuStrip1->PerformLayout();
+            this->ResumeLayout(false);
+            this->PerformLayout();
+
+        }
+#pragma endregion    
+    protected: 
+        void CloseApp ()
+        {
+            m_seq->Quit();
+            m_par->Quit();
+            //! Perform a very ungracious exit, should coordinate the threads
+            System::Environment::Exit(0);            
+        }
+    
+    protected: 
+        virtual void OnPaint(PaintEventArgs^ e) override
+        {
+        }
+
+        virtual void OnFormClosing(FormClosingEventArgs^ e) override
+        { 
+            CloseApp();
+        }
+    
+        void OnExit(System::Object^ sender, System::EventArgs^ e)
+        {                
+            CloseApp();
+        }
+
+        void OnSeed(System::Object^ sender, System::EventArgs^ e)
+        {
+            this->seedToolStripMenuItem->Enabled = false;
+            this->runToolStripMenuItem->Enabled = true;            
+            time_t now = time(NULL);
+            this->m_board1->seed((int)now);
+            this->m_board2->seed(this->m_board1);
+            this->Invalidate();
+        }
+
+        void OnRun(System::Object^ sender, System::EventArgs^ e)
+        {    
+            this->runToolStripMenuItem->Enabled = false;        
+            this->pauseToolStripMenuItem->Enabled = true;
+            m_seqThread->Start();
+            m_parThread->Start();    
+        }
+
+        void OnPauseResume(System::Object^ sender, System::EventArgs^ e)
+        {    
+            if (m_suspend)
+            {
+                m_seq->SetPause(true);
+                m_par->SetPause(true);
+                this->pauseToolStripMenuItem->Text = L"Resume";
+            }
+            else
+            {
+                m_seq->SetPause(false);
+                m_par->SetPause(false);            
+                this->pauseToolStripMenuItem->Text = L"Pause";
+            }
+            m_suspend = !m_suspend;
+        }
+
+    private: 
+        System::Void menuStrip1_ItemClicked(System::Object^  sender, System::Windows::Forms::ToolStripItemClickedEventArgs^  e) 
+        {}
+};
+#endif
+#endif
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
new file mode 100644
index 0000000..8cc9cf6
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/src/Game_of_life.cpp
@@ -0,0 +1,223 @@
+/*
+    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.
+*/
+
+/* 
+    Game_of_life.cpp : 
+                      main project file.
+*/
+#include "Board.h"
+#include "Form1.h"
+
+#define WIN32_LEAN_AND_MEAN
+
+#ifndef _CONSOLE
+#include <windows.h>
+#else
+#include <iostream>
+#include <sstream>
+#include <time.h>
+#include "Evolution.h"
+
+#define BOARD_SQUARE_SIZE 2
+
+int low;                            //! lower range limit of threads
+int high;                           //! high range limit of threads
+double execution_time;              //! time for game of life iterations
+#endif
+
+Board::Board(int width, int height, int squareSize, LabelPtr counter)
+: m_width(width), m_height(height), m_squareSize(squareSize), m_counter(counter)
+{
+#ifndef _CONSOLE
+    InitializeComponent();
+    DoubleBuffered = true;
+
+    this->Width = m_squareSize*width;
+    this->Height = m_squareSize*height;
+#endif
+    m_matrix = new Matrix();
+    m_matrix->width = width;
+    m_matrix->height = height;
+    m_matrix->data = new char[width*height];
+    memset(m_matrix->data, 0, width*height);
+#ifndef _CONSOLE
+    m_occupiedBrush = gcnew SolidBrush(Color::Black);
+    m_freeBrush = gcnew SolidBrush(Color::LightGray);
+    
+    m_graphics = CreateGraphics();
+    m_bmp = gcnew Bitmap(Width, Height);
+    m_mem_dc = Graphics::FromImage(m_bmp);
+#endif
+}
+
+void Board::seed(int s)
+{        
+    srand(s);
+    for (int j=0; j<m_height; j++)
+    {
+        for (int i=0; i<m_width; i++)
+        {        
+            int x = rand()/(int)(((unsigned)RAND_MAX + 1) / 100);
+            m_matrix->data[i+j*m_width] = x>75? 1: 0;               // 25% occupied
+        }
+    }
+#ifndef _CONSOLE
+    Invalidate();
+#endif
+}
+
+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();
+#endif
+}
+
+#ifndef _CONSOLE
+void Board::draw(Graphics^ g)
+{
+    m_mem_dc->FillRectangle(m_freeBrush, Drawing::Rectangle(0, 0, m_width*m_squareSize, m_height*m_squareSize));
+    for (int j=0; j<m_height; j++)
+    {
+        for (int i=0; i<m_width; i++)
+        {    
+            if ( m_matrix->data[i+j*m_width] )
+            {
+                m_mem_dc->FillRectangle(m_occupiedBrush, Drawing::Rectangle(i*m_squareSize, j*m_squareSize, m_squareSize, m_squareSize));
+            }
+        }
+    }
+    g->DrawImage(m_bmp, 0, 0);
+}
+
+void Board::OnPaint(PaintEventArgs^ e)
+{
+    draw(e->Graphics);
+}
+
+[STAThreadAttribute]
+int main(array<System::String ^> ^args)
+{
+    // Enabling Windows XP visual effects before any controls are created
+    Application::EnableVisualStyles();
+    Application::SetCompatibleTextRenderingDefault(false); 
+
+    // Create the main window and run it
+    Application::Run(gcnew Form1());
+    return 0;
+}
+#else
+
+//! Print usage of this program
+void PrintUsage() 
+{
+    printf("Usage: gol [M[:N] -t execution_time]\nM and N are a range of numbers of threads to be used.\nexecution_time is a time (in sec) for execution game_of_life iterations\n");
+    printf("Default values:\nM:\t\tautomatic\nN:\t\tM\nexecution_time:\t10\n");
+}
+
+//! Parse command line
+bool ParseCommandLine(int argc, char * argv []) 
+{
+    char* s = argv[1];
+    char* end;
+    //! command line without parameters
+    if(argc == 1)
+    {
+        low = tbb::task_scheduler_init::automatic;
+        high = low;
+        execution_time = 10;
+        return true;
+    }
+    //! command line with parameters
+    if(argc != 4)
+    {
+        PrintUsage();
+        return false;
+    }
+    if(std::string("-t") != argv[argc-2])
+    //! process M[:N] parameter
+    high = strtol(s,&end,0);
+    low = strtol(s,&end,0);
+    switch( *end ) 
+    {
+        case ':': 
+            high = strtol(end+1,0,0); 
+            break;
+        case '\0':
+            break;
+        default:
+            PrintUsage();
+            return false;
+    }
+    if (high < low)
+    {
+        std::cout << "Set correct range. Current range: " << low << ":" << high << std::endl;
+        PrintUsage();
+        return false;
+
+    }
+    //! process execution_time parameter
+    execution_time = strtol(argv[argc-1],&end,0);
+    return true;
+}
+
+int main( int argc, char* argv[] ) 
+{
+    if(!ParseCommandLine( argc, argv ))
+        return 1;
+    SequentialEvolution* m_seq;
+    ParallelEvolution* m_par;
+    Board* m_board1;
+    Board* m_board2; 
+    int* count = NULL;
+   
+    int boardWidth = 300;
+    int boardHeight = 300;
+
+    m_board1 = new Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, count);
+    m_board2 = new Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, count);
+
+    time_t now = time(NULL);
+    printf("Generate Game of life board\n");
+    m_board1->seed((int)now);
+    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);
+    for( int p = low; p <= high; ++p ) 
+    {
+        m_par->Run(execution_time, p);
+    }    
+    return 0;
+}
+#endif
diff --git a/examples/parallel_for/game_of_life.NET/src/Update_state.cpp b/examples/parallel_for/game_of_life.NET/src/Update_state.cpp
new file mode 100644
index 0000000..64c8f4d
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/src/Update_state.cpp
@@ -0,0 +1,410 @@
+/*
+    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 "Evolution.h"
+
+#ifdef USE_SSE 
+/* Update states with SSE */
+
+#include <xmmintrin.h>
+#include <emmintrin.h>
+
+inline void create_record( char * src, unsigned * dst, unsigned width)
+{
+    dst[0] |= src[width - 1];
+    for( unsigned a=0; a<31u; ++a )
+        dst[0] |= src[a]<<(a+1);
+    unsigned a;
+    for( a=31u; a<width; ++a )
+        dst[(a+1)/32u] |= src[a]<<((a+1)%32u);
+    dst[(a+1)/32u] |= src[0]<<((a+1)%32u);
+}
+
+inline void sum_offset( __m128i * X, __m128i * A, __m128i * B, __m128i * C, 
+                        unsigned size_sse_ar, unsigned shift )
+{
+    for(unsigned i=0; i<size_sse_ar; ++i) 
+    {
+        __m128i tmp = _mm_and_si128(A[i],X[shift + i]);    
+        A[i]=_mm_xor_si128(A[i],X[shift + i]);    
+        C[i]=_mm_or_si128(C[i],_mm_and_si128(B[i],tmp));
+        B[i]=_mm_xor_si128(B[i],tmp);
+    }
+}
+
+inline void shift_left2D( __m128i * X, unsigned height, unsigned size_sse_row )
+{
+    for( unsigned b=0; b<height; ++b ) 
+    {
+        unsigned ind = b*size_sse_row;
+        unsigned x0 = X[ind].m128i_u32[0] & 1;
+
+        X[ind] =_mm_or_si128( _mm_srli_epi16(X[ind],1), 
+            _mm_slli_epi16( _mm_srli_si128( X[ind], 2), 15) );
+    
+        unsigned x1 = X[ind + 1].m128i_u32[0] & 1;
+        X[ind+1] =_mm_or_si128( _mm_srli_epi16( X[ind+1],1), 
+            _mm_slli_epi16( _mm_srli_si128( X[ind+1], 2), 15) );
+        X[ind].m128i_u32[3] |= x1<<31;
+        
+        unsigned x2 = X[ind + 2].m128i_u32[0] & 1;
+        X[ind+2] =_mm_or_si128( _mm_srli_epi16( X[ind+2],1), 
+            _mm_slli_epi16( _mm_srli_si128( X[ind+2], 2), 15) );
+        X[ind+1].m128i_u32[3] |= x2<<31;
+        
+        unsigned* dst = (unsigned*)&X[ind];
+        dst[301/32u] |= x0<<(301%32u);
+   }
+}
+
+inline void shift_right2D( __m128i * X, unsigned height, unsigned size_sse_row )
+{
+    for( unsigned b=0; b<height; ++b ) 
+    {
+        unsigned ind = b*size_sse_row;
+
+        unsigned x0 = X[ind].m128i_u32[3]; x0>>=31;
+        X[ind] =_mm_or_si128( _mm_slli_epi16(X[ind],1), 
+            _mm_srli_epi16( _mm_slli_si128( X[ind], 2), 15) );
+            
+        unsigned x1 = X[ind + 1].m128i_u32[3]; x1>>=31;
+        X[ind + 1] =_mm_or_si128( _mm_slli_epi16(X[ind + 1],1),
+                _mm_srli_epi16( _mm_slli_si128( X[ind + 1], 2), 15) );
+        X[ind + 1].m128i_u32[0] |= x0;
+                
+        unsigned* dst = (unsigned*)&X[ind];
+        unsigned x2 = dst[301/32u] & (1<<(301%32u)); x2>>=(301%32u);
+        X[ind + 2] =_mm_or_si128( _mm_slli_epi16(X[ind + 2],1),
+            _mm_srli_epi16( _mm_slli_si128( X[ind + 2], 2), 15) );        
+        X[ind + 2].m128i_u32[0] |= x1;    
+        X[ind].m128i_u32[0] |= x2;
+   }
+}
+
+void UpdateState(Matrix * m_matrix, char * dest ,int begin, int end)
+{
+    //300/128 + 1 =3, 3*300=900
+    unsigned size_sse_row = m_matrix->width/128 + 1; //3
+    unsigned size_sse_ar=size_sse_row * (end - begin); 
+    __m128i X[906], A[900], B[900], C[900];
+    char * mas  = m_matrix->data;
+    
+    for( unsigned i=0; i<size_sse_ar; ++i)
+    {
+        A[i].m128i_u32[0]=0;A[i].m128i_u32[1]=0;A[i].m128i_u32[2]=0;A[i].m128i_u32[3]=0;
+        B[i].m128i_u32[0]=0;B[i].m128i_u32[1]=0;B[i].m128i_u32[2]=0;B[i].m128i_u32[3]=0;
+        C[i].m128i_u32[0]=0;C[i].m128i_u32[1]=0;C[i].m128i_u32[2]=0;C[i].m128i_u32[3]=0;    
+    }
+
+    for( unsigned i=0; i<size_sse_ar+6; ++i)
+    {
+        X[i].m128i_u32[0]=0;X[i].m128i_u32[1]=0;X[i].m128i_u32[2]=0;X[i].m128i_u32[3]=0;
+    }
+
+    // create X[] with bounds
+    unsigned height = end - begin;
+    unsigned width = m_matrix->width;
+    for( unsigned b = 0 ; b < height; ++b ) 
+    {
+        char* src = &mas[(b + begin)*width];
+        unsigned* dst = (unsigned*)&X[(b+1)*size_sse_row];
+        create_record(src, dst, width);
+    }
+    // create high row in X[]
+    char * src;
+    if(begin == 0) 
+    {
+        src = &mas[(m_matrix->height-1)*width];
+    }
+    else 
+    {
+        src = &mas[(begin-1)*width];
+    }
+    unsigned* dst = (unsigned*)X;
+    create_record(src, dst, width);
+    
+    //create lower row in X[]
+    if(end == m_matrix->height ) 
+    {
+        src = mas;
+    }        
+    else 
+    {
+        src = &mas[end*width];
+    }
+    dst = (unsigned*)&X[(height+1)*size_sse_row];
+    create_record(src, dst, width);
+    
+    //sum( C, B, A, X+offset_for_upwards ); high-left friend
+    sum_offset(X,A,B,C,size_sse_ar, 0);
+    
+    //sum( C, B, A, X+offset_for_no_vertical_shift );
+    sum_offset(X,A,B,C,size_sse_ar, size_sse_row);
+    
+    //sum( C, B, A, X+offset_for_downwards );
+    sum_offset(X,A,B,C,size_sse_ar, 2*size_sse_row);
+
+    //shift_left( X ); (when view 2D) in our logic it is in right
+    height = end - begin + 2;
+    shift_left2D( X, height, size_sse_row);
+
+    //sum( C, B, A, X+offset_for_upwards ); high-left friend
+    sum_offset(X,A,B,C,size_sse_ar, 0);
+
+    //sum( C, B, A, X+offset_for_downwards );
+    sum_offset(X,A,B,C,size_sse_ar, 2*size_sse_row);
+
+    //shift_left( X ); (view in 2D) in our logic it is right shift
+    height = end - begin + 2;
+    shift_left2D( X, height, size_sse_row);
+    
+    //sum( C, B, A, X+offset_for_upwards ); high-right friend
+    sum_offset(X,A,B,C,size_sse_ar, 0);
+    
+    //sum( C, B, A, X+offset_for_no_vertical_shift ); right friend
+    sum_offset(X,A,B,C,size_sse_ar, size_sse_row);    
+    
+    //sum( C, B, A, X+offset_for_downwards ); right down friend
+    sum_offset(X,A,B,C,size_sse_ar, 2*size_sse_row);
+
+    //shift_right( X ); (when view in 2D) in our case it left shift.
+    height = end - begin + 2;
+    shift_right2D( X, height, size_sse_row);
+    
+    //X = (X|A)&B&~C (done bitwise over the arrays) 
+    unsigned shift = size_sse_row;
+    for(unsigned i=0; i<size_sse_ar; ++i) 
+    {
+        C[i].m128i_u32[0] = ~C[i].m128i_u32[0];
+        C[i].m128i_u32[1] = ~C[i].m128i_u32[1];
+        C[i].m128i_u32[2] = ~C[i].m128i_u32[2];
+        C[i].m128i_u32[3] = ~C[i].m128i_u32[3];
+        X[shift + i] = _mm_and_si128(_mm_and_si128(_mm_or_si128(X[shift + i],
+            A[i]),B[i]),C[i]);    
+    }
+
+    height = end - begin;
+    width=m_matrix->width;
+    for( unsigned b=0; b<height; ++b ) 
+    {
+        char* dst = &dest[(b+begin)*width];
+        unsigned* src = (unsigned*)&X[(b+1)*size_sse_row];
+        for( unsigned a=0; a<width; ++a )
+        {
+            unsigned c = src[a/32u] & 1<<(a%32u);
+            dst[a] = c>>(a%32u);
+        }
+    }
+}
+#else 
+/* end SSE block */
+
+// ----------------------------------------------------------------------
+// GetAdjacentCellState() - returns the state (value) of the specified 
+// adjacent cell of the current cell "cellNumber"
+char GetAdjacentCellState(
+                                char* source,      // pointer to source data block
+                                int x,             // logical width of field
+                                int y,             // logical height of field
+                                int cellNumber,    // number of cell position to examine
+                                int cp             // which adjacent position
+                               )
+{
+/* 
+cp 
+*-- cp=1 ... --- cp=8 (summary: -1-2-3-
+-x-          -x-                -4-x-5-
+---          --*                -6-7-8- )
+*/
+    char cellState = 0;        // return value
+
+    // set up boundary flags to trigger field-wrap logic
+    bool onTopRow = false;
+    bool onBottomRow = false;
+    bool onLeftColumn = false;
+    bool onRightColumn = false;
+
+    // check to see if cell is on top row
+    if (cellNumber < x)
+    {
+        onTopRow = true;
+    }
+    // check to see if cell is on bottom row
+    if ((x*y)-cellNumber <= x)
+    {
+        onBottomRow = true;
+    }
+    // check to see if cell is on left column
+    if (cellNumber%x == 0)
+    {
+        onLeftColumn = true;
+    }
+    // check to see if cell is on right column
+    if ((cellNumber+1)%x == 0)
+    {
+        onRightColumn = true;
+    }
+
+    switch (cp)
+    {
+        case 1:
+            if (onTopRow && onLeftColumn)
+            {
+                return *(source+((x*y)-1));
+            }
+            if (onTopRow && !onLeftColumn)
+            {
+                return *(source+(((x*y)-x)+(cellNumber-1)));
+            }
+            if (onLeftColumn && !onTopRow)
+            {
+                return *(source+(cellNumber-1));
+            }
+            return *((source+cellNumber)-(x+1));
+
+        case 2:
+            if (onTopRow)
+            {
+                return *(source+(((x*y)-x)+cellNumber));
+            }
+            return *((source+cellNumber)-x);
+
+        case 3:
+            if (onTopRow && onRightColumn)
+            {
+                return *(source+((x*y)-x));
+            }
+            if (onTopRow && !onRightColumn)
+            {
+                return *(source+(((x*y)-x)+(cellNumber+1)));
+            }
+            if (onRightColumn && !onTopRow)
+            {
+                return *(source+((cellNumber-(x*2))+1));
+            }
+            return *(source+(cellNumber-(x-1)));
+
+        case 4:
+            if (onRightColumn)
+            {
+                return *(source+(cellNumber-(x-1)));
+            }
+            return *(source+(cellNumber+1));
+
+        case 5:
+            if (onBottomRow && onRightColumn)
+            {
+                return *source;
+            }
+            if (onBottomRow && !onRightColumn)
+            {
+                return *(source+((cellNumber-((x*y)-x))+1));
+            }
+            if (onRightColumn && !onBottomRow)
+            {
+                return *(source+(cellNumber+1));
+            }
+            return *(source+(((cellNumber+x))+1));
+
+        case 6:
+            if (onBottomRow)
+            {
+                return *(source+(cellNumber-((x*y)-x)));
+            }
+            return *(source+(cellNumber+x));
+
+        case 7:
+            if (onBottomRow && onLeftColumn)
+            {
+                return *(source+(x-1));
+            }
+            if (onBottomRow && !onLeftColumn)
+            {
+                return *(source+(cellNumber-((x*y)-x)-1));
+            }
+            if (onLeftColumn && !onBottomRow)
+            {
+                return *(source+(cellNumber+((x*2)-1)));
+            }
+            return *(source+(cellNumber+(x-1)));
+
+        case 8:
+            if (onLeftColumn)
+            {
+                return *(source+(cellNumber+(x-1)));
+            }
+            return *(source+(cellNumber-1));
+    }
+    return cellState;
+}
+
+char CheckCell(Matrix * m_matrix, int cellNumber)
+{
+    char total = 0;
+    char* source = m_matrix->data;
+    //look around to find cell's with status "alive"
+    for(int i=1; i<9; i++)
+    {
+        total += GetAdjacentCellState(source, m_matrix->width, m_matrix->height, cellNumber, i);
+    }
+    // if the number of adjacent live cells is < 2 or > 3, the result is a dead 
+    // cell regardless of its current state. (A live cell dies of loneliness if it
+    // has less than 2 neighbors, and of overcrowding if it has more than 3; a new
+    // cell is born in an empty spot only if it has exactly 3 neighbors.
+    if (total < 2 || total > 3)
+    {
+        return 0;
+    }
+
+    // if we get here and the cell position holds a living cell, it stays alive
+    if (*(source+cellNumber))
+    {
+        return 1;
+    }
+
+    // we have an empty position. If there are only 2 neighbors, the position stays
+    // empty.
+    if (total == 2)
+    {
+        return 0;
+    }
+
+    // we have an empty position and exactly 3 neighbors. A cell is born.
+    return 1;
+}
+
+void UpdateState(Matrix * m_matrix, char * dest ,int begin, int end)
+{
+        for (int i=begin; i<=end; i++)
+        {
+            *(dest+i) = CheckCell(m_matrix, i);
+        }
+}
+
+#endif 
+/* end non-SSE block */
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
new file mode 100644
index 0000000..ab8d1c0
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.sln
@@ -0,0 +1,25 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+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|Win32 = Debug|Win32
+		Release(console)|Win32 = Release(console)|Win32
+		Release|Win32 = Release|Win32
+	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|Win32.ActiveCfg = Debug|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|Win32.Build.0 = Debug|Win32
+		{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|Win32.ActiveCfg = Release|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/examples/pipeline/square/vc8/square.vcproj b/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.vcproj
similarity index 54%
copy from examples/pipeline/square/vc8/square.vcproj
copy to examples/parallel_for/game_of_life.NET/vc8/Game_of_life.vcproj
index 2e4d5b2..7a19772 100644
--- a/examples/pipeline/square/vc8/square.vcproj
+++ b/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.vcproj
@@ -1,19 +1,16 @@
-<?xml version="1.0" encoding="windows-1252"?>
+<?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="8,00"
-	Name="square"
-	ProjectGUID="{A21C0AEE-ADDC-45F0-A668-58FF10351D23}"
-	RootNamespace="square"
-	Keyword="Win32Proj"
+	Name="Game of Life"
+	ProjectGUID="{731C7E2E-2766-41D9-96FC-0A3548973803}"
+	RootNamespace="Game_of_life"
+	Keyword="ManagedCProj"
 	>
 	<Platforms>
 		<Platform
 			Name="Win32"
 		/>
-		<Platform
-			Name="x64"
-		/>
 	</Platforms>
 	<ToolFiles>
 	</ToolFiles>
@@ -23,17 +20,15 @@
 			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
-			CharacterSet="2"
+			CharacterSet="1"
+			ManagedExtensions="1"
+			WholeProgramOptimization="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -47,11 +42,12 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;USE_SSE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
-				Detect64BitPortabilityProblems="true"
+				GenerateXMLDocumentationFiles="false"
+				WarningLevel="2"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -65,13 +61,15 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				IgnoreImportLibrary="false"
+				AdditionalDependencies="tbb_debug.lib user32.lib $(NOINHERIT)"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib;"
 				GenerateDebugInformation="true"
-				SubSystem="1"
+				AssemblyDebug="1"
+				SubSystem="2"
+				EntryPointSymbol="main"
 				TargetMachine="1"
-				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -96,26 +94,24 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
+			Name="Release|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
-			CharacterSet="2"
+			CharacterSet="1"
+			ManagedExtensions="1"
+			WholeProgramOptimization="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -125,15 +121,16 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
-				TargetEnvironment="3"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
-				RuntimeLibrary="3"
+				AdditionalOptions="-S -03&#x0D;&#x0A;"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
+				WarningLevel="3"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -147,13 +144,16 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				IgnoreImportLibrary="false"
+				AdditionalDependencies="tbb.lib user32.lib $(NOINHERIT)"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib;"
 				GenerateDebugInformation="true"
-				SubSystem="1"
-				TargetMachine="17"
-				FixedBaseAddress="1"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				EntryPointSymbol="main"
+				TargetMachine="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -178,26 +178,24 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				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|Win32"
+			Name="Debug(console)|Win32"
 			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			CharacterSet="2"
+			ManagedExtensions="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
+				Description=""
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -210,10 +208,11 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;USE_SSE"
+				ExceptionHandling="1"
+				RuntimeLibrary="3"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 			/>
@@ -228,15 +227,13 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
 				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
 				TargetMachine="1"
-				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -261,26 +258,24 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
+			Name="Release(console)|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			CharacterSet="2"
+			ManagedExtensions="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
+				Description=""
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -290,14 +285,13 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
-				TargetEnvironment="3"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;USE_SSE"
 				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -313,12 +307,12 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
-				TargetMachine="17"
+				TargetMachine="1"
 				FixedBaseAddress="1"
 			/>
 			<Tool
@@ -344,12 +338,32 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				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>
 	</Configurations>
 	<References>
+		<AssemblyReference
+			RelativePath="System.dll"
+			AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+		/>
+		<AssemblyReference
+			RelativePath="System.Data.dll"
+			AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
+		/>
+		<AssemblyReference
+			RelativePath="System.Drawing.dll"
+			AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
+		/>
+		<AssemblyReference
+			RelativePath="System.Windows.Forms.dll"
+			AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+		/>
+		<AssemblyReference
+			RelativePath="System.XML.dll"
+			AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+		/>
 	</References>
 	<Files>
 		<Filter
@@ -358,7 +372,35 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath="..\square.cpp"
+				RelativePath="..\src\AssemblyInfo.cpp"
+				>
+				<FileConfiguration
+					Name="Debug(console)|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release(console)|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\Evolution.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\src\Game_of_life.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\src\Update_state.cpp"
 				>
 			</File>
 		</Filter>
@@ -367,12 +409,39 @@
 			Filter="h;hpp;hxx;hm;inl;inc;xsd"
 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
 			>
+			<File
+				RelativePath="..\src\Board.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\Evolution.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\Form1.h"
+				>
+				<FileConfiguration
+					Name="Debug(console)|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</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=".\app.ico"
+				>
+			</File>
+			<File
+				RelativePath=".\app.rc"
+				>
+			</File>
 		</Filter>
 	</Files>
 	<Globals>
diff --git a/examples/parallel_for/game_of_life.NET/vc8/app.ico b/examples/parallel_for/game_of_life.NET/vc8/app.ico
new file mode 100644
index 0000000..3a5525f
Binary files /dev/null and b/examples/parallel_for/game_of_life.NET/vc8/app.ico differ
diff --git a/examples/parallel_for/game_of_life.NET/vc8/app.rc b/examples/parallel_for/game_of_life.NET/vc8/app.rc
new file mode 100644
index 0000000..807aa89
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/vc8/app.rc
@@ -0,0 +1,63 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon placed first or with lowest ID value becomes application icon
+
+LANGUAGE 9, 1
+#pragma code_page(1252)
+1           ICON         "app.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE  
+BEGIN
+    "resource.h\0"
+    "\0"
+END
+
+2 TEXTINCLUDE  
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE  
+BEGIN
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/examples/parallel_for/game_of_life.NET/vc8/resource.h b/examples/parallel_for/game_of_life.NET/vc8/resource.h
new file mode 100644
index 0000000..d5ac7c4
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/vc8/resource.h
@@ -0,0 +1,3 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by app.rc
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
new file mode 100644
index 0000000..8fa8e8b
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.sln
@@ -0,0 +1,25 @@
+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}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug(console)|Win32 = Debug(console)|Win32
+		Debug|Win32 = Debug|Win32
+		Release(console)|Win32 = Release(console)|Win32
+		Release|Win32 = Release|Win32
+	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
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/examples/pipeline/square/vc9/square.vcproj b/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.vcproj
similarity index 55%
copy from examples/pipeline/square/vc9/square.vcproj
copy to examples/parallel_for/game_of_life.NET/vc9/Game_of_life.vcproj
index b6816e8..2ed25ab 100644
--- a/examples/pipeline/square/vc9/square.vcproj
+++ b/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.vcproj
@@ -1,20 +1,16 @@
-<?xml version="1.0" encoding="windows-1252"?>
+<?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
-	Version="9,00"
-	Name="square"
-	ProjectGUID="{A21C0AEE-ADDC-45F0-A668-58FF10351D23}"
-	RootNamespace="square"
-	Keyword="Win32Proj"
+	Version="9.00"
+	Name="Game_of_life"
+	ProjectGUID="{56035D17-379A-4C67-A113-6E82CCDDBA50}"
+	RootNamespace="Game_of_life"
 	TargetFrameworkVersion="131072"
 	>
 	<Platforms>
 		<Platform
 			Name="Win32"
 		/>
-		<Platform
-			Name="x64"
-		/>
 	</Platforms>
 	<ToolFiles>
 	</ToolFiles>
@@ -24,17 +20,14 @@
 			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
-			CharacterSet="2"
+			CharacterSet="1"
+			ManagedExtensions="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -48,10 +41,12 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="0"
 				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
+				WarningLevel="3"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -65,13 +60,15 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				IgnoreImportLibrary="false"
+				AdditionalDependencies="tbb_debug.lib user32.lib $(NOINHERIT)"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
-				SubSystem="1"
+				AssemblyDebug="1"
+				SubSystem="2"
+				EntryPointSymbol="main"
 				RandomizedBaseAddress="1"
-				FixedBaseAddress="1"
 				DataExecutionPrevention="0"
 				TargetMachine="1"
 			/>
@@ -95,26 +92,23 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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;"
 			/>
 		</Configuration>
 		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
+			Name="Release|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			CharacterSet="2"
+			WholeProgramOptimization="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -124,15 +118,15 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
-				TargetEnvironment="3"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
+				Optimization="2"
+				EnableIntrinsicFunctions="true"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				WarningLevel="3"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -146,15 +140,12 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalDependencies="tbb.lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				FixedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -176,12 +167,12 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)"""
 			/>
 		</Configuration>
 		<Configuration
-			Name="Release|Win32"
+			Name="Debug(console)|Win32"
 			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
@@ -192,10 +183,6 @@
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -208,10 +195,11 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;USE_SSE"
+				RuntimeLibrary="3"
+				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -225,16 +213,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				RandomizedBaseAddress="1"
-				FixedBaseAddress="1"
-				DataExecutionPrevention="0"
 				TargetMachine="1"
 			/>
 			<Tool
@@ -257,14 +240,14 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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;"
 			/>
 		</Configuration>
 		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
+			Name="Release(console)|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			CharacterSet="2"
 			>
@@ -273,10 +256,6 @@
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
-				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
-				AdditionalDependencies="gen_input.exe"
-				Outputs="input.txt"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -286,14 +265,14 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
-				TargetEnvironment="3"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+				Optimization="2"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;USE_SSE"
 				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -309,15 +288,13 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
-				RandomizedBaseAddress="1"
 				FixedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
+				TargetMachine="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -339,12 +316,37 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
 	<References>
+		<AssemblyReference
+			RelativePath="System.dll"
+			AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+			MinFrameworkVersion="131072"
+		/>
+		<AssemblyReference
+			RelativePath="System.Data.dll"
+			AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
+			MinFrameworkVersion="131072"
+		/>
+		<AssemblyReference
+			RelativePath="System.Drawing.dll"
+			AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
+			MinFrameworkVersion="131072"
+		/>
+		<AssemblyReference
+			RelativePath="System.Windows.Forms.dll"
+			AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+			MinFrameworkVersion="131072"
+		/>
+		<AssemblyReference
+			RelativePath="System.XML.dll"
+			AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+			MinFrameworkVersion="131072"
+		/>
 	</References>
 	<Files>
 		<Filter
@@ -353,7 +355,35 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath="..\square.cpp"
+				RelativePath="..\src\AssemblyInfo.cpp"
+				>
+				<FileConfiguration
+					Name="Debug(console)|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release(console)|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\Evolution.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\src\Game_of_life.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\src\Update_state.cpp"
 				>
 			</File>
 		</Filter>
@@ -362,12 +392,32 @@
 			Filter="h;hpp;hxx;hm;inl;inc;xsd"
 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
 			>
+			<File
+				RelativePath="..\src\Board.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\Evolution.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\Form1.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=".\app.ico"
+				>
+			</File>
+			<File
+				RelativePath=".\app.rc"
+				>
+			</File>
 		</Filter>
 	</Files>
 	<Globals>
diff --git a/examples/parallel_for/game_of_life.NET/vc9/app.ico b/examples/parallel_for/game_of_life.NET/vc9/app.ico
new file mode 100644
index 0000000..3a5525f
Binary files /dev/null and b/examples/parallel_for/game_of_life.NET/vc9/app.ico differ
diff --git a/examples/parallel_for/game_of_life.NET/vc9/app.rc b/examples/parallel_for/game_of_life.NET/vc9/app.rc
new file mode 100644
index 0000000..807aa89
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/vc9/app.rc
@@ -0,0 +1,63 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon placed first or with lowest ID value becomes application icon
+
+LANGUAGE 9, 1
+#pragma code_page(1252)
+1           ICON         "app.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE  
+BEGIN
+    "resource.h\0"
+    "\0"
+END
+
+2 TEXTINCLUDE  
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE  
+BEGIN
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/examples/parallel_for/game_of_life.NET/vc9/resource.h b/examples/parallel_for/game_of_life.NET/vc9/resource.h
new file mode 100644
index 0000000..d5ac7c4
--- /dev/null
+++ b/examples/parallel_for/game_of_life.NET/vc9/resource.h
@@ -0,0 +1,3 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by app.rc
diff --git a/examples/parallel_for/index.html b/examples/parallel_for/index.html
index a917dc1..0c2b348 100644
--- a/examples/parallel_for/index.html
+++ b/examples/parallel_for/index.html
@@ -12,6 +12,8 @@ This directory has examples of the template <code>parallel_for</code>.
 <DD>Parallel 2-D raytracer/renderer.
 <DT><A HREF="polygon_overlay/index.html">polygon_overlay</A>
 <DD>Simple polygon overlay.
+<DT><A HREF="game_of_life.NET/index.html">game_of_life</A>
+<DD>Simple Game of life overlay.
 </DL>
 
 <HR>
diff --git a/examples/parallel_for/polygon_overlay/Makefile b/examples/parallel_for/polygon_overlay/Makefile
index 55c814a..7e50547 100644
--- a/examples/parallel_for/polygon_overlay/Makefile
+++ b/examples/parallel_for/polygon_overlay/Makefile
@@ -31,69 +31,38 @@ ARGS=
 # The C++ compiler
 #CXX=g++
 
-# detecting x64
-ifeq ($(shell uname -m),x86_64)
-x64 ?= 64
-endif
-# detecting UI ("mac", "x" or "con")
-ifeq ($(shell uname),Darwin)
-UI ?= mac
-else
-UI ?= $(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libX11.so -o -f /usr/lib$(x64)/libX11.so ] && echo x || echo con")
-endif
-
+include ../../common/gui/Makefile.gmake
 
 ifeq ($(UI),x)
-EXE=./$(NAME)
-CXXFLAGS += -DX_FULLSYNC -I/usr/X11R6/include -DUSE_SCALABLE_ALLOC=0
-LIBS += -lpthread -L/usr/X11R6/lib$(x64) -lX11
-# detect if libXext can be found
-ifeq ($(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libXext.so -o -f /usr/lib$(x64)/libXext.so ] && echo 0"),0)
-LIBS += -lXext
-else  # no libXext
-CXXFLAGS += -DX_NOSHMEM
-endif # libXext
-else # ! X
-
-ifeq ($(UI),mac)
-TBBLIBSPATH ?= /Library/Frameworks/TBB.framework/Libraries
-CXXFLAGS += -L$(TBBLIBSPATH) -arch i386 -mmacosx-version-min=10.4 -msse3 -ftree-vectorize
-LIBS += -framework OpenGL -framework AGL -framework Carbon
-APPRES = $(NAME).app/Contents/Resources
-EXE = ./$(NAME).app/Contents/MacOS/$(NAME)
-# look in /System and /Developer (for Xcode 3)
-PBXCP = $(wildcard /[SD]*/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp) -resolve-src-symlinks -exclude .DS_Store -exclude CVS -exclude .svn
-else # ! Mac
-UI=con
-EXE=./$(NAME)
-endif # Mac
+CXXFLAGS += -DX_FULLSYNC # TODO: is this necessary? -DUSE_SCALABLE_ALLOC=0 
 endif # X
-SRCFILES = polymain.cpp polyover.cpp
-GUIFILES = ../../common/gui/$(UI)video.cpp pover_video.cpp
+
+SRCFILES = ../../common/gui/$(UI)video.cpp pover_video.cpp polymain.cpp polyover.cpp
 
 all:	release test
 
 resources:
 ifeq ($(UI),mac)
 	mkdir -p $(APPRES)/English.lproj $(NAME).app/Contents/MacOS
+	$(PBXCP) xcode/English.lproj/main.nib $(APPRES)/English.lproj
 	$(PBXCP) xcode/Info.plist $(APPRES)
 endif
 
-release: $(GUIFILES) $(SRCFILES) resources
-	$(CXX) -O3 -DNDEBUG $(CXXFLAGS) -o $(EXE) $< *.cpp -ltbb -ltbbmalloc $(LIBS)
+release: $(SRCFILES) resources
+	$(CXX) -O3 -DNDEBUG $(CXXFLAGS) -o $(EXE) $(SRCFILES) -ltbb -ltbbmalloc $(LIBS)
 
-debug:  $(GUIFILES) $(SRCFILES) resources
-	$(CXX) -g -O0 -DTBB_USE_DEBUG -D_DEBUG $(CXXFLAGS) -o $(EXE) $< *.cpp -ltbb_debug -ltbbmalloc_debug $(LIBS)
+debug:  $(SRCFILES) resources
+	$(CXX) -g -O0 -DTBB_USE_DEBUG -D_DEBUG $(CXXFLAGS) -o $(EXE) $(SRCFILES) -ltbb_debug -ltbbmalloc_debug $(LIBS)
 
 clean:
-	rm -f $(EXE) *.o *.d
+	$(RM) $(EXE) *.o *.d
 ifeq ($(UI),mac)
 	rm -rf $(NAME).app
 endif
 
 test:
 ifeq ($(UI),mac)
-	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; $(EXE) $(ARGS)
+	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; ./$(EXE) $(ARGS)
 else
-	$(EXE) $(ARGS)
+	./$(EXE) $(ARGS)
 endif
diff --git a/examples/parallel_for/polygon_overlay/polymain.cpp b/examples/parallel_for/polygon_overlay/polymain.cpp
index e75cc23..45c14ed 100644
--- a/examples/parallel_for/polygon_overlay/polymain.cpp
+++ b/examples/parallel_for/polygon_overlay/polymain.cpp
@@ -481,6 +481,9 @@ bool GenerateMap(Polygon_map_t **newMap, int xSize, int ySize, int gNPolygons, c
         }
     }
 #endif  // _DEBUG
+    free(tempMap);
+    free(validPolys);
+    free(validSide);
     return true;
 }
 
@@ -553,6 +556,7 @@ void CheckPolygonMap(Polygon_map_t *checkMap) {
             }
         }
     }
+    free(cArray);
 }
 
 bool CompOnePolygon(RPolygon *p1, RPolygon *p2) {
@@ -602,6 +606,8 @@ bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2) {
             is_ok = false;
         }
     }
+    delete t1;
+    delete t2;
     return is_ok;
 }
 
diff --git a/examples/parallel_for/polygon_overlay/polyover.cpp b/examples/parallel_for/polygon_overlay/polyover.cpp
index 68da376..1ca3f9c 100644
--- a/examples/parallel_for/polygon_overlay/polyover.cpp
+++ b/examples/parallel_for/polygon_overlay/polyover.cpp
@@ -191,6 +191,7 @@ void NaiveParallelOverlay(Polygon_map_t *&result_map, Polygon_map_t &polymap1, P
         }
         result_map->clear();
     }
+    delete resultMutex;
     if(gCsvFile.is_open()) {
         gCsvFile << std::endl;
     }
@@ -328,6 +329,7 @@ public:
 
         delete fmap1;
         delete fmap2;
+        RPolygon::free_RPolygon( slicePolygon );
     }
 
     ApplySplitOverlay(Polygon_map_t *resultMap, Polygon_map_t *map1, Polygon_map_t *map2, tbb::spin_mutex *rmutex) :
@@ -398,6 +400,7 @@ void SplitParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, P
         (*result_map)->clear();
 
     }
+    delete resultMutex;
     if(gCsvFile.is_open()) {
         gCsvFile << std::endl;
     }
diff --git a/examples/parallel_for/polygon_overlay/vc7.1/pover.vcproj b/examples/parallel_for/polygon_overlay/vc7.1/pover.vcproj
index 88fb672..2933b4f 100644
--- a/examples/parallel_for/polygon_overlay/vc7.1/pover.vcproj
+++ b/examples/parallel_for/polygon_overlay/vc7.1/pover.vcproj
@@ -24,7 +24,7 @@
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_CONSOLE"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="TRUE"
@@ -37,7 +37,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib""
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -46,9 +46,9 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"
-copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$(OutDir)"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)"
+copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.pdb" "$(OutDir)"
 "/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
@@ -80,7 +80,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -93,7 +93,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib""
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -104,9 +104,9 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"
-copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDir)"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)"
+copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.pdb" "$(OutDir)"
 "/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
@@ -138,7 +138,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDi
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -151,7 +151,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDi
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -162,9 +162,9 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDi
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"
-copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDir)"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)"
+copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.pdb" "$(OutDir)"
 "/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
@@ -197,7 +197,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDi
 				InlineFunctionExpansion="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="TRUE"
@@ -210,7 +210,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDi
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				TargetMachine="1"
@@ -219,9 +219,9 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDi
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"
-copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$(OutDir)"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)"
+copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.pdb" "$(OutDir)"
 "/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
@@ -254,7 +254,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$
 				InlineFunctionExpansion="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="TRUE"
@@ -267,7 +267,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				TargetMachine="1"
@@ -276,9 +276,9 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"
-copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$(OutDir)"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)"
+copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.pdb" "$(OutDir)"
 "/>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -311,7 +311,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -324,7 +324,7 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -335,9 +335,9 @@ copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"
-copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDir)"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)"
+copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.pdb" "$(OutDir)"
 "/>
 			<Tool
 				Name="VCPreBuildEventTool"
diff --git a/examples/parallel_for/polygon_overlay/vc8/pover.vcproj b/examples/parallel_for/polygon_overlay/vc8/pover.vcproj
index a7a6416..795fa60 100644
--- a/examples/parallel_for/polygon_overlay/vc8/pover.vcproj
+++ b/examples/parallel_for/polygon_overlay/vc8/pover.vcproj
@@ -46,7 +46,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -67,7 +67,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="1"
@@ -96,8 +96,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)" &#x0D;&#x0A; copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)" &#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)" &#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -129,7 +129,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -149,7 +149,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -178,8 +178,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -211,7 +211,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -232,7 +232,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -263,8 +263,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				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;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -297,7 +297,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -317,7 +317,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -348,8 +348,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -382,7 +382,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -403,7 +403,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -434,8 +434,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				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;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -469,7 +469,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -489,7 +489,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -520,8 +520,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -553,7 +553,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -574,7 +574,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="1"
@@ -603,8 +603,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -637,7 +637,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -657,7 +657,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -686,8 +686,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/polygon_overlay/vc9/pover.vcproj b/examples/parallel_for/polygon_overlay/vc9/pover.vcproj
index d36c0ec..5793781 100644
--- a/examples/parallel_for/polygon_overlay/vc9/pover.vcproj
+++ b/examples/parallel_for/polygon_overlay/vc9/pover.vcproj
@@ -47,7 +47,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -67,7 +67,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -95,8 +95,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -128,7 +128,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -148,7 +148,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -178,8 +178,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.dll" "$(OutDir)""
+				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)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -212,7 +212,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -232,7 +232,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -262,8 +262,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.dll" "$(OutDir)""
+				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)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -295,7 +295,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -315,7 +315,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -343,8 +343,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -376,7 +376,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -396,7 +396,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -425,8 +425,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -459,7 +459,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -479,7 +479,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -510,8 +510,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -545,7 +545,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -565,7 +565,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -596,8 +596,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -630,7 +630,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -650,7 +650,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -679,8 +679,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				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;copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/seismic/Makefile b/examples/parallel_for/seismic/Makefile
index f9c86bb..f860d85 100644
--- a/examples/parallel_for/seismic/Makefile
+++ b/examples/parallel_for/seismic/Makefile
@@ -31,49 +31,14 @@ ARGS=- 300
 # The C++ compiler
 #CXX=g++
 
-# detecting x64
-ifeq ($(shell uname -m),x86_64)
-x64 ?= 64
-endif
-# detecting UI ("mac", "x" or "con")
-ifeq ($(shell uname),Darwin)
-UI ?= mac
-else
-UI ?= $(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libX11.so -o -f /usr/lib$(x64)/libX11.so ] && echo x || echo con")
-endif
-
-
-ifeq ($(UI),x)
-EXE=./$(NAME)
-CXXFLAGS += -I/usr/X11R6/include
-LIBS += -lpthread -L/usr/X11R6/lib$(x64) -lX11
-# detect if libXext can be found
-ifeq ($(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libXext.so -o -f /usr/lib$(x64)/libXext.so ] && echo 0"),0)
-LIBS += -lXext
-else  # no libXext
-CXXFLAGS += -DX_NOSHMEM
-endif # libXext
-else # ! X
-
-ifeq ($(UI),mac)
-TBBLIBSPATH = /Library/Frameworks/TBB.framework/Libraries
-CXXFLAGS += -L$(TBBLIBSPATH) -arch i386 -mmacosx-version-min=10.4 -msse3 -ftree-vectorize
-LIBS += -framework OpenGL -framework AGL -framework Carbon
-APPRES = $(NAME).app/Contents/Resources
-EXE = ./$(NAME).app/Contents/MacOS/$(NAME)
-# look in /System and /Developer (for Xcode 3)
-PBXCP = $(wildcard /[SD]*/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp) -resolve-src-symlinks -exclude .DS_Store -exclude CVS -exclude .svn
-else # ! Mac
-UI=con
-EXE=./$(NAME)
-endif # Mac
-endif # X
+include ../../common/gui/Makefile.gmake
 
 all:	release test
 
 resources:
 ifeq ($(UI),mac)
 	mkdir -p $(APPRES)/English.lproj $(NAME).app/Contents/MacOS
+	$(PBXCP) xcode/English.lproj/main.nib $(APPRES)/English.lproj
 	$(PBXCP) xcode/Info.plist $(APPRES)
 endif
 
@@ -84,14 +49,14 @@ debug: ../../common/gui/$(UI)video.cpp SeismicSimulation.cpp resources
 	$(CXX) -g -O0 -DTBB_USE_DEBUG $(CXXFLAGS) -o $(EXE) $< SeismicSimulation.cpp -ltbb_debug $(LIBS)
 
 clean:
-	rm -f $(EXE) *.o *.d
+	$(RM) $(EXE) *.o *.d
 ifeq ($(UI),mac)
 	rm -rf $(NAME).app
 endif
 
 test:
 ifeq ($(UI),mac)
-	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; $(EXE) $(ARGS)
+	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; ./$(EXE) $(ARGS)
 else
-	$(EXE) $(ARGS)
+	./$(EXE) $(ARGS)
 endif
diff --git a/examples/parallel_for/seismic/vc7.1/SeismicSimulation.vcproj b/examples/parallel_for/seismic/vc7.1/SeismicSimulation.vcproj
index ab96f1c..d0ff8ad 100644
--- a/examples/parallel_for/seismic/vc7.1/SeismicSimulation.vcproj
+++ b/examples/parallel_for/seismic/vc7.1/SeismicSimulation.vcproj
@@ -25,7 +25,7 @@
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="TRUE"
@@ -38,7 +38,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				TargetMachine="1"
@@ -47,8 +47,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -79,7 +79,7 @@
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -92,7 +92,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -103,8 +103,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -135,7 +135,7 @@
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -148,7 +148,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -159,8 +159,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"
 				CommandLine="..\..\..\common\gui\dxcheck.bat"/>
@@ -193,7 +193,7 @@
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="TRUE"
@@ -206,7 +206,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				TargetMachine="1"
@@ -215,8 +215,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"
 				CommandLine="..\..\..\common\gui\dxcheck.bat"/>
diff --git a/examples/parallel_for/seismic/vc8/SeismicSimulation.vcproj b/examples/parallel_for/seismic/vc8/SeismicSimulation.vcproj
index a093da2..0fb0b34 100644
--- a/examples/parallel_for/seismic/vc8/SeismicSimulation.vcproj
+++ b/examples/parallel_for/seismic/vc8/SeismicSimulation.vcproj
@@ -46,7 +46,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -67,7 +67,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="1"
@@ -96,8 +96,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -129,7 +129,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -149,7 +149,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -178,8 +178,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -211,7 +211,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -232,7 +232,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -263,8 +263,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -297,7 +297,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -317,7 +317,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -348,8 +348,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -382,7 +382,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -403,7 +403,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -434,8 +434,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -469,7 +469,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -489,7 +489,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -520,8 +520,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -553,7 +553,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -574,7 +574,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="1"
@@ -603,8 +603,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -637,7 +637,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -657,7 +657,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -686,8 +686,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/seismic/vc9/SeismicSimulation.vcproj b/examples/parallel_for/seismic/vc9/SeismicSimulation.vcproj
index 83a37d7..fe43053 100644
--- a/examples/parallel_for/seismic/vc9/SeismicSimulation.vcproj
+++ b/examples/parallel_for/seismic/vc9/SeismicSimulation.vcproj
@@ -47,7 +47,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -67,7 +67,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -95,8 +95,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -128,7 +128,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -148,7 +148,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -178,8 +178,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -212,7 +212,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -232,7 +232,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -262,8 +262,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -295,7 +295,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -315,7 +315,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -343,8 +343,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -376,7 +376,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -396,7 +396,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -425,8 +425,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -459,7 +459,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -479,7 +479,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -510,8 +510,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -545,7 +545,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -565,7 +565,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -596,8 +596,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -630,7 +630,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB22_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -650,7 +650,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -679,8 +679,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/tachyon/Makefile b/examples/parallel_for/tachyon/Makefile
index 7f2574c..0758fdb 100644
--- a/examples/parallel_for/tachyon/Makefile
+++ b/examples/parallel_for/tachyon/Makefile
@@ -62,51 +62,21 @@ export DATASET = balls
 # The default runtime arguments
 export ARGS =
 
-# detecting x64
-ifeq ($(shell uname -m),x86_64)
-x64 ?= 64
-endif
-# detecting UI ("mac", "x" or "con")
-ifeq ($(shell uname),Darwin)
-UI ?= mac
-else
-UI ?= $(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libX11.so -o -f /usr/lib$(x64)/libX11.so ] && echo x || echo con")
-endif
+# define name suffix
+SUFFIX = .$(VERSION)
 
-MYCXXFLAGS = -DX_FULLSYNC
 LIBS ?= -lm
 
-# Platform-specific settings
+include ../../common/gui/Makefile.gmake
+
 ifeq ($(UI),x)
-EXE=$(NAME).$(VERSION)
-MYCXXFLAGS += -I/usr/X11R6/include
-ADD_THREADS=1
-LIBS += -L/usr/X11R6/lib$(x64) -lX11
-# detect if libXext can be found
-ifeq ($(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libXext.so -o -f /usr/lib$(x64)/libXext.so ] && echo 0"),0)
-LIBS += -lXext
-MYCXXFLAGS += -DX_NOSHMPIX
-else
-MYCXXFLAGS += -DX_NOSHMEM
+CXXFLAGS += -DX_FULLSYNC 
+ifneq (,$(findstring -lXext,$(LIBS)))
+CXXFLAGS += -DX_NOSHMPIX
 endif
-else
-
-ifeq ($(UI),mac)
-TBBLIBSPATH = /Library/Frameworks/TBB.framework/Libraries
-CXXFLAGS += -arch i386 -mmacosx-version-min=10.4 -msse3 -ftree-vectorize
-LIBS += -framework OpenGL -framework AGL -framework Carbon -L$(TBBLIBSPATH)
-RES = $(NAME).$(VERSION).app/Contents/Resources
-EXE = $(NAME).$(VERSION).app/Contents/MacOS/$(NAME).$(VERSION)
-# look in /System and /Developer (for Xcode 3)
-PBXCP = $(wildcard /[SD]*/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp) -resolve-src-symlinks -exclude .DS_Store -exclude CVS -exclude .svn
-else # ! Mac
-
-UI=con
-EXE=$(NAME).$(VERSION)
-endif # Mac
 endif # X
 
-MYCXXFLAGS += $(CXXFLAGS)
+MYCXXFLAGS = $(CXXFLAGS)
 
 all: build run
 release: build
@@ -158,10 +128,6 @@ else
 MYCXXFLAGS += -O2
 endif
 
-ifeq ($(ADD_THREADS),1)
-LIBS += -lpthread
-endif
-
 
 ifeq ($(ADD_TBB),1)
 MYCXXFLAGS +=
@@ -186,11 +152,16 @@ endif
 
 $(EXE): $(SOURCE)
 ifeq ($(UI),mac)
-	mkdir -p $(RES)/English.lproj $(NAME).$(VERSION).app/Contents/MacOS
-	$(PBXCP) xcode/Info.plist $(RES)
+	mkdir -p $(APPRES)/English.lproj $(NAME).$(VERSION).app/Contents/MacOS
+	$(PBXCP) xcode/English.lproj/main.nib $(APPRES)/English.lproj
+	$(PBXCP) xcode/Info.plist $(APPRES)
 endif
 	$(CXX) $(MYCXXFLAGS) -o $@ $(SOURCE) $(LIBS)
-	rm -f *.o
+	$(RM) *.o
 
+clean: VERSION = *
 clean:
-	rm -rf $(NAME).* *.o *.d
+	$(RM) $(EXE) *.o *.d
+ifeq ($(UI),mac)
+	rm -rf $(NAME).*
+endif
diff --git a/examples/parallel_for/tachyon/src/trace.tbb.cpp b/examples/parallel_for/tachyon/src/trace.tbb.cpp
index 4feda24..095a9c2 100644
--- a/examples/parallel_for/tachyon/src/trace.tbb.cpp
+++ b/examples/parallel_for/tachyon/src/trace.tbb.cpp
@@ -201,7 +201,7 @@ void * thread_trace(thr_parms * parms)
     int g, grain_size = 50;
     char *grain_str = getenv ("TBB_GRAINSIZE");
     if (grain_str && (sscanf (grain_str, "%d", &g) > 0) && (g > 0)) grain_size = g;
-    tbb::parallel_for (tbb::blocked_range2d<int> (starty, stopy, grain_size, startx, stopx, grain_size), parallel_task ());
+    tbb::parallel_for (tbb::blocked_range2d<int> (starty, stopy, grain_size, startx, stopx, grain_size), parallel_task (), tbb::simple_partitioner());
 
     return(NULL);  
 }
diff --git a/examples/parallel_for/tachyon/src/types.h b/examples/parallel_for/tachyon/src/types.h
index 28f0a1c..4685acc 100644
--- a/examples/parallel_for/tachyon/src/types.h
+++ b/examples/parallel_for/tachyon/src/types.h
@@ -55,7 +55,9 @@
     SUCH DAMAGE.
 */
 
-#ifdef _WIN32
+#if __MINGW32__
+#include <malloc.h>
+#elif _WIN32
 #include <malloc.h>
 #define alloca _alloca
 #elif __FreeBSD__
diff --git a/examples/parallel_for/tachyon/vc7.1/tachyon.tbb.vcproj b/examples/parallel_for/tachyon/vc7.1/tachyon.tbb.vcproj
index d5f5187..6afd836 100644
--- a/examples/parallel_for/tachyon/vc7.1/tachyon.tbb.vcproj
+++ b/examples/parallel_for/tachyon/vc7.1/tachyon.tbb.vcproj
@@ -23,7 +23,7 @@
 				Optimization="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -40,7 +40,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="$(OutDir)/tachyon.common.lib tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -50,8 +50,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -80,7 +80,7 @@
 				Name="VCCLCompilerTool"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -96,7 +96,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="$(OutDir)/tachyon.common.lib tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -108,8 +108,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -138,7 +138,7 @@
 				Name="VCCLCompilerTool"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -154,7 +154,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="$(OutDir)/tachyon.common.lib tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -166,8 +166,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -197,7 +197,7 @@
 				Optimization="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -214,7 +214,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="$(OutDir)/tachyon.common.lib tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -224,8 +224,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/parallel_for/tachyon/vc7.1/tachyon.tbb1d.vcproj b/examples/parallel_for/tachyon/vc7.1/tachyon.tbb1d.vcproj
index 756e916..c342be1 100644
--- a/examples/parallel_for/tachyon/vc7.1/tachyon.tbb1d.vcproj
+++ b/examples/parallel_for/tachyon/vc7.1/tachyon.tbb1d.vcproj
@@ -23,7 +23,7 @@
 				Optimization="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -40,7 +40,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="$(OutDir)/tachyon.common.lib tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -50,8 +50,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -80,7 +80,7 @@
 				Name="VCCLCompilerTool"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -96,7 +96,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="$(OutDir)/tachyon.common.lib tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="2"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
@@ -108,8 +108,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -138,7 +138,7 @@
 				Name="VCCLCompilerTool"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -154,7 +154,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="$(OutDir)/tachyon.common.lib tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
@@ -166,8 +166,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -197,7 +197,7 @@
 				Optimization="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -214,7 +214,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="$(OutDir)/tachyon.common.lib tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -224,8 +224,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/parallel_for/tachyon/vc8/tachyon.tbb.vcproj b/examples/parallel_for/tachyon/vc8/tachyon.tbb.vcproj
index 0a50918..7a5c4e4 100644
--- a/examples/parallel_for/tachyon/vc8/tachyon.tbb.vcproj
+++ b/examples/parallel_for/tachyon/vc8/tachyon.tbb.vcproj
@@ -47,7 +47,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -71,7 +71,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -101,8 +101,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -135,7 +135,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -157,7 +157,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -187,8 +187,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -220,7 +220,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -243,7 +243,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -274,8 +274,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -308,7 +308,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -329,7 +329,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -360,8 +360,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -393,7 +393,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -416,7 +416,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -447,8 +447,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -481,7 +481,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -502,7 +502,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -533,8 +533,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -566,7 +566,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -590,7 +590,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -620,8 +620,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -654,7 +654,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -676,7 +676,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -706,8 +706,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/tachyon/vc8/tachyon.tbb1d.vcproj b/examples/parallel_for/tachyon/vc8/tachyon.tbb1d.vcproj
index 7a21ac8..2f7ede0 100644
--- a/examples/parallel_for/tachyon/vc8/tachyon.tbb1d.vcproj
+++ b/examples/parallel_for/tachyon/vc8/tachyon.tbb1d.vcproj
@@ -47,7 +47,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -71,7 +71,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -101,8 +101,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -135,7 +135,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -157,7 +157,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -187,8 +187,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -220,7 +220,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -243,7 +243,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -274,8 +274,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -308,7 +308,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -329,7 +329,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -360,8 +360,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -393,7 +393,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -416,7 +416,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -447,8 +447,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -481,7 +481,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -502,7 +502,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -533,8 +533,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -566,7 +566,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -590,7 +590,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -620,8 +620,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -654,7 +654,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -676,7 +676,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -706,8 +706,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/tachyon/vc9/tachyon.tbb.vcproj b/examples/parallel_for/tachyon/vc9/tachyon.tbb.vcproj
index 7128541..a42ddfb 100644
--- a/examples/parallel_for/tachyon/vc9/tachyon.tbb.vcproj
+++ b/examples/parallel_for/tachyon/vc9/tachyon.tbb.vcproj
@@ -48,7 +48,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -71,7 +71,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -100,8 +100,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -133,7 +133,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -155,7 +155,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -185,8 +185,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -218,7 +218,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -240,7 +240,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -270,8 +270,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -303,7 +303,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -326,7 +326,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -355,8 +355,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -389,7 +389,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -411,7 +411,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -441,8 +441,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -475,7 +475,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -496,7 +496,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -527,8 +527,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -561,7 +561,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -582,7 +582,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -613,8 +613,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -647,7 +647,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -669,7 +669,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -699,8 +699,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/tachyon/vc9/tachyon.tbb1d.vcproj b/examples/parallel_for/tachyon/vc9/tachyon.tbb1d.vcproj
index 2643535..125feee 100644
--- a/examples/parallel_for/tachyon/vc9/tachyon.tbb1d.vcproj
+++ b/examples/parallel_for/tachyon/vc9/tachyon.tbb1d.vcproj
@@ -48,7 +48,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -71,7 +71,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -100,8 +100,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -133,7 +133,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -155,7 +155,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -185,8 +185,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -218,7 +218,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -240,7 +240,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -270,8 +270,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -303,7 +303,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -326,7 +326,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -355,8 +355,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -389,7 +389,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -411,7 +411,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -441,8 +441,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -475,7 +475,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -496,7 +496,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -527,8 +527,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -561,7 +561,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -582,7 +582,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -613,8 +613,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -647,7 +647,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -669,7 +669,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB22_INSTALL_DIR)\intel64\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -699,8 +699,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/convex_hull/Makefile b/examples/parallel_reduce/convex_hull/Makefile
index 7efebf7..f3aa034 100644
--- a/examples/parallel_reduce/convex_hull/Makefile
+++ b/examples/parallel_reduce/convex_hull/Makefile
@@ -42,7 +42,7 @@ debug: *.cpp
 	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o convex_hull_bench convex_hull_bench.cpp -ltbb_debug $(LIBS)
 
 clean:
-	rm -f convex_hull_bench convex_hull_sample *.o *.d
+	$(RM) convex_hull_bench convex_hull_sample *.o *.d
 
 test:
 	./$(PROG) $(ARGS)
diff --git a/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp b/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp
index 27196bb..0150bb1 100644
--- a/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp
+++ b/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp
@@ -208,11 +208,11 @@ typedef tbb::blocked_range<size_t> range_t;
 typedef tbb::concurrent_vector<point_t> pointVec_t;
 
 void appendVector(const point_t* src, size_t srcSize, pointVec_t& dest) {
-    std::copy(src, src + srcSize, dest.begin() + dest.grow_by(srcSize));
+    std::copy(src, src + srcSize, dest.grow_by(srcSize));
 }
 
 void appendVector(const pointVec_t& src, pointVec_t& dest) {
-    std::copy(src.begin(), src.end(), dest.begin() + dest.grow_by(src.size()));
+    std::copy(src.begin(), src.end(), dest.grow_by(src.size()));
 }
 
 #else // USE STD::VECTOR - include spin_mutex.h and lock vector operations
@@ -303,7 +303,8 @@ template<typename BodyType>
 void initialize(pointVec_t &points) {
     points.clear();
 
-    tbb::parallel_for(range_t(0, cfg::MAXPOINTS, BodyType::grainSize), BodyType(points));
+    tbb::parallel_for(range_t(0, cfg::MAXPOINTS, BodyType::grainSize),
+                      BodyType(points), tbb::simple_partitioner());
 }
 
 class FindXExtremum {
@@ -492,7 +493,8 @@ 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);
-    tbb::parallel_reduce(range_t(0, P.size(), BodyType::grainSize), body);
+    tbb::parallel_reduce(range_t(0, P.size(), BodyType::grainSize),
+                         body, tbb::simple_partitioner() );
 
     if(util::VERBOSE) {
         std::stringstream ss;
diff --git a/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp b/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp
index c70402a..c0204f7 100644
--- a/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp
+++ b/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp
@@ -40,11 +40,11 @@ typedef tbb::concurrent_vector< point_t > pointVec_t;
 typedef tbb::blocked_range<size_t>        range_t;
 
 void appendVector(const point_t* src, size_t srcSize, pointVec_t& dest) {
-    std::copy(src, src + srcSize, dest.begin() + dest.grow_by(srcSize));
+    std::copy(src, src + srcSize, dest.grow_by(srcSize));
 }
 
 void appendVector(const pointVec_t& src, pointVec_t& dest) {
-    std::copy(src.begin(), src.end(), dest.begin() + dest.grow_by(src.size()));
+    std::copy(src.begin(), src.end(), dest.grow_by(src.size()));
 }
 
 class FillRNDPointsVector_buf {
diff --git a/examples/parallel_reduce/convex_hull/vc7.1/convex_hull_bench.vcproj b/examples/parallel_reduce/convex_hull/vc7.1/convex_hull_bench.vcproj
index dc7e1e9..c9f8f34 100644
--- a/examples/parallel_reduce/convex_hull/vc7.1/convex_hull_bench.vcproj
+++ b/examples/parallel_reduce/convex_hull/vc7.1/convex_hull_bench.vcproj
@@ -19,7 +19,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -31,7 +31,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -40,8 +40,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -67,7 +67,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -90,8 +90,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/parallel_reduce/convex_hull/vc7.1/convex_hull_sample.vcproj b/examples/parallel_reduce/convex_hull/vc7.1/convex_hull_sample.vcproj
index 5bb7163..6206b05 100644
--- a/examples/parallel_reduce/convex_hull/vc7.1/convex_hull_sample.vcproj
+++ b/examples/parallel_reduce/convex_hull/vc7.1/convex_hull_sample.vcproj
@@ -19,7 +19,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -31,7 +31,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -40,8 +40,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -67,7 +67,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -90,8 +90,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/parallel_reduce/convex_hull/vc8/convex_hull_benchmark.vcproj b/examples/parallel_reduce/convex_hull/vc8/convex_hull_benchmark.vcproj
index 3344906..9ae029b 100644
--- a/examples/parallel_reduce/convex_hull/vc8/convex_hull_benchmark.vcproj
+++ b/examples/parallel_reduce/convex_hull/vc8/convex_hull_benchmark.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -199,7 +199,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -219,7 +219,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -250,8 +250,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -280,7 +280,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -299,7 +299,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -330,8 +330,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/convex_hull/vc8/convex_hull_sample.vcproj b/examples/parallel_reduce/convex_hull/vc8/convex_hull_sample.vcproj
index 7f79c90..df911b4 100644
--- a/examples/parallel_reduce/convex_hull/vc8/convex_hull_sample.vcproj
+++ b/examples/parallel_reduce/convex_hull/vc8/convex_hull_sample.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -199,7 +199,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -219,7 +219,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -250,8 +250,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -280,7 +280,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -299,7 +299,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -330,8 +330,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/convex_hull/vc9/convex_hull_benchmark.vcproj b/examples/parallel_reduce/convex_hull/vc9/convex_hull_benchmark.vcproj
index 1c62ac9..9b8127c 100644
--- a/examples/parallel_reduce/convex_hull/vc9/convex_hull_benchmark.vcproj
+++ b/examples/parallel_reduce/convex_hull/vc9/convex_hull_benchmark.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -120,7 +120,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -139,7 +139,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -169,8 +169,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -199,7 +199,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -247,8 +247,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -277,7 +277,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -296,7 +296,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -327,8 +327,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/convex_hull/vc9/convex_hull_sample.vcproj b/examples/parallel_reduce/convex_hull/vc9/convex_hull_sample.vcproj
index a5fd58a..d0494d7 100644
--- a/examples/parallel_reduce/convex_hull/vc9/convex_hull_sample.vcproj
+++ b/examples/parallel_reduce/convex_hull/vc9/convex_hull_sample.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -120,7 +120,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -139,7 +139,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -169,8 +169,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -199,7 +199,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -247,8 +247,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -277,7 +277,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -296,7 +296,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -327,8 +327,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy /Y "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/primes/Makefile b/examples/parallel_reduce/primes/Makefile
index 35ba6d6..9524ba5 100644
--- a/examples/parallel_reduce/primes/Makefile
+++ b/examples/parallel_reduce/primes/Makefile
@@ -40,7 +40,7 @@ debug: *.cpp
 	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
-	rm -f $(PROG) *.o *.d
+	$(RM) $(PROG) *.o *.d
 
 test:
 	./$(PROG) $(ARGS)
diff --git a/examples/parallel_reduce/primes/primes.cpp b/examples/parallel_reduce/primes/primes.cpp
index a9aa6fd..55ddfa1 100644
--- a/examples/parallel_reduce/primes/primes.cpp
+++ b/examples/parallel_reduce/primes/primes.cpp
@@ -294,7 +294,10 @@ Number ParallelCountPrimes( Number n ) {
         count += s.multiples.n_factor;
         if( PrintPrimes ) 
             printf("---\n");
-        parallel_reduce( SieveRange( s.multiples.m, n, s.multiples.m, GrainSize ), s );
+        // Explicit grain size and simple_partitioner() used here instead of automatic grainsize 
+        // determination becase we want SieveRange to be decomposed down to GrainSize or smaller.  
+        // Doing so improves odds that the working set fits in cache when evaluating Sieve::operator().
+        parallel_reduce( SieveRange( s.multiples.m, n, s.multiples.m, GrainSize ), s, simple_partitioner() );
         count += s.count;
     }
     return count;
diff --git a/examples/parallel_reduce/primes/vc7.1/primes.vcproj b/examples/parallel_reduce/primes/vc7.1/primes.vcproj
index 6336f7c..ba8b9a2 100644
--- a/examples/parallel_reduce/primes/vc7.1/primes.vcproj
+++ b/examples/parallel_reduce/primes/vc7.1/primes.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,8 +41,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -80,7 +80,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -91,8 +91,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/parallel_reduce/primes/vc8/primes.vcproj b/examples/parallel_reduce/primes/vc8/primes.vcproj
index 2424e1e..c183a09 100644
--- a/examples/parallel_reduce/primes/vc8/primes.vcproj
+++ b/examples/parallel_reduce/primes/vc8/primes.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -249,8 +249,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -297,7 +297,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -328,8 +328,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/primes/vc9/primes.vcproj b/examples/parallel_reduce/primes/vc9/primes.vcproj
index 5dc48fd..d0224ca 100644
--- a/examples/parallel_reduce/primes/vc9/primes.vcproj
+++ b/examples/parallel_reduce/primes/vc9/primes.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -168,8 +168,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,8 +246,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -325,8 +325,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_while/parallel_preorder/vc7.1/parallel_preorder.vcproj b/examples/parallel_while/parallel_preorder/vc7.1/parallel_preorder.vcproj
index 2b666a3..5b7c292 100644
--- a/examples/parallel_while/parallel_preorder/vc7.1/parallel_preorder.vcproj
+++ b/examples/parallel_while/parallel_preorder/vc7.1/parallel_preorder.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,8 +41,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -80,7 +80,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -91,8 +91,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/parallel_while/parallel_preorder/vc8/parallel_preorder.vcproj b/examples/parallel_while/parallel_preorder/vc8/parallel_preorder.vcproj
index 67460ba..057930b 100644
--- a/examples/parallel_while/parallel_preorder/vc8/parallel_preorder.vcproj
+++ b/examples/parallel_while/parallel_preorder/vc8/parallel_preorder.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -249,8 +249,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -297,7 +297,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -328,8 +328,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.vcproj b/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.vcproj
index ea32d82..d9e48f5 100644
--- a/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.vcproj
+++ b/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -168,8 +168,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,8 +246,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -325,8 +325,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/pipeline/index.html b/examples/pipeline/index.html
index d7ae979..dfa089e 100644
--- a/examples/pipeline/index.html
+++ b/examples/pipeline/index.html
@@ -7,7 +7,9 @@ This directory has examples of the template <code>pipeline</code>.
 <H2>Directories</H2>
 <DL>
 <DT><A HREF="text_filter/index.html">text_filter</A>
-<DD>A simple text filter.
+<DD>A simple text filter that capitalizes words in a text.
+<DT><A HREF="square/index.html">square</A>
+<DD>Another simple string transformation example that squares numbers read from a file.
 </DL>
 
 <HR>
diff --git a/examples/pipeline/square/Makefile b/examples/pipeline/square/Makefile
index e6d9d5e..0ec518c 100644
--- a/examples/pipeline/square/Makefile
+++ b/examples/pipeline/square/Makefile
@@ -27,9 +27,11 @@
 # GNU Makefile that builds and runs example.
 PROG=square
 ARGS=input.txt output.txt
+GEN=gen_input
 
 # The C++ compiler
 #CXX=g++
+
 SQUARE = square.cpp
 
 all:	release test
@@ -41,11 +43,13 @@ debug: $(SQUARE)
 	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
-	rm -f $(PROG) *.o *.d input.txt output.txt gen_input
+	$(RM) $(PROG) $(GEN) *.o *.d input.txt output.txt
+
+$(GEN): gen_input.cpp 
+	$(CXX) -O2 $(CXXFLAGS) -o $(GEN) $^ $(LIBS)
 
-gen_input: gen_input.cpp 
-	$(CXX) -O2 $(CXXFLAGS) -o $@ $^ $(LIBS)
+input.txt: $(GEN)
+	./$(GEN)  >input.txt
 
-test: gen_input
-	./gen_input >input.txt
+test: input.txt
 	./$(PROG) $(ARGS)
diff --git a/examples/pipeline/square/index.html b/examples/pipeline/square/index.html
index d38dccb..a2205eb 100644
--- a/examples/pipeline/square/index.html
+++ b/examples/pipeline/square/index.html
@@ -2,10 +2,8 @@
 <BODY>
 
 <H2>Overview</H2>
-Text filter that demonstrates class pipeline. Example program 
-reads a file contains decimal integers in text format and changes each 
-to its square.
-The <A href=" ../../../doc/Tutorial.pdf">Tutorial</A> explains this example in detail.
+Text filter that demonstrates class pipeline. Example program reads a file 
+containing decimal integers in text format, and changes each to its square.
 
 <H2>Files</H2>
 <DL>
@@ -32,6 +30,14 @@ The <A href=" ../../../doc/Tutorial.pdf">Tutorial</A> explains this example in d
 <H2>To Build</H2>
 General build directions can be found <A HREF=../../index.html#build>here</A>.
 <P></P>
+Two additional targets for this example:
+<DL>
+    <DT><TT>make gen_input</TT>
+    <DD>Create an input generator program that prints out a sequence of integers.
+    <DT><TT>make input.txt</TT>
+    <DD>Create an input file for the example (with help of <TT>gen_input</TT>).
+</DL>
+<P></P>
 
 <H2>Usage</H2>
 <DL>
@@ -39,11 +45,14 @@ General build directions can be found <A HREF=../../index.html#build>here</A>.
 <DD>Run the example on the named <I>inputfile</I> (optional, default value is "input.txt") and produce the named <I>outputfile</I> (optional, default value is "output.txt").
     <I>N</I> is the number of threads to be used (optional).
     
+<DT><TT>gen_input [<I>LN</I>] > <I>inputfile</I></TT>
+<DD>Generate a file named <I>inputfile</I> consisting of <I>LN</I> lines each containing one integer.
+    If not specified, <I>LN</I> is assumed to be 1000000.
+    
 <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>Prepare an <I>inputfile</I> with about 5,000 lines of text (e.g., by 
-        <TT>gen_input 5000</TT>).
+    <BR>Prepare an <I>inputfile</I> with about 5,000 lines of text (see the instruction above).
     <BR>Run it with this <I>inputfile</I> and the desired number of threads,
 	e.g., <TT>square <I>inputfile</I> <I>outputfile</I> 4</TT>.
 </DL>
diff --git a/examples/pipeline/square/vc7.1/square.vcproj b/examples/pipeline/square/vc7.1/square.vcproj
index d29d7dd..c816f1b 100644
--- a/examples/pipeline/square/vc7.1/square.vcproj
+++ b/examples/pipeline/square/vc7.1/square.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -29,14 +29,14 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt"
+				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;copy input.txt $(OutDir)"
 				AdditionalDependencies="gen_input.exe"
 				Outputs=""$(OutDir)\input.txt""/>
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -45,8 +45,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -72,7 +72,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -81,14 +81,13 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\doc\*.txt"+"$(TBB21_INSTALL_DIR)\doc\html\*.html" "$(OutDir)\input.txt" >NUL
-"
+				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;copy input.txt $(OutDir)"
 				Outputs=""$(OutDir)\input.txt""/>
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -99,8 +98,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/pipeline/square/vc8/square.vcproj b/examples/pipeline/square/vc8/square.vcproj
index 2e4d5b2..7b30327 100644
--- a/examples/pipeline/square/vc8/square.vcproj
+++ b/examples/pipeline/square/vc8/square.vcproj
@@ -31,7 +31,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
+				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;copy input.txt $(OutDir)"
 				AdditionalDependencies="gen_input.exe"
 				Outputs="input.txt"
 			/>
@@ -47,7 +47,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -67,7 +67,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -96,8 +96,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -113,7 +113,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt"
+				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;copy input.txt $(OutDir)"
 				AdditionalDependencies="gen_input.exe"
 				Outputs="input.txt"
 			/>
@@ -130,7 +130,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -149,7 +149,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -178,8 +178,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -210,7 +210,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -230,7 +230,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -261,8 +261,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -294,7 +294,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -313,7 +313,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -344,8 +344,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/pipeline/square/vc9/square.vcproj b/examples/pipeline/square/vc9/square.vcproj
index b6816e8..dbedc38 100644
--- a/examples/pipeline/square/vc9/square.vcproj
+++ b/examples/pipeline/square/vc9/square.vcproj
@@ -32,7 +32,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
+				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;copy input.txt $(OutDir)"
 				AdditionalDependencies="gen_input.exe"
 				Outputs="input.txt"
 			/>
@@ -48,7 +48,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -67,7 +67,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -95,8 +95,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -112,7 +112,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
+				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;copy input.txt $(OutDir)"
 				AdditionalDependencies="gen_input.exe"
 				Outputs="input.txt"
 			/>
@@ -129,7 +129,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -148,7 +148,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -176,8 +176,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -193,7 +193,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
+				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;copy input.txt $(OutDir)"
 				AdditionalDependencies="gen_input.exe"
 				Outputs="input.txt"
 			/>
@@ -208,7 +208,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -227,7 +227,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -257,8 +257,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -274,7 +274,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;"
+				CommandLine="$(OutDir)\gen_input >input.txt&#x0D;&#x0A;copy input.txt $(OutDir)"
 				AdditionalDependencies="gen_input.exe"
 				Outputs="input.txt"
 			/>
@@ -290,7 +290,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -309,7 +309,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -339,8 +339,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/pipeline/text_filter/Makefile b/examples/pipeline/text_filter/Makefile
index 67ec0b0..53a2425 100644
--- a/examples/pipeline/text_filter/Makefile
+++ b/examples/pipeline/text_filter/Makefile
@@ -40,7 +40,7 @@ debug: *.cpp
 	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
-	rm -f $(PROG) *.o *.d input.txt output.txt
+	$(RM) $(PROG) *.o *.d input.txt output.txt
 
 test:
 	@echo Constructing input.txt
diff --git a/examples/pipeline/text_filter/vc7.1/text_filter.vcproj b/examples/pipeline/text_filter/vc7.1/text_filter.vcproj
index 88ab903..6a44177 100644
--- a/examples/pipeline/text_filter/vc7.1/text_filter.vcproj
+++ b/examples/pipeline/text_filter/vc7.1/text_filter.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -35,7 +35,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -44,8 +44,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -71,7 +71,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -86,7 +86,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -97,8 +97,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/pipeline/text_filter/vc8/text_filter.vcproj b/examples/pipeline/text_filter/vc8/text_filter.vcproj
index c923305..b021e71 100644
--- a/examples/pipeline/text_filter/vc8/text_filter.vcproj
+++ b/examples/pipeline/text_filter/vc8/text_filter.vcproj
@@ -46,7 +46,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -66,7 +66,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -95,8 +95,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -128,7 +128,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -147,7 +147,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -176,8 +176,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -207,7 +207,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -227,7 +227,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -258,8 +258,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -290,7 +290,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -309,7 +309,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -340,8 +340,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/pipeline/text_filter/vc9/text_filter.vcproj b/examples/pipeline/text_filter/vc9/text_filter.vcproj
index 866e110..4d9f192 100644
--- a/examples/pipeline/text_filter/vc9/text_filter.vcproj
+++ b/examples/pipeline/text_filter/vc9/text_filter.vcproj
@@ -47,7 +47,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -66,7 +66,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -94,8 +94,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -125,7 +125,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -144,7 +144,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -174,8 +174,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -207,7 +207,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -226,7 +226,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -255,8 +255,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -287,7 +287,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -306,7 +306,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -337,8 +337,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/task/tree_sum/Makefile b/examples/task/tree_sum/Makefile
index 4424f4b..ad97fe2 100644
--- a/examples/task/tree_sum/Makefile
+++ b/examples/task/tree_sum/Makefile
@@ -40,7 +40,7 @@ debug: *.cpp
 	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbbmalloc_debug -ltbb_debug $(LIBS)
 
 clean:
-	rm -f $(PROG) *.o *.d
+	$(RM) $(PROG) *.o *.d
 
 test:
 	./$(PROG) $(ARGS)
diff --git a/examples/task/tree_sum/vc7.1/tree_sum.vcproj b/examples/task/tree_sum/vc7.1/tree_sum.vcproj
index 773cef4..c2e575a 100644
--- a/examples/task/tree_sum/vc7.1/tree_sum.vcproj
+++ b/examples/task/tree_sum/vc7.1/tree_sum.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,8 +41,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)" && copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -80,7 +80,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -91,8 +91,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)" && copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/task/tree_sum/vc8/tree_sum.vcproj b/examples/task/tree_sum/vc8/tree_sum.vcproj
index 7eed458..85f23de 100644
--- a/examples/task/tree_sum/vc8/tree_sum.vcproj
+++ b/examples/task/tree_sum/vc8/tree_sum.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)" && copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				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)" && copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -249,8 +249,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)" && copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -297,7 +297,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -328,8 +328,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc.dll" "$(OutDir)""
+				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)" && copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbbmalloc.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/task/tree_sum/vc9/tree_sum.vcproj b/examples/task/tree_sum/vc9/tree_sum.vcproj
index bd0b019..d2549df 100644
--- a/examples/task/tree_sum/vc9/tree_sum.vcproj
+++ b/examples/task/tree_sum/vc9/tree_sum.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				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)" && copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -168,8 +168,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.dll" "$(OutDir)""
+				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)" && copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,8 +246,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				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)" && copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -325,8 +325,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc.dll" "$(OutDir)""
+				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)" && copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbbmalloc.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/test_all/fibonacci/Fibonacci.cpp b/examples/test_all/fibonacci/Fibonacci.cpp
index 43e0ea7..232122f 100644
--- a/examples/test_all/fibonacci/Fibonacci.cpp
+++ b/examples/test_all/fibonacci/Fibonacci.cpp
@@ -60,6 +60,7 @@
 #include "tbb/mutex.h"
 #include "tbb/spin_mutex.h"
 #include "tbb/queuing_mutex.h"
+#include "tbb/tbb_thread.h"
 
 using namespace std;
 using namespace tbb;
@@ -126,9 +127,9 @@ value SerialQueueFib(int n)
         Q.push(Matrix1110);
     Matrix2x2 A, B;
     while(true) {
-        Q.pop(A);
+        while( !Q.try_pop(A) ) this_tbb_thread::yield();
         if(Q.empty()) break;
-        Q.pop(B);
+        while( !Q.try_pop(B) ) this_tbb_thread::yield();
         Q.push(A * B);
     }
     return A.v[0][0];
@@ -244,9 +245,9 @@ struct QueueStream {
     //! Get pair of matricies if present
     bool pop_if_present( pair<Matrix2x2, Matrix2x2> &mm ) {
         // get first matrix if present
-        if(!Queue.pop_if_present(mm.first)) return false;
+        if(!Queue.try_pop(mm.first)) return false;
         // get second matrix if present
-        if(!Queue.pop_if_present(mm.second)) {
+        if(!Queue.try_pop(mm.second)) {
             // if not, then push back first matrix
             Queue.push(mm.first); return false;
         }
@@ -281,7 +282,7 @@ public:
     void operator() (argument_type mm) const {
         mm.first = mm.first * mm.second;
         // note: it can run concurrently with QueueStream::pop_if_present()
-        if(my_stream.Queue.pop_if_present(mm.second))
+        if(my_stream.Queue.try_pop(mm.second))
              my_while.add( mm ); // now, two matrices available. Add next iteration.
         else my_stream.Queue.push( mm.first ); // or push back calculated value if queue is empty
     }
@@ -308,7 +309,7 @@ struct QueueProcessTask: public task {
     QueueProcessTask( QueueStream &s ) : my_stream(s) { }
     //! executing task
     /*override*/ task* execute() {
-        while( !my_stream.producer_is_done || my_stream.Queue.size()>1 ) {
+        while( !my_stream.producer_is_done || my_stream.Queue.unsafe_size()>1 ) {
             parallel_while<parallel_whileFibBody> w; // run while loop in parallel
             w.run( my_stream, parallel_whileFibBody( w, my_stream ) );
         }
@@ -326,8 +327,10 @@ value ParallelQueueFib(int n)
     // If there is only a single thread, the first task in the list runs to completion
     // before the second task in the list starts.
     task::spawn_root_and_wait(list);
-    assert(stream.Queue.size() == 1); // it is easy to lose some work
-    Matrix2x2 M; stream.Queue.pop( M ); // get last matrix
+    assert(stream.Queue.unsafe_size() == 1); // it is easy to lose some work
+    Matrix2x2 M; 
+    bool result = stream.Queue.try_pop( M ); // get last matrix
+    assert( result );
     return M.v[0][0]; // and result number
 }
 
@@ -358,7 +361,9 @@ public:
     {
         concurrent_queue<Matrix2x2> &Queue = *static_cast<concurrent_queue<Matrix2x2> *>(p);
         Matrix2x2 m1, m2;
-        Queue.pop( m1 ); Queue.pop( m2 ); // get two elements
+        // get two elements
+        while( !Queue.try_pop( m1 ) ) this_tbb_thread::yield(); 
+        while( !Queue.try_pop( m2 ) ) this_tbb_thread::yield();
         m1 = m1 * m2; // process them
         Queue.push( m1 ); // and push back
         return this; // just nothing
@@ -380,7 +385,10 @@ value ParallelPipeFib(int n)
     pipeline.run( n ); // must be larger then max threads number
     pipeline.clear(); // do not forget clear the pipeline
 
-    Matrix2x2 M; input.Queue.pop( M ); // get last element
+    assert( input.Queue.unsafe_size()==1 );
+    Matrix2x2 M; 
+    bool result = input.Queue.try_pop( M ); // get last element
+    assert( result );
     return M.v[0][0]; // get value
 }
 
diff --git a/examples/test_all/fibonacci/Makefile b/examples/test_all/fibonacci/Makefile
index 3abcc62..5112fe0 100644
--- a/examples/test_all/fibonacci/Makefile
+++ b/examples/test_all/fibonacci/Makefile
@@ -40,7 +40,7 @@ debug: *.cpp
 	$(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
-	rm -f $(PROG) *.o *.d
+	$(RM) $(PROG) *.o *.d
 
 test:
 	./$(PROG) $(ARGS)
diff --git a/examples/test_all/fibonacci/vc7.1/fibonacci.vcproj b/examples/test_all/fibonacci/vc7.1/fibonacci.vcproj
index 97cf7c7..7504126 100644
--- a/examples/test_all/fibonacci/vc7.1/fibonacci.vcproj
+++ b/examples/test_all/fibonacci/vc7.1/fibonacci.vcproj
@@ -20,7 +20,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,8 +41,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -80,7 +80,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -91,8 +91,8 @@
 				Name="VCMIDLTool"/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc7.1\bin\tbb.pdb" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/test_all/fibonacci/vc8/fibonacci.vcproj b/examples/test_all/fibonacci/vc8/fibonacci.vcproj
index 5d1606e..d46a39f 100644
--- a/examples/test_all/fibonacci/vc8/fibonacci.vcproj
+++ b/examples/test_all/fibonacci/vc8/fibonacci.vcproj
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -92,8 +92,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -170,8 +170,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -249,8 +249,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A; copy  "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -297,7 +297,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -328,8 +328,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/test_all/fibonacci/vc9/fibonacci.vcproj b/examples/test_all/fibonacci/vc9/fibonacci.vcproj
index 58772d8..941c14f 100644
--- a/examples/test_all/fibonacci/vc9/fibonacci.vcproj
+++ b/examples/test_all/fibonacci/vc9/fibonacci.vcproj
@@ -44,7 +44,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -91,8 +91,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -168,8 +168,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_USE_DEBUG"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,8 +246,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				OptimizeReferences="2"
@@ -325,8 +325,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/include/index.html b/include/index.html
index c37ff34..f80c5d4 100644
--- a/include/index.html
+++ b/include/index.html
@@ -6,8 +6,8 @@ Include files for Threading Building Blocks.
 
 <H2>Directories</H2>
 <DL>
-<DT><A HREF="tbb">tbb</A>
-<DD>Include files for Threading Building Blocks.
+<DT><A HREF="tbb/index.html">tbb</A>
+<DD>Include files for Threading Building Blocks classes and functions.
 </DL>
 
 <HR>
diff --git a/include/tbb/_concurrent_queue_internal.h b/include/tbb/_concurrent_queue_internal.h
new file mode 100644
index 0000000..4b45f4c
--- /dev/null
+++ b/include/tbb/_concurrent_queue_internal.h
@@ -0,0 +1,966 @@
+/*
+    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_concurrent_queue_internal_H
+#define __TBB_concurrent_queue_internal_H
+
+#include "tbb_stddef.h"
+#include "tbb_machine.h"
+#include "atomic.h"
+#include "spin_mutex.h"
+#include "cache_aligned_allocator.h"
+#include "tbb_exception.h"
+#include <iterator>
+#include <new>
+
+namespace tbb {
+
+#if !__TBB_TEMPLATE_FRIENDS_BROKEN
+
+// forward declaration
+namespace strict_ppl {
+template<typename T, typename A> class concurrent_queue;
+}
+
+template<typename T, typename A> class concurrent_bounded_queue;
+
+namespace deprecated {
+template<typename T, typename A> class concurrent_queue;
+}
+#endif
+
+//! For internal use only.
+//! @cond INTERNAL
+namespace strict_ppl {
+
+namespace internal {
+
+using namespace tbb::internal;
+
+typedef size_t ticket;
+
+static void* invalid_page;
+
+template<typename T> class micro_queue ;
+template<typename T> class micro_queue_pop_finalizer ;
+template<typename T> class concurrent_queue_base_v3;
+
+//! parts of concurrent_queue_rep that do not have references to micro_queue
+/**
+ * For internal use only.
+ */
+struct concurrent_queue_rep_base : no_copy {
+    template<typename T> friend class micro_queue;
+    template<typename T> friend class concurrent_queue_base_v3;
+
+protected:
+    //! Approximately n_queue/golden ratio
+    static const size_t phi = 3;
+
+public:
+    // must be power of 2
+    static const size_t n_queue = 8;
+
+    //! Prefix on a page
+    struct page {
+        page* next;
+        uintptr_t mask; 
+    };
+
+    atomic<ticket> head_counter;
+    char pad1[NFS_MaxLineSize-sizeof(atomic<ticket>)];
+    atomic<ticket> tail_counter;
+    char pad2[NFS_MaxLineSize-sizeof(atomic<ticket>)];
+
+    //! Always a power of 2
+    size_t items_per_page;
+
+    //! Size of an item
+    size_t item_size;
+
+    //! number of invalid entries in the queue
+    atomic<size_t> n_invalid_entries;
+
+    char pad3[NFS_MaxLineSize-sizeof(size_t)-sizeof(size_t)-sizeof(atomic<size_t>)];
+} ;
+
+//! Abstract class to define interface for page allocation/deallocation
+/**
+ * For internal use only.
+ */
+class concurrent_queue_page_allocator
+{
+    template<typename T> friend class micro_queue ;
+    template<typename T> friend class micro_queue_pop_finalizer ;
+protected:
+    virtual ~concurrent_queue_page_allocator() {}
+private:
+    virtual concurrent_queue_rep_base::page* allocate_page() = 0;
+    virtual void deallocate_page( concurrent_queue_rep_base::page* p ) = 0;
+} ;
+
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+// unary minus operator applied to unsigned type, result still unsigned
+#pragma warning( push )
+#pragma warning( disable: 4146 )
+#endif
+
+//! A queue using simple locking.
+/** For efficient, this class has no constructor.  
+    The caller is expected to zero-initialize it. */
+template<typename T>
+class micro_queue : no_copy {
+    typedef concurrent_queue_rep_base::page page;
+
+    //! Class used to ensure exception-safety of method "pop" 
+    class destroyer: no_copy {
+        T& my_value;
+    public:
+        destroyer( T& value ) : my_value(value) {}
+        ~destroyer() {my_value.~T();}          
+    };
+
+    T& get_ref( page& page, size_t index ) {
+        return static_cast<T*>(static_cast<void*>(&page+1))[index];
+    }
+
+    void copy_item( page& dst, size_t index, const void* src ) {
+        new( &get_ref(dst,index) ) T(*static_cast<const T*>(src)); 
+    }
+
+    void copy_item( page& dst, size_t dindex, const page& src, size_t sindex ) {
+        new( &get_ref(dst,dindex) ) T( static_cast<const T*>(static_cast<const void*>(&src+1))[sindex] );
+    }
+
+    void assign_and_destroy_item( void* dst, page& src, size_t index ) {
+        T& from = get_ref(src,index);
+        destroyer d(from);
+        *static_cast<T*>(dst) = from;
+    }
+
+    void spin_wait_until_my_turn( atomic<ticket>& counter, ticket k, concurrent_queue_rep_base& rb ) const ;
+
+public:
+    friend class micro_queue_pop_finalizer<T>;
+
+    atomic<page*> head_page;
+    atomic<ticket> head_counter;
+
+    atomic<page*> tail_page;
+    atomic<ticket> tail_counter;
+
+    spin_mutex page_mutex;
+    
+    void push( const void* item, ticket k, concurrent_queue_base_v3<T>& base ) ;
+
+    bool pop( void* dst, ticket k, concurrent_queue_base_v3<T>& base ) ;
+
+    micro_queue& assign( const micro_queue& src, concurrent_queue_base_v3<T>& base ) ;
+
+    page* make_copy( concurrent_queue_base_v3<T>& base, const page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index ) ;
+
+    void make_invalid( ticket k ) ;
+};
+
+template<typename T>
+void micro_queue<T>::spin_wait_until_my_turn( atomic<ticket>& counter, ticket k, concurrent_queue_rep_base& rb ) const {
+    atomic_backoff backoff;
+    do {
+        backoff.pause();
+        if( counter&0x1 ) {
+            ++rb.n_invalid_entries;
+            throw_bad_last_alloc_exception_v4();
+        }
+    } while( counter!=k ) ;
+}
+
+template<typename T>
+void micro_queue<T>::push( const void* item, ticket k, concurrent_queue_base_v3<T>& base ) {
+    k &= -concurrent_queue_rep_base::n_queue;
+    page* p = NULL;
+    size_t index = k/concurrent_queue_rep_base::n_queue & (base.my_rep->items_per_page-1);
+    if( !index ) {
+        try {
+            concurrent_queue_page_allocator& pa = base;
+            p = pa.allocate_page();
+        } catch (...) {
+            ++base.my_rep->n_invalid_entries;
+            make_invalid( k );
+        }
+        p->mask = 0;
+        p->next = NULL;
+    }
+    
+    if( tail_counter!=k ) spin_wait_until_my_turn( tail_counter, k, *base.my_rep );
+        
+    if( p ) {
+        spin_mutex::scoped_lock lock( page_mutex );
+        if( page* q = tail_page )
+            q->next = p;
+        else
+            head_page = p; 
+        tail_page = p;
+    } else {
+        p = tail_page;
+    }
+   
+    try {
+        copy_item( *p, index, item );
+        // If no exception was thrown, mark item as present.
+        p->mask |= uintptr_t(1)<<index;
+        tail_counter += concurrent_queue_rep_base::n_queue; 
+    } catch (...) {
+        ++base.my_rep->n_invalid_entries;
+        tail_counter += concurrent_queue_rep_base::n_queue; 
+        throw;
+    }
+}
+
+template<typename T>
+bool micro_queue<T>::pop( void* dst, ticket k, concurrent_queue_base_v3<T>& base ) {
+    k &= -concurrent_queue_rep_base::n_queue;
+    if( head_counter!=k ) spin_wait_until_eq( head_counter, k );
+    if( tail_counter==k ) spin_wait_while_eq( tail_counter, k );
+    page& p = *head_page;
+    __TBB_ASSERT( &p, NULL );
+    size_t index = k/concurrent_queue_rep_base::n_queue & (base.my_rep->items_per_page-1);
+    bool success = false; 
+    {
+        micro_queue_pop_finalizer<T> finalizer( *this, base, k+concurrent_queue_rep_base::n_queue, index==base.my_rep->items_per_page-1 ? &p : NULL ); 
+        if( p.mask & uintptr_t(1)<<index ) {
+            success = true;
+            assign_and_destroy_item( dst, p, index );
+        } else {
+            --base.my_rep->n_invalid_entries;
+        }
+    }
+    return success;
+}
+
+template<typename T>
+micro_queue<T>& micro_queue<T>::assign( const micro_queue<T>& src, concurrent_queue_base_v3<T>& base ) {
+    head_counter = src.head_counter;
+    tail_counter = src.tail_counter;
+    page_mutex   = src.page_mutex;
+
+    const page* srcp = src.head_page;
+    if( srcp ) {
+        ticket g_index = head_counter;
+        try {
+            size_t n_items  = (tail_counter-head_counter)/concurrent_queue_rep_base::n_queue;
+            size_t index = head_counter/concurrent_queue_rep_base::n_queue & (base.my_rep->items_per_page-1);
+            size_t end_in_first_page = (index+n_items<base.my_rep->items_per_page)?(index+n_items):base.my_rep->items_per_page;
+
+            head_page = make_copy( base, srcp, index, end_in_first_page, g_index );
+            page* cur_page = head_page;
+
+            if( srcp != src.tail_page ) {
+                for( srcp = srcp->next; srcp!=src.tail_page; srcp=srcp->next ) {
+                    cur_page->next = make_copy( base, srcp, 0, base.my_rep->items_per_page, g_index );
+                    cur_page = cur_page->next;
+                }
+
+                __TBB_ASSERT( srcp==src.tail_page, NULL );
+                size_t last_index = tail_counter/concurrent_queue_rep_base::n_queue & (base.my_rep->items_per_page-1);
+                if( last_index==0 ) last_index = base.my_rep->items_per_page;
+
+                cur_page->next = make_copy( base, srcp, 0, last_index, g_index );
+                cur_page = cur_page->next;
+            }
+            tail_page = cur_page;
+        } catch (...) {
+            make_invalid( g_index );
+        }
+    } else {
+        head_page = tail_page = NULL;
+    }
+    return *this;
+}
+
+template<typename T>
+void micro_queue<T>::make_invalid( ticket k ) {
+    static page dummy = {static_cast<page*>((void*)1), 0};
+    // mark it so that no more pushes are allowed.
+    invalid_page = &dummy;
+    {
+        spin_mutex::scoped_lock lock( page_mutex );
+        tail_counter = k+concurrent_queue_rep_base::n_queue+1;
+        if( page* q = tail_page )
+            q->next = static_cast<page*>(invalid_page);
+        else
+            head_page = static_cast<page*>(invalid_page); 
+        tail_page = static_cast<page*>(invalid_page);
+    }
+    throw;
+}
+
+template<typename T>
+concurrent_queue_rep_base::page* micro_queue<T>::make_copy( concurrent_queue_base_v3<T>& base, const concurrent_queue_rep_base::page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index ) {
+    concurrent_queue_page_allocator& pa = base;
+    page* new_page = pa.allocate_page();
+    new_page->next = NULL;
+    new_page->mask = src_page->mask;
+    for( ; begin_in_page!=end_in_page; ++begin_in_page, ++g_index )
+        if( new_page->mask & uintptr_t(1)<<begin_in_page )
+            copy_item( *new_page, begin_in_page, *src_page, begin_in_page );
+    return new_page;
+}
+
+template<typename T>
+class micro_queue_pop_finalizer: no_copy {
+    typedef concurrent_queue_rep_base::page page;
+    ticket my_ticket;
+    micro_queue<T>& my_queue;
+    page* my_page; 
+    concurrent_queue_page_allocator& allocator;
+public:
+    micro_queue_pop_finalizer( micro_queue<T>& queue, concurrent_queue_base_v3<T>& b, ticket k, page* p ) :
+        my_ticket(k), my_queue(queue), my_page(p), allocator(b)
+    {}
+    ~micro_queue_pop_finalizer() ;
+};
+
+template<typename T>
+micro_queue_pop_finalizer<T>::~micro_queue_pop_finalizer() {
+    page* p = my_page;
+    if( p ) {
+        spin_mutex::scoped_lock lock( my_queue.page_mutex );
+        page* q = p->next;
+        my_queue.head_page = q;
+        if( !q ) {
+            my_queue.tail_page = NULL;
+        }
+    }
+    my_queue.head_counter = my_ticket;
+    if( p ) {
+        allocator.deallocate_page( p );
+    }
+}
+
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+#pragma warning( pop )
+#endif // warning 4146 is back
+
+template<typename T> class concurrent_queue_iterator_rep ;
+template<typename T> class concurrent_queue_iterator_base_v3;
+
+//! representation of concurrent_queue_base
+/**
+ * the class inherits from concurrent_queue_rep_base and defines an array of micro_queue<T>'s
+ */
+template<typename T>
+struct concurrent_queue_rep : public concurrent_queue_rep_base {
+    micro_queue<T> array[n_queue];
+
+    //! Map ticket to an array index
+    static size_t index( ticket k ) {
+        return k*phi%n_queue;
+    }
+
+    micro_queue<T>& choose( ticket k ) {
+        // The formula here approximates LRU in a cache-oblivious way.
+        return array[index(k)];
+    }
+};
+
+//! base class of concurrent_queue
+/**
+ * The class implements the interface defined by concurrent_queue_page_allocator
+ * and has a pointer to an instance of concurrent_queue_rep.
+ */
+template<typename T>
+class concurrent_queue_base_v3: public concurrent_queue_page_allocator {
+    //! Internal representation
+    concurrent_queue_rep<T>* my_rep;
+
+    friend struct concurrent_queue_rep<T>;
+    friend class micro_queue<T>;
+    friend class concurrent_queue_iterator_rep<T>;
+    friend class concurrent_queue_iterator_base_v3<T>;
+
+protected:
+    typedef typename concurrent_queue_rep<T>::page page;
+
+private:
+    /* override */ virtual page *allocate_page() {
+        concurrent_queue_rep<T>& r = *my_rep;
+        size_t n = sizeof(page) + r.items_per_page*r.item_size;
+        return reinterpret_cast<page*>(allocate_block ( n ));
+    }
+
+    /* override */ virtual void deallocate_page( concurrent_queue_rep_base::page *p ) {
+        concurrent_queue_rep<T>& r = *my_rep;
+        size_t n = sizeof(page) + r.items_per_page*r.item_size;
+        deallocate_block( reinterpret_cast<void*>(p), n );
+    }
+
+    //! custom allocator
+    virtual void *allocate_block( size_t n ) = 0;
+
+    //! custom de-allocator
+    virtual void deallocate_block( void *p, size_t n ) = 0;
+
+protected:
+    concurrent_queue_base_v3( size_t item_size ) ;
+
+    /* override */ virtual ~concurrent_queue_base_v3() {
+        size_t nq = my_rep->n_queue;
+        for( size_t i=0; i<nq; i++ )
+            __TBB_ASSERT( my_rep->array[i].tail_page==NULL, "pages were not freed properly" );
+        cache_aligned_allocator<concurrent_queue_rep<T> >().deallocate(my_rep,1);
+    }
+
+    //! Enqueue item at tail of queue
+    void internal_push( const void* src ) {
+        concurrent_queue_rep<T>& r = *my_rep;
+        ticket k = r.tail_counter++;
+        r.choose(k).push( src, k, *this );
+    }
+
+    //! Attempt to dequeue item from queue.
+    /** NULL if there was no item to dequeue. */
+    bool internal_try_pop( void* dst ) ;
+
+    //! Get size of queue; result may be invalid if queue is modified concurrently
+    size_t internal_size() const ;
+
+    //! check if the queue is empty; thread safe
+    bool internal_empty() const ;
+
+    //! free any remaining pages
+    /* note that the name may be misleading, but it remains so due to a historical accident. */
+    void internal_finish_clear() ;
+
+    //! throw an exception
+    void internal_throw_exception() const {
+        throw std::bad_alloc();
+    }
+
+    //! copy internal representation
+    void assign( const concurrent_queue_base_v3& src ) ;
+};
+
+template<typename T>
+concurrent_queue_base_v3<T>::concurrent_queue_base_v3( size_t item_size ) {
+    my_rep = cache_aligned_allocator<concurrent_queue_rep<T> >().allocate(1);
+    __TBB_ASSERT( (size_t)my_rep % NFS_GetLineSize()==0, "alignment error" );
+    __TBB_ASSERT( (size_t)&my_rep->head_counter % NFS_GetLineSize()==0, "alignment error" );
+    __TBB_ASSERT( (size_t)&my_rep->tail_counter % NFS_GetLineSize()==0, "alignment error" );
+    __TBB_ASSERT( (size_t)&my_rep->array % NFS_GetLineSize()==0, "alignment error" );
+    memset(my_rep,0,sizeof(concurrent_queue_rep<T>));
+    my_rep->item_size = item_size;
+    my_rep->items_per_page = item_size<=8 ? 32 :
+                             item_size<=16 ? 16 : 
+                             item_size<=32 ? 8 :
+                             item_size<=64 ? 4 :
+                             item_size<=128 ? 2 :
+                             1;
+}
+
+template<typename T>
+bool concurrent_queue_base_v3<T>::internal_try_pop( void* dst ) {
+    concurrent_queue_rep<T>& r = *my_rep;
+    ticket k;
+    do {
+        k = r.head_counter;
+        for(;;) {
+            if( r.tail_counter<=k ) {
+                // Queue is empty 
+                return false;
+            }
+            // Queue had item with ticket k when we looked.  Attempt to get that item.
+            ticket tk=k;
+#if defined(_MSC_VER) && defined(_Wp64)
+    #pragma warning (push)
+    #pragma warning (disable: 4267)
+#endif
+            k = r.head_counter.compare_and_swap( tk+1, tk );
+#if defined(_MSC_VER) && defined(_Wp64)
+    #pragma warning (pop)
+#endif
+            if( k==tk )
+                break;
+            // Another thread snatched the item, retry.
+        }
+    } while( !r.choose( k ).pop( dst, k, *this ) );
+    return true;
+}
+
+template<typename T>
+size_t concurrent_queue_base_v3<T>::internal_size() const {
+    concurrent_queue_rep<T>& r = *my_rep;
+    __TBB_ASSERT( sizeof(ptrdiff_t)<=sizeof(size_t), NULL );
+    ticket hc = r.head_counter;
+    size_t nie = r.n_invalid_entries;
+    ticket tc = r.tail_counter;
+    __TBB_ASSERT( hc!=tc || !nie, NULL );
+    ptrdiff_t sz = tc-hc-nie;
+    return sz<0 ? 0 :  size_t(sz);
+}
+
+template<typename T>
+bool concurrent_queue_base_v3<T>::internal_empty() const {
+    concurrent_queue_rep<T>& r = *my_rep;
+    ticket tc = r.tail_counter;
+    ticket hc = r.head_counter;
+    // if tc!=r.tail_counter, the queue was not empty at some point between the two reads.
+    return tc==r.tail_counter && tc==hc+r.n_invalid_entries ;
+}
+
+template<typename T>
+void concurrent_queue_base_v3<T>::internal_finish_clear() {
+    concurrent_queue_rep<T>& r = *my_rep;
+    size_t nq = r.n_queue;
+    for( size_t i=0; i<nq; ++i ) {
+        page* tp = r.array[i].tail_page;
+        __TBB_ASSERT( r.array[i].head_page==tp, "at most one page should remain" );
+        if( tp!=NULL) {
+            if( tp!=invalid_page ) deallocate_page( tp );
+            r.array[i].tail_page = NULL;
+        }
+    }
+}
+
+template<typename T>
+void concurrent_queue_base_v3<T>::assign( const concurrent_queue_base_v3& src ) {
+    concurrent_queue_rep<T>& r = *my_rep;
+    r.items_per_page = src.my_rep->items_per_page;
+
+    // copy concurrent_queue_rep.
+    r.head_counter = src.my_rep->head_counter;
+    r.tail_counter = src.my_rep->tail_counter;
+    r.n_invalid_entries = src.my_rep->n_invalid_entries;
+
+    // copy micro_queues
+    for( size_t i = 0; i<r.n_queue; ++i )
+        r.array[i].assign( src.my_rep->array[i], *this);
+
+    __TBB_ASSERT( r.head_counter==src.my_rep->head_counter && r.tail_counter==src.my_rep->tail_counter, 
+            "the source concurrent queue should not be concurrently modified." );
+}
+
+template<typename Container, typename Value> class concurrent_queue_iterator;
+
+template<typename T>
+class concurrent_queue_iterator_rep: no_assign {
+public:
+    ticket head_counter;
+    const concurrent_queue_base_v3<T>& my_queue;
+    typename concurrent_queue_base_v3<T>::page* array[concurrent_queue_rep<T>::n_queue];
+    concurrent_queue_iterator_rep( const concurrent_queue_base_v3<T>& queue ) :
+        head_counter(queue.my_rep->head_counter),
+        my_queue(queue)
+    {
+        for( size_t k=0; k<concurrent_queue_rep<T>::n_queue; ++k )
+            array[k] = queue.my_rep->array[k].head_page;
+    }
+
+    //! Set item to point to kth element.  Return true if at end of queue or item is marked valid; false otherwise.
+    bool get_item( void*& item, size_t k ) ;
+};
+
+template<typename T>
+bool concurrent_queue_iterator_rep<T>::get_item( void*& item, size_t k ) {
+    if( k==my_queue.my_rep->tail_counter ) {
+        item = NULL;
+        return true;
+    } else {
+        typename concurrent_queue_base_v3<T>::page* p = array[concurrent_queue_rep<T>::index(k)];
+        __TBB_ASSERT(p,NULL);
+        size_t i = k/concurrent_queue_rep<T>::n_queue & (my_queue.my_rep->items_per_page-1);
+        item = static_cast<unsigned char*>(static_cast<void*>(p+1)) + my_queue.my_rep->item_size*i;
+        return (p->mask & uintptr_t(1)<<i)!=0;
+    }
+}
+
+//! Type-independent portion of concurrent_queue_iterator.
+/** @ingroup containers */
+template<typename Value>
+class concurrent_queue_iterator_base_v3 : no_assign {
+    //! Concurrentconcurrent_queue over which we are iterating.
+    /** NULL if one past last element in queue. */
+    concurrent_queue_iterator_rep<Value>* my_rep;
+
+    template<typename C, typename T, typename U>
+    friend bool operator==( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j );
+
+    template<typename C, typename T, typename U>
+    friend bool operator!=( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j );
+protected:
+    //! Pointer to current item
+    mutable void* my_item;
+
+public:
+    //! Default constructor
+    concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
+
+    //! Copy constructor
+    concurrent_queue_iterator_base_v3( const concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
+        assign(i);
+    }
+
+    //! Construct iterator pointing to head of queue.
+    concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3<Value>& queue ) ;
+
+protected:
+    //! Assignment
+    void assign( const concurrent_queue_iterator_base_v3<Value>& other ) ;
+
+    //! Advance iterator one step towards tail of queue.
+    void advance() ;
+
+    //! Destructor
+    ~concurrent_queue_iterator_base_v3() {
+        cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().deallocate(my_rep, 1);
+        my_rep = NULL;
+    }
+};
+
+template<typename Value>
+concurrent_queue_iterator_base_v3<Value>::concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3<Value>& queue ) {
+    my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().allocate(1);
+    new( my_rep ) concurrent_queue_iterator_rep<Value>(queue);
+    size_t k = my_rep->head_counter;
+    if( !my_rep->get_item(my_item, k) ) advance();
+}
+
+template<typename Value>
+void concurrent_queue_iterator_base_v3<Value>::assign( const concurrent_queue_iterator_base_v3<Value>& other ) {
+    if( my_rep!=other.my_rep ) {
+        if( my_rep ) {
+            cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().deallocate(my_rep, 1);
+            my_rep = NULL;
+        }
+        if( other.my_rep ) {
+            my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().allocate(1);
+            new( my_rep ) concurrent_queue_iterator_rep<Value>( *other.my_rep );
+        }
+    }
+    my_item = other.my_item;
+}
+
+template<typename Value>
+void concurrent_queue_iterator_base_v3<Value>::advance() {
+    __TBB_ASSERT( my_item, "attempt to increment iterator past end of queue" );  
+    size_t k = my_rep->head_counter;
+    const concurrent_queue_base_v3<Value>& queue = my_rep->my_queue;
+#if TBB_USE_ASSERT
+    void* tmp;
+    my_rep->get_item(tmp,k);
+    __TBB_ASSERT( my_item==tmp, NULL );
+#endif /* TBB_USE_ASSERT */
+    size_t i = k/concurrent_queue_rep<Value>::n_queue & (queue.my_rep->items_per_page-1);
+    if( i==queue.my_rep->items_per_page-1 ) {
+        typename concurrent_queue_base_v3<Value>::page*& root = my_rep->array[concurrent_queue_rep<Value>::index(k)];
+        root = root->next;
+    }
+    // advance k
+    my_rep->head_counter = ++k;
+    if( !my_rep->get_item(my_item, k) ) advance();
+}
+
+template<typename T>
+static inline const concurrent_queue_iterator_base_v3<const T>& add_constness( const concurrent_queue_iterator_base_v3<T>& q )
+{
+    return *reinterpret_cast<const concurrent_queue_iterator_base_v3<const T> *>(&q) ;
+}
+
+//! Meets requirements of a forward iterator for STL.
+/** Value is either the T or const T type of the container.
+    @ingroup containers */
+template<typename Container, typename Value>
+class concurrent_queue_iterator: public concurrent_queue_iterator_base_v3<Value>,
+        public std::iterator<std::forward_iterator_tag,Value> {
+#if !__TBB_TEMPLATE_FRIENDS_BROKEN
+    template<typename T, class A>
+    friend class ::tbb::strict_ppl::concurrent_queue;
+#else
+public: // workaround for MSVC
+#endif 
+    //! Construct iterator pointing to head of queue.
+    concurrent_queue_iterator( const concurrent_queue_base_v3<Value>& queue ) :
+        concurrent_queue_iterator_base_v3<Value>(queue)
+    {
+    }
+
+public:
+    concurrent_queue_iterator() {}
+
+    //! Copy constructor
+    concurrent_queue_iterator( const concurrent_queue_iterator<Container,Value>& other ) :
+        concurrent_queue_iterator_base_v3<Value>(other)
+    {
+    }
+
+    template<typename T>
+    concurrent_queue_iterator( const concurrent_queue_iterator<Container,T>& other ) :
+        concurrent_queue_iterator_base_v3<Value>(add_constness(other))
+    {
+    }
+
+    //! Iterator assignment
+    concurrent_queue_iterator& operator=( const concurrent_queue_iterator& other ) {
+        assign(other);
+        return *this;
+    }
+
+    //! Reference to current item 
+    Value& operator*() const {
+        return *static_cast<Value*>(this->my_item);
+    }
+
+    Value* operator->() const {return &operator*();}
+
+    //! Advance to next item in queue
+    concurrent_queue_iterator& operator++() {
+        this->advance();
+        return *this;
+    }
+
+    //! Post increment
+    Value* operator++(int) {
+        Value* result = &operator*();
+        operator++();
+        return result;
+    }
+}; // concurrent_queue_iterator
+
+
+template<typename C, typename T, typename U>
+bool operator==( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j ) {
+    return i.my_item==j.my_item;
+}
+
+template<typename C, typename T, typename U>
+bool operator!=( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j ) {
+    return i.my_item!=j.my_item;
+}
+
+} // namespace internal
+
+} // namespace strict_ppl
+
+//! @cond INTERNAL
+namespace internal {
+
+class concurrent_queue_rep;
+class concurrent_queue_iterator_rep;
+class concurrent_queue_iterator_base_v3;
+template<typename Container, typename Value> class concurrent_queue_iterator;
+
+//! For internal use only.
+/** Type-independent portion of concurrent_queue.
+    @ingroup containers */
+class concurrent_queue_base_v3: no_copy {
+    //! Internal representation
+    concurrent_queue_rep* my_rep;
+
+    friend class concurrent_queue_rep;
+    friend struct micro_queue;
+    friend class micro_queue_pop_finalizer;
+    friend class concurrent_queue_iterator_rep;
+    friend class concurrent_queue_iterator_base_v3;
+protected:
+    //! Prefix on a page
+    struct page {
+        page* next;
+        uintptr_t mask; 
+    };
+
+    //! Capacity of the queue
+    ptrdiff_t my_capacity;
+   
+    //! Always a power of 2
+    size_t items_per_page;
+
+    //! Size of an item
+    size_t item_size;
+
+private:
+    virtual void copy_item( page& dst, size_t index, const void* src ) = 0;
+    virtual void assign_and_destroy_item( void* dst, page& src, size_t index ) = 0;
+protected:
+    __TBB_EXPORTED_METHOD concurrent_queue_base_v3( size_t item_size );
+    virtual __TBB_EXPORTED_METHOD ~concurrent_queue_base_v3();
+
+    //! Enqueue item at tail of queue
+    void __TBB_EXPORTED_METHOD internal_push( const void* src );
+
+    //! Dequeue item from head of queue
+    void __TBB_EXPORTED_METHOD internal_pop( void* dst );
+
+    //! Attempt to enqueue item onto queue.
+    bool __TBB_EXPORTED_METHOD internal_push_if_not_full( const void* src );
+
+    //! Attempt to dequeue item from queue.
+    /** NULL if there was no item to dequeue. */
+    bool __TBB_EXPORTED_METHOD internal_pop_if_present( void* dst );
+
+    //! Get size of queue
+    ptrdiff_t __TBB_EXPORTED_METHOD internal_size() const;
+
+    //! Check if the queue is emtpy
+    bool __TBB_EXPORTED_METHOD internal_empty() const;
+
+    //! Set the queue capacity
+    void __TBB_EXPORTED_METHOD internal_set_capacity( ptrdiff_t capacity, size_t element_size );
+
+    //! custom allocator
+    virtual page *allocate_page() = 0;
+
+    //! custom de-allocator
+    virtual void deallocate_page( page *p ) = 0;
+
+    //! free any remaining pages
+    /* note that the name may be misleading, but it remains so due to a historical accident. */
+    void __TBB_EXPORTED_METHOD internal_finish_clear() ;
+
+    //! throw an exception
+    void __TBB_EXPORTED_METHOD internal_throw_exception() const;
+
+    //! copy internal representation
+    void __TBB_EXPORTED_METHOD assign( const concurrent_queue_base_v3& src ) ;
+
+private:
+    virtual void copy_page_item( page& dst, size_t dindex, const page& src, size_t sindex ) = 0;
+};
+
+//! Type-independent portion of concurrent_queue_iterator.
+/** @ingroup containers */
+class concurrent_queue_iterator_base_v3 {
+    //! Concurrentconcurrent_queue over which we are iterating.
+    /** NULL if one past last element in queue. */
+    concurrent_queue_iterator_rep* my_rep;
+
+    template<typename C, typename T, typename U>
+    friend bool operator==( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j );
+
+    template<typename C, typename T, typename U>
+    friend bool operator!=( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j );
+protected:
+    //! Pointer to current item
+    mutable void* my_item;
+
+    //! Default constructor
+    concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
+
+    //! Copy constructor
+    concurrent_queue_iterator_base_v3( const concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
+        assign(i);
+    }
+
+    //! Construct iterator pointing to head of queue.
+    __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3& queue );
+
+    //! Assignment
+    void __TBB_EXPORTED_METHOD assign( const concurrent_queue_iterator_base_v3& i );
+
+    //! Advance iterator one step towards tail of queue.
+    void __TBB_EXPORTED_METHOD advance();
+
+    //! Destructor
+    __TBB_EXPORTED_METHOD ~concurrent_queue_iterator_base_v3();
+};
+
+typedef concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base;
+
+//! Meets requirements of a forward iterator for STL.
+/** Value is either the T or const T type of the container.
+    @ingroup containers */
+template<typename Container, typename Value>
+class concurrent_queue_iterator: public concurrent_queue_iterator_base,
+        public std::iterator<std::forward_iterator_tag,Value> {
+#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)
+    template<typename T, class A>
+    friend class ::tbb::concurrent_bounded_queue;
+
+    template<typename T, class A>
+    friend class ::tbb::deprecated::concurrent_queue;
+#else
+public: // workaround for MSVC
+#endif 
+    //! Construct iterator pointing to head of queue.
+    concurrent_queue_iterator( const concurrent_queue_base_v3& queue ) :
+        concurrent_queue_iterator_base_v3(queue)
+    {
+    }
+
+public:
+    concurrent_queue_iterator() {}
+
+    /** If Value==Container::value_type, then this routine is the copy constructor. 
+        If Value==const Container::value_type, then this routine is a conversion constructor. */
+    concurrent_queue_iterator( const concurrent_queue_iterator<Container,typename Container::value_type>& other ) :
+        concurrent_queue_iterator_base_v3(other)
+    {}
+
+    //! Iterator assignment
+    concurrent_queue_iterator& operator=( const concurrent_queue_iterator& other ) {
+        assign(other);
+        return *this;
+    }
+
+    //! Reference to current item 
+    Value& operator*() const {
+        return *static_cast<Value*>(my_item);
+    }
+
+    Value* operator->() const {return &operator*();}
+
+    //! Advance to next item in queue
+    concurrent_queue_iterator& operator++() {
+        advance();
+        return *this;
+    }
+
+    //! Post increment
+    Value* operator++(int) {
+        Value* result = &operator*();
+        operator++();
+        return result;
+    }
+}; // concurrent_queue_iterator
+
+
+template<typename C, typename T, typename U>
+bool operator==( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j ) {
+    return i.my_item==j.my_item;
+}
+
+template<typename C, typename T, typename U>
+bool operator!=( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j ) {
+    return i.my_item!=j.my_item;
+}
+
+} // namespace internal;
+
+//! @endcond
+
+} // namespace tbb
+
+#endif /* __TBB_concurrent_queue_internal_H */
diff --git a/include/tbb/atomic.h b/include/tbb/atomic.h
index 3ff9050..8f3517f 100644
--- a/include/tbb/atomic.h
+++ b/include/tbb/atomic.h
@@ -61,20 +61,6 @@ enum memory_semantics {
 //! @cond INTERNAL
 namespace internal {
 
-template<size_t Size, memory_semantics M>
-struct atomic_traits {       // Primary template
-};
-
-template<size_t Size>
-struct atomic_word {             // Primary template
-    typedef intptr word;
-};
-
-template<typename I>            // Primary template
-struct atomic_base {
-    I my_value;
-};
-
 #if __GNUC__ || __SUNPRO_CC
 #define __TBB_DECL_ATOMIC_FIELD(t,f,a) t f  __attribute__ ((aligned(a)));
 #elif defined(__INTEL_COMPILER)||_MSC_VER >= 1300
@@ -83,42 +69,41 @@ struct atomic_base {
 #error Do not know syntax for forcing alignment.
 #endif /* __GNUC__ */
 
-template<>
-struct atomic_word<8> {          // Specialization
-    typedef int64_t word;
-};
+template<size_t S>
+struct atomic_rep;           // Primary template declared, but never defined.
 
-#if _WIN32 && __TBB_x86_64
-// ATTENTION: On 64-bit Windows, we currently have to specialize atomic_word
-// for every size to avoid type conversion warnings
-// See declarations of atomic primitives in machine/windows_em64t.h
 template<>
-struct atomic_word<1> {          // Specialization
+struct atomic_rep<1> {       // Specialization
     typedef int8_t word;
+    int8_t value;
 };
 template<>
-struct atomic_word<2> {          // Specialization
+struct atomic_rep<2> {       // Specialization
     typedef int16_t word;
+    __TBB_DECL_ATOMIC_FIELD(int16_t,value,2)
 };
 template<>
-struct atomic_word<4> {          // Specialization
+struct atomic_rep<4> {       // Specialization
+#if _MSC_VER && __TBB_WORDSIZE==4
+    // Work-around that avoids spurious /Wp64 warnings
+    typedef intptr_t word;
+#else
     typedef int32_t word;
-};
 #endif
-
-template<>
-struct atomic_base<uint64_t> {   // Specialization
-    __TBB_DECL_ATOMIC_FIELD(uint64_t,my_value,8)
+    __TBB_DECL_ATOMIC_FIELD(int32_t,value,4)
 };
-
 template<>
-struct atomic_base<int64_t> {    // Specialization
-    __TBB_DECL_ATOMIC_FIELD(int64_t,my_value,8)
+struct atomic_rep<8> {       // Specialization
+    typedef int64_t word;
+    __TBB_DECL_ATOMIC_FIELD(int64_t,value,8)
 };
 
+template<size_t Size, memory_semantics M>
+struct atomic_traits;        // Primary template declared, but not defined.
+
 #define __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(S,M)                         \
     template<> struct atomic_traits<S,M> {                               \
-        typedef atomic_word<S>::word word;                               \
+        typedef atomic_rep<S>::word word;                               \
         inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\
             return __TBB_CompareAndSwap##S##M(location,new_value,comparand);    \
         }                                                                       \
@@ -133,7 +118,7 @@ struct atomic_base<int64_t> {    // Specialization
 #define __TBB_DECL_ATOMIC_PRIMITIVES(S)                                  \
     template<memory_semantics M>                                         \
     struct atomic_traits<S,M> {                                          \
-        typedef atomic_word<S>::word word;                               \
+        typedef atomic_rep<S>::word word;                               \
         inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\
             return __TBB_CompareAndSwap##S(location,new_value,comparand);       \
         }                                                                       \
@@ -170,20 +155,74 @@ __TBB_DECL_ATOMIC_PRIMITIVES(8)
     The baroque expression below avoids all the warnings (we hope). */
 #define __TBB_MINUS_ONE(T) (T(T(0)-T(1)))
 
-//! Base class that provides basic functionality for atomic<T>.
+//! Base class that provides basic functionality for atomic<T> without fetch_and_add.
+/** Works for any type T that has the same size as an integral type, has a trivial constructor/destructor, 
+    and can be copied/compared by memcpy/memcmp. */
+template<typename T>
+struct atomic_impl {
+protected:
+    atomic_rep<sizeof(T)> rep;
+private:
+    //! Union type used to convert type T to underlying integral type.
+    union converter {
+        T value;
+        typename atomic_rep<sizeof(T)>::word bits;
+    };
+public:
+    typedef T value_type;
+
+    template<memory_semantics M>
+    value_type fetch_and_store( value_type value ) {
+        converter u, w;
+        u.value = value;
+        w.bits = internal::atomic_traits<sizeof(value_type),M>::fetch_and_store(&rep.value,u.bits);
+        return w.value;
+    }
+
+    value_type fetch_and_store( value_type value ) {
+        return fetch_and_store<__TBB_full_fence>(value);
+    }
+
+    template<memory_semantics M>
+    value_type compare_and_swap( value_type value, value_type comparand ) {
+        converter u, v, w;
+        u.value = value;
+        v.value = comparand;
+        w.bits = internal::atomic_traits<sizeof(value_type),M>::compare_and_swap(&rep.value,u.bits,v.bits);
+        return w.value;
+    }
+
+    value_type compare_and_swap( value_type value, value_type comparand ) {
+        return compare_and_swap<__TBB_full_fence>(value,comparand);
+    }
+
+    operator value_type() const volatile {                // volatile qualifier here for backwards compatibility 
+        converter w;
+        w.bits = __TBB_load_with_acquire( rep.value );
+        return w.value;
+    }
+
+protected:
+    value_type store_with_release( value_type rhs ) {
+        converter u;
+        u.value = rhs;
+        __TBB_store_with_release(rep.value,u.bits);
+        return rhs;
+    }
+};
+
+//! Base class that provides basic functionality for atomic<T> with fetch_and_add.
 /** I is the underlying type.
     D is the difference type.
     StepType should be char if I is an integral type, and T if I is a T*. */
 template<typename I, typename D, typename StepType>
-struct atomic_impl: private atomic_base<I> {
-private:
-    typedef typename atomic_word<sizeof(I)>::word word;
+struct atomic_impl_with_arithmetic: atomic_impl<I> {
 public:
     typedef I value_type;
 
     template<memory_semantics M>
     value_type fetch_and_add( D addend ) {
-        return value_type(internal::atomic_traits<sizeof(value_type),M>::fetch_and_add( &this->my_value, addend*sizeof(StepType) ));
+        return value_type(internal::atomic_traits<sizeof(value_type),M>::fetch_and_add( &this->rep.value, addend*sizeof(StepType) ));
     }
 
     value_type fetch_and_add( D addend ) {
@@ -208,34 +247,6 @@ public:
         return fetch_and_add(__TBB_MINUS_ONE(D));
     }
 
-    template<memory_semantics M>
-    value_type fetch_and_store( value_type value ) {
-        return value_type(internal::atomic_traits<sizeof(value_type),M>::fetch_and_store(&this->my_value,word(value)));
-    }
-
-    value_type fetch_and_store( value_type value ) {
-        return fetch_and_store<__TBB_full_fence>(value);
-    }
-
-    template<memory_semantics M>
-    value_type compare_and_swap( value_type value, value_type comparand ) {
-        return value_type(internal::atomic_traits<sizeof(value_type),M>::compare_and_swap(&this->my_value,word(value),word(comparand)));
-    }
-
-    value_type compare_and_swap( value_type value, value_type comparand ) {
-        return compare_and_swap<__TBB_full_fence>(value,comparand);
-    }
-
-    operator value_type() const volatile {                // volatile qualifier here for backwards compatibility 
-        return __TBB_load_with_acquire( this->my_value );
-    }
-
-protected:
-    value_type store_with_release( value_type rhs ) {
-        __TBB_store_with_release(this->my_value,rhs);
-        return rhs;
-    }
-
 public:
     value_type operator+=( D addend ) {
         return fetch_and_add(addend)+addend;
@@ -269,24 +280,24 @@ public:
 #if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400
 
 template<>
-inline atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,char>::operator atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,char>::value_type() const volatile {
-    return __TBB_Load8(&this->my_value);
+inline atomic_impl<__TBB_LONG_LONG>::operator atomic_impl<__TBB_LONG_LONG>::value_type() const volatile {
+    return __TBB_Load8(&rep.value);
 }
 
 template<>
-inline atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,char>::operator atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,char>::value_type() const volatile {
-    return __TBB_Load8(&this->my_value);
+inline atomic_impl<unsigned __TBB_LONG_LONG>::operator atomic_impl<unsigned __TBB_LONG_LONG>::value_type() const volatile {
+    return __TBB_Load8(&rep.value);
 }
 
 template<>
-inline atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,char>::value_type atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,char>::store_with_release( value_type rhs ) {
-    __TBB_Store8(&this->my_value,rhs);
+inline atomic_impl<__TBB_LONG_LONG>::value_type atomic_impl<__TBB_LONG_LONG>::store_with_release( value_type rhs ) {
+    __TBB_Store8(&rep.value,rhs);
     return rhs;
 }
 
 template<>
-inline atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,char>::value_type atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,char>::store_with_release( value_type rhs ) {
-    __TBB_Store8(&this->my_value,rhs);
+inline atomic_impl<unsigned __TBB_LONG_LONG>::value_type atomic_impl<unsigned __TBB_LONG_LONG>::store_with_release( value_type rhs ) {
+    __TBB_Store8(&rep.value,rhs);
     return rhs;
 }
 
@@ -300,11 +311,16 @@ inline atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,char>::valu
 /** See the Reference for details.
     @ingroup synchronization */
 template<typename T>
-struct atomic {
+struct atomic: internal::atomic_impl<T> {
+    T operator=( T rhs ) {
+        // "this" required here in strict ISO C++ because store_with_release is a dependent name
+        return this->store_with_release(rhs);
+    }
+    atomic<T>& operator=( const atomic<T>& rhs ) {this->store_with_release(rhs); return *this;}
 };
 
 #define __TBB_DECL_ATOMIC(T) \
-    template<> struct atomic<T>: internal::atomic_impl<T,T,char> {  \
+    template<> struct atomic<T>: internal::atomic_impl_with_arithmetic<T,T,char> {  \
         T operator=( T rhs ) {return store_with_release(rhs);}  \
         atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;}  \
     };
@@ -326,7 +342,7 @@ __TBB_DECL_ATOMIC(unsigned long)
    type synonyms on the platform.  Type U should be the wider variant of T from the
    perspective of /Wp64. */
 #define __TBB_DECL_ATOMIC_ALT(T,U) \
-    template<> struct atomic<T>: internal::atomic_impl<T,T,char> {  \
+    template<> struct atomic<T>: internal::atomic_impl_with_arithmetic<T,T,char> {  \
         T operator=( U rhs ) {return store_with_release(T(rhs));}  \
         atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;}  \
     };
@@ -347,95 +363,28 @@ __TBB_DECL_ATOMIC(unsigned char)
 __TBB_DECL_ATOMIC(wchar_t)
 #endif /* _MSC_VER||!defined(_NATIVE_WCHAR_T_DEFINED) */
 
-template<typename T> struct atomic<T*>: internal::atomic_impl<T*,ptrdiff_t,T> {
+//! Specialization for atomic<T*> with arithmetic and operator->.
+template<typename T> struct atomic<T*>: internal::atomic_impl_with_arithmetic<T*,ptrdiff_t,T> {
     T* operator=( T* rhs ) {
         // "this" required here in strict ISO C++ because store_with_release is a dependent name
         return this->store_with_release(rhs);
     }
-    atomic<T*>& operator=( const atomic<T*>& rhs ) {this->store_with_release(rhs); return *this;}
+    atomic<T*>& operator=( const atomic<T*>& rhs ) {
+        this->store_with_release(rhs); return *this;
+    }
     T* operator->() const {
         return (*this);
     }
 };
 
-template<>
-struct atomic<void*> {
-private:
-    void* my_value;
-
-public:
-    typedef void* value_type;
-
-    template<memory_semantics M>
-    value_type compare_and_swap( value_type value, value_type comparand ) {
-        return value_type(internal::atomic_traits<sizeof(value_type),M>::compare_and_swap(&my_value,internal::intptr(value),internal::intptr(comparand)));
-    }
-
-    value_type compare_and_swap( value_type value, value_type comparand ) {
-        return compare_and_swap<__TBB_full_fence>(value,comparand);
-    }
-
-    template<memory_semantics M>
-    value_type fetch_and_store( value_type value ) {
-        return value_type(internal::atomic_traits<sizeof(value_type),M>::fetch_and_store(&my_value,internal::intptr(value)));
-    }
-
-    value_type fetch_and_store( value_type value ) {
-        return fetch_and_store<__TBB_full_fence>(value);
-    }
-
-    operator value_type() const {
-        return __TBB_load_with_acquire(my_value);
-    }
-
-    value_type operator=( value_type rhs ) {
-        __TBB_store_with_release(my_value,rhs);
-        return rhs;
+//! Specialization for atomic<void*>, for sake of not allowing arithmetic or operator->.
+template<> struct atomic<void*>: internal::atomic_impl<void*> {
+    void* operator=( void* rhs ) {
+        // "this" required here in strict ISO C++ because store_with_release is a dependent name
+        return this->store_with_release(rhs);
     }
-
     atomic<void*>& operator=( const atomic<void*>& rhs ) {
-        __TBB_store_with_release(my_value,rhs);
-        return *this;
-    }
-};
-
-template<>
-struct atomic<bool> {
-private:
-    bool my_value;
-    typedef internal::atomic_word<sizeof(bool)>::word word;
-public:
-    typedef bool value_type;
-    template<memory_semantics M>
-    value_type compare_and_swap( value_type value, value_type comparand ) {
-        return internal::atomic_traits<sizeof(value_type),M>::compare_and_swap(&my_value,word(value),word(comparand))!=0;
-    }
-
-    value_type compare_and_swap( value_type value, value_type comparand ) {
-        return compare_and_swap<__TBB_full_fence>(value,comparand);
-    }
-
-    template<memory_semantics M>
-    value_type fetch_and_store( value_type value ) {
-        return internal::atomic_traits<sizeof(value_type),M>::fetch_and_store(&my_value,word(value))!=0;
-    }
-
-    value_type fetch_and_store( value_type value ) {
-        return fetch_and_store<__TBB_full_fence>(value);
-    }
-
-    operator value_type() const {
-        return __TBB_load_with_acquire(my_value);
-    }
-
-    value_type operator=( value_type rhs ) {
-        __TBB_store_with_release(my_value,rhs);
-        return rhs;
-    }
-
-    atomic<bool>& operator=( const atomic<bool>& rhs ) {
-        __TBB_store_with_release(my_value,rhs);
-        return *this;
+        this->store_with_release(rhs); return *this;
     }
 };
 
diff --git a/src/test/test_cache_aligned_allocator_STL.cpp b/include/tbb/combinable.h
similarity index 52%
copy from src/test/test_cache_aligned_allocator_STL.cpp
copy to include/tbb/combinable.h
index abf33db..9122ffa 100644
--- a/src/test/test_cache_aligned_allocator_STL.cpp
+++ b/include/tbb/combinable.h
@@ -26,18 +26,53 @@
     the GNU General Public License.
 */
 
-// Test whether cache_aligned_allocator works with some of the host's STL containers.
+#ifndef __TBB_combinable_H
+#define __TBB_combinable_H
 
+#include "tbb/enumerable_thread_specific.h"
 #include "tbb/cache_aligned_allocator.h"
-#include "tbb/tbb_allocator.h"
 
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "test_allocator_STL.h"
+namespace tbb {
+/** \name combinable
+    **/
+//@{
+//! Thread-local storage with optional reduction
+/** @ingroup containers */
+    template <typename T>
+        class combinable {
+    private:
+        typedef typename tbb::cache_aligned_allocator<T> my_alloc;
 
-int main() {
-    TestAllocatorWithSTL<tbb::cache_aligned_allocator>();
-    TestAllocatorWithSTL<tbb::tbb_allocator>();
-    printf("done\n");
-    return 0;
-}
+        typedef typename tbb::enumerable_thread_specific<T, my_alloc, ets_no_key> my_ets_type;
+        my_ets_type my_ets; 
+ 
+    public:
 
+        combinable() { }
+
+        template <typename finit>
+        combinable( finit _finit) : my_ets(_finit) { }
+
+        //! destructor
+        ~combinable() { 
+        }
+
+        combinable(const combinable& other) : my_ets(other.my_ets) { }
+
+        combinable & operator=( const combinable & other) { my_ets = other.my_ets; return *this; }
+
+        void clear() { my_ets.clear(); }
+
+        T& local() { return my_ets.local(); }
+
+        T& local(bool & exists) { return my_ets.local(exists); }
+
+        template< typename FCombine>
+        T combine(FCombine fcombine) { return my_ets.combine(fcombine); }
+
+        template<typename FCombine>
+        void combine_each(FCombine fcombine) { my_ets.combine_each(fcombine); }
+
+    };
+} // namespace tbb
+#endif /* __TBB_combinable_H */
diff --git a/src/tbb/concurrent_hash_map.cpp b/include/tbb/compat/ppl.h
similarity index 68%
copy from src/tbb/concurrent_hash_map.cpp
copy to include/tbb/compat/ppl.h
index 4d476c6..624168e 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/include/tbb/compat/ppl.h
@@ -26,20 +26,32 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#ifndef __TBB_compat_ppl_H
+#define __TBB_compat_ppl_H
 
-namespace tbb {
+#include "../task_group.h"
+#include "../parallel_invoke.h"
+#include "../parallel_for_each.h"
+#include "../parallel_for.h"
 
-namespace internal {
+namespace Concurrency {
 
-bool hash_map_segment_base::internal_grow_predicate() const {
-    // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the 
-    // library so that Intel(R) Thread Checker will ignore them.  The reads are used in a double-check
-    // context, so the program is nonetheless correct despite the race.
-    return my_logical_size >= my_physical_size && my_physical_size < internal::hash_map_base::max_physical_size;
-}
+    using tbb::task_handle;
+    using tbb::task_group_status;
+    using tbb::task_group;
+    using tbb::structured_task_group;
+    using tbb::missing_wait;
 
-} // namespace internal
+    using tbb::not_complete;
+    using tbb::complete;
+    using tbb::canceled;
 
-} // namespace tbb
+    using tbb::is_current_task_group_canceling;
 
+    using tbb::parallel_invoke;
+    using tbb::strict_ppl::parallel_for;
+    using tbb::parallel_for_each;
+
+} // namespace Concurrency
+
+#endif /* __TBB_compat_ppl_H */
diff --git a/include/tbb/concurrent_hash_map.h b/include/tbb/concurrent_hash_map.h
index 64945d0..44e28be 100644
--- a/include/tbb/concurrent_hash_map.h
+++ b/include/tbb/concurrent_hash_map.h
@@ -39,6 +39,7 @@
 #include "tbb_allocator.h"
 #include "spin_rw_mutex.h"
 #include "atomic.h"
+#include "aligned_space.h"
 #if TBB_USE_PERFORMANCE_WARNINGS
 #include <typeinfo>
 #endif
@@ -51,45 +52,233 @@ class concurrent_hash_map;
 
 //! @cond INTERNAL
 namespace internal {
+    //! ITT instrumented routine that loads pointer from location pointed to by src.
+    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 );
+
     //! Type of a hash code.
     typedef size_t hashcode_t;
     //! base class of concurrent_hash_map
     class hash_map_base {
     public:
-        // Mutex types for each layer of the container
-        typedef spin_rw_mutex node_mutex_t;
-        typedef spin_rw_mutex chain_mutex_t;
-        typedef spin_rw_mutex segment_mutex_t;
-
+        //! Size type
+        typedef size_t size_type;
         //! Type of a hash code.
-        typedef internal::hashcode_t hashcode_t;
-        //! Log2 of n_segment
-        static const size_t n_segment_bits = 6;
-        //! Number of segments 
-        static const size_t n_segment = size_t(1)<<n_segment_bits; 
-        //! Maximum size of array of chains
-        static const size_t max_physical_size = size_t(1)<<(8*sizeof(hashcode_t)-n_segment_bits);
-    };
+        typedef size_t hashcode_t;
+        //! 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)
+        //! Bucket type
+        struct bucket : no_copy {
+            //! Mutex type for buckets
+            typedef spin_rw_mutex mutex_t;
+            //! Scoped lock type for mutex
+            typedef mutex_t::scoped_lock scoped_t;
+            mutex_t mutex;
+            node_base *node_list;
+        };
+        //! Count of segments in the first block
+        static size_type const embedded_block = 1;
+        //! Count of segments in the first block
+        static size_type const embedded_buckets = 1<<embedded_block;
+        //! Count of segments in the first block
+        static size_type const first_block = 8; //including embedded_block. perfect with bucket size 16, so the allocations are power of 4096
+        //! Size of a pointer / table size
+        static size_type const pointers_per_table = sizeof(segment_index_t) * 8; // one segment per bit
+        //! Segment pointer
+        typedef bucket *segment_ptr_t;
+        //! Segment pointers table type
+        typedef segment_ptr_t segments_table_t[pointers_per_table];
+        //! Hash mask = sum of allocated segments sizes - 1
+        atomic<hashcode_t> my_mask;
+        //! Segment pointers table. Also prevents false sharing between my_mask and my_size
+        segments_table_t my_table;
+        //! Size of container in stored items
+        atomic<size_type> my_size; // It must be in separate cache line from my_mask due to performance effects
+        //! Zero segment
+        bucket my_embedded_segment[embedded_buckets];
+
+        //! Constructor
+        hash_map_base() {
+            std::memset( this, 0, pointers_per_table*sizeof(segment_ptr_t) // 32*4=128   or 64*8=512
+                + sizeof(my_size) + sizeof(my_mask)  // 4+4 or 8+8
+                + embedded_buckets*sizeof(bucket) ); // n*8 or n*16
+            for( size_type i = 0; i < embedded_block; i++ ) // fill the table
+                my_table[i] = my_embedded_segment + segment_base(i);
+            my_mask = embedded_buckets - 1;
+            __TBB_ASSERT( embedded_block <= first_block, "The first block number must include embedded blocks");
+        }
 
-    template<typename Iterator>
-    class hash_map_range;
+        //! @return segment index of given index in the array
+        static segment_index_t segment_index_of( size_type index ) {
+            return segment_index_t( __TBB_Log2( index|1 ) );
+        }
+
+        //! @return the first array index of given segment
+        static segment_index_t segment_base( segment_index_t k ) {
+            return (segment_index_t(1)<<k & ~segment_index_t(1));
+        }
+
+        //! @return segment size except for @arg k == 0
+        static size_type segment_size( segment_index_t k ) {
+            return size_type(1)<<k; // fake value for k==0
+        }
+        
+        //! @return true if @arg ptr is valid pointer
+        static bool is_valid( void *ptr ) {
+            return ptr > reinterpret_cast<void*>(1);
+        }
 
-    struct hash_map_segment_base {
-        //! Mutex that protects this segment
-        hash_map_base::segment_mutex_t my_mutex;
+        //! Initialize buckets
+        static void init_buckets( segment_ptr_t ptr, size_type sz, bool is_initial ) {
+            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;
+                }
+        }
+        
+        //! Add node @arg n to bucket @arg b
+        static void add_to_bucket( bucket *b, node_base *n ) {
+            n->next = b->node_list;
+            b->node_list = n; // its under lock and flag is set
+        }
 
-        // Number of nodes
-        atomic<size_t> my_logical_size;
+        //! Exception safety helper
+        struct enable_segment_failsafe {
+            segment_ptr_t *my_segment_ptr;
+            enable_segment_failsafe(segments_table_t &table, segment_index_t k) : my_segment_ptr(&table[k]) {}
+            ~enable_segment_failsafe() {
+                if( my_segment_ptr ) *my_segment_ptr = 0; // indicate no allocation in progress
+            }
+        };
+
+        //! Enable segment
+        void enable_segment( segment_index_t k, bool is_initial = false ) {
+            __TBB_ASSERT( k, "Zero segment must be embedded" );
+            enable_segment_failsafe watchdog( my_table, k );
+            cache_aligned_allocator<bucket> alloc;
+            size_type sz;
+            __TBB_ASSERT( !is_valid(my_table[k]), "Wrong concurrent assignment");
+            if( k >= first_block ) {
+                sz = segment_size( k );
+                segment_ptr_t ptr = alloc.allocate( sz );
+                init_buckets( ptr, sz, is_initial );
+#if TBB_USE_THREADING_TOOLS
+                itt_store_pointer_with_release_v3( my_table + k, ptr );
+#else
+                my_table[k] = ptr;// my_mask has release fence
+#endif
+                sz <<= 1;// double it to get entire capacity of the container
+            } else { // the first block
+                __TBB_ASSERT( k == embedded_block, "Wrong segment index" );
+                sz = segment_size( first_block );
+                segment_ptr_t ptr = alloc.allocate( sz - embedded_buckets );
+                init_buckets( ptr, sz - embedded_buckets, is_initial );
+                ptr -= segment_base(embedded_block);
+                for(segment_index_t i = embedded_block; i < first_block; i++) // calc the offsets
+#if TBB_USE_THREADING_TOOLS
+                    itt_store_pointer_with_release_v3( my_table + i, ptr + segment_base(i) );
+#else
+                    my_table[i] = ptr + segment_base(i);
+#endif
+            }
+#if TBB_USE_THREADING_TOOLS
+            itt_store_pointer_with_release_v3( &my_mask, (void*)(sz-1) );
+#else
+            my_mask = sz - 1;
+#endif
+            watchdog.my_segment_ptr = 0;
+        }
 
-        // Size of chains
-        /** Always zero or a power of two */
-        size_t my_physical_size;
+        //! Get bucket by (masked) hashcode
+        bucket *get_bucket( hashcode_t h ) const throw() { // TODO: add throw() everywhere?
+            segment_index_t s = segment_index_of( h );
+            h -= segment_base(s);
+            segment_ptr_t seg = my_table[s];
+            __TBB_ASSERT( is_valid(seg), "hashcode must be cut by valid mask for allocated segments" );
+            return &seg[h];
+        }
 
-        //! True if my_logical_size>=my_physical_size.
-        /** Used to support Intel(R) Thread Checker. */
-        bool __TBB_EXPORTED_METHOD internal_grow_predicate() const;
+        //! Check for mask race
+        // Splitting into two functions should help inlining
+        inline bool check_mask_race( const hashcode_t h, hashcode_t &m ) const {
+            hashcode_t m_now, m_old = m;
+#if TBB_USE_THREADING_TOOLS
+            m_now = (hashcode_t) itt_load_pointer_with_acquire_v3( &my_mask );
+#else
+            m_now = my_mask;
+#endif
+            if( m_old != m_now )
+                return check_rehashing_collision( h, m_old, m = m_now );
+            return false;
+        }
+
+        //! Process mask race, check for rehashing collision
+        bool check_rehashing_collision( const hashcode_t h, hashcode_t m_old, hashcode_t m ) const {
+            __TBB_ASSERT(m_old != m, NULL); // TODO?: m arg could be optimized out by passing h = h&m
+            if( (h & m_old) != (h & m) ) { // mask changed for this hashcode, rare event
+                // condition above proves that 'h' has some other bits set beside 'm_old'
+                // find next applicable mask after m_old    //TODO: look at bsl instruction
+                for( ++m_old; !(h & m_old); m_old <<= 1 ); // at maximum few rounds depending on the first block size
+                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 )
+                    return true;
+            }
+            return false;
+        }
+
+        //! Insert a node and check for load factor. @return segment index to enable.
+        segment_index_t insert_new_node( bucket *b, node_base *n, hashcode_t mask ) {
+            size_type sz = ++my_size; // prefix form is to enforce allocation after the first item inserted
+            add_to_bucket( b, n );
+            // check load factor
+            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 )
+                    return new_seg; // The value must be processed
+            }
+            return 0;
+        }
+
+        //! Prepare enough segments for number of buckets
+        void reserve(size_type buckets) {
+            if( !buckets-- ) return;
+            bool is_initial = !my_size;
+            for( size_type m = my_mask; buckets > m; m = my_mask )
+                enable_segment( segment_index_of( m+1 ), is_initial );
+        }
+        //! Swap hash_map_bases
+        void internal_swap(hash_map_base &table) {
+            std::swap(this->my_mask, table.my_mask);
+            std::swap(this->my_size, table.my_size);
+            for(size_type i = 0; i < embedded_buckets; i++)
+                std::swap(this->my_embedded_segment[i].node_list, table.my_embedded_segment[i].node_list);
+            for(size_type i = embedded_block; i < pointers_per_table; i++)
+                std::swap(this->my_table[i], table.my_table[i]);
+        }
     };
 
+    template<typename Iterator>
+    class hash_map_range;
+
     //! Meets requirements of a forward iterator for STL */
     /** Value is either the T or const T type of the container.
         @ingroup containers */ 
@@ -97,21 +286,10 @@ namespace internal {
     class hash_map_iterator
         : public std::iterator<std::forward_iterator_tag,Value>
     {
+        typedef Container map_type;
         typedef typename Container::node node;
-        typedef typename Container::chain chain;
-        typedef typename Container::segment segment;
-
-        //! concurrent_hash_map over which we are iterating.
-        Container* my_table;
-
-        //! Pointer to node that has current item
-        node* my_node;
-
-        //! Index into hash table's array for current item
-        size_t my_array_index;
-
-        //! Index of segment that has array for current item
-        size_t my_segment_index;
+        typedef hash_map_base::node_base node_base;
+        typedef hash_map_base::bucket bucket;
 
         template<typename C, typename T, typename U>
         friend bool operator==( const hash_map_iterator<C,T>& i, const hash_map_iterator<C,U>& j );
@@ -128,19 +306,20 @@ namespace internal {
         template<typename I>
         friend class internal::hash_map_range;
 
-        void advance_to_next_node() {
-            size_t i = my_array_index+1;
-            do {
-                segment &s = my_table->my_segment[my_segment_index];
-                while( i<s.my_physical_size ) {
-                    my_node = s.my_array[i].node_list;
-                    if( my_node ) goto done;
-                    ++i;
+        void advance_to_next_bucket() { // TODO?: refactor to iterator_base class
+            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
+                    ++my_bucket;
+                else my_bucket = my_map->get_bucket( k );
+                my_node = static_cast<node*>( my_bucket->node_list );
+                if( hash_map_base::is_valid(my_node) ) {
+                    my_index = k; return;
                 }
-                i = 0;
-            } while( ++my_segment_index<my_table->n_segment );
-        done:
-            my_array_index = i;
+                ++k;
+            }
+            my_bucket = 0; my_node = 0; my_index = k; // the end
         }
 #if !defined(_MSC_VER) || defined(__INTEL_COMPILER)
         template<typename Key, typename T, typename HashCompare, typename A>
@@ -148,18 +327,31 @@ namespace internal {
 #else
     public: // workaround
 #endif
-        hash_map_iterator( const Container& table, size_t segment_index, size_t array_index=0, node* b=NULL );
+        //! concurrent_hash_map over which we are iterating.
+        const Container *my_map;
+
+        //! Index in hash table for current item
+        size_t my_index;
+
+        //! Pointer to bucket
+        const bucket *my_bucket;
+
+        //! Pointer to node that has current item
+        node *my_node;
+
+        hash_map_iterator( const Container &map, size_t index, const bucket *b, node_base *n );
+
     public:
         //! Construct undefined iterator
         hash_map_iterator() {}
-        hash_map_iterator( const hash_map_iterator<Container,typename Container::value_type>& other ) :
-            my_table(other.my_table),
-            my_node(other.my_node),
-            my_array_index(other.my_array_index),
-            my_segment_index(other.my_segment_index)
+        hash_map_iterator( const hash_map_iterator<Container,typename Container::value_type> &other ) :
+            my_map(other.my_map),
+            my_index(other.my_index),
+            my_bucket(other.my_bucket),
+            my_node(other.my_node)
         {}
         Value& operator*() const {
-            __TBB_ASSERT( my_node, "iterator uninitialized or at end of container?" );
+            __TBB_ASSERT( hash_map_base::is_valid(my_node), "iterator uninitialized or at end of container?" );
             return my_node->item;
         }
         Value* operator->() const {return &operator*();}
@@ -174,45 +366,38 @@ namespace internal {
     };
 
     template<typename Container, typename Value>
-    hash_map_iterator<Container,Value>::hash_map_iterator( const Container& table, size_t segment_index, size_t array_index, node* b ) : 
-        my_table(const_cast<Container*>(&table)),
-        my_node(b),
-        my_array_index(array_index),
-        my_segment_index(segment_index)
+    hash_map_iterator<Container,Value>::hash_map_iterator( const Container &map, size_t index, const bucket *b, node_base *n ) :
+        my_map(&map),
+        my_index(index),
+        my_bucket(b),
+        my_node( static_cast<node*>(n) )
     {
-        if( segment_index<my_table->n_segment ) {
-            if( !my_node ) {
-                segment &s = my_table->my_segment[segment_index];
-                chain* first_chain = s.my_array;
-                if( first_chain && my_array_index < s.my_physical_size)
-                    my_node = first_chain[my_array_index].node_list;
-            }
-            if( !my_node ) advance_to_next_node();
-        }
+        if( b && !hash_map_base::is_valid(n) )
+            advance_to_next_bucket();
     }
 
     template<typename Container, typename Value>
     hash_map_iterator<Container,Value>& hash_map_iterator<Container,Value>::operator++() {
-        my_node=my_node->next;
-        if( !my_node ) advance_to_next_node();
+        my_node = static_cast<node*>( my_node->next );
+        if( !my_node ) advance_to_next_bucket();
         return *this;
     }
 
     template<typename Container, typename T, typename U>
     bool operator==( const hash_map_iterator<Container,T>& i, const hash_map_iterator<Container,U>& j ) {
-        return i.my_node==j.my_node;
+        return i.my_node == j.my_node && i.my_map == j.my_map;
     }
 
     template<typename Container, typename T, typename U>
     bool operator!=( const hash_map_iterator<Container,T>& i, const hash_map_iterator<Container,U>& j ) {
-        return i.my_node!=j.my_node;
+        return i.my_node != j.my_node || i.my_map != j.my_map;
     }
 
     //! Range class used with concurrent_hash_map
     /** @ingroup containers */ 
     template<typename Iterator>
     class hash_map_range {
-    private:
+        typedef typename Iterator::map_type map_type;
         Iterator my_begin;
         Iterator my_end;
         mutable Iterator my_midpoint;
@@ -241,8 +426,8 @@ namespace internal {
             my_grainsize(r.my_grainsize)
         {
             r.my_end = my_begin = r.my_midpoint;
-            __TBB_ASSERT( my_begin!=my_end, "Splitting despite the range is not divisible" );
-            __TBB_ASSERT( r.my_begin!=r.my_end, "Splitting despite the range is not divisible" );
+            __TBB_ASSERT( !empty(), "Splitting despite the range is not divisible" );
+            __TBB_ASSERT( !r.empty(), "Splitting despite the range is not divisible" );
             set_midpoint();
             r.set_midpoint();
         }
@@ -254,15 +439,28 @@ namespace internal {
             my_midpoint(r.my_midpoint),
             my_grainsize(r.my_grainsize)
         {}
+#if TBB_DEPRECATED
         //! Init range with iterators and grainsize specified
         hash_map_range( const Iterator& begin_, const Iterator& end_, size_type grainsize = 1 ) : 
             my_begin(begin_), 
-            my_end(end_), 
-            my_grainsize(grainsize) 
+            my_end(end_),
+            my_grainsize(grainsize)
         {
+            if(!my_end.my_index && !my_end.my_bucket) // end
+                my_end.my_index = my_end.my_map->my_mask + 1;
             set_midpoint();
             __TBB_ASSERT( grainsize>0, "grainsize must be positive" );
         }
+#endif
+        //! Init range with container and grainsize specified
+        hash_map_range( const map_type &map, size_type grainsize = 1 ) : 
+            my_begin( Iterator( map, 0, map.my_embedded_segment, map.my_embedded_segment->node_list ) ),
+            my_end( Iterator( map, map.my_mask + 1, 0, 0 ) ),
+            my_grainsize( grainsize )
+        {
+            __TBB_ASSERT( grainsize>0, "grainsize must be positive" );
+            set_midpoint();
+        }
         const Iterator& begin() const {return my_begin;}
         const Iterator& end() const {return my_end;}
         //! The grain size for this range.
@@ -271,61 +469,53 @@ namespace internal {
 
     template<typename Iterator>
     void hash_map_range<Iterator>::set_midpoint() const {
-        size_t n = my_end.my_segment_index - my_begin.my_segment_index;
-        if( n > 1 || (n == 1 && my_end.my_array_index > my_grainsize/2) ) {
-            // Split by groups of segments
-            my_midpoint = Iterator(*my_begin.my_table,(my_end.my_segment_index+my_begin.my_segment_index+1)/2u);
+        // Split by groups of nodes
+        size_t m = my_end.my_index-my_begin.my_index;
+        if( m > my_grainsize ) {
+            m = my_begin.my_index + m/2u;
+            hash_map_base::bucket *b = my_begin.my_map->get_bucket(m);
+            my_midpoint = Iterator(*my_begin.my_map,m,b,b->node_list);
         } else {
-            // Split by groups of nodes
-            size_t m = my_end.my_array_index-my_begin.my_array_index;
-            if( n ) m += my_begin.my_table->my_segment[my_begin.my_segment_index].my_physical_size;
-            if( m > my_grainsize ) {
-                my_midpoint = Iterator(*my_begin.my_table,my_begin.my_segment_index,my_begin.my_array_index + m/2u);
-            } else {
-                my_midpoint = my_end;
-            }
+            my_midpoint = my_end;
         }
-        __TBB_ASSERT( my_begin.my_segment_index < my_midpoint.my_segment_index
-            || (my_begin.my_segment_index == my_midpoint.my_segment_index
-            && my_begin.my_array_index <= my_midpoint.my_array_index),
+        __TBB_ASSERT( my_begin.my_index <= my_midpoint.my_index,
             "my_begin is after my_midpoint" );
-        __TBB_ASSERT( my_midpoint.my_segment_index < my_end.my_segment_index
-            || (my_midpoint.my_segment_index == my_end.my_segment_index
-            && my_midpoint.my_array_index <= my_end.my_array_index),
+        __TBB_ASSERT( my_midpoint.my_index <= my_end.my_index,
             "my_midpoint is after my_end" );
         __TBB_ASSERT( my_begin != my_midpoint || my_begin == my_end,
             "[my_begin, my_midpoint) range should not be empty" );
     }
-    //! Hash multiplier
-    static const hashcode_t hash_multiplier = sizeof(hashcode_t)==4? 2654435769U : 11400714819323198485ULL;
-    //! Hasher functions
-    template<typename T>
-    inline static hashcode_t hasher( const T& t ) {
-        return static_cast<hashcode_t>( t ) * hash_multiplier;
-    }
-    template<typename P>
-    inline static hashcode_t hasher( P* ptr ) {
-        hashcode_t const h = reinterpret_cast<hashcode_t>( ptr );
-        return (h >> 3) ^ h;
-    }
-    template<typename E, typename S, typename A>
-    inline static hashcode_t hasher( const std::basic_string<E,S,A>& s ) {
-        hashcode_t h = 0;
-        for( const E* c = s.c_str(); *c; c++ )
-            h = static_cast<hashcode_t>(*c) ^ (h * hash_multiplier);
-        return h;
-    }
-    template<typename F, typename S>
-    inline static hashcode_t hasher( const std::pair<F,S>& p ) {
-        return hasher(p.first) ^ hasher(p.second);
-    }
 } // namespace internal
 //! @endcond
 
+//! Hash multiplier
+static const size_t hash_multiplier = sizeof(size_t)==4? 2654435769U : 11400714819323198485ULL;
+//! Hasher functions
+template<typename T>
+inline static size_t tbb_hasher( const T& t ) {
+    return static_cast<size_t>( t ) * hash_multiplier;
+}
+template<typename P>
+inline static size_t tbb_hasher( P* ptr ) {
+    size_t const h = reinterpret_cast<size_t>( ptr );
+    return (h >> 3) ^ h;
+}
+template<typename E, typename S, typename A>
+inline static size_t tbb_hasher( const std::basic_string<E,S,A>& s ) {
+    size_t h = 0;
+    for( const E* c = s.c_str(); *c; c++ )
+        h = static_cast<size_t>(*c) ^ (h * hash_multiplier);
+    return h;
+}
+template<typename F, typename S>
+inline static size_t tbb_hasher( const std::pair<F,S>& p ) {
+    return tbb_hasher(p.first) ^ tbb_hasher(p.second);
+}
+
 //! hash_compare - default argument
 template<typename T>
 struct tbb_hash_compare {
-    static internal::hashcode_t hash( const T& t ) { return internal::hasher(t); }
+    static size_t hash( const T& t ) { return tbb_hasher(t); }
     static bool equal( const T& a, const T& b ) { return a == b; }
 };
 
@@ -340,6 +530,9 @@ struct tbb_hash_compare {
     - If exception happens during insert() operations, it has no effect (unless exception raised by HashCompare::hash() function during grow_segment).
     - If exception happens during operator=() operation, the container can have a part of source items, and methods size() and empty() can return wrong results.
 
+ at par Changes since TBB 2.1
+    - Replaced internal algorithm and data structure. Patent is pending.
+
 @par Changes since TBB 2.0
     - Fixed exception-safety
     - Added template argument for allocator
@@ -355,7 +548,7 @@ struct tbb_hash_compare {
     - Added global functions: operator==(), operator!=(), and swap() 
 
     @ingroup containers */
-template<typename Key, typename T, typename HashCompare, typename A>
+template<typename Key, typename T, typename HashCompare, typename Allocator>
 class concurrent_hash_map : protected internal::hash_map_base {
     template<typename Container, typename Value>
     friend class internal::hash_map_iterator;
@@ -363,19 +556,11 @@ class concurrent_hash_map : protected internal::hash_map_base {
     template<typename I>
     friend class internal::hash_map_range;
 
-    struct node;
-    friend struct node;
-    typedef typename A::template rebind<node>::other node_allocator_type;
-
 public:
-    class const_accessor;
-    friend class const_accessor;
-    class accessor;
-
     typedef Key key_type;
     typedef T mapped_type;
     typedef std::pair<const Key,T> value_type;
-    typedef size_t size_type;
+    typedef internal::hash_map_base::size_type size_type;
     typedef ptrdiff_t difference_type;
     typedef value_type *pointer;
     typedef const value_type *const_pointer;
@@ -385,17 +570,109 @@ public:
     typedef internal::hash_map_iterator<concurrent_hash_map,const value_type> const_iterator;
     typedef internal::hash_map_range<iterator> range_type;
     typedef internal::hash_map_range<const_iterator> const_range_type;
-    typedef A allocator_type;
+    typedef Allocator allocator_type;
+
+protected:
+    friend class const_accessor;
+    struct node;
+    typedef typename Allocator::template rebind<node>::other node_allocator_type;
+    node_allocator_type my_allocator;
+    HashCompare my_hash_compare;
 
+    struct node : public node_base {
+        value_type item;
+        node( const Key &key ) : item(key, T()) {}
+        node( const Key &key, const T &t ) : item(key, t) {}
+        // exception-safe allocation, see C++ Standard 2003, clause 5.3.4p17
+        void *operator new( size_t /*size*/, node_allocator_type &a ) {
+            void *ptr = a.allocate(1);
+            if(!ptr) throw std::bad_alloc();
+            return ptr;
+        }
+        // match placement-new form above to be called if exception thrown in constructor
+        void operator delete( void *ptr, node_allocator_type &a ) {return a.deallocate(static_cast<node*>(ptr),1); }
+    };
+
+    void delete_node( node_base *n ) {
+        my_allocator.destroy( static_cast<node*>(n) );
+        my_allocator.deallocate( static_cast<node*>(n), 1);
+    }
+
+    node *search_bucket( const key_type &key, bucket *b ) const {
+        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");
+        return n;
+    }
+
+    //! bucket accessor is to find, rehash, acquire a lock, and access a bucket
+    class bucket_accessor : public bucket::scoped_t {
+        bool my_is_writer; // TODO: use it from base type
+        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
+        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
+#else
+            if( __TBB_load_with_acquire(my_b->node_list) == __TBB_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
+                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);
+        }
+        //! check whether bucket is locked for write
+        bool is_writer() { return my_is_writer; }
+        //! get bucket pointer
+        bucket *operator() () { return my_b; }
+        // TODO: optimize out
+        bool upgrade_to_writer() { my_is_writer = true; return bucket::scoped_t::upgrade_to_writer(); }
+    };
+
+    // TODO refactor to hash_base
+    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
+        hashcode_t mask = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit
+
+        bucket_accessor b_old( this, h & mask );
+
+        mask = (mask<<1) | 1; // get full mask for new bucket
+        __TBB_ASSERT( (mask&(mask+1))==0 && (h & mask) == h, NULL );
+    restart:
+        for( node_base **p = &b_old()->node_list, *n = __TBB_load_with_acquire(*p); is_valid(n); n = *p ) {
+            hashcode_t c = my_hash_compare.hash( static_cast<node*>(n)->item.first );
+            if( (c & mask) == h ) {
+                if( !b_old.is_writer() )
+                    if( !b_old.upgrade_to_writer() ) {
+                        goto restart; // node ptr can be invalid due to concurrent erase
+                    }
+                *p = n->next; // exclude from b_old
+                add_to_bucket( b_new, n );
+            } else p = &n->next; // iterate to next item
+        }
+    }
+
+public:
+    
+    class accessor;
     //! Combines data access, locking, and garbage collection.
     class const_accessor {
-        friend class concurrent_hash_map<Key,T,HashCompare,A>;
+        friend class concurrent_hash_map<Key,T,HashCompare,Allocator>;
         friend class accessor;
-        void operator=( const accessor& ) const; // Deny access
-        const_accessor( const accessor& );       // Deny access
+        void operator=( const accessor & ) const; // Deny access
+        const_accessor( const accessor & );       // Deny access
     public:
         //! Type of value
-        typedef const std::pair<const Key,T> value_type;
+        typedef const typename concurrent_hash_map::value_type value_type;
 
         //! True if result is empty.
         bool empty() const {return !my_node;}
@@ -404,7 +681,7 @@ public:
         void release() {
             if( my_node ) {
                 my_lock.release();
-                my_node = NULL;
+                my_node = 0;
             }
         }
 
@@ -427,8 +704,8 @@ public:
             my_node = NULL; // my_lock.release() is called in scoped_lock destructor
         }
     private:
-        node* my_node;
-        node_mutex_t::scoped_lock my_lock;
+        node *my_node;
+        typename node::scoped_t my_lock;
         hashcode_t my_hash;
     };
 
@@ -436,7 +713,7 @@ public:
     class accessor: public const_accessor {
     public:
         //! Type of value
-        typedef std::pair<const Key,T> value_type;
+        typedef typename concurrent_hash_map::value_type value_type;
 
         //! Return reference to associated value in hash table.
         reference operator*() const {
@@ -447,22 +724,18 @@ public:
         //! Return pointer to associated value in hash table.
         pointer operator->() const {
             return &operator*();
-        }       
+        }
     };
 
     //! Construct empty table.
     concurrent_hash_map(const allocator_type &a = allocator_type())
         : my_allocator(a)
-
-    {
-        initialize();
-    }
+    {}
 
     //! Copy constructor
     concurrent_hash_map( const concurrent_hash_map& table, const allocator_type &a = allocator_type())
         : my_allocator(a)
     {
-        initialize();
         internal_copy(table);
     }
 
@@ -471,7 +744,7 @@ public:
     concurrent_hash_map(I first, I last, const allocator_type &a = allocator_type())
         : my_allocator(a)
     {
-        initialize();
+        reserve( std::distance(first, last) ); // TODO: load_factor?
         internal_copy(first, last);
     }
 
@@ -489,35 +762,33 @@ public:
     void clear();
 
     //! Clear table and destroy it.  
-    ~concurrent_hash_map();
+    ~concurrent_hash_map() { clear(); }
 
     //------------------------------------------------------------------------
     // Parallel algorithm support
     //------------------------------------------------------------------------
     range_type range( size_type grainsize=1 ) {
-        return range_type( begin(), end(), grainsize );
+        return range_type( *this, grainsize );
     }
     const_range_type range( size_type grainsize=1 ) const {
-        return const_range_type( begin(), end(), grainsize );
+        return const_range_type( *this, grainsize );
     }
 
     //------------------------------------------------------------------------
     // STL support - not thread-safe methods
     //------------------------------------------------------------------------
-    iterator begin() {return iterator(*this,0);}
-    iterator end() {return iterator(*this,n_segment);}
-    const_iterator begin() const {return const_iterator(*this,0);}
-    const_iterator end() const {return const_iterator(*this,n_segment);}
+    iterator begin() {return iterator(*this,0,my_embedded_segment,my_embedded_segment->node_list);}
+    iterator end() {return iterator(*this,0,0,0);}
+    const_iterator begin() const {return const_iterator(*this,0,my_embedded_segment,my_embedded_segment->node_list);}
+    const_iterator end() const {return const_iterator(*this,0,0,0);}
     std::pair<iterator, iterator> equal_range( const Key& key ) { return internal_equal_range(key, end()); }
     std::pair<const_iterator, const_iterator> equal_range( const Key& key ) const { return internal_equal_range(key, end()); }
     
     //! Number of items in table.
-    /** Be aware that this method is relatively slow compared to the 
-        typical size() method for an STL container. */
-    size_type size() const;
+    size_type size() const { return my_size; }
 
     //! True if size()==0.
-    bool empty() const;
+    bool empty() const { return my_size == 0; }
 
     //! Upper bound on size.
     size_type max_size() const {return (~size_type(0))/sizeof(node);}
@@ -525,7 +796,7 @@ public:
     //! return allocator object
     allocator_type get_allocator() const { return this->my_allocator; }
 
-    //! swap two instances
+    //! swap two instances. Iterators are invalidated
     void swap(concurrent_hash_map &table);
 
     //------------------------------------------------------------------------
@@ -533,50 +804,56 @@ public:
     //------------------------------------------------------------------------
 
     //! Return count of items (0 or 1)
-    size_type count( const Key& key ) const {
-        return const_cast<concurrent_hash_map*>(this)->lookup</*insert*/false>(NULL, key, /*write=*/false, NULL );
+    size_type count( const Key &key ) const {
+        return const_cast<concurrent_hash_map*>(this)->lookup(/*insert*/false, key, NULL, NULL, /*write=*/false );
     }
 
     //! Find item and acquire a read lock on the item.
     /** Return true if item is found, false otherwise. */
-    bool find( const_accessor& result, const Key& key ) const {
-        return const_cast<concurrent_hash_map*>(this)->lookup</*insert*/false>(&result, key, /*write=*/false, NULL );
+    bool find( const_accessor &result, const Key &key ) const {
+        result.release();
+        return const_cast<concurrent_hash_map*>(this)->lookup(/*insert*/false, key, NULL, &result, /*write=*/false );
     }
 
     //! Find item and acquire a write lock on the item.
     /** Return true if item is found, false otherwise. */
-    bool find( accessor& result, const Key& key ) {
-        return lookup</*insert*/false>(&result, key, /*write=*/true, NULL );
+    bool find( accessor &result, const Key &key ) {
+        result.release();
+        return lookup(/*insert*/false, key, NULL, &result, /*write=*/true );
     }
         
     //! Insert item (if not already present) and acquire a read lock on the item.
     /** Returns true if item is new. */
-    bool insert( const_accessor& result, const Key& key ) {
-        return lookup</*insert*/true>(&result, key, /*write=*/false, NULL );
+    bool insert( const_accessor &result, const Key &key ) {
+        result.release();
+        return lookup(/*insert*/true, key, NULL, &result, /*write=*/false );
     }
 
     //! Insert item (if not already present) and acquire a write lock on the item.
     /** Returns true if item is new. */
-    bool insert( accessor& result, const Key& key ) {
-        return lookup</*insert*/true>(&result, key, /*write=*/true, NULL );
+    bool insert( accessor &result, const Key &key ) {
+        result.release();
+        return lookup(/*insert*/true, key, NULL, &result, /*write=*/true );
     }
 
     //! Insert item by copying if there is no such key present already and acquire a read lock on the item.
     /** Returns true if item is new. */
-    bool insert( const_accessor& result, const value_type& value ) {
-        return lookup</*insert*/true>(&result, value.first, /*write=*/false, &value.second );
+    bool insert( const_accessor &result, const value_type &value ) {
+        result.release();
+        return lookup(/*insert*/true, value.first, &value.second, &result, /*write=*/false );
     }
 
     //! Insert item by copying if there is no such key present already and acquire a write lock on the item.
     /** Returns true if item is new. */
-    bool insert( accessor& result, const value_type& value ) {
-        return lookup</*insert*/true>(&result, value.first, /*write=*/true, &value.second );
+    bool insert( accessor &result, const value_type &value ) {
+        result.release();
+        return lookup(/*insert*/true, value.first, &value.second, &result, /*write=*/true );
     }
 
     //! Insert item by copying if there is no such key present already
     /** Returns true if item is inserted. */
-    bool insert( const value_type& value ) {
-        return lookup</*insert*/true>(NULL, value.first, /*write=*/false, &value.second );
+    bool insert( const value_type &value ) {
+        return lookup(/*insert*/true, value.first, &value.second, NULL, /*write=*/false );
     }
 
     //! Insert range [first, last)
@@ -602,150 +879,44 @@ public:
         return exclude( item_accessor, /*readonly=*/ false );
     }
 
-private:
-    //! Basic unit of storage used in chain.
-    struct node: internal::no_copy {
-        //! Next node in chain
-        node* next;
-        node_mutex_t mutex;
-        value_type item;
-        node( const Key& key ) : item(key, T()) {}
-        node( const Key& key, const T& t ) : item(key, t) {}
-        // exception-safe allocation, see C++ Standard 2003, clause 5.3.4p17
-        void* operator new( size_t /*size*/, node_allocator_type& a ) {
-            void *ptr = a.allocate(1);
-            if(!ptr) throw std::bad_alloc();
-            return ptr;
-        }
-        // match placement-new form above to be called if exception thrown in constructor
-        void operator delete( void* ptr, node_allocator_type& a ) {return a.deallocate(static_cast<node*>(ptr),1); }
-    };
-
-    struct chain;
-    friend struct chain;
-
-    //! A linked-list of nodes.
-    /** Should be zero-initialized before use. */
-    struct chain {
-        void push_front( node& b ) {
-            b.next = node_list;
-            node_list = &b;
-        }
-        chain_mutex_t mutex;
-        node* node_list;
-    };
-
-    struct segment;
-    friend struct segment;
-
-    //! Segment of the table.
-    /** The table is partioned into disjoint segments to reduce conflicts.
-        A segment should be zero-initialized before use. */
-    struct segment: internal::hash_map_segment_base {
-#if TBB_USE_ASSERT
-        ~segment() {
-            __TBB_ASSERT( !my_array, "should have been cleared earlier" );
-        }
-#endif /* TBB_USE_ASSERT */
-
-        // Pointer to array of chains
-        chain* my_array;
+protected:
+    //! Insert or find item and optionally acquire a lock on the item.
+    bool lookup( bool op_insert, const Key &key, const T *t, const_accessor *result, bool write );
 
-        // Get chain in this segment that corresponds to given hash code.
-        chain& get_chain( hashcode_t hashcode, size_t n_segment_bits ) {
-            return my_array[(hashcode>>n_segment_bits)&(my_physical_size-1)];
-        }
-     
-        //! Allocate an array with at least new_size chains. 
-        /** "new_size" is rounded up to a power of two that occupies at least one cache line.
-            Does not deallocate the old array.  Overwrites my_array. */
-        void allocate_array( size_t new_size ) {
-            size_t n=(internal::NFS_GetLineSize()+sizeof(chain)-1)/sizeof(chain);
-            __TBB_ASSERT((n&(n-1))==0, NULL);
-            while( n<new_size ) n<<=1;
-            chain* array = cache_aligned_allocator<chain>().allocate( n );
-            // storing earlier might help overcome false positives of in deducing "bool grow" in concurrent threads
-            __TBB_store_with_release(my_physical_size, n);
-            std::memset( array, 0, n*sizeof(chain) );
-            my_array = array;
-        }
-    };
-
-    segment& get_segment( hashcode_t hashcode ) {
-        return my_segment[hashcode&(n_segment-1)];
-    }
-
-    node_allocator_type my_allocator;
-
-    HashCompare my_hash_compare;
-
-    segment* my_segment;
-
-    node* create_node(const Key& key, const T* t) {
-        // exception-safe allocation and construction
-        if(t) return new( my_allocator ) node(key, *t);
-        else  return new( my_allocator ) node(key);
-    }
-
-    void delete_node(node* b) {
-        my_allocator.destroy(b);
-        my_allocator.deallocate(b, 1);
-    }
+    //! delete item by accessor
+    bool exclude( const_accessor &item_accessor, bool readonly );
 
-    node* search_list( const Key& key, chain& c ) const {
-        node* b = c.node_list;
-        while( b && !my_hash_compare.equal(key, b->item.first) )
-            b = b->next;
-        return b;
-    }
     //! Returns an iterator for an item defined by the key, or for the next item after it (if upper==true)
     template<typename I>
     std::pair<I, I> internal_equal_range( const Key& key, I end ) const;
 
-    //! delete item by accessor
-    bool exclude( const_accessor& item_accessor, bool readonly );
-
-    //! Grow segment for which caller has acquired a write lock.
-    void grow_segment( segment_mutex_t::scoped_lock& segment_lock, segment& s );
-
-    //! Does heavy lifting for "find" and "insert".
-    template<bool op_insert>
-    bool lookup( const_accessor* result, const Key& key, bool write, const T* t );
-
-    //! Perform initialization on behalf of a constructor
-    void initialize() {
-        my_segment = cache_aligned_allocator<segment>().allocate(n_segment);
-        std::memset( my_segment, 0, sizeof(segment)*n_segment );
-     }
-
     //! Copy "source" to *this, where *this must start out empty.
     void internal_copy( const concurrent_hash_map& source );
 
     template<typename I>
     void internal_copy(I first, I last);
-};
-
-template<typename Key, typename T, typename HashCompare, typename A>
-concurrent_hash_map<Key,T,HashCompare,A>::~concurrent_hash_map() {
-    clear();
-    cache_aligned_allocator<segment>().deallocate( my_segment, n_segment );
-}
-
-template<typename Key, typename T, typename HashCompare, typename A>
-typename concurrent_hash_map<Key,T,HashCompare,A>::size_type concurrent_hash_map<Key,T,HashCompare,A>::size() const {
-    size_type result = 0;
-    for( size_t k=0; k<n_segment; ++k )
-        result += my_segment[k].my_logical_size;
-    return result;
-}
 
-template<typename Key, typename T, typename HashCompare, typename A>
-bool concurrent_hash_map<Key,T,HashCompare,A>::empty() const {
-    for( size_t k=0; k<n_segment; ++k )
-        if( my_segment[k].my_logical_size )
-            return false;
-    return true;
-}
+    //! fast find when no concurrent erasure is used
+    const_pointer find( const Key& key ) const {
+        hashcode_t h = my_hash_compare.hash( key );
+        hashcode_t m = my_mask;
+    restart:
+        __TBB_ASSERT((m&(m+1))==0, NULL);
+        bucket *b = get_bucket( h & m );
+        if( b->node_list == __TBB_rehash_req ) {
+            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?
+        }
+        node *n = search_bucket( key, b );
+        if( check_mask_race( h, m ) )
+            goto restart;
+        if( n )
+            return &n->item;
+        return 0;
+    }
+};
 
 #if _MSC_VER && !defined(__INTEL_COMPILER)
     // Suppress "conditional expression is constant" warning.
@@ -754,159 +925,171 @@ bool concurrent_hash_map<Key,T,HashCompare,A>::empty() const {
 #endif
 
 template<typename Key, typename T, typename HashCompare, typename A>
-template<bool op_insert>
-bool concurrent_hash_map<Key,T,HashCompare,A>::lookup( const_accessor* result, const Key& key, bool write, const T* t ) {
-    if( result )
-        result->release();
-    const hashcode_t h = my_hash_compare.hash( key );
-    segment& s = get_segment(h);
-restart:
-    bool return_value = false;
-    // first check in double-check sequence
+bool concurrent_hash_map<Key,T,HashCompare,A>::lookup( bool op_insert, const Key &key, const T *t, const_accessor *result, bool write ) {
+    __TBB_ASSERT( !result || !result->my_node, NULL );
+    segment_index_t grow_segment;
+    bool return_value;
+    node *n, *tmp_n = 0;
+    hashcode_t const h = my_hash_compare.hash( key );
 #if TBB_USE_THREADING_TOOLS
-    bool grow = op_insert && s.internal_grow_predicate();
+    hashcode_t m = (hashcode_t) itt_load_pointer_with_acquire_v3( &my_mask );
 #else
-    bool grow = op_insert && s.my_logical_size >= s.my_physical_size
-        && s.my_physical_size < max_physical_size; // check whether there are free bits
-#endif /* TBB_USE_THREADING_TOOLS */
-    segment_mutex_t::scoped_lock segment_lock( s.my_mutex, /*write=*/grow );
-    if( grow ) { // Load factor is too high  
-        grow_segment( segment_lock, s );
-    }
-    if( !s.my_array ) {
-        __TBB_ASSERT( !op_insert, NULL );
-        return false;
-    }
-    __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
-    chain& c = s.get_chain( h, n_segment_bits );
-    chain_mutex_t::scoped_lock chain_lock( c.mutex, /*write=*/false );
-
-    node* b = search_list( key, c );
-    if( op_insert ) {
-        if( !b ) {
-            b = create_node(key, t);
-            // Search failed
-            if( !chain_lock.upgrade_to_writer() ) {
-                // Rerun search_list, in case another thread inserted the item during the upgrade.
-                node* b_temp = search_list( key, c );
-                if( b_temp ) { // unfortunately, it did
-                    chain_lock.downgrade_to_reader();
-                    delete_node( b );
-                    b = b_temp;
-                    goto done;
+    hashcode_t m = my_mask;
+#endif
+    restart:
+    {//lock scope
+        __TBB_ASSERT((m&(m+1))==0, NULL);
+        return_value = false;
+        // get bucket
+        bucket_accessor b( this, h & m );
+
+        // find a node
+        n = search_bucket( key, b() );
+        if( op_insert ) {
+            // [opt] insert a key
+            if( !is_valid(n) ) {
+                if( !tmp_n ) {
+                    if(t) tmp_n = new( my_allocator ) node(key, *t);
+                    else  tmp_n = new( my_allocator ) node(key);
                 }
+                if( !b.is_writer() && !b.upgrade_to_writer() ) { // TODO: improved insertion
+                    // Rerun search_list, in case another thread inserted the item during the upgrade.
+                    n = search_bucket( key, b() );
+                    if( is_valid(n) ) { // unfortunately, it did
+                        b.downgrade_to_reader();
+                        goto exists;
+                    }
+                }
+                if( check_mask_race(h, m) )
+                    goto restart; // b.release() is done in ~b().
+                // insert and set flag to grow the container
+                grow_segment = insert_new_node( b(), n = tmp_n, m );
+                tmp_n = 0;
+                return_value = true;
+            } else {
+    exists:     grow_segment = 0;
+            }
+        } else { // find or count
+            if( !n ) {
+                if( check_mask_race( h, m ) )
+                    goto restart; // b.release() is done in ~b(). TODO: replace by continue
+                return false;
             }
-            ++s.my_logical_size; // we can't change it earlier due to correctness of size() and exception safety of equal()
             return_value = true;
-            c.push_front( *b );
+            grow_segment = 0;
         }
-    } else { // find or count
-        if( !b )      return false;
-        return_value = true;
-    }
-done:
-    if( !result ) return return_value;
-    if( !result->my_lock.try_acquire( b->mutex, write ) ) {
-        // we are unlucky, prepare for longer wait
-        internal::AtomicBackoff trials;
-        do {
-            if( !trials.bounded_pause() ) {
-                // the wait takes really long, restart the operation
-                chain_lock.release(); segment_lock.release();
-                __TBB_Yield();
-                goto restart;
-            }
-        } while( !result->my_lock.try_acquire( b->mutex, write ) );
-    }
-    result->my_node = b;
+        if( !result ) goto check_growth;
+        // TODO: the following seems as generic/regular operation
+        // acquire the item
+        if( !result->my_lock.try_acquire( n->mutex, write ) ) {
+            // we are unlucky, prepare for longer wait
+            internal::atomic_backoff trials;
+            do {
+                if( !trials.bounded_pause() ) {
+                    // the wait takes really long, restart the operation
+                    b.release();
+                    __TBB_Yield();
+                    m = my_mask;
+                    goto restart;
+                }
+            } while( !result->my_lock.try_acquire( n->mutex, write ) );
+        }
+    }//lock scope
+    result->my_node = n;
     result->my_hash = h;
+check_growth:
+    // [opt] grow the container
+    if( grow_segment )
+        enable_segment( grow_segment );
+    if( tmp_n ) // if op_insert only
+        delete_node( tmp_n );
     return return_value;
 }
 
-#if _MSC_VER && !defined(__INTEL_COMPILER)
-    #pragma warning( pop )
-#endif // warning 4127 is back
-
 template<typename Key, typename T, typename HashCompare, typename A>
 template<typename I>
 std::pair<I, I> concurrent_hash_map<Key,T,HashCompare,A>::internal_equal_range( const Key& key, I end ) const {
     hashcode_t h = my_hash_compare.hash( key );
-    size_t segment_index = h&(n_segment-1);
-    segment& s = my_segment[segment_index ];
-    size_t chain_index = (h>>n_segment_bits)&(s.my_physical_size-1);
-    if( !s.my_array )
-        return std::make_pair(end, end);
-    chain& c = s.my_array[chain_index];
-    node* b = search_list( key, c );
-    if( !b )
+    hashcode_t m = my_mask;
+    __TBB_ASSERT((m&(m+1))==0, NULL);
+    h &= m;
+    bucket *b = get_bucket( h );
+    while( b->node_list == __TBB_rehash_req ) {
+        m = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit
+        b = get_bucket( h &= m );
+    }
+    node *n = search_bucket( key, b );
+    if( !n )
         return std::make_pair(end, end);
-    iterator lower(*this, segment_index, chain_index, b), upper(lower);
+    iterator lower(*this, h, b, n), upper(lower);
     return std::make_pair(lower, ++upper);
 }
 
 template<typename Key, typename T, typename HashCompare, typename A>
-bool concurrent_hash_map<Key,T,HashCompare,A>::erase( const Key &key ) {
-    hashcode_t h = my_hash_compare.hash( key );
-    segment& s = get_segment( h );
-    node* b=NULL; // explicitly initialized to prevent compiler warnings
-    {
-        bool chain_locked_for_write = false;
-        segment_mutex_t::scoped_lock segment_lock( s.my_mutex, /*write=*/false );
-        if( !s.my_array ) return false;
-        __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
-        chain& c = s.get_chain( h, n_segment_bits );
-        chain_mutex_t::scoped_lock chain_lock( c.mutex, /*write=*/false );
-    search:
-        node** p = &c.node_list;
-        b = *p;
-        while( b && !my_hash_compare.equal(key, b->item.first ) ) {
-            p = &b->next;
-            b = *p;
-        }
-        if( !b ) return false;
-        if( !chain_locked_for_write && !chain_lock.upgrade_to_writer() ) {
-            chain_locked_for_write = true;
-            goto search;
-        }
-        *p = b->next;
-        --s.my_logical_size;
-    }
-    {
-        node_mutex_t::scoped_lock item_locker( b->mutex, /*write=*/true );
-    }
-    // note: there should be no threads pretending to acquire this mutex again, do not try to upgrade const_accessor!
-    delete_node( b ); // Only one thread can delete it due to write lock on the chain_mutex
-    return true;        
-}
-
-template<typename Key, typename T, typename HashCompare, typename A>
 bool concurrent_hash_map<Key,T,HashCompare,A>::exclude( const_accessor &item_accessor, bool readonly ) {
     __TBB_ASSERT( item_accessor.my_node, NULL );
-    const hashcode_t h = item_accessor.my_hash;
-    node *const b = item_accessor.my_node;
+    node_base *const n = item_accessor.my_node;
     item_accessor.my_node = NULL; // we ought release accessor anyway
-    segment& s = get_segment( h );
-    {
-        segment_mutex_t::scoped_lock segment_lock( s.my_mutex, /*write=*/false );
-        __TBB_ASSERT( s.my_array, NULL );
-        __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
-        chain& c = s.get_chain( h, n_segment_bits );
-        chain_mutex_t::scoped_lock chain_lock( c.mutex, /*write=*/true );
-        node** p = &c.node_list;
-        while( *p && *p != b )
+    hashcode_t const h = item_accessor.my_hash;
+    hashcode_t m = my_mask;
+    do {
+        // get bucket
+        bucket_accessor b( this, h & m, /*writer=*/true );
+        node_base **p = &b()->node_list;
+        while( *p && *p != n )
             p = &(*p)->next;
         if( !*p ) { // someone else was the first
+            if( check_mask_race( h, m ) )
+                continue;
             item_accessor.my_lock.release();
             return false;
         }
-        __TBB_ASSERT( *p == b, NULL );
-        *p = b->next;
-        --s.my_logical_size;
-    }
+        __TBB_ASSERT( *p == n, NULL );
+        *p = n->next; // remove from container
+        my_size--;
+        break;
+    } while(true);
     if( readonly ) // need to get exclusive lock
         item_accessor.my_lock.upgrade_to_writer(); // return value means nothing here
     item_accessor.my_lock.release();
-    delete_node( b ); // Only one thread can delete it due to write lock on the chain_mutex
+    delete_node( n ); // Only one thread can delete it due to write lock on the chain_mutex
+    return true;
+}
+
+template<typename Key, typename T, typename HashCompare, typename A>
+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;
+    {//lock scope
+    restart:
+        // get bucket
+        bucket_accessor b( this, h & m );
+    search:
+        node_base **p = &b()->node_list;
+        n = *p;
+        while( is_valid(n) && !my_hash_compare.equal(key, static_cast<node*>(n)->item.first ) ) {
+            p = &n->next;
+            n = *p;
+        }
+        if( !n ) { // not found, but mask could be changed
+            if( check_mask_race( h, m ) )
+                goto restart;
+            return false;
+        }
+        else if( !b.is_writer() && !b.upgrade_to_writer() ) {
+            if( check_mask_race( h, m ) ) // contended upgrade, check mask
+                goto restart;
+            goto search;
+        }
+        *p = n->next;
+        my_size--;
+    }
+    {
+        typename node::scoped_t item_locker( n->mutex, /*write=*/true );
+    }
+    // note: there should be no threads pretending to acquire this mutex again, do not try to upgrade const_accessor!
+    delete_node( n ); // Only one thread can delete it due to write lock on the bucket
     return true;
 }
 
@@ -914,93 +1097,91 @@ template<typename Key, typename T, typename HashCompare, typename A>
 void concurrent_hash_map<Key,T,HashCompare,A>::swap(concurrent_hash_map<Key,T,HashCompare,A> &table) {
     std::swap(this->my_allocator, table.my_allocator);
     std::swap(this->my_hash_compare, table.my_hash_compare);
-    std::swap(this->my_segment, table.my_segment);
+    internal_swap(table);
 }
 
 template<typename Key, typename T, typename HashCompare, typename A>
 void concurrent_hash_map<Key,T,HashCompare,A>::clear() {
+    hashcode_t m = my_mask;
+    __TBB_ASSERT((m&(m+1))==0, NULL);
+#if TBB_USE_DEBUG || TBB_USE_PERFORMANCE_WARNINGS
 #if TBB_USE_PERFORMANCE_WARNINGS
-    size_t total_physical_size = 0, min_physical_size = size_t(-1L), max_physical_size = 0; //< usage statistics
+    int size = int(my_size), buckets = int(m)+1, empty_buckets = 0, overpopulated_buckets = 0; // usage statistics
     static bool reported = false;
 #endif
-    for( size_t i=0; i<n_segment; ++i ) {
-        segment& s = my_segment[i];
-        size_t n = s.my_physical_size;
-        if( chain* array = s.my_array ) {
-            s.my_array = NULL;
-            s.my_physical_size = 0;
-            s.my_logical_size = 0;
-            for( size_t j=0; j<n; ++j ) {
-                while( node* b = array[j].node_list ) {
-                    array[j].node_list = b->next;
-                    delete_node(b);
-                }
-            }
-            cache_aligned_allocator<chain>().deallocate( array, n );
-        }
+    // check consistency
+    for( segment_index_t b = 0; b <= m; b++ ) {
+        node_base *n = get_bucket(b)->node_list;
 #if TBB_USE_PERFORMANCE_WARNINGS
-        total_physical_size += n;
-        if(min_physical_size > n) min_physical_size = n;
-        if(max_physical_size < n) max_physical_size = n;
+        if( n == __TBB_empty_rehashed ) empty_buckets++;
+        else if( n == __TBB_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" );
+        }
     }
-    if( !reported
-        && ( (total_physical_size >= n_segment*48 && min_physical_size < total_physical_size/n_segment/2)
-         || (total_physical_size >= n_segment*128 && max_physical_size > total_physical_size/n_segment*2) ) )
-    {
-        reported = true;
+#if TBB_USE_PERFORMANCE_WARNINGS
+    if( buckets > size) empty_buckets -= buckets - size;
+    else overpopulated_buckets -= size - buckets; // TODO: load_factor?
+    if( !reported && buckets >= 512 && ( 2*empty_buckets >= size || 2*overpopulated_buckets > size ) ) {
         internal::runtime_warning(
-            "Performance is not optimal because the hash function produces bad randomness in lower bits in %s",
-            typeid(*this).name() );
-#endif
+            "Performance is not optimal because the hash function produces bad randomness in lower bits in %s.\nSize: %d  Empties: %d  Overlaps: %d",
+            typeid(*this).name(), size, empty_buckets, overpopulated_buckets );
+        reported = true;
     }
-}
-
-template<typename Key, typename T, typename HashCompare, typename A>
-void concurrent_hash_map<Key,T,HashCompare,A>::grow_segment( segment_mutex_t::scoped_lock& segment_lock, segment& s ) {
-    // Following is second check in a double-check.
-    if( s.my_logical_size >= s.my_physical_size ) {
-        chain* old_array = s.my_array;
-        size_t old_size = s.my_physical_size;
-        s.allocate_array( s.my_logical_size+1 );
-        for( size_t k=0; k<old_size; ++k )
-            while( node* b = old_array[k].node_list ) {
-                old_array[k].node_list = b->next;
-                hashcode_t h = my_hash_compare.hash( b->item.first );
-                __TBB_ASSERT( &get_segment(h)==&s, "hash function changed?" );
-                s.get_chain(h,n_segment_bits).push_front(*b);
+#endif
+#endif//TBB_USE_DEBUG || TBB_USE_PERFORMANCE_WARNINGS
+    my_size = 0;
+    segment_index_t s = segment_index_of( m );
+    __TBB_ASSERT( s+1 == pointers_per_table || !my_table[s+1], "wrong mask or concurrent grow" );
+    cache_aligned_allocator<bucket> alloc;
+    do {
+        __TBB_ASSERT( is_valid( my_table[s] ), "wrong mask or concurrent grow" );
+        segment_ptr_t buckets = my_table[s];
+        size_type sz = segment_size( s ? s : 1 );
+        for( segment_index_t i = 0; i < sz; i++ )
+            for( node_base *n = buckets[i].node_list; is_valid(n); n = buckets[i].node_list ) {
+                buckets[i].node_list = n->next;
+                delete_node( n );
             }
-        cache_aligned_allocator<chain>().deallocate( old_array, old_size );
-    }
-    segment_lock.downgrade_to_reader();
+        if( s >= first_block) // the first segment or the next
+            alloc.deallocate( buckets, sz );
+        else if( s == embedded_block && embedded_block != first_block )
+            alloc.deallocate( buckets, segment_size(first_block)-embedded_buckets );
+        if( s >= embedded_block ) my_table[s] = 0;
+    } while(s-- > 0);
+    my_mask = embedded_buckets - 1;
 }
 
 template<typename Key, typename T, typename HashCompare, typename A>
 void concurrent_hash_map<Key,T,HashCompare,A>::internal_copy( const concurrent_hash_map& source ) {
-    for( size_t i=0; i<n_segment; ++i ) {
-        segment& s = source.my_segment[i];
-        __TBB_ASSERT( !my_segment[i].my_array, "caller should have cleared" );
-        if( s.my_logical_size ) {
-            segment& d = my_segment[i];
-            d.allocate_array( s.my_logical_size );
-            d.my_logical_size = s.my_logical_size;
-            size_t s_size = s.my_physical_size;
-            chain* s_array = s.my_array;
-            chain* d_array = d.my_array;
-            for( size_t k=0; k<s_size; ++k )
-                for( node* b = s_array[k].node_list; b; b=b->next ) {
-                    __TBB_ASSERT( &get_segment(my_hash_compare.hash( b->item.first ))==&d, "hash function changed?" );
-                    node* b_new = create_node(b->item.first, &b->item.second);
-                    d_array[k].push_front(*b_new); // hashcode is the same and segment and my_physical sizes are the same
-                }
+    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
         }
-    }
+    } else internal_copy( source.begin(), source.end() );
 }
 
 template<typename Key, typename T, typename HashCompare, typename A>
 template<typename I>
 void concurrent_hash_map<Key,T,HashCompare,A>::internal_copy(I first, I last) {
-    for(; first != last; ++first)
-        insert( *first );
+    hashcode_t m = my_mask;
+    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");
+        node *n = new( my_allocator ) node(first->first, first->second);
+        add_to_bucket( b, n );
+        ++my_size; // TODO: replace by non-atomic op
+    }
 }
 
 template<typename Key, typename T, typename HashCompare, typename A1, typename A2>
@@ -1023,6 +1204,10 @@ template<typename Key, typename T, typename HashCompare, typename A>
 inline void swap(concurrent_hash_map<Key, T, HashCompare, A> &a, concurrent_hash_map<Key, T, HashCompare, A> &b)
 {    a.swap( b ); }
 
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    #pragma warning( pop )
+#endif // warning 4127 is back
+
 } // namespace tbb
 
 #endif /* __TBB_concurrent_hash_map_H */
diff --git a/include/tbb/concurrent_queue.h b/include/tbb/concurrent_queue.h
index f169a51..f344a84 100644
--- a/include/tbb/concurrent_queue.h
+++ b/include/tbb/concurrent_queue.h
@@ -29,216 +29,143 @@
 #ifndef __TBB_concurrent_queue_H
 #define __TBB_concurrent_queue_H
 
-#include "tbb_stddef.h"
-#include "cache_aligned_allocator.h"
-#include <iterator>
-#include <new>
+#include "_concurrent_queue_internal.h"
 
 namespace tbb {
 
-template<typename T, class A = cache_aligned_allocator<T> > 
-class concurrent_queue;
-
-//! @cond INTERNAL
-namespace internal {
-
-class concurrent_queue_rep;
-class concurrent_queue_iterator_rep;
-class concurrent_queue_iterator_base_v3;
-template<typename Container, typename Value> class concurrent_queue_iterator;
+namespace strict_ppl {
 
-//! For internal use only.
-/** Type-independent portion of concurrent_queue.
+//! A high-performance thread-safe non-blocking concurrent queue.
+/** Multiple threads may each push and pop concurrently.
+    Assignment construction is not allowed.
     @ingroup containers */
-class concurrent_queue_base_v3: no_copy {
-    //! Internal representation
-    concurrent_queue_rep* my_rep;
-
-    friend class concurrent_queue_rep;
-    friend struct micro_queue;
-    friend class micro_queue_pop_finalizer;
-    friend class concurrent_queue_iterator_rep;
-    friend class concurrent_queue_iterator_base_v3;
-protected:
-    //! Prefix on a page
-    struct page {
-        page* next;
-        uintptr mask; 
-    };
-
-    //! Capacity of the queue
-    ptrdiff_t my_capacity;
-   
-    //! Always a power of 2
-    size_t items_per_page;
-
-    //! Size of an item
-    size_t item_size;
-
-private:
-    virtual void copy_item( page& dst, size_t index, const void* src ) = 0;
-    virtual void assign_and_destroy_item( void* dst, page& src, size_t index ) = 0;
-protected:
-    __TBB_EXPORTED_METHOD concurrent_queue_base_v3( size_t item_size );
-    virtual __TBB_EXPORTED_METHOD ~concurrent_queue_base_v3();
-
-    //! Enqueue item at tail of queue
-    void __TBB_EXPORTED_METHOD internal_push( const void* src );
-
-    //! Dequeue item from head of queue
-    void __TBB_EXPORTED_METHOD internal_pop( void* dst );
-
-    //! Attempt to enqueue item onto queue.
-    bool __TBB_EXPORTED_METHOD internal_push_if_not_full( const void* src );
-
-    //! Attempt to dequeue item from queue.
-    /** NULL if there was no item to dequeue. */
-    bool __TBB_EXPORTED_METHOD internal_pop_if_present( void* dst );
-
-    //! Get size of queue
-    ptrdiff_t __TBB_EXPORTED_METHOD internal_size() const;
-
-    //! set the queue capacity
-    void __TBB_EXPORTED_METHOD internal_set_capacity( ptrdiff_t capacity, size_t element_size );
-
-    //! custom allocator
-    virtual page *allocate_page() = 0;
-
-    //! custom de-allocator
-    virtual void deallocate_page( page *p ) = 0;
+template<typename T, typename A = cache_aligned_allocator<T> > 
+class concurrent_queue: public internal::concurrent_queue_base_v3<T> {
+    template<typename Container, typename Value> friend class internal::concurrent_queue_iterator;
 
-    //! free any remaining pages
-    /* note that the name may be misleading, but it remains so due to a historical accident. */
-    void __TBB_EXPORTED_METHOD internal_finish_clear() ;
+    //! Allocator type
+    typedef typename A::template rebind<char>::other page_allocator_type;
+    page_allocator_type my_allocator;
 
-    //! throw an exception
-    void __TBB_EXPORTED_METHOD internal_throw_exception() const;
+    //! Allocates a block of size n (bytes)
+    /*overide*/ virtual void *allocate_block( size_t n ) {
+        void *b = reinterpret_cast<void*>(my_allocator.allocate( n ));
+        if( !b ) this->internal_throw_exception(); 
+        return b;
+    }
 
-    //! copy internal representation
-    void __TBB_EXPORTED_METHOD assign( const concurrent_queue_base_v3& src ) ;
+    //! Returns a block of size n (bytes)
+    /*override*/ virtual void deallocate_block( void *b, size_t n ) {
+        my_allocator.deallocate( reinterpret_cast<char*>(b), n );
+    }
 
-private:
-    virtual void copy_page_item( page& dst, size_t dindex, const page& src, size_t sindex ) = 0;
-};
+public:
+    //! Element type in the queue.
+    typedef T value_type;
 
-typedef concurrent_queue_base_v3 concurrent_queue_base ;
+    //! Reference type
+    typedef T& reference;
 
-//! Type-independent portion of concurrent_queue_iterator.
-/** @ingroup containers */
-class concurrent_queue_iterator_base_v3 {
-    //! Concurrentconcurrent_queue over which we are iterating.
-    /** NULL if one past last element in queue. */
-    concurrent_queue_iterator_rep* my_rep;
+    //! Const reference type
+    typedef const T& const_reference;
 
-    template<typename C, typename T, typename U>
-    friend bool operator==( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j );
+    //! Integral type for representing size of the queue.
+    typedef size_t size_type;
 
-    template<typename C, typename T, typename U>
-    friend bool operator!=( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j );
-protected:
-    //! Pointer to current item
-    mutable void* my_item;
+    //! Difference type for iterator
+    typedef ptrdiff_t difference_type;
 
-    //! Default constructor
-    concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
+    //! Allocator type
+    typedef A allocator_type;
 
-    //! Copy constructor
-    concurrent_queue_iterator_base_v3( const concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
-        assign(i);
+    //! Construct empty queue
+    explicit concurrent_queue(const allocator_type& a = allocator_type()) : 
+        internal::concurrent_queue_base_v3<T>( sizeof(T) ), my_allocator( a )
+    {
     }
 
-    //! Construct iterator pointing to head of queue.
-    __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( const concurrent_queue_base& queue );
-
-    //! Assignment
-    void __TBB_EXPORTED_METHOD assign( const concurrent_queue_iterator_base_v3& i );
-
-    //! Advance iterator one step towards tail of queue.
-    void __TBB_EXPORTED_METHOD advance();
-
-    //! Destructor
-    __TBB_EXPORTED_METHOD ~concurrent_queue_iterator_base_v3();
-};
-
-typedef concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base;
-
-//! Meets requirements of a forward iterator for STL.
-/** Value is either the T or const T type of the container.
-    @ingroup containers */
-template<typename Container, typename Value>
-class concurrent_queue_iterator: public concurrent_queue_iterator_base,
-        public std::iterator<std::forward_iterator_tag,Value> {
-#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)
-    template<typename T, class A>
-    friend class ::tbb::concurrent_queue;
-#else
-public: // workaround for MSVC
-#endif 
-    //! Construct iterator pointing to head of queue.
-    concurrent_queue_iterator( const concurrent_queue_base& queue ) :
-        concurrent_queue_iterator_base_v3(queue)
+    //! [begin,end) constructor
+    template<typename InputIterator>
+    concurrent_queue( InputIterator begin, InputIterator end, const allocator_type& a = allocator_type()) :
+        internal::concurrent_queue_base_v3<T>( sizeof(T) ), my_allocator( a )
     {
+        for( ; begin != end; ++begin )
+            internal_push(&*begin);
     }
-public:
-    concurrent_queue_iterator() {}
-
-    /** If Value==Container::value_type, then this routine is the copy constructor. 
-        If Value==const Container::value_type, then this routine is a conversion constructor. */
-    concurrent_queue_iterator( const concurrent_queue_iterator<Container,typename Container::value_type>& other ) :
-        concurrent_queue_iterator_base_v3(other)
-    {}
-
-    //! Iterator assignment
-    concurrent_queue_iterator& operator=( const concurrent_queue_iterator& other ) {
-        assign(other);
-        return *this;
+    
+    //! Copy constructor
+    concurrent_queue( const concurrent_queue& src, const allocator_type& a = allocator_type()) : 
+        internal::concurrent_queue_base_v3<T>( sizeof(T) ), my_allocator( a )
+    {
+        assign( src );
     }
+    
+    //! Destroy queue
+    ~concurrent_queue();
 
-    //! Reference to current item 
-    Value& operator*() const {
-        return *static_cast<Value*>(my_item);
+    //! Enqueue an item at tail of queue.
+    void push( const T& source ) {
+        internal_push( &source );
     }
 
-    Value* operator->() const {return &operator*();}
-
-    //! Advance to next item in queue
-    concurrent_queue_iterator& operator++() {
-        advance();
-        return *this;
+    //! Attempt to dequeue an item from head of queue.
+    /** Does not wait for item to become available.
+        Returns true if successful; false otherwise. */
+    bool try_pop( T& result ) {
+        return internal_try_pop( &result );
     }
 
-    //! Post increment
-    Value* operator++(int) {
-        Value* result = &operator*();
-        operator++();
-        return result;
-    }
-}; // concurrent_queue_iterator
+    //! Return the number of items in the queue; thread unsafe
+    size_type unsafe_size() const {return this->internal_size();}
 
+    //! Equivalent to size()==0.
+    bool empty() const {return this->internal_empty();}
 
-template<typename C, typename T, typename U>
-bool operator==( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j ) {
-    return i.my_item==j.my_item;
-}
+    //! Clear the queue. not thread-safe.
+    void clear() ;
 
-template<typename C, typename T, typename U>
-bool operator!=( const concurrent_queue_iterator<C,T>& i, const concurrent_queue_iterator<C,U>& j ) {
-    return i.my_item!=j.my_item;
-}
+    //! Return allocator object
+    allocator_type get_allocator() const { return this->my_allocator; }
 
-} // namespace internal;
+    typedef internal::concurrent_queue_iterator<concurrent_queue,T> iterator;
+    typedef internal::concurrent_queue_iterator<concurrent_queue,const T> const_iterator;
+
+    //------------------------------------------------------------------------
+    // The iterators are intended only for debugging.  They are slow and not thread safe.
+    //------------------------------------------------------------------------
+    iterator unsafe_begin() {return iterator(*this);}
+    iterator unsafe_end() {return iterator();}
+    const_iterator unsafe_begin() const {return const_iterator(*this);}
+    const_iterator unsafe_end() const {return const_iterator();}
+} ;
 
-//! @endcond
+template<typename T, class A>
+concurrent_queue<T,A>::~concurrent_queue() {
+    clear();
+    this->internal_finish_clear();
+}
 
-//! A high-performance thread-safe queue.
-/** Multiple threads may each push and pop concurrently.
+template<typename T, class A>
+void concurrent_queue<T,A>::clear() {
+    while( !empty() ) {
+        T value;
+        internal_try_pop(&value);
+    }
+}
+
+} // namespace strict_ppl
+    
+//! A high-performance thread-safe blocking concurrent bounded queue.
+/** This is the pre-PPL TBB concurrent queue which supports boundedness and blocking semantics.
+    Note that method names agree with the PPL-style concurrent queue.
+    Multiple threads may each push and pop concurrently.
     Assignment construction is not allowed.
     @ingroup containers */
-template<typename T, class A>
-class concurrent_queue: public internal::concurrent_queue_base_v3 {
+template<typename T, class A = cache_aligned_allocator<T> >
+class concurrent_bounded_queue: public internal::concurrent_queue_base_v3 {
     template<typename Container, typename Value> friend class internal::concurrent_queue_iterator;
 
-    //! allocator type
+    //! Allocator type
     typedef typename A::template rebind<char>::other page_allocator_type;
     page_allocator_type my_allocator;
 
@@ -303,13 +230,29 @@ public:
     typedef std::ptrdiff_t difference_type;
 
     //! Construct empty queue
-    explicit concurrent_queue(const allocator_type  &a = allocator_type()) : 
+    explicit concurrent_bounded_queue(const allocator_type& a = allocator_type()) : 
         concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
     {
     }
 
+    //! Copy constructor
+    concurrent_bounded_queue( const concurrent_bounded_queue& src, const allocator_type& a = allocator_type()) : 
+        concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
+    {
+        assign( src );
+    }
+
+    //! [begin,end) constructor
+    template<typename InputIterator>
+    concurrent_bounded_queue( InputIterator begin, InputIterator end, const allocator_type& a = allocator_type()) :
+        concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
+    {
+        for( ; begin != end; ++begin )
+            internal_push_if_not_full(&*begin);
+    }
+
     //! Destroy queue
-    ~concurrent_queue();
+    ~concurrent_bounded_queue();
 
     //! Enqueue an item at tail of queue.
     void push( const T& source ) {
@@ -325,14 +268,14 @@ public:
     //! Enqueue an item at tail of queue if queue is not already full.
     /** Does not wait for queue to become not full.
         Returns true if item is pushed; false if queue was already full. */
-    bool push_if_not_full( const T& source ) {
+    bool try_push( const T& source ) {
         return internal_push_if_not_full( &source );
     }
 
     //! Attempt to dequeue an item from head of queue.
     /** Does not wait for item to become available.
         Returns true if successful; false otherwise. */
-    bool pop_if_present( T& destination ) {
+    bool try_pop( T& destination ) {
         return internal_pop_if_present( &destination );
     }
 
@@ -343,7 +286,7 @@ public:
     size_type size() const {return internal_size();}
 
     //! Equivalent to size()<=0.
-    bool empty() const {return size()<=0;}
+    bool empty() const {return internal_empty();}
 
     //! Maximum number of allowed elements
     size_type capacity() const {
@@ -351,7 +294,7 @@ public:
     }
 
     //! Set the capacity
-    /** Setting the capacity to 0 causes subsequent push_if_not_full operations to always fail,
+    /** Setting the capacity to 0 causes subsequent try_push operations to always fail,
         and subsequent push operations to block forever. */
     void set_capacity( size_type capacity ) {
         internal_set_capacity( capacity, sizeof(T) );
@@ -363,48 +306,104 @@ public:
     //! clear the queue. not thread-safe.
     void clear() ;
 
-    typedef internal::concurrent_queue_iterator<concurrent_queue,T> iterator;
-    typedef internal::concurrent_queue_iterator<concurrent_queue,const T> const_iterator;
+    typedef internal::concurrent_queue_iterator<concurrent_bounded_queue,T> iterator;
+    typedef internal::concurrent_queue_iterator<concurrent_bounded_queue,const T> const_iterator;
 
     //------------------------------------------------------------------------
     // The iterators are intended only for debugging.  They are slow and not thread safe.
     //------------------------------------------------------------------------
-    iterator begin() {return iterator(*this);}
-    iterator end() {return iterator();}
-    const_iterator begin() const {return const_iterator(*this);}
-    const_iterator end() const {return const_iterator();}
-    
-    //! Copy constructor
-    concurrent_queue( const concurrent_queue& src, const allocator_type &a = allocator_type()) : 
-        concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
-    {
-        assign( src );
-    }
+    iterator unsafe_begin() {return iterator(*this);}
+    iterator unsafe_end() {return iterator();}
+    const_iterator unsafe_begin() const {return const_iterator(*this);}
+    const_iterator unsafe_end() const {return const_iterator();}
 
-    //! [begin,end) constructor
-    template<typename InputIterator>
-    concurrent_queue( InputIterator begin, InputIterator end, const allocator_type &a = allocator_type()) :
-        concurrent_queue_base_v3( sizeof(T) ), my_allocator( a )
-    {
-        for( ; begin != end; ++begin )
-            internal_push_if_not_full(&*begin);
-    }
 }; 
 
 template<typename T, class A>
-concurrent_queue<T,A>::~concurrent_queue() {
+concurrent_bounded_queue<T,A>::~concurrent_bounded_queue() {
     clear();
     internal_finish_clear();
 }
 
 template<typename T, class A>
-void concurrent_queue<T,A>::clear() {
+void concurrent_bounded_queue<T,A>::clear() {
     while( !empty() ) {
         T value;
         internal_pop_if_present(&value);
     }
 }
 
+namespace deprecated {
+
+//! A high-performance thread-safe blocking concurrent bounded queue.
+/** This is the pre-PPL TBB concurrent queue which support boundedness and blocking semantics.
+    Note that method names agree with the PPL-style concurrent queue.
+    Multiple threads may each push and pop concurrently.
+    Assignment construction is not allowed.
+    @ingroup containers */
+template<typename T, class A = cache_aligned_allocator<T> > 
+class concurrent_queue: public concurrent_bounded_queue<T,A> {
+#if !__TBB_TEMPLATE_FRIENDS_BROKEN
+    template<typename Container, typename Value> friend class internal::concurrent_queue_iterator;
+#endif 
+
+public:
+    //! Construct empty queue
+    explicit concurrent_queue(const A& a = A()) : 
+        concurrent_bounded_queue<T,A>( a )
+    {
+    }
+
+    //! Copy constructor
+    concurrent_queue( const concurrent_queue& src, const A& a = A()) : 
+        concurrent_bounded_queue<T,A>( src, a )
+    {
+    }
+
+    //! [begin,end) constructor
+    template<typename InputIterator>
+    concurrent_queue( InputIterator begin, InputIterator end, const A& a = A()) :
+        concurrent_bounded_queue<T,A>( begin, end, a )
+    {
+    }
+
+    //! Enqueue an item at tail of queue if queue is not already full.
+    /** Does not wait for queue to become not full.
+        Returns true if item is pushed; false if queue was already full. */
+    bool push_if_not_full( const T& source ) {
+        return try_push( source );
+    }
+
+    //! Attempt to dequeue an item from head of queue.
+    /** Does not wait for item to become available.
+        Returns true if successful; false otherwise. 
+        @deprecated Use try_pop()
+        */
+    bool pop_if_present( T& destination ) {
+        return try_pop( destination );
+    }
+
+    typedef typename concurrent_bounded_queue<T,A>::iterator iterator;
+    typedef typename concurrent_bounded_queue<T,A>::const_iterator const_iterator;
+    //
+    //------------------------------------------------------------------------
+    // The iterators are intended only for debugging.  They are slow and not thread safe.
+    //------------------------------------------------------------------------
+    iterator begin() {return this->unsafe_begin();}
+    iterator end() {return this->unsafe_end();}
+    const_iterator begin() const {return this->unsafe_begin();}
+    const_iterator end() const {return this->unsafe_end();}
+}; 
+
+}
+    
+
+#if TBB_DEPRECATED
+using deprecated::concurrent_queue;
+#else
+using strict_ppl::concurrent_queue;    
+#endif
+
 } // namespace tbb
 
 #endif /* __TBB_concurrent_queue_H */
diff --git a/include/tbb/concurrent_vector.h b/include/tbb/concurrent_vector.h
index 4e9bd09..46f13f9 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 <memory>
 #include <limits>
 #include <new>
 #include <cstring>
@@ -150,7 +149,6 @@ namespace internal {
 
         void __TBB_EXPORTED_METHOD internal_reserve( size_type n, size_type element_size, size_type max_size );
         size_type __TBB_EXPORTED_METHOD internal_capacity() const;
-        void __TBB_EXPORTED_METHOD internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op2 init, const void *src );
         void internal_grow( size_type start, size_type finish, size_type element_size, internal_array_op2 init, const void *src );
         size_type __TBB_EXPORTED_METHOD internal_grow_by( size_type delta, size_type element_size, internal_array_op2 init, const void *src );
         void* __TBB_EXPORTED_METHOD internal_push_back( size_type element_size, size_type& index );
@@ -162,6 +160,12 @@ namespace internal {
         void __TBB_EXPORTED_METHOD internal_throw_exception(size_type) const;
         void __TBB_EXPORTED_METHOD internal_swap(concurrent_vector_base_v3& v);
 
+        void __TBB_EXPORTED_METHOD 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 __TBB_EXPORTED_METHOD internal_grow_to_at_least_with_result( size_type new_size, size_type element_size, internal_array_op2 init, const void *src );
+
+        //! Deprecated entry point for backwards compatibility to TBB 2.1.
+        void __TBB_EXPORTED_METHOD internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op2 init, const void *src );
 private:
         //! Private functionality
         class helper;
@@ -208,10 +212,10 @@ private:
 public: // workaround for MSVC
 #endif 
 
-        vector_iterator( const Container& vector, size_t index ) : 
+        vector_iterator( const Container& vector, size_t index, void *ptr = 0 ) : 
             my_vector(const_cast<Container*>(&vector)), 
             my_index(index), 
-            my_item(NULL)
+            my_item(static_cast<Value*>(ptr))
         {}
 
     public:
@@ -397,6 +401,13 @@ public: // workaround for MSVC
     may increase element access time. Internal layout can be optimized by method compact() that
     merges several smaller arrays into one solid.
 
+ at par Changes since TBB 2.1
+    - Fixed guarantees of concurrent_vector::size() and grow_to_at_least() methods to assure elements are allocated.
+    - Methods end()/rbegin()/back() are partly thread-safe since they use size() to get the end of vector
+    - Added resize() methods (not thread-safe)
+    - Added cbegin/cend/crbegin/crend methods
+    - Changed return type of methods grow* and push_back to iterator
+
 @par Changes since TBB 2.0
     - Implemented exception-safety guaranties
     - Added template argument for allocator
@@ -417,7 +428,7 @@ public: // workaround for MSVC
     @ingroup containers */
 template<typename T, class A>
 class concurrent_vector: protected internal::allocator_base<T, A>,
-                         private internal::concurrent_vector_base_v3 {
+                         private internal::concurrent_vector_base {
 private:
     template<typename I>
     class generic_range_type: public blocked_range<I> {
@@ -500,10 +511,7 @@ public:
     explicit concurrent_vector(size_type n)
     {
         vector_allocator_ptr = &internal_allocator;
-        if ( !n ) return;
-        internal_reserve(n, sizeof(T), max_size()); my_early_size = n;
-        __TBB_ASSERT( my_first_block == segment_index_of(n-1)+1, NULL );
-        initialize_array(static_cast<T*>(my_segment[0].array), NULL, n);
+        internal_resize( n, sizeof(T), max_size(), NULL, &destroy_array, &initialize_array );
     }
 
     //! Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance
@@ -511,7 +519,7 @@ public:
         : internal::allocator_base<T, A>(a)
     {
         vector_allocator_ptr = &internal_allocator;
-        internal_assign( n, t );
+        internal_resize( n, sizeof(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
     }
 
     //! Construction with copying iteration range and given allocator instance
@@ -520,13 +528,13 @@ public:
         : internal::allocator_base<T, A>(a)
     {
         vector_allocator_ptr = &internal_allocator;
-        internal_assign(first, last, static_cast<is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
+        internal_assign_range(first, last, static_cast<is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
     }
 
     //! Assignment
     concurrent_vector& operator=( const concurrent_vector& vector ) {
         if( this != &vector )
-            concurrent_vector_base_v3::internal_assign(vector, sizeof(T), &destroy_array, &assign_array, &copy_array);
+            internal_assign(vector, sizeof(T), &destroy_array, &assign_array, &copy_array);
         return *this;
     }
 
@@ -534,7 +542,7 @@ public:
     template<class M>
     concurrent_vector& operator=( const concurrent_vector<T, M>& vector ) {
         if( static_cast<void*>( this ) != static_cast<const void*>( &vector ) )
-            concurrent_vector_base_v3::internal_assign(vector.internal_vector_base(),
+            internal_assign(vector.internal_vector_base(),
                 sizeof(T), &destroy_array, &assign_array, &copy_array);
         return *this;
     }
@@ -543,29 +551,70 @@ public:
     // Concurrent operations
     //------------------------------------------------------------------------
     //! Grow by "delta" elements.
+#if TBB_DEPRECATED
     /** Returns old size. */
     size_type grow_by( size_type delta ) {
         return delta ? internal_grow_by( delta, sizeof(T), &initialize_array, NULL ) : my_early_size;
     }
+#else
+    /** Returns iterator pointing to the first new element. */
+    iterator grow_by( size_type delta ) {
+        return iterator(*this, delta ? internal_grow_by( delta, sizeof(T), &initialize_array, NULL ) : my_early_size);
+    }
+#endif
 
     //! Grow by "delta" elements using copying constuctor.
+#if TBB_DEPRECATED
     /** Returns old size. */
     size_type grow_by( size_type delta, const_reference t ) {
         return delta ? internal_grow_by( delta, sizeof(T), &initialize_array_by, static_cast<const void*>(&t) ) : my_early_size;
     }
+#else
+    /** Returns iterator pointing to the first new element. */
+    iterator grow_by( size_type delta, const_reference t ) {
+        return iterator(*this, delta ? internal_grow_by( delta, sizeof(T), &initialize_array_by, static_cast<const void*>(&t) ) : my_early_size);
+    }
+#endif
 
-    //! Grow array until it has at least n elements.
+    //! Append minimal sequence of elements such that size()>=n.  
+#if TBB_DEPRECATED
+    /** The new elements are default constructed.  Blocks until all elements in range [0..n) are allocated.
+        May return while other elements are being constructed by other threads. */
     void grow_to_at_least( size_type n ) {
-        if( my_early_size<n )
-            internal_grow_to_at_least( n, sizeof(T), &initialize_array, NULL );
+        if( n ) internal_grow_to_at_least_with_result( n, sizeof(T), &initialize_array, NULL );
     };
+#else
+    /** The new elements are default constructed.  Blocks until all elements in range [0..n) are allocated.
+        May return while other elements are being constructed by other threads.
+        Returns iterator that points to beginning of appended sequence.
+        If no elements were appended, returns iterator pointing to nth element. */
+    iterator grow_to_at_least( size_type n ) {
+        size_type m=0;
+        if( n ) {
+            m = internal_grow_to_at_least_with_result( n, sizeof(T), &initialize_array, NULL );
+            if( m>n ) m=n;
+        }
+        return iterator(*this, m);
+    };
+#endif
 
     //! Push item 
-    size_type push_back( const_reference item ) {
+#if TBB_DEPRECATED
+    size_type push_back( const_reference item )
+#else
+    /** Returns iterator pointing to the new element. */
+    iterator push_back( const_reference item )
+#endif
+    {
         size_type k;
-        internal_loop_guide loop(1, internal_push_back(sizeof(T),k));
+        void *ptr = internal_push_back(sizeof(T),k);
+        internal_loop_guide loop(1, ptr);
         loop.init(&item);
+#if TBB_DEPRECATED
         return k;
+#else
+        return iterator(*this, k, ptr);
+#endif
     }
 
     //! Get reference to element at given index.
@@ -580,12 +629,12 @@ public:
         return internal_subscript(index);
     }
 
-    //! Get reference to element at given index.
+    //! Get reference to element at given index. Throws exceptions on errors.
     reference at( size_type index ) {
         return internal_subscript_with_exceptions(index);
     }
 
-    //! Get const reference to element at given index.
+    //! Get const reference to element at given index. Throws exceptions on errors.
     const_reference at( size_type index ) const {
         return internal_subscript_with_exceptions(index);
     }
@@ -602,13 +651,16 @@ public:
     //------------------------------------------------------------------------
     // Capacity
     //------------------------------------------------------------------------
-    //! Return size of vector.
-    size_type size() const {return my_early_size;}
+    //! Return size of vector. It may include elements under construction
+    size_type size() const {
+        size_type sz = my_early_size, cp = internal_capacity();
+        return cp < sz ? cp : sz;
+    }
 
-    //! Return size of vector.
+    //! Return true if vector is not empty or has elements under construction at least.
     bool empty() const {return !my_early_size;}
 
-    //! Maximum size to which array can grow without allocating more memory.
+    //! Maximum size to which array can grow without allocating more memory. Concurrent allocations are not included in the value.
     size_type capacity() const {return internal_capacity();}
 
     //! Allocate enough space to grow to size n without having to allocate more memory later.
@@ -619,8 +671,23 @@ public:
             internal_reserve(n, sizeof(T), max_size());
     }
 
+    //! Resize the vector. Not thread-safe.
+    void resize( size_type n ) {
+        internal_resize( n, sizeof(T), max_size(), NULL, &destroy_array, &initialize_array );
+    }
+    
+    //! Resize the vector, copy t for new elements. Not thread-safe.
+    void resize( size_type n, const_reference t ) {
+        internal_resize( n, sizeof(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
+    }
+   
+#if TBB_DEPRECATED 
+    //! An alias for shrink_to_fit()
+    void compact() {shrink_to_fit();}
+#endif /* TBB_DEPRECATED */
+
     //! Optimize memory usage and fragmentation.
-    void compact();
+    void shrink_to_fit();
 
     //! Upper bound on argument to reserve.
     size_type max_size() const {return (~size_type(0))/sizeof(T);}
@@ -637,6 +704,10 @@ public:
     const_iterator begin() const {return const_iterator(*this,0);}
     //! end const iterator
     const_iterator end() const {return const_iterator(*this,size());}
+    //! start const iterator
+    const_iterator cbegin() const {return const_iterator(*this,0);}
+    //! end const iterator
+    const_iterator cend() const {return const_iterator(*this,size());}
     //! reverse start iterator
     reverse_iterator rbegin() {return reverse_iterator(end());}
     //! reverse end iterator
@@ -645,6 +716,10 @@ public:
     const_reverse_iterator rbegin() const {return const_reverse_iterator(end());}
     //! reverse end const iterator
     const_reverse_iterator rend() const {return const_reverse_iterator(begin());}
+    //! reverse start const iterator
+    const_reverse_iterator crbegin() const {return const_reverse_iterator(end());}
+    //! reverse end const iterator
+    const_reverse_iterator crend() const {return const_reverse_iterator(begin());}
     //! the first item
     reference front() {
         __TBB_ASSERT( size()>0, NULL);
@@ -658,23 +733,26 @@ public:
     //! the last item
     reference back() {
         __TBB_ASSERT( size()>0, NULL);
-        return internal_subscript( my_early_size-1 );
+        return internal_subscript( size()-1 );
     }
     //! the last item const
     const_reference back() const {
         __TBB_ASSERT( size()>0, NULL);
-        return internal_subscript( my_early_size-1 );
+        return internal_subscript( size()-1 );
     }
     //! return allocator object
     allocator_type get_allocator() const { return this->my_allocator; }
 
     //! assign n items by copying t item
-    void assign(size_type n, const_reference t) { clear(); internal_assign( n, t ); }
+    void assign(size_type n, const_reference t) {
+        clear();
+        internal_resize( n, sizeof(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
+    }
 
     //! assign range [first, last)
     template<class I>
     void assign(I first, I last) {
-        clear(); internal_assign( first, last, static_cast<is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
+        clear(); internal_assign_range( first, last, static_cast<is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
     }
 
     //! swap two instances
@@ -714,19 +792,21 @@ private:
     T& internal_subscript_with_exceptions( size_type index ) const;
 
     //! assign n items by copying t
-    void internal_assign(size_type n, const_reference t);
+    void internal_assign_n(size_type n, const_pointer p) {
+        internal_resize( n, sizeof(T), max_size(), static_cast<const void*>(p), &destroy_array, p? &initialize_array_by : &initialize_array );
+    }
 
     //! helper class
     template<bool B> class is_integer_tag;
 
     //! assign integer items by copying when arguments are treated as iterators. See C++ Standard 2003 23.1.1p9
     template<class I>
-    void internal_assign(I first, I last, is_integer_tag<true> *) {
-        internal_assign(static_cast<size_type>(first), static_cast<T>(last));
+    void internal_assign_range(I first, I last, is_integer_tag<true> *) {
+        internal_assign_n(static_cast<size_type>(first), &static_cast<T&>(last));
     }
     //! inline proxy assign by iterators
     template<class I>
-    void internal_assign(I first, I last, is_integer_tag<false> *) {
+    void internal_assign_range(I first, I last, is_integer_tag<false> *) {
         internal_assign_iterators(first, last);
     }
     //! assign by iterators
@@ -769,7 +849,7 @@ private:
 };
 
 template<typename T, class A>
-void concurrent_vector<T, A>::compact() {
+void concurrent_vector<T, A>::shrink_to_fit() {
     internal_segments_table old;
     try {
         if( internal_compact( sizeof(T), &old, &destroy_array, &copy_array ) )
@@ -801,49 +881,35 @@ void concurrent_vector<T, A>::internal_free_segments(void *table[], segment_inde
 
 template<typename T, class A>
 T& concurrent_vector<T, A>::internal_subscript( size_type index ) const {
-    __TBB_ASSERT( index<size(), "index out of bounds" );
+    __TBB_ASSERT( index < my_early_size, "index out of bounds" );
     size_type j = index;
     segment_index_t k = segment_base_index_of( j );
+    __TBB_ASSERT( my_segment != (segment_t*)my_storage || k < pointers_per_short_table, "index is being allocated" );
     // no need in __TBB_load_with_acquire since thread works in own space or gets 
 #if TBB_USE_THREADING_TOOLS
-    return static_cast<T*>( tbb::internal::itt_load_pointer_v3(&my_segment[k].array))[j];
+    T* array = static_cast<T*>( tbb::internal::itt_load_pointer_v3(&my_segment[k].array));
 #else
-    return static_cast<T*>(my_segment[k].array)[j];
+    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, "index is being allocated" );
+    return array[j];
 }
 
 template<typename T, class A>
 T& concurrent_vector<T, A>::internal_subscript_with_exceptions( size_type index ) const {
-    if( index >= size() )
+    if( index >= my_early_size )
         internal_throw_exception(0); // throw std::out_of_range
     size_type j = index;
     segment_index_t k = segment_base_index_of( j );
     if( my_segment == (segment_t*)my_storage && k >= pointers_per_short_table )
-        internal_throw_exception(1); // throw std::out_of_range
+        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
         internal_throw_exception(2); // throw std::range_error
     return static_cast<T*>(array)[j];
 }
 
-template<typename T, class A>
-void concurrent_vector<T, A>::internal_assign(size_type n, const_reference t)
-{
-    __TBB_ASSERT(my_early_size == 0, NULL);
-    if( !n ) return;
-    internal_reserve(n, sizeof(T), max_size());
-    my_early_size = n;
-    segment_index_t k = 0;
-    size_type sz = segment_size( my_first_block );
-    while( sz < n ) {
-        initialize_array_by(static_cast<T*>(my_segment[k].array), static_cast<const void*>(&t), sz);
-        n -= sz;
-        if( !k ) k = my_first_block;
-        else { ++k; sz <<= 1; }
-    }
-    initialize_array_by(static_cast<T*>(my_segment[k].array), static_cast<const void*>(&t), n);
-}
-
 template<typename T, class A> template<class I>
 void concurrent_vector<T, A>::internal_assign_iterators(I first, I last) {
     __TBB_ASSERT(my_early_size == 0, NULL);
@@ -902,7 +968,6 @@ void concurrent_vector<T, A>::destroy_array( void* begin, size_type n ) {
 // concurrent_vector's template functions
 template<typename T, class A1, class A2>
 inline bool operator==(const concurrent_vector<T, A1> &a, const concurrent_vector<T, A2> &b) {
-    //TODO[?]: deal with _Range_checked_iterator_tag of MSVC.
     // Simply:    return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());
     if(a.size() != b.size()) return false;
     typename concurrent_vector<T, A1>::const_iterator i(a.begin());
diff --git a/include/tbb/enumerable_thread_specific.h b/include/tbb/enumerable_thread_specific.h
new file mode 100644
index 0000000..68d2f88
--- /dev/null
+++ b/include/tbb/enumerable_thread_specific.h
@@ -0,0 +1,863 @@
+/*
+    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_enumerable_thread_specific_H
+#define __TBB_enumerable_thread_specific_H
+
+#include "concurrent_vector.h"
+#include "tbb_thread.h"
+#include "concurrent_hash_map.h"
+#include "cache_aligned_allocator.h"
+#if __SUNPRO_CC
+#include <string.h>  // for memcpy
+#endif
+
+#if _WIN32||_WIN64
+#include <windows.h>
+#else
+#include <pthread.h>
+#endif
+
+namespace tbb {
+
+    //! enum for selecting between single key and key-per-instance versions
+    enum ets_key_usage_type { ets_key_per_instance, ets_no_key };
+
+    //! @cond
+    namespace internal {
+        
+        //! Random access iterator for traversing the thread local copies.
+        template< typename Container, typename Value >
+        class enumerable_thread_specific_iterator 
+#if defined(_WIN64) && defined(_MSC_VER) 
+            // Ensure that Microsoft's internal template function _Val_type works correctly.
+            : public std::iterator<std::random_access_iterator_tag,Value>
+#endif /* defined(_WIN64) && defined(_MSC_VER) */
+        {
+            //! current position in the concurrent_vector 
+        
+            Container *my_container;
+            typename Container::size_type my_index;
+            mutable Value *my_value;
+        
+            template<typename C, typename T>
+            friend enumerable_thread_specific_iterator<C,T> operator+( ptrdiff_t offset, 
+                                                                       const enumerable_thread_specific_iterator<C,T>& v );
+        
+            template<typename C, typename T, typename U>
+            friend bool operator==( const enumerable_thread_specific_iterator<C,T>& i, 
+                                    const enumerable_thread_specific_iterator<C,U>& j );
+        
+            template<typename C, typename T, typename U>
+            friend bool operator<( const enumerable_thread_specific_iterator<C,T>& i, 
+                                   const enumerable_thread_specific_iterator<C,U>& j );
+        
+            template<typename C, typename T, typename U>
+            friend ptrdiff_t operator-( const enumerable_thread_specific_iterator<C,T>& i, const enumerable_thread_specific_iterator<C,U>& j );
+            
+            template<typename C, typename U> 
+            friend class enumerable_thread_specific_iterator;
+        
+            public:
+        
+            enumerable_thread_specific_iterator( const Container &container, typename Container::size_type index ) : 
+                my_container(&const_cast<Container &>(container)), my_index(index), my_value(NULL) {}
+        
+            //! Default constructor
+            enumerable_thread_specific_iterator() : my_container(NULL), my_index(0), my_value(NULL) {}
+        
+            template<typename U>
+            enumerable_thread_specific_iterator( const enumerable_thread_specific_iterator<Container, U>& other ) :
+                    my_container( other.my_container ), my_index( other.my_index), my_value( const_cast<Value *>(other.my_value) ) {}
+        
+            enumerable_thread_specific_iterator operator+( ptrdiff_t offset ) const {
+                return enumerable_thread_specific_iterator(*my_container, my_index + offset);
+            }
+        
+            enumerable_thread_specific_iterator &operator+=( ptrdiff_t offset ) {
+                my_index += offset;
+                my_value = NULL;
+                return *this;
+            }
+        
+            enumerable_thread_specific_iterator operator-( ptrdiff_t offset ) const {
+                return enumerable_thread_specific_iterator( *my_container, my_index-offset );
+            }
+        
+            enumerable_thread_specific_iterator &operator-=( ptrdiff_t offset ) {
+                my_index -= offset;
+                my_value = NULL;
+                return *this;
+            }
+        
+            Value& operator*() const {
+                Value* value = my_value;
+                if( !value ) {
+                    value = my_value = &(*my_container)[my_index].value;
+                }
+                __TBB_ASSERT( value==&(*my_container)[my_index].value, "corrupt cache" );
+                return *value;
+            }
+        
+            Value& operator[]( ptrdiff_t k ) const {
+               return (*my_container)[my_index + k].value;
+            }
+        
+            Value* operator->() const {return &operator*();}
+        
+            enumerable_thread_specific_iterator& operator++() {
+                ++my_index;
+                my_value = NULL;
+                return *this;
+            }
+        
+            enumerable_thread_specific_iterator& operator--() {
+                --my_index;
+                my_value = NULL;
+                return *this;
+            }
+        
+            //! Post increment
+            enumerable_thread_specific_iterator operator++(int) {
+                enumerable_thread_specific_iterator result = *this;
+                ++my_index;
+                my_value = NULL;
+                return result;
+            }
+        
+            //! Post decrement
+            enumerable_thread_specific_iterator operator--(int) {
+                enumerable_thread_specific_iterator result = *this;
+                --my_index;
+                my_value = NULL;
+                return result;
+            }
+        
+            // STL support
+            typedef ptrdiff_t difference_type;
+            typedef Value value_type;
+            typedef Value* pointer;
+            typedef Value& reference;
+            typedef std::random_access_iterator_tag iterator_category;
+        };
+        
+        template<typename Container, typename T>
+        enumerable_thread_specific_iterator<Container,T> operator+( ptrdiff_t offset, 
+                                                                    const enumerable_thread_specific_iterator<Container,T>& v ) {
+            return enumerable_thread_specific_iterator<Container,T>( v.my_container, v.my_index + offset );
+        }
+        
+        template<typename Container, typename T, typename U>
+        bool operator==( const enumerable_thread_specific_iterator<Container,T>& i, 
+                         const enumerable_thread_specific_iterator<Container,U>& j ) {
+            return i.my_index==j.my_index && i.my_container == j.my_container;
+        }
+        
+        template<typename Container, typename T, typename U>
+        bool operator!=( const enumerable_thread_specific_iterator<Container,T>& i, 
+                         const enumerable_thread_specific_iterator<Container,U>& j ) {
+            return !(i==j);
+        }
+        
+        template<typename Container, typename T, typename U>
+        bool operator<( const enumerable_thread_specific_iterator<Container,T>& i, 
+                        const enumerable_thread_specific_iterator<Container,U>& j ) {
+            return i.my_index<j.my_index;
+        }
+        
+        template<typename Container, typename T, typename U>
+        bool operator>( const enumerable_thread_specific_iterator<Container,T>& i, 
+                        const enumerable_thread_specific_iterator<Container,U>& j ) {
+            return j<i;
+        }
+        
+        template<typename Container, typename T, typename U>
+        bool operator>=( const enumerable_thread_specific_iterator<Container,T>& i, 
+                         const enumerable_thread_specific_iterator<Container,U>& j ) {
+            return !(i<j);
+        }
+        
+        template<typename Container, typename T, typename U>
+        bool operator<=( const enumerable_thread_specific_iterator<Container,T>& i, 
+                         const enumerable_thread_specific_iterator<Container,U>& j ) {
+            return !(j<i);
+        }
+        
+        template<typename Container, typename T, typename U>
+        ptrdiff_t operator-( const enumerable_thread_specific_iterator<Container,T>& i, 
+                             const enumerable_thread_specific_iterator<Container,U>& j ) {
+            return i.my_index-j.my_index;
+        }
+
+    template<typename SegmentedContainer, typename Value >
+        class segmented_iterator
+#if defined(_WIN64) && defined(_MSC_VER)
+        : public std::iterator<std::input_iterator_tag, Value>
+#endif
+        {
+            template<typename C, typename T, typename U>
+            friend bool operator==(const segmented_iterator<C,T>& i, const segmented_iterator<C,U>& j);
+
+            template<typename C, typename T, typename U>
+            friend bool operator!=(const segmented_iterator<C,T>& i, const segmented_iterator<C,U>& j);
+            
+            template<typename C, typename U> 
+            friend class segmented_iterator;
+
+            public:
+
+                segmented_iterator() {my_segcont = NULL;}
+
+                segmented_iterator( const SegmentedContainer& _segmented_container ) : 
+                    my_segcont(const_cast<SegmentedContainer*>(&_segmented_container)),
+                    outer_iter(my_segcont->end()) { }
+
+                ~segmented_iterator() {}
+
+                typedef typename SegmentedContainer::iterator outer_iterator;
+                typedef typename SegmentedContainer::value_type InnerContainer;
+                typedef typename InnerContainer::iterator inner_iterator;
+
+                // STL support
+                typedef ptrdiff_t difference_type;
+                typedef Value value_type;
+                typedef typename SegmentedContainer::size_type size_type;
+                typedef Value* pointer;
+                typedef Value& reference;
+                typedef std::input_iterator_tag iterator_category;
+
+                // Copy Constructor
+                template<typename U>
+                segmented_iterator(const segmented_iterator<SegmentedContainer, U>& other) :
+                    my_segcont(other.my_segcont),
+                    outer_iter(other.outer_iter),
+                    // can we assign a default-constructed iterator to inner if we're at the end?
+                    inner_iter(other.inner_iter)
+                {}
+
+                // assignment
+                template<typename U>
+                segmented_iterator& operator=( const segmented_iterator<SegmentedContainer, U>& other) {
+                    if(this != &other) {
+                        my_segcont = other.my_segcont;
+                        outer_iter = other.outer_iter;
+                        if(outer_iter != my_segcont->end()) inner_iter = other.inner_iter;
+                    }
+                    return *this;
+                }
+
+                // allow assignment of outer iterator to segmented iterator.  Once it is
+                // assigned, move forward until a non-empty inner container is found or
+                // the end of the outer container is reached.
+                segmented_iterator& operator=(const outer_iterator& new_outer_iter) {
+                    __TBB_ASSERT(my_segcont != NULL, NULL);
+                    // check that this iterator points to something inside the segmented container
+                    for(outer_iter = new_outer_iter ;outer_iter!=my_segcont->end(); ++outer_iter) {
+                        if( !outer_iter->empty() ) {
+                            inner_iter = outer_iter->begin();
+                            break;
+                        }
+                    }
+                    return *this;
+                }
+
+                // pre-increment
+                segmented_iterator& operator++() {
+                    advance_me();
+                    return *this;
+                }
+
+                // post-increment
+                segmented_iterator operator++(int) {
+                    segmented_iterator tmp = *this;
+                    operator++();
+                    return tmp;
+                }
+
+                bool operator==(const outer_iterator& other_outer) const {
+                    __TBB_ASSERT(my_segcont != NULL, NULL);
+                    return (outer_iter == other_outer &&
+                            (outer_iter == my_segcont->end() || inner_iter == outer_iter->begin()));
+                }
+
+                bool operator!=(const outer_iterator& other_outer) const {
+                    return !operator==(other_outer);
+
+                }
+
+                // (i)* RHS
+                reference operator*() const {
+                    __TBB_ASSERT(my_segcont != NULL, NULL);
+                    __TBB_ASSERT(outer_iter != my_segcont->end(), "Dereferencing a pointer at end of container");
+                    __TBB_ASSERT(inner_iter != outer_iter->end(), NULL); // should never happen
+                    return *inner_iter;
+                }
+
+                // i->
+                pointer operator->() const { return &operator*();}
+
+            private:
+                SegmentedContainer*             my_segcont;
+                outer_iterator outer_iter;
+                inner_iterator inner_iter;
+
+                void advance_me() {
+                    __TBB_ASSERT(my_segcont != NULL, NULL);
+                    __TBB_ASSERT(outer_iter != my_segcont->end(), NULL); // not true if there are no inner containers
+                    __TBB_ASSERT(inner_iter != outer_iter->end(), NULL); // not true if the inner containers are all empty.
+                    ++inner_iter;
+                    while(inner_iter == outer_iter->end() && ++outer_iter != my_segcont->end()) {
+                        inner_iter = outer_iter->begin();
+                    }
+                }
+        };    // segmented_iterator
+
+        template<typename SegmentedContainer, typename T, typename U>
+        bool operator==( const segmented_iterator<SegmentedContainer,T>& i, 
+                         const segmented_iterator<SegmentedContainer,U>& j ) {
+            if(i.my_segcont != j.my_segcont) return false;
+            if(i.my_segcont == NULL) return true;
+            if(i.outer_iter != j.outer_iter) return false;
+            if(i.outer_iter == i.my_segcont->end()) return true;
+            return i.inner_iter == j.inner_iter;
+        }
+
+        // !=
+        template<typename SegmentedContainer, typename T, typename U>
+        bool operator!=( const segmented_iterator<SegmentedContainer,T>& i, 
+                         const segmented_iterator<SegmentedContainer,U>& j ) {
+            return !(i==j);
+        }
+
+        // empty template for following specializations
+        template<ets_key_usage_type et>
+        struct tls_manager {};
+        
+        //! Struct that doesn't use a key
+        template <>
+        struct tls_manager<ets_no_key> {
+            typedef size_t tls_key_t;
+            static inline void create_key( tls_key_t &) { }
+            static inline void destroy_key( tls_key_t & ) { }
+            static inline void set_tls( tls_key_t &, void *  ) { }
+            static inline void * get_tls( tls_key_t & ) { return (size_t)0; }
+        };
+
+        //! Struct to use native TLS support directly
+        template <>
+        struct tls_manager <ets_key_per_instance> {
+#if _WIN32||_WIN64
+            typedef DWORD tls_key_t;
+            static inline void create_key( tls_key_t &k) { k = TlsAlloc(); }
+            static inline void destroy_key( tls_key_t &k) { TlsFree(k); }
+            static inline void set_tls( tls_key_t &k, void * value) { TlsSetValue(k, (LPVOID)value); }
+            static inline void * get_tls( tls_key_t &k ) { return (void *)TlsGetValue(k); }
+#else
+            typedef pthread_key_t tls_key_t;
+            static inline void create_key( tls_key_t &k) { pthread_key_create(&k, NULL); }
+            static inline void destroy_key( tls_key_t &k) { pthread_key_delete(k); }
+            static inline void set_tls( tls_key_t &k, void * value) { pthread_setspecific(k, value); }
+            static inline void * get_tls( tls_key_t &k ) { return pthread_getspecific(k); }
+#endif
+        };
+
+        class thread_hash_compare {
+        public:
+            // using hack suggested by Arch to get value for thread id for hashing...
+#if _WIN32||_WIN64
+            typedef DWORD thread_key;
+#else
+            typedef pthread_t thread_key;
+#endif
+            static thread_key my_thread_key(const tbb_thread::id j) {
+                thread_key key_val;
+                memcpy(&key_val, &j, sizeof(thread_key));
+                return key_val;
+            }
+
+            bool equal( const thread_key j, const thread_key k) const {
+                return j == k;
+            }
+            unsigned long hash(const thread_key k) const {
+                return (unsigned long)k;
+            }
+        };
+
+        // storage for initialization function pointer
+        template<typename T>
+        struct callback_base {
+            virtual T apply( ) = 0;
+            virtual void destroy( ) = 0;
+            // need to be able to create copies of callback_base for copy constructor
+            virtual callback_base* make_copy() = 0;
+            // need virtual destructor to satisfy GCC compiler warning
+            virtual ~callback_base() { }
+        };
+
+        template <typename T, typename Functor>
+        struct callback_leaf : public callback_base<T> {
+            typedef Functor my_callback_type;
+            typedef callback_leaf<T,Functor> my_type;
+            typedef my_type* callback_pointer;
+            typedef typename tbb::tbb_allocator<my_type> my_allocator_type;
+            Functor f;
+            callback_leaf( const Functor& f_) : f(f_) {
+            }
+
+            static callback_pointer new_callback(const Functor& f_ ) {
+                void* new_void = my_allocator_type().allocate(1);
+                callback_pointer new_cb = new (new_void) callback_leaf<T,Functor>(f_); // placement new
+                return new_cb;
+            }
+
+            /* override */ callback_pointer make_copy() {
+                return new_callback( f );
+            }
+
+             /* override */ void destroy( ) {
+                 callback_pointer my_ptr = this;
+                 my_allocator_type().destroy(my_ptr);
+                 my_allocator_type().deallocate(my_ptr,1);
+             }
+            /* override */ T apply() { return f(); }  // does copy construction of returned value.
+        };
+
+        template<typename Key, typename T, typename HC, typename A>
+        class ets_concurrent_hash_map : public tbb::concurrent_hash_map<Key, T, HC, A> {
+        public:
+            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
+        };
+    
+    } // namespace internal
+    //! @endcond
+
+    //! The thread local class template
+    template <typename T, 
+              typename Allocator=cache_aligned_allocator<T>, 
+              ets_key_usage_type ETS_key_type=ets_no_key > 
+    class enumerable_thread_specific { 
+
+        template<typename U, typename A, ets_key_usage_type C> friend class enumerable_thread_specific;
+    
+        typedef internal::tls_manager< ETS_key_type > my_tls_manager;
+
+        //! The padded elements; padded to avoid false sharing
+        template<typename U>
+        struct padded_element {
+            U value;
+            char padding[ ( (sizeof(U) - 1) / internal::NFS_MaxLineSize + 1 ) * internal::NFS_MaxLineSize - sizeof(U) ];
+            padded_element(const U &v) : value(v) {}
+            padded_element() {}
+        };
+    
+        //! A generic range, used to create range objects from the iterators
+        template<typename I>
+        class generic_range_type: public blocked_range<I> {
+        public:
+            typedef T value_type;
+            typedef T& reference;
+            typedef const T& const_reference;
+            typedef I iterator;
+            typedef ptrdiff_t difference_type;
+            generic_range_type( I begin_, I end_, size_t grainsize = 1) : blocked_range<I>(begin_,end_,grainsize) {} 
+            template<typename U>
+            generic_range_type( const generic_range_type<U>& r) : blocked_range<I>(r.begin(),r.end(),r.grainsize()) {} 
+            generic_range_type( generic_range_type& r, split ) : blocked_range<I>(r,split()) {}
+        };
+    
+        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
+        // 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;
+        typedef 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;
+
+        typename my_tls_manager::tls_key_t my_key;
+
+        void reset_key() {
+            my_tls_manager::destroy_key(my_key);
+            my_tls_manager::create_key(my_key); 
+        }
+
+        internal::callback_base<T> *my_finit_callback;
+
+        // need to use a pointed-to exemplar because T may not be assignable.
+        // using tbb_allocator instead of padded_element_allocator because we may be
+        // copying an exemplar from one instantiation of ETS to another with a different
+        // allocator.
+        typedef typename tbb::tbb_allocator<padded_element<T> > exemplar_allocator_type;
+        static padded_element<T> * create_exemplar(const T& my_value) {
+            padded_element<T> *new_exemplar = 0;
+            // void *new_space = padded_allocator_type().allocate(1);
+            void *new_space = exemplar_allocator_type().allocate(1);
+            new_exemplar = new(new_space) padded_element<T>(my_value);
+            return new_exemplar;
+        }
+
+        static padded_element<T> *create_exemplar( ) {
+            // void *new_space = padded_allocator_type().allocate(1);
+            void *new_space = exemplar_allocator_type().allocate(1);
+            padded_element<T> *new_exemplar = new(new_space) padded_element<T>( );
+            return new_exemplar;
+        }
+
+        static void free_exemplar(padded_element<T> *my_ptr) {
+            // padded_allocator_type().destroy(my_ptr);
+            // padded_allocator_type().deallocate(my_ptr,1);
+            exemplar_allocator_type().destroy(my_ptr);
+            exemplar_allocator_type().deallocate(my_ptr,1);
+        }
+
+        padded_element<T>* my_exemplar_ptr;
+
+        internal_collection_type my_locals;
+        thread_to_index_type my_hash_tbl;
+    
+    public:
+    
+        //! Basic types
+        typedef Allocator allocator_type;
+        typedef T value_type;
+        typedef T& reference;
+        typedef const T& const_reference;
+        typedef T* pointer;
+        typedef const T* const_pointer;
+        typedef typename internal_collection_type::size_type size_type;
+        typedef typename internal_collection_type::difference_type difference_type;
+    
+        // Iterator types
+        typedef typename internal::enumerable_thread_specific_iterator< internal_collection_type, value_type > iterator;
+        typedef typename internal::enumerable_thread_specific_iterator< internal_collection_type, const value_type > const_iterator;
+
+        // Parallel range types
+        typedef generic_range_type< iterator > range_type;
+        typedef generic_range_type< const_iterator > const_range_type;
+    
+        //! Default constructor, which leads to default construction of local copies
+        enumerable_thread_specific() : my_finit_callback(0) { 
+            my_exemplar_ptr = create_exemplar();
+            my_tls_manager::create_key(my_key); 
+        }
+
+        //! construction with initializer method
+        // Finit should be a function taking 0 parameters and returning a T
+        template <typename Finit>
+        enumerable_thread_specific( Finit _finit )
+        {
+            my_finit_callback = internal::callback_leaf<T,Finit>::new_callback( _finit );
+            my_tls_manager::create_key(my_key);
+            my_exemplar_ptr = 0; // don't need exemplar if function is provided
+        }
+    
+        //! Constuction with exemplar, which leads to copy construction of local copies
+        enumerable_thread_specific(const T &_exemplar) : my_finit_callback(0) {
+            my_exemplar_ptr = create_exemplar(_exemplar);
+            my_tls_manager::create_key(my_key); 
+        }
+    
+        //! Destructor
+        ~enumerable_thread_specific() { 
+            my_tls_manager::destroy_key(my_key); 
+            if(my_finit_callback) {
+                my_finit_callback->destroy();
+            }
+            if(my_exemplar_ptr)
+            {
+                free_exemplar(my_exemplar_ptr);
+            }
+        }
+      
+        //! returns reference to local, discarding exists
+        reference local() {
+            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
+            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;
+                }
+            }
+            // 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;
+        }
+
+        //! Get the number of local copies
+        size_type size() const { return my_locals.size(); }
+    
+        //! true if there have been no local copies created
+        bool empty() const { return my_locals.empty(); }
+    
+        //! begin iterator
+        iterator begin() { return iterator( my_locals, 0 ); }
+        //! end iterator
+        iterator end() { return iterator(my_locals, my_locals.size() ); }
+    
+        //! begin const iterator
+        const_iterator begin() const { return const_iterator(my_locals, 0); }
+    
+        //! end const iterator
+        const_iterator end() const { return const_iterator(my_locals, my_locals.size()); }
+
+        //! Get range for parallel algorithms
+        range_type range( size_t grainsize=1 ) { return range_type( begin(), end(), grainsize ); } 
+        
+        //! Get const range for parallel algorithms
+        const_range_type range( size_t grainsize=1 ) const { return const_range_type( begin(), end(), grainsize ); }
+    
+        //! Destroys local copies
+        void clear() {
+            my_locals.clear();
+            my_hash_tbl.clear();
+            reset_key();
+            // callback is not destroyed
+            // exemplar is not destroyed
+        }
+
+        // STL container methods
+        // copy constructor
+
+    private:
+
+        template<typename U, typename A2, ets_key_usage_type C2>
+        void
+        internal_copy_construct( const enumerable_thread_specific<U, A2, C2>& other) {
+            typedef typename tbb::enumerable_thread_specific<U, A2, C2> other_type;
+            for(typename other_type::const_iterator ci = other.begin(); ci != other.end(); ++ci) {
+                my_locals.push_back(*ci);
+            }
+            if(other.my_finit_callback) {
+                my_finit_callback = other.my_finit_callback->make_copy();
+            }
+            else {
+                my_finit_callback = 0;
+            }
+            if(other.my_exemplar_ptr) {
+                my_exemplar_ptr = create_exemplar(other.my_exemplar_ptr->value);
+            }
+            else {
+                my_exemplar_ptr = 0;
+            }
+            my_tls_manager::create_key(my_key);
+        }
+
+    public:
+
+        template<typename U, typename Alloc, ets_key_usage_type Cachetype>
+        enumerable_thread_specific( const enumerable_thread_specific<U, Alloc, Cachetype>& other ) : my_hash_tbl(other.my_hash_tbl) 
+        {   // Have to do push_back because the contained elements are not necessarily assignable.
+            internal_copy_construct(other);
+        }
+
+        // non-templatized version
+        enumerable_thread_specific( const enumerable_thread_specific& other ) : my_hash_tbl(other.my_hash_tbl) 
+        {
+            internal_copy_construct(other);
+        }
+
+    private:
+
+        template<typename U, typename A2, ets_key_usage_type C2>
+        enumerable_thread_specific &
+        internal_assign(const enumerable_thread_specific<U, A2, C2>& other) {
+            typedef typename tbb::enumerable_thread_specific<U, A2, C2> other_type;
+            if(static_cast<void *>( this ) != static_cast<const void *>( &other )) {
+                this->clear(); // resets TLS key
+                my_hash_tbl = other.my_hash_tbl;
+                // cannot use assign because T may not be assignable.
+                for(typename other_type::const_iterator ci = other.begin(); ci != other.end(); ++ci) {
+                    my_locals.push_back(*ci);
+                }
+
+                if(my_finit_callback) {
+                    my_finit_callback->destroy();
+                    my_finit_callback = 0;
+                }
+                if(my_exemplar_ptr) {
+                    free_exemplar(my_exemplar_ptr);
+                    my_exemplar_ptr = 0;
+                }
+                if(other.my_finit_callback) {
+                    my_finit_callback = other.my_finit_callback->make_copy();
+                }
+
+                if(other.my_exemplar_ptr) {
+                    my_exemplar_ptr = create_exemplar(other.my_exemplar_ptr->value);
+                }
+            }
+            return *this;
+        }
+
+    public:
+
+        // assignment
+        enumerable_thread_specific& operator=(const enumerable_thread_specific& other) {
+            return internal_assign(other);
+        }
+
+        template<typename U, typename Alloc, ets_key_usage_type Cachetype>
+        enumerable_thread_specific& operator=(const enumerable_thread_specific<U, Alloc, Cachetype>& other)
+        {
+            return internal_assign(other);
+        }
+
+    private:
+
+        // combine_func_t has signature T(T,T) or T(const T&, const T&)
+        template <typename combine_func_t>
+        T internal_combine(typename internal_collection_type::const_range_type r, combine_func_t f_combine) {
+            if(r.is_divisible()) {
+                typename internal_collection_type::const_range_type r2(r,split());
+                return f_combine(internal_combine(r2, f_combine), internal_combine(r, f_combine));
+            }
+            if(r.size() == 1) {
+                return r.begin()->value;
+            }
+            typename internal_collection_type::const_iterator i2 = r.begin();
+            ++i2;
+            return f_combine(r.begin()->value, i2->value);
+        }
+
+    public:
+
+        // combine_func_t has signature T(T,T) or T(const T&, const T&)
+        template <typename combine_func_t>
+        T combine(combine_func_t f_combine) {
+            if(my_locals.begin() == my_locals.end()) {
+                if(my_finit_callback) {
+                    return my_finit_callback->apply();
+                }
+                return (*my_exemplar_ptr).value;
+            }
+            typename internal_collection_type::const_range_type r(my_locals.begin(), my_locals.end(), (size_t)2);
+            return internal_combine(r, f_combine);
+        }
+
+        // combine_func_t has signature void(T) or void(const T&)
+        template <typename combine_func_t>
+        void combine_each(combine_func_t f_combine) {
+            for(const_iterator ci = begin(); ci != end(); ++ci) {
+                f_combine( *ci );
+            }
+        }
+    }; // enumerable_thread_specific
+
+    template< typename Container >
+    class flattened2d {
+
+        // This intermediate typedef is to address issues with VC7.1 compilers
+        typedef typename Container::value_type conval_type;
+
+    public:
+
+        //! Basic types
+        typedef typename conval_type::size_type size_type;
+        typedef typename conval_type::difference_type difference_type;
+        typedef typename conval_type::allocator_type allocator_type;
+        typedef typename conval_type::value_type value_type;
+        typedef typename conval_type::reference reference;
+        typedef typename conval_type::const_reference const_reference;
+        typedef typename conval_type::pointer pointer;
+        typedef typename conval_type::const_pointer const_pointer;
+
+        typedef typename internal::segmented_iterator<Container, value_type> iterator;
+        typedef typename internal::segmented_iterator<Container, const value_type> const_iterator;
+
+        flattened2d( const Container &c, typename Container::const_iterator b, typename Container::const_iterator e ) : 
+            my_container(const_cast<Container*>(&c)), my_begin(b), my_end(e) { }
+
+        flattened2d( const Container &c ) : 
+            my_container(const_cast<Container*>(&c)), my_begin(c.begin()), my_end(c.end()) { }
+
+        iterator begin() { return iterator(*my_container) = my_begin; }
+        iterator end() { return iterator(*my_container) = my_end; }
+        const_iterator begin() const { return const_iterator(*my_container) = my_begin; }
+        const_iterator end() const { return const_iterator(*my_container) = my_end; }
+
+        size_type size() const {
+            size_type tot_size = 0;
+            for(typename Container::const_iterator i = my_begin; i != my_end; ++i) {
+                tot_size += i->size();
+            }
+            return tot_size;
+        }
+
+    private:
+
+        Container *my_container;
+        typename Container::const_iterator my_begin;
+        typename Container::const_iterator my_end;
+
+    };
+
+    template <typename Container>
+    flattened2d<Container> flatten2d(const Container &c, const typename Container::const_iterator b, const typename Container::const_iterator e) {
+        return flattened2d<Container>(c, b, e);
+    }
+
+    template <typename Container>
+    flattened2d<Container> flatten2d(const Container &c) {
+        return flattened2d<Container>(c);
+    }
+
+} // namespace tbb
+
+#endif
diff --git a/examples/parallel_for/index.html b/include/tbb/index.html
similarity index 58%
copy from examples/parallel_for/index.html
copy to include/tbb/index.html
index a917dc1..fa05965 100644
--- a/examples/parallel_for/index.html
+++ b/include/tbb/index.html
@@ -2,16 +2,16 @@
 <BODY>
 
 <H2>Overview</H2>
-This directory has examples of the template <code>parallel_for</code>.
+Include files for Threading Building Blocks classes and functions.
+
+<BR><A HREF=".">Click here</A> to see all files in the directory.
 
 <H2>Directories</H2>
 <DL>
-<DT><A HREF="seismic/index.html">seismic</A>
-<DD>Parallel seismic wave simulation.
-<DT><A HREF="tachyon/index.html">tachyon</A>
-<DD>Parallel 2-D raytracer/renderer.
-<DT><A HREF="polygon_overlay/index.html">polygon_overlay</A>
-<DD>Simple polygon overlay.
+<DT><A HREF="machine">machine</A>
+<DD>Include files for low-level architecture specific functionality.
+<DT><A HREF="compat">compat</A>
+<DD>Include files for source level compatibility with other frameworks.
 </DL>
 
 <HR>
@@ -26,4 +26,3 @@ subsidiaries in the United States and other countries.
 * Other names and brands may be claimed as the property of others.
 </BODY>
 </HTML>
-
diff --git a/include/tbb/machine/linux_ia32.h b/include/tbb/machine/linux_ia32.h
index b9030f9..514e3d7 100644
--- a/include/tbb/machine/linux_ia32.h
+++ b/include/tbb/machine/linux_ia32.h
@@ -30,11 +30,16 @@
 #error Do not include this file directly; include tbb_machine.h instead
 #endif
 
+#if !__MINGW32__
 #include "linux_common.h"
+#endif
 
 #define __TBB_WORDSIZE 4
 #define __TBB_BIG_ENDIAN 0
 
+#define __TBB_release_consistency_helper() __asm__ __volatile__("": : :"memory")
+
+inline void __TBB_rel_acq_fence() { __asm__ __volatile__("mfence": : :"memory"); }
 
 #define __MACHINE_DECL_ATOMICS(S,T,X) \
 static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand )  \
@@ -243,22 +248,6 @@ inline void __TBB_machine_store_with_release(volatile T &location, V value) {
 #define __TBB_FetchAndIncrementWacquire(P) __TBB_FetchAndAddW(P,1)
 #define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,-1)
 
-// Definition of Lock functions
+// Use generic definitions from tbb_machine.h
 #undef __TBB_TryLockByte
 #undef __TBB_LockByte
-
-#define __TBB_cpuid
-static inline void __TBB_x86_cpuid( int32_t buffer[4], int32_t mode ) {
-    // EBX register saved for compliancy with position-independent code (PIC) rules on IA32
-    __asm__ ("pushl %%ebx\n\t"
-             "cpuid\n\t"
-             "movl  %%ebx,%1\n\t"
-             "popl  %%ebx"
-                    : "=a"(buffer[0]),
-                      "=S"(buffer[1]),
-                      "=c"(buffer[2]),
-                      "=d"(buffer[3])
-                    : "0"(mode)
-                    : "memory" );
-}
-
diff --git a/include/tbb/machine/linux_itanium.h b/include/tbb/machine/linux_ia64.h
similarity index 96%
rename from include/tbb/machine/linux_itanium.h
rename to include/tbb/machine/linux_ia64.h
index e458f90..59347b5 100644
--- a/include/tbb/machine/linux_itanium.h
+++ b/include/tbb/machine/linux_ia64.h
@@ -88,6 +88,9 @@ extern "C" {
     void __TBB_machine_pause(int32_t delay);
     bool __TBB_machine_trylockbyte( volatile unsigned char &ptr );
     int64_t __TBB_machine_lockbyte( volatile unsigned char &ptr );
+
+    //! Retrieves the current RSE backing store pointer. IA64 specific.
+    void* __TBB_get_bsp();
 }
 
 #define __TBB_CompareAndSwap1(P,V,C) __TBB_machine_cmpswp1__TBB_full_fence(P,V,C)
@@ -139,9 +142,12 @@ extern "C" {
 /* Even though GCC imbues volatile loads with acquire semantics, 
    it sometimes moves loads over the acquire fence.  The
    fences defined here stop such incorrect code motion. */
-#define __TBB_fence_for_release() __asm__ __volatile__("": : :"memory")
-#define __TBB_fence_for_acquire() __asm__ __volatile__("": : :"memory")
-#endif
+#define __TBB_release_consistency_helper() __asm__ __volatile__("": : :"memory")
+#define __TBB_rel_acq_fence() __asm__ __volatile__("mf": : :"memory")
+#else
+#define __TBB_release_consistency_helper()
+#define __TBB_rel_acq_fence() __mf()
+#endif /* __INTEL_COMPILER */
 
 // Special atomic functions
 #define __TBB_CompareAndSwapW(P,V,C)   __TBB_CompareAndSwap8(P,V,C)
diff --git a/include/tbb/machine/linux_em64t.h b/include/tbb/machine/linux_intel64.h
similarity index 92%
rename from include/tbb/machine/linux_em64t.h
rename to include/tbb/machine/linux_intel64.h
index 9e955d6..6f42254 100644
--- a/include/tbb/machine/linux_em64t.h
+++ b/include/tbb/machine/linux_intel64.h
@@ -35,8 +35,9 @@
 #define __TBB_WORDSIZE 8
 #define __TBB_BIG_ENDIAN 0
 
-#define __TBB_fence_for_acquire() __asm__ __volatile__("": : :"memory")
-#define __TBB_fence_for_release() __asm__ __volatile__("": : :"memory")
+#define __TBB_release_consistency_helper() __asm__ __volatile__("": : :"memory")
+
+inline void __TBB_rel_acq_fence() { __asm__ __volatile__("mfence": : :"memory"); }
 
 #define __MACHINE_DECL_ATOMICS(S,T,X) \
 static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand )  \
@@ -131,16 +132,6 @@ static inline void __TBB_machine_pause( int32_t delay ) {
 #define __TBB_FetchAndIncrementWacquire(P) __TBB_FetchAndAddW(P,1)
 #define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,-1)
 
-// Definition of Lock functions
+// Use generic definitions from tbb_machine.h
 #undef __TBB_TryLockByte
 #undef __TBB_LockByte
-
-#define __TBB_cpuid
-static inline void __TBB_x86_cpuid( int32_t buffer[4], int32_t mode ) {
-    // NOTE: gcc sometimes fails to compile the following asm.  But icc always succeeds.
-    __asm__ ("cpuid" : "=a"(buffer[0]),
-                       "=b"(buffer[1]),
-                       "=c"(buffer[2]),
-                       "=d"(buffer[3]) : "0"(mode) : "memory" );
-}
-
diff --git a/include/tbb/machine/mac_ppc.h b/include/tbb/machine/mac_ppc.h
index a950137..6d6b1be 100644
--- a/include/tbb/machine/mac_ppc.h
+++ b/include/tbb/machine/mac_ppc.h
@@ -81,5 +81,5 @@ inline int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t
 #define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cmpswp4(P,V,C)
 #define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cmpswp8(P,V,C)
 #define __TBB_Yield() sched_yield()
-#define __TBB_fence_for_acquire() __asm__ __volatile__("sync": : :"memory")
-#define __TBB_fence_for_release() __asm__ __volatile__("sync": : :"memory")
+#define __TBB_rel_acq_fence() __asm__ __volatile__("lwsync": : :"memory")
+#define __TBB_release_consistency_helper() __TBB_rel_acq_fence()
diff --git a/include/tbb/machine/windows_ia32.h b/include/tbb/machine/windows_ia32.h
index cb9fa23..69c961a 100644
--- a/include/tbb/machine/windows_ia32.h
+++ b/include/tbb/machine/windows_ia32.h
@@ -31,15 +31,17 @@
 #endif
 
 #if defined(__INTEL_COMPILER)
-#define __TBB_fence_for_acquire() __asm { __asm nop }
-#define __TBB_fence_for_release() __asm { __asm nop }
+#define __TBB_release_consistency_helper() __asm { __asm nop }
 #elif _MSC_VER >= 1300
 extern "C" void _ReadWriteBarrier();
 #pragma intrinsic(_ReadWriteBarrier)
-#define __TBB_fence_for_acquire() _ReadWriteBarrier()
-#define __TBB_fence_for_release() _ReadWriteBarrier()
+#define __TBB_release_consistency_helper() _ReadWriteBarrier()
+#else
+#error Unsupported compiler - need to define __TBB_release_consistency_helper to support it
 #endif
 
+inline void __TBB_rel_acq_fence() { __asm { __asm mfence } }
+
 #define __TBB_WORDSIZE 4
 #define __TBB_BIG_ENDIAN 0
 
@@ -55,23 +57,18 @@ extern "C" {
     __int64 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore8 (volatile void *ptr, __int64 value );
     void __TBB_EXPORTED_FUNC __TBB_machine_store8 (volatile void *ptr, __int64 value );
     __int64 __TBB_EXPORTED_FUNC __TBB_machine_load8 (const volatile void *ptr);
-    bool __TBB_EXPORTED_FUNC __TBB_machine_trylockbyte ( volatile unsigned char& flag );
 }
 
 template <typename T, size_t S>
 struct __TBB_machine_load_store {
     static inline T load_with_acquire(const volatile T& location) {
         T to_return = location;
-#ifdef __TBB_fence_for_acquire 
-        __TBB_fence_for_acquire();
-#endif /* __TBB_fence_for_acquire */
+        __TBB_release_consistency_helper();
         return to_return;
     }
 
     static inline void store_with_release(volatile T &location, T value) {
-#ifdef __TBB_fence_for_release
-        __TBB_fence_for_release();
-#endif /* __TBB_fence_for_release */
+        __TBB_release_consistency_helper();
         location = value;
     }
 };
@@ -109,6 +106,7 @@ inline void __TBB_machine_store_with_release(size_t& location, size_t value) {
 static inline T __TBB_machine_cmpswp##S ( volatile void * ptr, U value, U comparand ) { \
     T result; \
     volatile T *p = (T *)ptr; \
+    __TBB_release_consistency_helper(); \
     __asm \
     { \
        __asm mov edx, p \
@@ -117,13 +115,14 @@ static inline T __TBB_machine_cmpswp##S ( volatile void * ptr, U value, U compar
        __asm lock cmpxchg [edx], C \
        __asm mov result, A \
     } \
-   __TBB_load_with_acquire(*(T *)ptr); \
+    __TBB_release_consistency_helper(); \
     return result; \
 } \
 \
 static inline T __TBB_machine_fetchadd##S ( volatile void * ptr, U addend ) { \
     T result; \
     volatile T *p = (T *)ptr; \
+    __TBB_release_consistency_helper(); \
     __asm \
     { \
         __asm mov edx, p \
@@ -131,13 +130,14 @@ static inline T __TBB_machine_fetchadd##S ( volatile void * ptr, U addend ) { \
         __asm lock xadd [edx], A \
         __asm mov result, A \
     } \
-   __TBB_load_with_acquire(*(T *)ptr); \
+    __TBB_release_consistency_helper(); \
     return result; \
 }\
 \
 static inline T __TBB_machine_fetchstore##S ( volatile void * ptr, U value ) { \
     T result; \
     volatile T *p = (T *)ptr; \
+    __TBB_release_consistency_helper(); \
     __asm \
     { \
         __asm mov edx, p \
@@ -145,7 +145,7 @@ static inline T __TBB_machine_fetchstore##S ( volatile void * ptr, U value ) { \
         __asm lock xchg [edx], A \
         __asm mov result, A \
     } \
-   __TBB_load_with_acquire(*(T *)ptr); \
+    __TBB_release_consistency_helper(); \
     return result; \
 }
 
@@ -223,22 +223,20 @@ extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void );
 #define __TBB_Pause(V) __TBB_machine_pause(V)
 #define __TBB_Log2(V)    __TBB_machine_lg(V)
 
-#define __TBB_TryLockByte(F) __TBB_machine_trylockbyte(F)
+// Use generic definitions from tbb_machine.h
+#undef __TBB_TryLockByte
+#undef __TBB_LockByte
 
-#define __TBB_cpuid
-static inline void __TBB_x86_cpuid( __int32 buffer[4], __int32 mode ) {
-    __asm
-    {
-        mov eax,mode
-        cpuid
-        mov edi,buffer
-        mov [edi+0],eax
-        mov [edi+4],ebx
-        mov [edi+8],ecx
-        mov [edi+12],edx
+#if defined(_MSC_VER)&&_MSC_VER<1400
+    static inline void* __TBB_machine_get_current_teb () {
+        void* pteb;
+        __asm mov eax, fs:[0x18]
+        __asm mov pteb, eax
+        return pteb;
     }
-}
+#endif
 
 #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
     #pragma warning (pop)
 #endif // warnings 4244, 4267 are back
+
diff --git a/include/tbb/machine/windows_ia32_inline.h b/include/tbb/machine/windows_ia32_inline.h
deleted file mode 100644
index 90095c2..0000000
--- a/include/tbb/machine/windows_ia32_inline.h
+++ /dev/null
@@ -1,189 +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_machine_H
-#error Do not include this file directly; include tbb_machine.h instead
-#endif
-
-#include <windows.h>
-
-#define __TBB_WORDSIZE 4
-#define __TBB_BIG_ENDIAN 0
-
-#define DEFINE_ATOMICS(S,T,A,C) \
-static inline T __TBB_machine_cmpswp##S ( volatile void * ptr, T value, T comparand ) { \
-    T result; \
-    T *p = (T *)ptr; \
-    __asm \
-    { \
-       __asm mov edx, p \
-       __asm mov C , value \
-       __asm mov A , comparand \
-       __asm lock cmpxchg [edx], C \
-       __asm mov result, A \
-    } \
-    return result; \
-} \
-\
-static inline T __TBB_machine_fetchadd##S ( volatile void * ptr, T addend ) { \
-    T result; \
-    T *p = (T *)ptr; \
-    __asm \
-    { \
-        __asm mov edx, p \
-        __asm mov A, addend \
-        __asm lock xadd [edx], A \
-        __asm mov result, A \
-    } \
-    return result; \
-}\
-\
-static inline T __TBB_machine_fetchstore##S ( volatile void * ptr, T value ) { \
-    T result; \
-    T *p = (T *)ptr; \
-    __asm \
-    { \
-        __asm mov edx, p \
-        __asm mov A, value \
-        __asm lock xchg [edx], A \
-        __asm mov result, A \
-    } \
-    return result; \
-}
-
-DEFINE_ATOMICS(1, __int8, al, cl)
-DEFINE_ATOMICS(2, __int16, ax, cx)
-DEFINE_ATOMICS(4, __int32, eax, ecx)
-
-static inline __int64 __TBB_machine_cmpswp8 (volatile void *ptr, __int64 value, __int64 comparand ) {
-    __int32 comparand_lo = comparand;
-    __int32 comparand_hi = comparand>>32;
-    __int32 value_lo = value;
-    __int32 value_hi = value>>32;
-
-    __int64 *p = (__int64 *)ptr;
-
-    // EDX:EAX is comparand, ECX:EBX is value, EDX:EAX is result
-    __asm 
-    {
-        mov edx, comparand_hi
-        mov eax, comparand_lo
-        mov ecx, value_hi
-        mov ebx, value_lo
-        lock cmpxchg8b [p]
-    }
-}
-
-
-static inline __int32 __TBB_machine_lg( unsigned __int64 i ) {
-    unsigned __int32 j;
-    __asm
-    {
-        bsr eax, i
-        mov j, eax
-    }
-    return j;
-}
-
-static inline void __TBB_machine_OR( volatile void *operand, unsigned __int32 addend ) {
-   __asm 
-   {
-       mov eax, addend
-       mov edx, [operand]
-       lock or [edx], eax
-   }
-}
-
-static inline void __TBB_machine_AND( volatile void *operand, unsigned __int32 addend ) {
-   __asm 
-   {
-       mov eax, addend
-       mov edx, [operand]
-       lock and [edx], eax
-   }
-}
-
-static inline void __TBB_machine_pause (__int32 delay ) {
-    _asm 
-    {
-        mov eax, delay
-      L1: 
-        pause
-        add eax, -1
-        jne L1  
-    }
-    return;
-}
-
-#define __TBB_CompareAndSwap1(P,V,C) __TBB_machine_cmpswp1(P,V,C)
-#define __TBB_CompareAndSwap2(P,V,C) __TBB_machine_cmpswp2(P,V,C)
-#define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cmpswp4(P,V,C)
-#define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cmpswp8(P,V,C)
-#define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp4(P,V,C)
-
-#define __TBB_FetchAndAdd1(P,V) __TBB_machine_fetchadd1(P,V)
-#define __TBB_FetchAndAdd2(P,V) __TBB_machine_fetchadd2(P,V)
-#define __TBB_FetchAndAdd4(P,V) __TBB_machine_fetchadd4(P,V)
-#undef __TBB_FetchAndAdd8
-#define __TBB_FetchAndAddW(P,V) __TBB_machine_fetchadd4(P,V)
-
-#define __TBB_FetchAndStore1(P,V) __TBB_machine_fetchstore1(P,V)
-#define __TBB_FetchAndStore2(P,V) __TBB_machine_fetchstore2(P,V)
-#define __TBB_FetchAndStore4(P,V) __TBB_machine_fetchstore4(P,V)
-#undef __TBB_FetchAndStore8
-#define __TBB_FetchAndStoreW(P,V) __TBB_machine_fetchstore4(P,V)
-
-// Should define this: 
-#undef __TBB_Store8
-#undef __TBB_Load8
-
-#define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V)
-#define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V)
-
-// Definition of other functions
-#if !defined(_WIN32_WINNT)
-extern "C" BOOL WINAPI SwitchToThread(void);
-#endif
-#define __TBB_Yield()  SwitchToThread()
-#define __TBB_Pause(V) __TBB_machine_pause(V)
-#define __TBB_Log2(V)    __TBB_machine_lg(V)
-
-#define __TBB_cpuid
-static inline void __TBB_x86_cpuid( __int32 buffer[4], __int32 mode ) {
-    __asm
-    {
-        mov eax,mode
-        cpuid
-        mov edi,buffer
-        mov [edi+0],eax
-        mov [edi+4],ebx
-        mov [edi+8],ecx
-        mov [edi+12],edx
-    }
-}
-
diff --git a/include/tbb/machine/windows_em64t.h b/include/tbb/machine/windows_intel64.h
similarity index 88%
rename from include/tbb/machine/windows_em64t.h
rename to include/tbb/machine/windows_intel64.h
index 7a63f7f..a885aa4 100644
--- a/include/tbb/machine/windows_em64t.h
+++ b/include/tbb/machine/windows_intel64.h
@@ -43,13 +43,14 @@
 #endif /* !defined(__INTEL_COMPILER) */
 
 #if defined(__INTEL_COMPILER)
-#define __TBB_fence_for_acquire() __asm { __asm nop }
-#define __TBB_fence_for_release() __asm { __asm nop }
+#define __TBB_release_consistency_helper() __asm { __asm nop }
+inline void __TBB_rel_acq_fence() { __asm { __asm mfence } }
 #elif _MSC_VER >= 1300
 extern "C" void _ReadWriteBarrier();
 #pragma intrinsic(_ReadWriteBarrier)
-#define __TBB_fence_for_acquire() _ReadWriteBarrier()
-#define __TBB_fence_for_release() _ReadWriteBarrier()
+#define __TBB_release_consistency_helper() _ReadWriteBarrier()
+#pragma intrinsic(_mm_mfence)
+inline void __TBB_rel_acq_fence() { _mm_mfence(); }
 #endif
 
 #define __TBB_WORDSIZE 8
@@ -126,26 +127,6 @@ extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void );
 #define __TBB_Pause(V) __TBB_machine_pause(V)
 #define __TBB_Log2(V)    __TBB_machine_lg(V)
 
-#if !__INTEL_COMPILER
-extern "C" void __cpuid( int cpuinfo[4], int mode );
-#pragma intrinsic(__cpuid)
-#endif
-
-#define __TBB_cpuid
-inline void __TBB_x86_cpuid( __int32 buffer[4], __int32 mode ) {
-#if __INTEL_COMPILER
-    __asm
-    {
-        mov eax,mode
-        cpuid
-        mov rdi,buffer
-        mov [rdi+0],eax
-        mov [rdi+4],ebx
-        mov [rdi+8],ecx
-        mov [rdi+12],edx
-    }
-#else
-    __cpuid(buffer, mode);
-#endif
-}
-
+// Use generic definitions from tbb_machine.h
+#undef __TBB_TryLockByte
+#undef __TBB_LockByte
diff --git a/include/tbb/mutex.h b/include/tbb/mutex.h
index 6308e42..a14735f 100644
--- a/include/tbb/mutex.h
+++ b/include/tbb/mutex.h
@@ -45,6 +45,8 @@ extern void handle_perror( int error_code, const char* what );
 } } //namespaces
 #endif /* _WIN32||_WIN64 */
 
+#include <new>
+#include "aligned_space.h"
 #include "tbb_stddef.h"
 #include "tbb_profiling.h"
 
@@ -111,12 +113,8 @@ public:
 #if TBB_USE_ASSERT
             internal_acquire(mutex);
 #else
+            mutex.lock();
             my_mutex = &mutex;
-  #if _WIN32||_WIN64
-            EnterCriticalSection(&mutex.impl);
-  #else
-            pthread_mutex_lock(&mutex.impl);
-  #endif /* _WIN32||_WIN64 */
 #endif /* TBB_USE_ASSERT */
         }
 
@@ -125,12 +123,7 @@ public:
 #if TBB_USE_ASSERT
             return internal_try_acquire (mutex);
 #else
-            bool result;
-  #if _WIN32||_WIN64
-            result = TryEnterCriticalSection(&mutex.impl)!=0;
-  #else
-            result = pthread_mutex_trylock(&mutex.impl)==0;
-  #endif /* _WIN32||_WIN64 */
+            bool result = mutex.try_lock();
             if( result )
                 my_mutex = &mutex;
             return result;
@@ -142,11 +135,7 @@ public:
 #if TBB_USE_ASSERT
             internal_release ();
 #else
-  #if _WIN32||_WIN64
-            LeaveCriticalSection(&my_mutex->impl);
-  #else
-            pthread_mutex_unlock(&my_mutex->impl);
-  #endif /* _WIN32||_WIN64 */
+            my_mutex->unlock();
             my_mutex = NULL;
 #endif /* TBB_USE_ASSERT */
         }
@@ -163,6 +152,8 @@ public:
 
         //! All checks from release using mutex.state were moved here
         void __TBB_EXPORTED_METHOD internal_release();
+
+        friend class mutex;
     };
 
     // Mutex traits
@@ -170,6 +161,55 @@ public:
     static const bool is_recursive_mutex = false;
     static const bool is_fair_mutex = false;
 
+    // ISO C++0x compatibility methods
+
+    //! Acquire lock
+    void lock() {
+#if TBB_USE_ASSERT
+        aligned_space<scoped_lock,1> tmp;
+        new(tmp.begin()) scoped_lock(*this);
+#else
+  #if _WIN32||_WIN64
+        EnterCriticalSection(&impl);
+  #else
+        pthread_mutex_lock(&impl);
+  #endif /* _WIN32||_WIN64 */
+#endif /* TBB_USE_ASSERT */
+    }
+
+    //! Try acquiring lock (non-blocking)
+    /** Return true if lock acquired; false otherwise. */
+    bool try_lock() {
+#if TBB_USE_ASSERT
+        aligned_space<scoped_lock,1> tmp;
+        scoped_lock& s = *tmp.begin();
+        s.my_mutex = NULL;
+        return s.internal_try_acquire(*this);
+#else
+  #if _WIN32||_WIN64
+        return TryEnterCriticalSection(&impl)!=0;
+  #else
+        return pthread_mutex_trylock(&impl)==0;
+  #endif /* _WIN32||_WIN64 */
+#endif /* TBB_USE_ASSERT */
+    }
+
+    //! Release lock
+    void unlock() {
+#if TBB_USE_ASSERT
+        aligned_space<scoped_lock,1> tmp;
+        scoped_lock& s = *tmp.begin();
+        s.my_mutex = this;
+        s.internal_release();
+#else
+  #if _WIN32||_WIN64
+        LeaveCriticalSection(&impl);
+  #else
+        pthread_mutex_unlock(&impl);
+  #endif /* _WIN32||_WIN64 */
+#endif /* TBB_USE_ASSERT */
+    }
+
 private:
 #if _WIN32||_WIN64
     CRITICAL_SECTION impl;    
diff --git a/include/tbb/parallel_for.h b/include/tbb/parallel_for.h
index 62efd28..8b733e0 100644
--- a/include/tbb/parallel_for.h
+++ b/include/tbb/parallel_for.h
@@ -31,7 +31,10 @@
 
 #include "task.h"
 #include "partitioner.h"
+#include "blocked_range.h"
 #include <new>
+#include <stdexcept> // std::invalid_argument
+#include <string> // std::invalid_argument text
 
 namespace tbb {
 
@@ -123,10 +126,17 @@ namespace internal {
     See also requirements on \ref range_req "Range" and \ref parallel_for_body_req "parallel_for Body". **/
 //@{
 
-//! Parallel iteration over range with simple partitioner, or default partitioner if no partitioner is specified.
+//! Parallel iteration over range with default partitioner. 
 /** @ingroup algorithms **/
 template<typename Range, typename Body>
-void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner=simple_partitioner() ) {
+void parallel_for( const Range& range, const Body& body ) {
+    internal::start_for<Range,Body,__TBB_DEFAULT_PARTITIONER>::run(range,body,__TBB_DEFAULT_PARTITIONER());
+}
+
+//! Parallel iteration over range with simple partitioner.
+/** @ingroup algorithms **/
+template<typename Range, typename Body>
+void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner ) {
     internal::start_for<Range,Body,simple_partitioner>::run(range,body,partitioner);
 }
 
@@ -168,6 +178,54 @@ void parallel_for( const Range& range, const Body& body, affinity_partitioner& p
 #endif /* __TBB_EXCEPTIONS */
 //@}
 
+//! @cond INTERNAL
+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 Index my_begin;
+    const Index my_step; 
+public:
+    parallel_for_body( Function& _func, Index& _begin, Index& _step) 
+        : my_func(_func), my_begin(_begin), my_step(_step) {}
+    
+    void operator()( tbb::blocked_range<Index>& r ) const {
+        for( Index i = r.begin(),  k = my_begin + i * my_step; i < r.end(); i++, k = k + my_step)
+            my_func( k );
+    }
+};
+} // namespace internal
+//! @endcond
+
+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) {
+    tbb::task_group_context context;
+    return 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) {
+    if (step <= 0 ) throw std::invalid_argument("step should be positive");
+
+    if (last > first) {
+        Index end = (last - first) / step;
+        if (first + end * step < last) end++;
+        tbb::blocked_range<Index> range(static_cast<Index>(0), end);
+        internal::parallel_for_body<Function, Index> body(f, first, step);
+        tbb::parallel_for(range, body, tbb::auto_partitioner(), context);
+    }
+    return f;
+}
+//@}
+
+} // namespace strict_ppl
+
+using strict_ppl::parallel_for;
+
 } // namespace tbb
 
 #endif /* __TBB_parallel_for_H */
diff --git a/include/tbb/parallel_for_each.h b/include/tbb/parallel_for_each.h
new file mode 100644
index 0000000..3ae8da3
--- /dev/null
+++ b/include/tbb/parallel_for_each.h
@@ -0,0 +1,79 @@
+/*
+    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_parallel_for_each_H
+#define __TBB_parallel_for_each_H
+
+#include "parallel_do.h"
+
+namespace tbb {
+
+//! @cond INTERNAL
+namespace internal {
+    // The class calls user function in operator()
+    template <typename Function, typename Iterator>
+    class parallel_for_each_body : internal::no_assign {
+        Function &my_func;
+    public:
+        parallel_for_each_body(Function &_func) : my_func(_func) {}
+        parallel_for_each_body(const parallel_for_each_body<Function, Iterator> &_caller) : my_func(_caller.my_func) {}
+
+        void operator() ( typename std::iterator_traits<Iterator>::value_type value ) const {
+            my_func(value);
+        }
+    };
+} // namespace internal
+//! @endcond
+
+/** \name parallel_for_each
+    **/
+//@{
+//! Calls function _Func 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);
+
+    tbb::parallel_do (_First, _Last, body, context);
+    return _Func;
+}
+
+//! 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);
+
+    tbb::parallel_do (_First, _Last, body);
+    return _Func;
+}
+
+//@}
+
+} // namespace
+
+#endif /* __TBB_parallel_for_each_H */
diff --git a/include/tbb/parallel_invoke.h b/include/tbb/parallel_invoke.h
new file mode 100644
index 0000000..fb425c6
--- /dev/null
+++ b/include/tbb/parallel_invoke.h
@@ -0,0 +1,333 @@
+/*
+    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_parallel_invoke_H
+#define __TBB_parallel_invoke_H
+
+#include "task.h"
+
+namespace tbb {
+
+//! @cond INTERNAL
+namespace internal {
+    // Simple task object, executing user method
+    template<typename function>
+    class function_invoker : public task{
+    public:
+        function_invoker(function& _function) : my_function(_function) {}
+    private:
+        function &my_function;
+        /*override*/
+        task* execute()
+        {
+            my_function();
+            return NULL;
+        }
+    };
+
+    // The class spawns two or three child tasks
+    template <size_t N, typename function1, typename function2, typename function3>
+    class spawner : public task {
+    private:
+        function1& my_func1;
+        function2& my_func2;
+        function3& my_func3;
+        bool is_recycled;
+
+        task* execute (){
+            if(is_recycled){
+                return NULL;
+            }else{
+                __TBB_ASSERT(N==2 || N==3, "Number of arguments passed to spawner is wrong");
+                set_ref_count(N);
+                recycle_as_safe_continuation();
+                internal::function_invoker<function2>* invoker2 = new (allocate_child()) internal::function_invoker<function2>(my_func2);
+                __TBB_ASSERT(invoker2, "Child task allocation failed");
+                spawn(*invoker2);
+                size_t n = N; // To prevent compiler warnings
+                if (n>2) {
+                    internal::function_invoker<function3>* invoker3 = new (allocate_child()) internal::function_invoker<function3>(my_func3);
+                    __TBB_ASSERT(invoker3, "Child task allocation failed");
+                    spawn(*invoker3);
+                }
+                my_func1();
+                is_recycled = true;
+                return NULL;
+            }
+        } // execute
+
+    public:
+        spawner(function1& _func1, function2& _func2, function3& _func3) : my_func1(_func1), my_func2(_func2), my_func3(_func3), is_recycled(false) {}
+    };
+
+    // Creates and spawns child tasks
+    class parallel_invoke_helper : public empty_task {
+    public:
+        // Dummy functor class
+        class parallel_invoke_noop {
+        public:
+            void operator() () const {}
+        };
+        // Creates a helper object with user-defined number of children expected
+        parallel_invoke_helper(int number_of_children)
+        {
+            set_ref_count(number_of_children + 1);
+        }
+        // Adds child task and spawns it
+        template <typename function>
+        void add_child (function &_func)
+        {
+            internal::function_invoker<function>* invoker = new (allocate_child()) internal::function_invoker<function>(_func);
+            __TBB_ASSERT(invoker, "Child task allocation failed");
+            spawn(*invoker);
+        }
+
+        // Adds a task with multiple child tasks and spawns it
+        // two arguments
+        template <typename function1, typename function2>
+        void add_children (function1& _func1, function2& _func2)
+        {
+            // The third argument is dummy, it is ignored actually.
+            parallel_invoke_noop noop;
+            internal::spawner<2, function1, function2, parallel_invoke_noop>& sub_root = *new(allocate_child())internal::spawner<2, function1, function2, parallel_invoke_noop>(_func1, _func2, noop);
+            spawn(sub_root);
+        }
+        // three arguments
+        template <typename function1, typename function2, typename function3>
+        void add_children (function1& _func1, function2& _func2, function3& _func3)
+        {
+            internal::spawner<3, function1, function2, function3>& sub_root = *new(allocate_child())internal::spawner<3, function1, function2, function3>(_func1, _func2, _func3);
+            spawn(sub_root);
+        }
+
+        // Waits for all child tasks
+        template <typename F0>
+        void run_and_finish(F0& f0)
+        {
+            internal::function_invoker<F0>* invoker = new (allocate_child()) internal::function_invoker<F0>(f0);
+            __TBB_ASSERT(invoker, "Child task allocation failed");
+            spawn_and_wait_for_all(*invoker);
+        }
+    };
+    // The class destroys root if exception occured as well as in normal case
+    class parallel_invoke_cleaner: internal::no_copy { 
+    public:
+        parallel_invoke_cleaner(int number_of_children, tbb::task_group_context& context) : root(*new(task::allocate_root(context)) internal::parallel_invoke_helper(number_of_children))
+        {}
+        ~parallel_invoke_cleaner(){
+            root.destroy(root);
+        }
+        internal::parallel_invoke_helper& root;
+    };
+} // namespace internal
+//! @endcond
+
+/** \name parallel_invoke
+    **/
+//@{
+//! Executes a list of tasks in parallel and waits for all tasks to complete.
+/** @ingroup algorithms */
+
+// parallel_invoke with user-defined context
+// two arguments
+template<typename F0, typename F1 >
+void parallel_invoke(F0 f0, F1 f1, tbb::task_group_context& context) {
+    internal::parallel_invoke_cleaner cleaner(2, context);
+    internal::parallel_invoke_helper& root = cleaner.root;
+
+    root.add_child(f1);
+
+    root.run_and_finish(f0);
+}
+
+// three arguments
+template<typename F0, typename F1, typename F2 >
+void parallel_invoke(F0 f0, F1 f1, F2 f2, tbb::task_group_context& context) {
+    internal::parallel_invoke_cleaner cleaner(3, context);
+    internal::parallel_invoke_helper& root = cleaner.root;
+
+    root.add_child(f2);
+    root.add_child(f1);
+
+    root.run_and_finish(f0);
+}
+
+// four arguments
+template<typename F0, typename F1, typename F2, typename F3>
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, tbb::task_group_context& context) {
+    internal::parallel_invoke_cleaner cleaner(4, context);
+    internal::parallel_invoke_helper& root = cleaner.root;
+
+    root.add_child(f3);
+    root.add_child(f2);
+    root.add_child(f1);
+
+    root.run_and_finish(f0);
+}
+
+// five arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4 >
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, tbb::task_group_context& context) {
+    internal::parallel_invoke_cleaner cleaner(3, context);
+    internal::parallel_invoke_helper& root = cleaner.root;
+
+    root.add_children(f4, f3);
+    root.add_children(f2, f1);
+
+    root.run_and_finish(f0);
+}
+
+// six arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5 >
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, tbb::task_group_context& context) {
+    internal::parallel_invoke_cleaner cleaner(3, context);
+    internal::parallel_invoke_helper& root = cleaner.root;
+
+    root.add_children(f5, f4, f3);
+    root.add_children(f2, f1);
+
+    root.run_and_finish(f0);
+}
+
+// seven arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6 >
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, tbb::task_group_context& context) {
+    internal::parallel_invoke_cleaner cleaner(3, context);
+    internal::parallel_invoke_helper& root = cleaner.root;
+
+    root.add_children(f6, f5, f4);
+    root.add_children(f3, f2, f1);
+
+    root.run_and_finish(f0);
+}
+
+// eight arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6,
+    typename F7>
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, tbb::task_group_context& context) {
+    internal::parallel_invoke_cleaner cleaner(4, context);
+    internal::parallel_invoke_helper& root = cleaner.root;
+
+    root.add_children(f7, f6, f5);
+    root.add_children(f4, f3);
+    root.add_children(f2, f1);
+
+    root.run_and_finish(f0);
+}
+
+// nine arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6,
+        typename F7, typename F8>
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, tbb::task_group_context& context) {
+    internal::parallel_invoke_cleaner cleaner(4, context);
+    internal::parallel_invoke_helper& root = cleaner.root;
+
+    root.add_children(f8, f7, f6);
+    root.add_children(f5, f4, f3);
+    root.add_children(f2, f1);
+
+    root.run_and_finish(f0);
+}
+
+// ten arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6,
+        typename F7, typename F8, typename F9>
+void parallel_invoke(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) {
+    internal::parallel_invoke_cleaner cleaner(4, context);
+    internal::parallel_invoke_helper& root = cleaner.root;
+
+    root.add_children(f9, f8, f7);
+    root.add_children(f6, f5, f4);
+    root.add_children(f3, f2, f1);
+
+    root.run_and_finish(f0);
+}
+
+// two arguments
+template<typename F0, typename F1>
+void parallel_invoke(F0 f0, F1 f1) {
+    task_group_context context;
+    parallel_invoke<F0, F1>(f0, f1, context);
+}
+// three arguments
+template<typename F0, typename F1, typename F2>
+void parallel_invoke(F0 f0, F1 f1, F2 f2) {
+    task_group_context context;
+    parallel_invoke<F0, F1, F2>(f0, f1, f2, context);
+}
+// four arguments
+template<typename F0, typename F1, typename F2, typename F3 >
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3) {
+    task_group_context context;
+    parallel_invoke<F0, F1, F2, F3>(f0, f1, f2, f3, context);
+}
+// five arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4>
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4) {
+    task_group_context context;
+    parallel_invoke<F0, F1, F2, F3, F4>(f0, f1, f2, f3, f4, context);
+}
+// six arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5>
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5) {
+    task_group_context context;
+    parallel_invoke<F0, F1, F2, F3, F4, F5>(f0, f1, f2, f3, f4, f5, context);
+}
+// seven arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6>
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6) {
+    task_group_context context;
+    parallel_invoke<F0, F1, F2, F3, F4, F5, F6>(f0, f1, f2, f3, f4, f5, f6, context);
+}
+// eigth arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6,
+        typename F7>
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7) {
+    task_group_context context;
+    parallel_invoke<F0, F1, F2, F3, F4, F5, F6, F7>(f0, f1, f2, f3, f4, f5, f6, f7, context);
+}
+// nine arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6,
+        typename F7, typename F8>
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8) {
+    task_group_context context;
+    parallel_invoke<F0, F1, F2, F3, F4, F5, F6, F7, F8>(f0, f1, f2, f3, f4, f5, f6, f7, f8, context);
+}
+// ten arguments
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6,
+        typename F7, typename F8, typename F9>
+void parallel_invoke(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9) {
+    task_group_context context;
+    parallel_invoke<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9>(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, context);
+}
+
+//@}
+
+} // namespace
+
+#endif /* __TBB_parallel_invoke_H */
diff --git a/include/tbb/parallel_reduce.h b/include/tbb/parallel_reduce.h
index e6ded7f..89786ac 100644
--- a/include/tbb/parallel_reduce.h
+++ b/include/tbb/parallel_reduce.h
@@ -61,103 +61,6 @@ namespace internal {
 #endif /* TBB_USE_THREADING_TOOLS */
     }
 
-    //! Task type use to combine the partial results of parallel_reduce.
-    /** @ingroup algorithms */
-    template<typename Body>
-    class finish_reduce: public task {
-        Body* const my_body;
-        bool has_right_zombie;
-        aligned_space<Body,1> zombie_space;
-        finish_reduce( Body* body ) : 
-            my_body(body),
-            has_right_zombie(false)
-        {
-        }
-        task* execute() {
-            if( has_right_zombie ) {
-                // Right child was stolen.
-                Body* s = zombie_space.begin();
-                my_body->join( *s );
-                s->~Body();
-            }
-            return NULL;
-        }       
-        template<typename Range,typename Body_, typename Partitioner>
-        friend class start_reduce;
-    };
-
-    //! Task type used to split the work of parallel_reduce.
-    /** @ingroup algorithms */
-    template<typename Range, typename Body, typename Partitioner>
-    class start_reduce: public task {
-        typedef finish_reduce<Body> finish_type;
-        Body* my_body;
-        Range my_range;
-        typename Partitioner::partition_type my_partition;
-        /*override*/ task* execute();
-        template<typename Body_>
-        friend class finish_reduce;
-    
-        //! Constructor used for root task
-        start_reduce( const Range& range, Body* body, const Partitioner &partitioner ) :
-            my_body(body),
-            my_range(range),
-            my_partition(partitioner)
-        {
-        }
-        //! Splitting constructor used to generate children.
-        /** this becomes left child.  Newly constructed object is right child. */
-        start_reduce( start_reduce& parent, split ) :
-            my_body(parent.my_body),
-            my_range(parent.my_range,split()),
-            my_partition(parent.my_partition,split())
-        {
-        }
-        //! Process a steal.
-        /** Affinity is never set, so if this method is called, it must arise because this is stolen. */
-        /*override*/ void note_affinity( affinity_id /*id*/ ) {
-            finish_type* p = static_cast<finish_type*>(parent() );
-            Body* body = new( p->zombie_space.begin() ) Body(*my_body,split());
-            p->has_right_zombie = true;
-            my_body = body;
-        }
-    public:
-#if !__TBB_EXCEPTIONS
-        static void run( const Range& range, Body& body, const Partitioner &partitioner ) {
-            if( !range.empty() ) 
-                task::spawn_root_and_wait( *new(task::allocate_root()) start_reduce(range,&body,partitioner) );
-        }
-#else /* __TBB_EXCEPTIONS */
-        static void run( const Range& range, Body& body, const Partitioner &partitioner ) {
-            // Bound context prevents exceptions from body to affect nesting or sibling algorithms,
-            // and allows users to handle exceptions safely by wrapping parallel_for in the try-block.
-            if( !range.empty() )  {
-                task_group_context context;
-                task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
-            }
-        }
-        static void run( const Range& range, Body& body, const Partitioner &partitioner, task_group_context& context ) {
-            if( !range.empty() ) 
-                task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
-        }
-#endif /* __TBB_EXCEPTIONS */
-    };
-
-    template<typename Range, typename Body, typename Partitioner>
-    task* start_reduce<Range,Body,Partitioner>::execute() {
-        if( !my_range.is_divisible() || my_partition.should_execute_range(*this) ) {
-            (*my_body)( my_range );
-            return NULL;
-        } else {
-            finish_type& c = *new( allocate_continuation()) finish_type(my_body);
-            recycle_as_child_of(c);
-            c.set_ref_count(2);    
-            start_reduce& b = *new( c.allocate_child() ) start_reduce(*this,split());
-            spawn(b);
-            return this;
-        }
-    }
- 
     //! 0 if root, 1 if a left child, 2 if a right child.
     /** Represented as a char, not enum, for compactness. */
     typedef char reduction_context;
@@ -165,13 +68,13 @@ namespace internal {
     //! Task type use to combine the partial results of parallel_reduce with affinity_partitioner.
     /** @ingroup algorithms */
     template<typename Body>
-    class finish_reduce_with_affinity: public task {
+    class finish_reduce: public task {
         //! Pointer to body, or NULL if the left child has not yet finished. 
         Body* my_body;
         bool has_right_zombie;
         const reduction_context my_context;
         aligned_space<Body,1> zombie_space;
-        finish_reduce_with_affinity( char context ) : 
+        finish_reduce( char context ) : 
             my_body(NULL),
             has_right_zombie(false),
             my_context(context)
@@ -185,28 +88,28 @@ namespace internal {
                 s->~Body();
             }
             if( my_context==1 ) 
-                parallel_reduce_store_body( static_cast<finish_reduce_with_affinity*>(parent())->my_body, my_body );
+                parallel_reduce_store_body( static_cast<finish_reduce*>(parent())->my_body, my_body );
             return NULL;
         }       
-        template<typename Range,typename Body_>
-        friend class start_reduce_with_affinity;
+        template<typename Range,typename Body_, typename Partitioner>
+        friend class start_reduce;
     };
 
     //! Task type used to split the work of parallel_reduce with affinity_partitioner.
     /** @ingroup algorithms */
-    template<typename Range, typename Body>
-    class start_reduce_with_affinity: public task {
-        typedef finish_reduce_with_affinity<Body> finish_type;
+    template<typename Range, typename Body, typename Partitioner>
+    class start_reduce: public task {
+        typedef finish_reduce<Body> finish_type;
         Body* my_body;
         Range my_range;
-        typename affinity_partitioner::partition_type my_partition;
+        typename Partitioner::partition_type my_partition;
         reduction_context my_context;
         /*override*/ task* execute();
         template<typename Body_>
-        friend class finish_reduce_with_affinity;
+        friend class finish_reduce;
     
         //! Constructor used for root task
-        start_reduce_with_affinity( const Range& range, Body* body, affinity_partitioner& partitioner ) :
+        start_reduce( const Range& range, Body* body, Partitioner& partitioner ) :
             my_body(body),
             my_range(range),
             my_partition(partitioner),
@@ -215,7 +118,7 @@ namespace internal {
         }
         //! Splitting constructor used to generate children.
         /** this becomes left child.  Newly constructed object is right child. */
-        start_reduce_with_affinity( start_reduce_with_affinity& parent, split ) :
+        start_reduce( start_reduce& parent, split ) :
             my_body(parent.my_body),
             my_range(parent.my_range,split()),
             my_partition(parent.my_partition,split()),
@@ -230,28 +133,28 @@ namespace internal {
         }
 
 public:
-        static void run( const Range& range, Body& body, affinity_partitioner& partitioner ) {
+        static void run( const Range& range, Body& body, Partitioner& partitioner ) {
             if( !range.empty() ) {
 #if !__TBB_EXCEPTIONS || TBB_JOIN_OUTER_TASK_GROUP
-                task::spawn_root_and_wait( *new(task::allocate_root()) start_reduce_with_affinity(range,&body,partitioner) );
+                task::spawn_root_and_wait( *new(task::allocate_root()) start_reduce(range,&body,partitioner) );
 #else
                 // Bound context prevents exceptions from body to affect nesting or sibling algorithms,
                 // and allows users to handle exceptions safely by wrapping parallel_for in the try-block.
                 task_group_context context;
-                task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce_with_affinity(range,&body,partitioner) );
+                task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
 #endif /* __TBB_EXCEPTIONS && !TBB_JOIN_OUTER_TASK_GROUP */
             }
         }
 #if __TBB_EXCEPTIONS
-        static void run( const Range& range, Body& body, affinity_partitioner& partitioner, task_group_context& context ) {
+        static void run( const Range& range, Body& body, Partitioner& partitioner, task_group_context& context ) {
             if( !range.empty() ) 
-                task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce_with_affinity(range,&body,partitioner) );
+                task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
         }
 #endif /* __TBB_EXCEPTIONS */
     };
 
-    template<typename Range, typename Body>
-    task* start_reduce_with_affinity<Range,Body>::execute() {
+    template<typename Range, typename Body, typename Partitioner>
+    task* start_reduce<Range,Body,Partitioner>::execute() {
         if( my_context==2 ) {
             finish_type* p = static_cast<finish_type*>(parent() );
             if( !parallel_reduce_load_body(p->my_body) ) {
@@ -269,7 +172,7 @@ public:
             recycle_as_child_of(c);
             c.set_ref_count(2);    
             bool delay = my_partition.decide_whether_to_delay();
-            start_reduce_with_affinity& b = *new( c.allocate_child() ) start_reduce_with_affinity(*this,split());
+            start_reduce& b = *new( c.allocate_child() ) start_reduce(*this,split());
             my_partition.spawn_or_delay(delay,*this,b);
             return this;
         }
@@ -344,25 +247,32 @@ public:
     See also requirements on \ref range_req "Range" and \ref parallel_reduce_body_req "parallel_reduce Body". **/
 //@{
 
-//! Parallel iteration with reduction and simple_partitioner, or no partitioner specified.
+//! Parallel iteration with reduction and default partitioner.
+/** @ingroup algorithms **/
+template<typename Range, typename Body>
+void parallel_reduce( const Range& range, Body& body ) {
+    internal::start_reduce<Range,Body, const __TBB_DEFAULT_PARTITIONER>::run( range, body, __TBB_DEFAULT_PARTITIONER() );
+}
+
+//! Parallel iteration with reduction and simple_partitioner
 /** @ingroup algorithms **/
 template<typename Range, typename Body>
-void parallel_reduce( const Range& range, Body& body, const simple_partitioner& partitioner = simple_partitioner() ) {
-    internal::start_reduce<Range,Body,simple_partitioner>::run( range, body, partitioner );
+void parallel_reduce( const Range& range, Body& body, const simple_partitioner& partitioner ) {
+    internal::start_reduce<Range,Body,const simple_partitioner>::run( range, body, partitioner );
 }
 
 //! Parallel iteration with reduction and auto_partitioner
 /** @ingroup algorithms **/
 template<typename Range, typename Body>
 void parallel_reduce( const Range& range, Body& body, const auto_partitioner& partitioner ) {
-    internal::start_reduce<Range,Body,auto_partitioner>::run( range, body, partitioner );
+    internal::start_reduce<Range,Body,const auto_partitioner>::run( range, body, partitioner );
 }
 
 //! Parallel iteration with reduction and affinity_partitioner
 /** @ingroup algorithms **/
 template<typename Range, typename Body>
 void parallel_reduce( const Range& range, Body& body, affinity_partitioner& partitioner ) {
-    internal::start_reduce_with_affinity<Range,Body>::run( range, body, partitioner );
+    internal::start_reduce<Range,Body,affinity_partitioner>::run( range, body, partitioner );
 }
 
 #if __TBB_EXCEPTIONS
@@ -370,34 +280,44 @@ void parallel_reduce( const Range& range, Body& body, affinity_partitioner& part
 /** @ingroup algorithms **/
 template<typename Range, typename Body>
 void parallel_reduce( const Range& range, Body& body, const simple_partitioner& partitioner, task_group_context& context ) {
-    internal::start_reduce<Range,Body,simple_partitioner>::run( range, body, partitioner, context );
+    internal::start_reduce<Range,Body,const simple_partitioner>::run( range, body, partitioner, context );
 }
 
 //! Parallel iteration with reduction, auto_partitioner and user-supplied context
 /** @ingroup algorithms **/
 template<typename Range, typename Body>
 void parallel_reduce( const Range& range, Body& body, const auto_partitioner& partitioner, task_group_context& context ) {
-    internal::start_reduce<Range,Body,auto_partitioner>::run( range, body, partitioner, context );
+    internal::start_reduce<Range,Body,const auto_partitioner>::run( range, body, partitioner, context );
 }
 
 //! Parallel iteration with reduction, affinity_partitioner and user-supplied context
 /** @ingroup algorithms **/
 template<typename Range, typename Body>
 void parallel_reduce( const Range& range, Body& body, affinity_partitioner& partitioner, task_group_context& context ) {
-    internal::start_reduce_with_affinity<Range,Body>::run( range, body, partitioner, context );
+    internal::start_reduce<Range,Body,affinity_partitioner>::run( range, body, partitioner, context );
 }
 #endif /* __TBB_EXCEPTIONS */
 
 /** parallel_reduce overloads that work with anonymous function objects
     (see also \ref parallel_reduce_lambda_req "requirements on parallel_reduce anonymous function objects"). **/
 
-//! Parallel iteration with reduction and simple_partitioner, or no partitioner specified.
+//! Parallel iteration with reduction and default partitioner.
+/** @ingroup algorithms **/
+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>
+                          ::run(range, body, __TBB_DEFAULT_PARTITIONER() );
+    return body.result();
+}
+
+//! Parallel iteration with reduction and simple_partitioner.
 /** @ingroup algorithms **/
 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,
-                       const simple_partitioner& partitioner = simple_partitioner() ) {
+                       const simple_partitioner& partitioner ) {
     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>,simple_partitioner>
+    internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,const simple_partitioner>
                           ::run(range, body, partitioner );
     return body.result();
 }
@@ -408,7 +328,7 @@ 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,
                        const auto_partitioner& partitioner ) {
     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>,auto_partitioner>
+    internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,const auto_partitioner>
                           ::run( range, body, partitioner );
     return body.result();
 }
@@ -419,7 +339,7 @@ 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,
                        affinity_partitioner& partitioner ) {
     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-    internal::start_reduce_with_affinity<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction> >
+    internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,affinity_partitioner>
                                         ::run( range, body, partitioner );
     return body.result();
 }
@@ -431,7 +351,7 @@ 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,
                        const simple_partitioner& partitioner, task_group_context& context ) {
     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>,simple_partitioner>
+    internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,const simple_partitioner>
                           ::run( range, body, partitioner, context );
     return body.result();
 }
@@ -442,7 +362,7 @@ 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,
                        const auto_partitioner& partitioner, task_group_context& context ) {
     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>,auto_partitioner>
+    internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,const auto_partitioner>
                           ::run( range, body, partitioner, context );
     return body.result();
 }
@@ -453,7 +373,7 @@ 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,
                        affinity_partitioner& partitioner, task_group_context& context ) {
     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-    internal::start_reduce_with_affinity<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction> >
+    internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,affinity_partitioner>
                                         ::run( range, body, partitioner, context );
     return body.result();
 }
diff --git a/include/tbb/parallel_scan.h b/include/tbb/parallel_scan.h
index e670cf7..1369bf7 100644
--- a/include/tbb/parallel_scan.h
+++ b/include/tbb/parallel_scan.h
@@ -323,10 +323,17 @@ namespace internal {
     See also requirements on \ref range_req "Range" and \ref parallel_scan_body_req "parallel_scan Body". **/
 //@{
 
+//! Parallel prefix with default partitioner
+/** @ingroup algorithms **/
+template<typename Range, typename Body>
+void parallel_scan( const Range& range, Body& body ) {
+    internal::start_scan<Range,Body,__TBB_DEFAULT_PARTITIONER>::run(range,body,__TBB_DEFAULT_PARTITIONER());
+}
+
 //! Parallel prefix with simple_partitioner
 /** @ingroup algorithms **/
 template<typename Range, typename Body>
-void parallel_scan( const Range& range, Body& body, const simple_partitioner& partitioner=simple_partitioner() ) {
+void parallel_scan( const Range& range, Body& body, const simple_partitioner& partitioner ) {
     internal::start_scan<Range,Body,simple_partitioner>::run(range,body,partitioner);
 }
 
diff --git a/include/tbb/partitioner.h b/include/tbb/partitioner.h
index 4529760..53e2953 100644
--- a/include/tbb/partitioner.h
+++ b/include/tbb/partitioner.h
@@ -134,6 +134,7 @@ public:
 
 private:
     template<typename Range, typename Body, typename Partitioner> friend class internal::start_for;
+    template<typename Range, typename Body, typename Partitioner> friend class internal::start_reduce;
     template<typename Range, typename Body> friend class internal::start_reduce_with_affinity;
     template<typename Range, typename Body, typename Partitioner> friend class internal::start_scan;
 
diff --git a/include/tbb/pipeline.h b/include/tbb/pipeline.h
index b31df8b..6684a1f 100644
--- a/include/tbb/pipeline.h
+++ b/include/tbb/pipeline.h
@@ -48,6 +48,8 @@ typedef unsigned long Token;
 typedef long tokendiff_t;
 class stage_task;
 class ordered_buffer;
+class pipeline_root_task;
+class pipeline_cleaner;
 
 } // namespace internal
 //! @endcond
@@ -62,12 +64,15 @@ private:
     //! The lowest bit 0 is for parallel vs. serial
     static const unsigned char filter_is_serial = 0x1; 
 
-    //! 4th bit distinguish ordered vs unordered
-    // The bit was not set for parallel filters in TBB 2.1 and earlier,
-    // but is_ordered() function always treats parallel filters as out of order
+    //! 4th bit distinguishes ordered vs unordered filters.
+    /** The bit was not set for parallel filters in TBB 2.1 and earlier,
+        but is_ordered() function always treats parallel filters as out of order. */
     static const unsigned char filter_is_out_of_order = 0x1<<4;  
 
-    static const unsigned char current_version = __TBB_PIPELINE_VERSION(4);
+    //! 5th bit distinguishes thread-bound and regular filters.
+    static const unsigned char filter_is_bound = 0x1<<5;  
+
+    static const unsigned char current_version = __TBB_PIPELINE_VERSION(5);
     static const unsigned char version_mask = 0x7<<1; // bits 1-3 are for version
 public:
     enum mode {
@@ -86,7 +91,8 @@ protected:
         input_buffer(NULL),
         my_filter_mode(static_cast<unsigned char>(is_serial_ ? serial : parallel)),
         prev_filter_in_pipeline(not_in_pipeline()),
-        my_pipeline(NULL)
+        my_pipeline(NULL),
+        next_segment(NULL)
     {}
     
     filter( mode filter_mode ) :
@@ -94,7 +100,8 @@ protected:
         input_buffer(NULL),
         my_filter_mode(static_cast<unsigned char>(filter_mode)),
         prev_filter_in_pipeline(not_in_pipeline()),
-        my_pipeline(NULL)
+        my_pipeline(NULL),
+        next_segment(NULL)
     {}
 
 public:
@@ -103,11 +110,16 @@ public:
         return bool( my_filter_mode & filter_is_serial );
     }  
     
-    // ! True if filter must receive stream in order.
+    //! True if filter must receive stream in order.
     bool is_ordered() const {
         return (my_filter_mode & (filter_is_out_of_order|filter_is_serial))==filter_is_serial;
     }
 
+    //! True if filter is thread-bound.
+    bool is_bound() const {
+        return ( my_filter_mode & filter_is_bound )==filter_is_bound;
+    }
+
     //! Operate on an item from the input stream, and return item for output stream.
     /** Returns NULL if filter is a sink. */
     virtual void* operator()( void* item ) = 0;
@@ -117,8 +129,8 @@ public:
     virtual __TBB_EXPORTED_METHOD ~filter();
 
 #if __TBB_EXCEPTIONS
-    //! Destroys item if pipeline is cancelled
-    /** Required to prevent memory leaks 
+    //! Destroys item if pipeline was cancelled.
+    /** Required to prevent memory leaks.
         Note it can be called concurrently even for serial filters.*/
     virtual void finalize( void* /*item*/ ) {};
 #endif
@@ -127,20 +139,64 @@ private:
     //! Pointer to next filter in the pipeline.
     filter* next_filter_in_pipeline;
 
-    //! Input buffer for filter that requires serial input; NULL otherwise. */
+    //! 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;
 
     friend class internal::stage_task;
+    friend class internal::pipeline_root_task;
     friend class pipeline;
+    friend class thread_bound_filter;
 
-    //! Internal storage for is_serial()
+    //! Storage for filter mode and dynamically checked implementation version.
     const unsigned char my_filter_mode;
 
     //! Pointer to previous filter in the pipeline.
     filter* prev_filter_in_pipeline;
 
-    //! Pointer to the pipeline
+    //! Pointer to the pipeline.
     pipeline* my_pipeline;
+
+    //! Pointer to the next "segment" of filters, or NULL if not required.
+    /** In each segment, the first filter is not thread-bound but follows a thread-bound one. */
+    filter* next_segment;
+};
+
+//! A stage in a pipeline served by a user thread.
+/** @ingroup algorithms */
+class thread_bound_filter: public filter {
+public:
+    enum result_type {
+        // item was processed
+        success,
+        // item is currently not available
+        item_not_available,
+        // there are no more items to process
+        end_of_stream
+    };
+protected:
+    thread_bound_filter(mode filter_mode): 
+         filter(static_cast<mode>(filter_mode | filter::filter_is_bound))
+    {}
+public:
+    //! If a data item is available, invoke operator() on that item.  
+    /** 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. */
+    result_type __TBB_EXPORTED_METHOD try_process_item(); 
+
+    //! Wait until a data item becomes available, and invoke operator() on that item.
+    /** 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. */
+    result_type __TBB_EXPORTED_METHOD process_item();
+
+private:
+    //! Internal routine for item processing
+    result_type internal_process_item(bool is_blocking);
 };
 
 //! A processing pipeling that applies filters to items.
@@ -161,16 +217,19 @@ public:
     void __TBB_EXPORTED_METHOD run( size_t max_number_of_live_tokens );
 
 #if __TBB_EXCEPTIONS
-    //! Run the pipeline to completion with user-supplied context
+    //! Run the pipeline to completion with user-supplied context.
     void __TBB_EXPORTED_METHOD run( size_t max_number_of_live_tokens, tbb::task_group_context& context );
 #endif
 
-    //! Remove all filters from the pipeline
+    //! Remove all filters from the pipeline.
     void __TBB_EXPORTED_METHOD clear();
 
 private:
     friend class internal::stage_task;
+    friend class internal::pipeline_root_task;
     friend class filter;
+    friend class thread_bound_filter;
+    friend class internal::pipeline_cleaner;
 
     //! Pointer to first filter in the pipeline.
     filter* filter_list;
@@ -179,17 +238,20 @@ private:
     filter* filter_end;
 
     //! task who's reference count is used to determine when all stages are done.
-    empty_task* end_counter;
+    task* end_counter;
 
     //! Number of idle tokens waiting for input stage.
     atomic<internal::Token> input_tokens;
 
-    //! Number of tokens created so far.
-    internal::Token token_counter;
+    //! Global counter of tokens 
+    atomic<internal::Token> token_counter;
 
     //! False until fetch_input returns NULL.
     bool end_of_input;
 
+    //! True if the pipeline contains a thread-bound filter; false otherwise.
+    bool has_thread_bound_filters;
+
     //! Remove filter from pipeline.
     void remove_filter( filter& filter_ );
 
diff --git a/include/tbb/recursive_mutex.h b/include/tbb/recursive_mutex.h
index 886a319..1b7a825 100644
--- a/include/tbb/recursive_mutex.h
+++ b/include/tbb/recursive_mutex.h
@@ -48,6 +48,8 @@ namespace tbb { namespace internal {
 
 #endif /* _WIN32||_WIN64 */
 
+#include <new>
+#include "aligned_space.h"
 #include "tbb_stddef.h"
 #include "tbb_profiling.h"
 
@@ -105,8 +107,10 @@ public:
         scoped_lock() : my_mutex(NULL) {};
 
         //! Acquire lock on given mutex.
-        /** Upon entry, *this should not be in the "have acquired a mutex" state. */
         scoped_lock( recursive_mutex& mutex ) {
+#if TBB_USE_ASSERT
+            my_mutex = &mutex; 
+#endif /* TBB_USE_ASSERT */
             acquire( mutex );
         }
 
@@ -122,11 +126,7 @@ public:
             internal_acquire( mutex );
 #else
             my_mutex = &mutex;
-  #if _WIN32||_WIN64
-            EnterCriticalSection(&mutex.impl);
-  #else
-            pthread_mutex_lock( &mutex.impl );
-  #endif /* _WIN32||_WIN64 */
+            mutex.lock();
 #endif /* TBB_USE_ASSERT */
         }
 
@@ -135,15 +135,9 @@ public:
 #if TBB_USE_ASSERT
             return internal_try_acquire( mutex );
 #else
-            bool result;
-  #if _WIN32||_WIN64
-            result = TryEnterCriticalSection(&mutex.impl)!=0;
-  #else
-            result = pthread_mutex_trylock(&mutex.impl)==0;
-  #endif /* _WIN32||_WIN64 */
+            bool result = mutex.try_lock();
             if( result )
                 my_mutex = &mutex;
-
             return result;
 #endif /* TBB_USE_ASSERT */
         }
@@ -151,13 +145,9 @@ public:
         //! Release lock
         void release() {
 #if TBB_USE_ASSERT
-            internal_release ();
+            internal_release();
 #else
-  #if _WIN32||_WIN64
-            LeaveCriticalSection(&my_mutex->impl);
-  #else
-            pthread_mutex_unlock(&my_mutex->impl);
-  #endif /* _WIN32||_WIN64 */
+            my_mutex->unlock();
             my_mutex = NULL;
 #endif /* TBB_USE_ASSERT */
         }
@@ -174,6 +164,8 @@ public:
 
         //! All checks from release using mutex.state were moved here
         void __TBB_EXPORTED_METHOD internal_release();
+
+        friend class recursive_mutex;
     };
 
     // Mutex traits
@@ -181,6 +173,53 @@ public:
     static const bool is_recursive_mutex = true;
     static const bool is_fair_mutex = false;
 
+    // C++0x compatibility interface
+    
+    //! Acquire lock
+    void lock() {
+#if TBB_USE_ASSERT
+        aligned_space<scoped_lock,1> tmp;
+        new(tmp.begin()) scoped_lock(*this);
+#else
+  #if _WIN32||_WIN64
+        EnterCriticalSection(&impl);
+  #else
+        pthread_mutex_lock(&impl);
+  #endif /* _WIN32||_WIN64 */
+#endif /* TBB_USE_ASSERT */
+    }
+
+    //! Try acquiring lock (non-blocking)
+    /** Return true if lock acquired; false otherwise. */
+    bool try_lock() {
+#if TBB_USE_ASSERT
+        aligned_space<scoped_lock,1> tmp;
+        return (new(tmp.begin()) scoped_lock)->internal_try_acquire(*this);
+#else        
+  #if _WIN32||_WIN64
+        return TryEnterCriticalSection(&impl)!=0;
+  #else
+        return pthread_mutex_trylock(&impl)==0;
+  #endif /* _WIN32||_WIN64 */
+#endif /* TBB_USE_ASSERT */
+    }
+
+    //! Release lock
+    void unlock() {
+#if TBB_USE_ASSERT
+        aligned_space<scoped_lock,1> tmp;
+        scoped_lock& s = *tmp.begin();
+        s.my_mutex = this;
+        s.internal_release();
+#else
+  #if _WIN32||_WIN64
+        LeaveCriticalSection(&impl);
+  #else
+        pthread_mutex_unlock(&impl);
+  #endif /* _WIN32||_WIN64 */
+#endif /* TBB_USE_ASSERT */
+    }
+
 private:
 #if _WIN32||_WIN64
     CRITICAL_SECTION impl;
diff --git a/include/tbb/scalable_allocator.h b/include/tbb/scalable_allocator.h
index 68d4412..c8fd2d1 100644
--- a/include/tbb/scalable_allocator.h
+++ b/include/tbb/scalable_allocator.h
@@ -186,6 +186,8 @@ inline bool operator!=( const scalable_allocator<T>&, const scalable_allocator<U
             #pragma comment(lib, "tbbmalloc.lib")
         #endif
     #endif
+
+
 #endif
 
 #endif /* __cplusplus */
diff --git a/include/tbb/spin_mutex.h b/include/tbb/spin_mutex.h
index 8e73c13..446821a 100644
--- a/include/tbb/spin_mutex.h
+++ b/include/tbb/spin_mutex.h
@@ -30,6 +30,8 @@
 #define __TBB_spin_mutex_H
 
 #include <cstddef>
+#include <new>
+#include "aligned_space.h"
 #include "tbb_stddef.h"
 #include "tbb_machine.h"
 #include "tbb_profiling.h"
@@ -73,6 +75,8 @@ public:
         //! Like release, but with ITT instrumentation.
         void __TBB_EXPORTED_METHOD internal_release();
 
+        friend class spin_mutex;
+
     public:
         //! Construct without acquiring a mutex.
         scoped_lock() : my_mutex(NULL), my_unlock_value(0) {}
@@ -99,6 +103,7 @@ public:
         }
 
         //! Try acquiring lock (non-blocking)
+        /** Return true if lock acquired; false otherwise. */
         bool try_acquire( spin_mutex& m ) {
 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
             return internal_try_acquire(m);
@@ -141,6 +146,42 @@ public:
     static const bool is_recursive_mutex = false;
     static const bool is_fair_mutex = false;
 
+    // ISO C++0x compatibility methods
+
+    //! Acquire lock
+    void lock() {
+#if TBB_USE_THREADING_TOOLS
+        aligned_space<scoped_lock,1> tmp;
+        new(tmp.begin()) scoped_lock(*this);
+#else
+        __TBB_LockByte(flag);
+#endif /* TBB_USE_THREADING_TOOLS*/
+    }
+
+    //! Try acquiring lock (non-blocking)
+    /** Return true if lock acquired; false otherwise. */
+    bool try_lock() {
+#if TBB_USE_THREADING_TOOLS
+        aligned_space<scoped_lock,1> tmp;
+        return (new(tmp.begin()) scoped_lock)->internal_try_acquire(*this);
+#else
+        return __TBB_TryLockByte(flag);
+#endif /* TBB_USE_THREADING_TOOLS*/
+    }
+
+    //! Release lock
+    void unlock() {
+#if TBB_USE_THREADING_TOOLS
+        aligned_space<scoped_lock,1> tmp;
+        scoped_lock& s = *tmp.begin();
+        s.my_mutex = this;
+        s.my_unlock_value = 0;
+        s.internal_release();
+#else
+        __TBB_store_with_release(flag, 0);
+#endif /* TBB_USE_THREADING_TOOLS */
+    }
+
     friend class scoped_lock;
 };
 
diff --git a/include/tbb/spin_rw_mutex.h b/include/tbb/spin_rw_mutex.h
index de6cacd..bf81d12 100644
--- a/include/tbb/spin_rw_mutex.h
+++ b/include/tbb/spin_rw_mutex.h
@@ -144,7 +144,7 @@ public:
             __TBB_ASSERT( is_writer, "not a writer" );
             mutex->internal_downgrade();
 #else
-	     __TBB_FetchAndAddW( &mutex->state, ((intptr_t)ONE_READER-WRITER));
+            __TBB_FetchAndAddW( &mutex->state, ((intptr_t)ONE_READER-WRITER));
 #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */
             is_writer = false;
 
@@ -177,6 +177,35 @@ public:
     static const bool is_recursive_mutex = false;
     static const bool is_fair_mutex = false;
 
+    // ISO C++0x compatibility methods
+
+    //! Acquire writer lock
+    void lock() {internal_acquire_writer();}
+
+    //! Try acquiring writer lock (non-blocking)
+    /** Return true if lock acquired; false otherwise. */
+    bool try_lock() {return internal_try_acquire_writer();}
+
+    //! Release lock
+    void unlock() {
+#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
+        if( state&WRITER ) internal_release_writer();
+        else               internal_release_reader();
+#else
+        if( state&WRITER ) __TBB_AtomicAND( &state, READERS ); 
+        else               __TBB_FetchAndAddWrelease( &state, -(intptr_t)ONE_READER);
+#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */
+    }
+
+    // Methods for reader locks that resemble ISO C++0x compatibility methods.
+
+    //! Acquire reader lock
+    void lock_read() {internal_acquire_reader();}
+
+    //! Try acquiring reader lock (non-blocking)
+    /** Return true if reader lock acquired; false otherwise. */
+    bool try_lock_read() {return internal_try_acquire_reader();}
+
 private:
     typedef intptr_t state_t;
     static const state_t WRITER = 1;
diff --git a/include/tbb/task.h b/include/tbb/task.h
index 50e7cf0..701774c 100644
--- a/include/tbb/task.h
+++ b/include/tbb/task.h
@@ -30,6 +30,7 @@
 #define __TBB_task_H
 
 #include "tbb_stddef.h"
+#include "tbb_machine.h"
 
 #if __TBB_EXCEPTIONS
 #include "cache_aligned_allocator.h"
@@ -39,9 +40,9 @@ namespace tbb {
 
 class task;
 class task_list;
+
 #if __TBB_EXCEPTIONS
 class task_group_context;
-class tbb_exception;
 #endif /* __TBB_EXCEPTIONS */
 
 //! @cond INTERNAL
@@ -112,6 +113,8 @@ namespace internal {
         void __TBB_EXPORTED_METHOD free( task& ) const;
     };
 
+    class task_group_base;
+
     //! Memory prefix to a task object.
     /** This class is internal to the library.
         Do not reference it directly, except within the library itself.
@@ -127,6 +130,7 @@ namespace internal {
         friend class internal::allocate_child_proxy;
         friend class internal::allocate_continuation_proxy;
         friend class internal::allocate_additional_child_of_proxy;
+        friend class internal::task_group_base;
 
 #if __TBB_EXCEPTIONS
         //! Shared context that is used to communicate asynchronous state changes
@@ -188,6 +192,13 @@ namespace internal {
 
 #if __TBB_EXCEPTIONS
 
+#if TBB_USE_CAPTURED_EXCEPTION
+    class tbb_exception;
+#else
+    namespace internal {
+        class tbb_exception_ptr;
+    }
+#endif /* !TBB_USE_CAPTURED_EXCEPTION */
 
 //! Used to form groups of tasks 
 /** @ingroup task_scheduling 
@@ -204,15 +215,44 @@ namespace internal {
     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. **/
+    all the other tasks in this group and groups bound to it (as children) get canceled too.
+
+    IMPLEMENTATION NOTE: 
+    When adding new members to task_group_context 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. **/
 class task_group_context : internal::no_copy
 {
+private:
+#if TBB_USE_CAPTURED_EXCEPTION
+    typedef tbb_exception exception_container_type;
+#else
+    typedef internal::tbb_exception_ptr exception_container_type;
+#endif
+
+    enum version_traits_word_layout {
+        traits_offset = 16,
+        version_mask = 0xFFFF,
+        traits_mask = 0xFFFFul << traits_offset
+    };
+
 public:
     enum kind_type {
         isolated,
         bound
     };
 
+    enum traits_type {
+        exact_exception = 0x0001ul << traits_offset,
+        no_cancellation = 0x0002ul << traits_offset,
+        concurrent_wait = 0x0004ul << traits_offset,
+#if TBB_USE_CAPTURED_EXCEPTION
+        default_traits = 0
+#else
+        default_traits = exact_exception
+#endif /* !TBB_USE_CAPTURED_EXCEPTION */
+    };
+
 private:
     union {
         //! Flavor of this context: bound or isolated.
@@ -232,19 +272,20 @@ private:
     /** Read accesses to the field my_cancellation_requested are on the hot path inside
         the scheduler. This padding ensures that this field never shares the same cache 
         line with a local variable that is frequently written to. **/
-    char _leading_padding[internal::NFS_MaxLineSize - 2 * sizeof(uintptr_t)- sizeof(void*) - sizeof(internal::context_list_node_t)];
+    char _leading_padding[internal::NFS_MaxLineSize - 
+                    2 * sizeof(uintptr_t)- sizeof(void*) - sizeof(internal::context_list_node_t)];
     
     //! Specifies whether cancellation was request for this task group.
     uintptr_t my_cancellation_requested;
     
-    //! Version for run-time checks.
-    /** Run-time version checks may become necessary in the scheduler implementation
-        if in the future the meaning of the existing members will be changed or 
-        new members requiring non-zero initialization. **/
-    uintptr_t  my_version;
+    //! Version for run-time checks and behavioral traits of the context.
+    /** Version occupies low 16 bits, and traits (zero or more ORed enumerators
+        from the traits_type enumerations) take the next 16 bits.
+        Original (zeroth) version of the context did not support any traits. **/
+    uintptr_t  my_version_and_traits;
 
-    //! Pointer to the exception being propagated across this task group.
-    tbb_exception *my_exception;
+    //! Pointer to the container storing exception being propagated across this task group.
+    exception_container_type *my_exception;
 
     //! Scheduler that registered this context in its thread specific list.
     /** This field is not terribly necessary, but it allows to get a small performance 
@@ -257,8 +298,6 @@ private:
     char _trailing_padding[internal::NFS_MaxLineSize - sizeof(intptr_t) - 2 * sizeof(void*)];
 
 public:
-
-
     //! Default & binding constructor.
     /** 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) 
@@ -268,30 +307,41 @@ public:
         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.
         
-        Creating isolated context is involves much less overhead, but they have limited
-        utility. Normally when an exception occur in an algorithm that has nested
-        algorithms running one would want all the nested ones canceled as well. Such
-        behavior requires nested algorithms to use bound contexts.
+        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.
         
         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. */
-    task_group_context ( kind_type relation_with_parent = bound )
+        created isolated context will result in a faster algorithm startup.
+        
+        VERSIONING NOTE: 
+        Implementation(s) of task_group_context 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.
+
+        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. **/
+    task_group_context ( kind_type relation_with_parent = bound,
+                         uintptr_t traits = default_traits )
         : my_kind(relation_with_parent)
-        , my_version(0)
+        , my_version_and_traits(1 | traits)
     {
         init();
     }
 
     __TBB_EXPORTED_METHOD ~task_group_context ();
 
-    //! Forcefully reinitializes context object after an algorithm it was used with finished.
-    /** Because the method assumes that the all the tasks that used to be associated with 
-        this context have already finished, you must be extremely careful to not invalidate 
-        the context while it is still in use somewhere in the task hierarchy.
+    //! Forcefully reinitializes the context after the task tree it was associated with is completed.
+    /** 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.
         
-        IMPORTANT: It is assumed that this method is not used concurrently!
+        IMPORTANT: This method is not thread safe!
 
         The method does not change the context's parent if it is set. **/ 
     void __TBB_EXPORTED_METHOD reset ();
@@ -302,16 +352,25 @@ public:
         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 called on the same context, true may be returned by 
-        at most one invocation. **/
+        that when this method is concurrently called on the same not yet cancelled 
+        context, true will be returned by one and only one invocation. **/
     bool __TBB_EXPORTED_METHOD cancel_group_execution ();
 
     //! Returns true if the context received cancellation request.
     bool __TBB_EXPORTED_METHOD is_group_execution_cancelled () const;
 
+    //! Records the pending exception, and cancels the task group.
+    /** 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. **/
+    void __TBB_EXPORTED_METHOD register_pending_exception ();
+
 protected:
     //! Out-of-line part of the constructor. 
-    /** Separated to facilitate future support for backward binary compatibility. **/
+    /** Singled out to ensure backward binary compatibility of the future versions. **/
     void __TBB_EXPORTED_METHOD init ();
 
 private:
@@ -324,6 +383,15 @@ private:
     //! Checks if any of the ancestors has a cancellation request outstanding, 
     //! and propagates it back to descendants.
     void propagate_cancellation_from_ancestors ();
+
+    //! For debugging purposes only.
+    bool is_alive () { 
+#if TBB_USE_DEBUG
+        return my_version_and_traits != 0xDeadBeef;
+#else
+        return true;
+#endif /* TBB_USE_DEBUG */
+    }
 }; // class task_group_context
 
 #endif /* __TBB_EXCEPTIONS */
@@ -334,6 +402,9 @@ class task: internal::no_copy {
     //! Set reference count
     void __TBB_EXPORTED_METHOD internal_set_ref_count( int count );
 
+    //! Decrement reference count and return true if non-zero.
+    internal::reference_count __TBB_EXPORTED_METHOD internal_decrement_ref_count();
+
 protected:
     //! Default constructor.
     task() {prefix().extra_state=1;}
@@ -449,6 +520,14 @@ 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;
@@ -472,6 +551,7 @@ public:
         __TBB_ASSERT( prefix().depth>=-delta, "depth cannot be negative" );
         prefix().depth+=delta;
     }
+#endif /* !__TBB_TASK_DEQUE */
 
     //------------------------------------------------------------------------
     // Spawning and blocking
@@ -486,13 +566,31 @@ public:
 #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */
     }
 
+    //! Atomically increment reference count.
+    /** Has acquire semantics */  
+    void increment_ref_count() {
+        __TBB_FetchAndIncrementWacquire( &prefix().ref_count );
+    }
+
+    //! Atomically decrement reference count.  
+    /** Has release semanics. */  
+    int decrement_ref_count() {
+#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
+        return int(internal_decrement_ref_count());
+#else
+        return int(__TBB_FetchAndDecrementWrelease( &prefix().ref_count ))-1;
+#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */
+    }
+
     //! Schedule task for execution when a worker becomes available.
     /** After all children spawned so far finish their method task::execute,
         their parent's method task::execute may start running.  Therefore, it
         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 );
     }
 
@@ -502,7 +600,9 @@ public:
 
     //! 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 );
     }
 
@@ -513,7 +613,9 @@ 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 );
     }
 
@@ -525,7 +627,9 @@ 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 );
     }
 
@@ -535,6 +639,11 @@ public:
     //! task on whose behalf this task is working, or NULL if this is a root.
     task* parent() const {return prefix().parent;}
 
+#if __TBB_EXCEPTIONS
+    //! Shared context that is used to communicate asynchronous state changes
+    task_group_context* context() {return prefix().context;}
+#endif /* __TBB_EXCEPTIONS */   
+
     //! True if task is owned by different thread than thread that owns its parent.
     bool is_stolen_task() const {
         internal::task_prefix& p = prefix();
@@ -601,6 +710,8 @@ private:
     friend class internal::allocate_continuation_proxy;
     friend class internal::allocate_child_proxy;
     friend class internal::allocate_additional_child_of_proxy;
+    
+    friend class internal::task_group_base;
 
     //! Get reference to corresponding task_prefix.
     /** Version tag prevents loader on Linux from using the wrong symbol in debug builds. **/
@@ -659,7 +770,9 @@ 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();
@@ -668,7 +781,9 @@ 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
new file mode 100644
index 0000000..74be0b8
--- /dev/null
+++ b/include/tbb/task_group.h
@@ -0,0 +1,220 @@
+/*
+    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_task_group_H
+#define __TBB_task_group_H
+
+#include "task.h"
+
+namespace tbb {
+
+template<typename F>
+class task_handle {
+    F my_func;
+
+public:
+    task_handle( const F& f ) : my_func(f) {}
+
+    void operator()() { my_func(); }
+};
+
+enum task_group_status {
+    not_complete,
+    complete,
+    canceled
+};
+
+namespace internal {
+
+// Suppress gratuitous warnings from icc 11.0 when lambda expressions are used in instances of function_task.
+//#pragma warning(disable: 588)
+
+template<typename F>
+class function_task : public task {
+    F my_func;
+    /*override*/ task* execute() {
+        my_func();
+        return NULL;
+    }
+public:
+    function_task( const F& f ) : my_func(f) {}
+};
+
+template<typename F>
+class task_handle_task : public task {
+    task_handle<F>& my_handle;
+    /*override*/ task* execute() {
+        my_handle();
+        return NULL;
+    }
+public:
+    task_handle_task( task_handle<F>& h ) : my_handle(h) {}
+};
+
+class task_group_base : internal::no_copy {
+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 ) {
+        try {
+            if ( !my_context.is_group_execution_cancelled() )
+                f();
+        } catch ( ... ) {
+            my_context.register_pending_exception();
+        }
+        return wait();
+    }
+
+    template<typename F, typename Task>
+    void internal_run( F& f ) {
+        owner().spawn( *new( owner().allocate_additional_child_of(*my_root) ) Task(f) );
+    }
+
+public:
+    task_group_base( uintptr_t traits = 0 )
+        : my_context(task_group_context::bound, task_group_context::default_traits | traits)
+    {
+        my_root = new( task::allocate_root(my_context) ) empty_task;
+        my_root->set_ref_count(1);
+    }
+
+    template<typename F>
+    void run( task_handle<F>& h ) {
+        internal_run< task_handle<F>, internal::task_handle_task<F> >( h );
+    }
+
+    task_group_status wait() {
+        try {
+            owner().prefix().owner->wait_for_all( *my_root, NULL );
+        } catch ( ... ) {
+            my_context.reset();
+            throw;
+        }
+        if ( my_context.is_group_execution_cancelled() ) {
+            my_context.reset();
+            return canceled;
+        }
+        return complete;
+    }
+
+    bool is_canceling() {
+        return my_context.is_group_execution_cancelled();
+    }
+
+    void cancel() {
+        my_context.cancel_group_execution();
+    }
+}; // class task_group_base
+
+} // namespace internal
+
+class task_group : public internal::task_group_base {
+public:
+    task_group () : task_group_base( task_group_context::concurrent_wait ) {}
+
+    ~task_group() try {
+        __TBB_ASSERT( my_root->ref_count() != 0, NULL );
+        if( my_root->ref_count() > 1 )
+            my_root->wait_for_all();
+        owner().destroy(*my_root);
+    }
+    catch (...) {
+        owner().destroy(*my_root);
+        throw;
+    }
+
+    using task_group_base::run;
+
+    template<typename F>
+    void run( const F& f ) {
+        internal_run< const F, internal::function_task<F> >( f );
+    }
+
+    template<typename F>
+    task_group_status run_and_wait( const F& f ) {
+        return internal_run_and_wait<const F>( f );
+    }
+
+    template<typename F>
+    task_group_status run_and_wait( F& f ) {
+        return internal_run_and_wait<F>( f );
+    }
+
+}; // class task_group
+
+class missing_wait : public std::exception {
+public:
+    /*override*/ 
+    const char* what() const throw() { return "wait() was not called on the structured_task_group"; }
+};
+
+class structured_task_group : public internal::task_group_base {
+public:
+    ~structured_task_group() {
+        if( my_root->ref_count() > 1 ) {
+            bool stack_unwinding_in_progress = std::uncaught_exception();
+            // Always attempt to do proper cleanup to avoid inevitable memory corruption 
+            // in case of missing wait (for the sake of better testability & debuggability)
+            if ( !is_canceling() )
+                cancel();
+            my_root->wait_for_all();
+            owner().destroy(*my_root);
+            if ( !stack_unwinding_in_progress )
+                throw missing_wait();
+        }
+        else
+            owner().destroy(*my_root);
+    }
+
+    template<typename F>
+    task_group_status run_and_wait ( task_handle<F>& h ) {
+        return internal_run_and_wait< task_handle<F> >( h );
+    }
+
+    task_group_status wait() {
+        __TBB_ASSERT ( my_root->ref_count() != 0, "wait() can be called only once during the structured_task_group lifetime" );
+        return task_group_base::wait();
+    }
+}; // class structured_task_group
+
+inline 
+bool is_current_task_group_canceling() {
+    return task::self().is_cancelled();
+}
+
+} // namespace tbb
+
+#endif /* __TBB_task_group_H */
diff --git a/src/tbb/concurrent_hash_map.cpp b/include/tbb/tbb.h
similarity index 50%
copy from src/tbb/concurrent_hash_map.cpp
copy to include/tbb/tbb.h
index 4d476c6..4bac7bf 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/include/tbb/tbb.h
@@ -26,20 +26,51 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#ifndef __TBB_tbb_H
+#define __TBB_tbb_H
 
-namespace tbb {
+/** 
+    This header bulk-includes declarations or definitions of all the functionality 
+    provided by TBB (save for malloc dependent headers). 
 
-namespace internal {
+    If you use only a few TBB constructs, consider including specific headers only.
+    Any header listed below can be included independently of others.
+**/
 
-bool hash_map_segment_base::internal_grow_predicate() const {
-    // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the 
-    // library so that Intel(R) Thread Checker will ignore them.  The reads are used in a double-check
-    // context, so the program is nonetheless correct despite the race.
-    return my_logical_size >= my_physical_size && my_physical_size < internal::hash_map_base::max_physical_size;
-}
-
-} // namespace internal
-
-} // namespace tbb
+#include "aligned_space.h"
+#include "atomic.h"
+#include "blocked_range.h"
+#include "blocked_range2d.h"
+#include "blocked_range3d.h"
+#include "cache_aligned_allocator.h"
+#include "concurrent_hash_map.h"
+#include "concurrent_queue.h"
+#include "concurrent_vector.h"
+#include "enumerable_thread_specific.h"
+#include "mutex.h"
+#include "null_mutex.h"
+#include "null_rw_mutex.h"
+#include "parallel_do.h"
+#include "parallel_for.h"
+#include "parallel_for_each.h"
+#include "parallel_invoke.h"
+#include "parallel_reduce.h"
+#include "parallel_scan.h"
+#include "parallel_sort.h"
+#include "partitioner.h"
+#include "pipeline.h"
+#include "queuing_mutex.h"
+#include "queuing_rw_mutex.h"
+#include "recursive_mutex.h"
+#include "spin_mutex.h"
+#include "spin_rw_mutex.h"
+#include "task.h"
+#include "task_group.h"
+#include "task_scheduler_init.h"
+#include "task_scheduler_observer.h"
+#include "tbb_allocator.h"
+#include "tbb_exception.h"
+#include "tbb_thread.h"
+#include "tick_count.h"
 
+#endif /* __TBB_tbb_H */
diff --git a/include/tbb/tbb_allocator.h b/include/tbb/tbb_allocator.h
index d747427..aa1544b 100644
--- a/include/tbb/tbb_allocator.h
+++ b/include/tbb/tbb_allocator.h
@@ -30,6 +30,7 @@
 #define __TBB_tbb_allocator_H
 
 #include <new>
+#include <cstring>
 #include "tbb_stddef.h"
 
 namespace tbb {
@@ -140,6 +141,63 @@ inline bool operator==( const tbb_allocator<T>&, const tbb_allocator<U>& ) {retu
 template<typename T, typename U>
 inline bool operator!=( const tbb_allocator<T>&, const tbb_allocator<U>& ) {return false;}
 
+//! 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.
+    @ingroup memory_allocation */
+template <typename T, template<typename X> class Allocator = tbb_allocator>
+class zero_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 zero_allocator<U, Allocator> other;
+    };
+
+    zero_allocator() throw() { }
+    zero_allocator(const zero_allocator &a) throw() : base_allocator_type( a ) { }
+    template<typename U>
+    zero_allocator(const zero_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, 0, 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 zero_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 zero_allocator<U, Allocator> other;
+    };
+};
+
+template<typename T1, template<typename X1> class B1, typename T2, template<typename X2> class B2>
+inline bool operator==( const zero_allocator<T1,B1> &a, const zero_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 zero_allocator<T1,B1> &a, const zero_allocator<T2,B2> &b) {
+    return static_cast< B1<T1> >(a) != static_cast< B2<T2> >(b);
+}
+
 } // namespace tbb 
 
 #endif /* __TBB_tbb_allocator_H */
diff --git a/include/tbb/tbb_config.h b/include/tbb/tbb_config.h
new file mode 100644
index 0000000..27d20d3
--- /dev/null
+++ b/include/tbb/tbb_config.h
@@ -0,0 +1,167 @@
+/*
+    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_tbb_config_H
+#define __TBB_tbb_config_H
+
+/** This header is supposed to contain macro definitions and C style comments only.
+    The macros defined here are intended to control such aspects of TBB build as 
+    - compilation modes
+    - feature sets
+    - workarounds presence 
+**/
+
+/** Compilation modes **/
+
+#ifndef TBB_USE_DEBUG
+#ifdef TBB_DO_ASSERT
+#define TBB_USE_DEBUG TBB_DO_ASSERT
+#else
+#define TBB_USE_DEBUG 0
+#endif /* TBB_DO_ASSERT */
+#else
+#define TBB_DO_ASSERT TBB_USE_DEBUG
+#endif /* TBB_USE_DEBUG */
+
+#ifndef TBB_USE_ASSERT
+#ifdef TBB_DO_ASSERT
+#define TBB_USE_ASSERT TBB_DO_ASSERT
+#else 
+#define TBB_USE_ASSERT TBB_USE_DEBUG
+#endif /* TBB_DO_ASSERT */
+#endif /* TBB_USE_ASSERT */
+
+#ifndef TBB_USE_THREADING_TOOLS
+#ifdef TBB_DO_THREADING_TOOLS
+#define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS
+#else 
+#define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG
+#endif /* TBB_DO_THREADING_TOOLS */
+#endif /* TBB_USE_THREADING_TOOLS */
+
+#ifndef TBB_USE_PERFORMANCE_WARNINGS
+#ifdef TBB_PERFORMANCE_WARNINGS
+#define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS
+#else 
+#define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG
+#endif /* TBB_PEFORMANCE_WARNINGS */
+#endif /* TBB_USE_PERFORMANCE_WARNINGS */
+
+
+/** Feature sets **/
+
+#ifndef __TBB_EXCEPTIONS
+#define __TBB_EXCEPTIONS 1
+#endif /* __TBB_EXCEPTIONS */
+
+#ifndef __TBB_SCHEDULER_OBSERVER
+#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 */
+
+
+/* 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 )
+
+
+#ifndef TBB_USE_CAPTURED_EXCEPTION
+    #if __TBB_EXCEPTION_PTR_PRESENT
+        #define TBB_USE_CAPTURED_EXCEPTION 0
+    #else
+        #define TBB_USE_CAPTURED_EXCEPTION 1
+    #endif
+#else /* defined TBB_USE_CAPTURED_EXCEPTION */
+    #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT
+        #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.
+    #endif
+#endif /* defined TBB_USE_CAPTURED_EXCEPTION */
+
+
+#ifndef __TBB_DEFAULT_PARTITIONER
+#if TBB_DEPRECATED
+/** Default partitioner for parallel loop templates in TBB 1.0-2.1 */
+#define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner
+#else
+/** Default partitioner for parallel loop templates in TBB 2.2 */
+#define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner
+#endif /* TBB_DEFAULT_PARTITIONER */
+#endif /* !defined(__TBB_DEFAULT_PARTITIONER */
+
+/** Workarounds presence **/
+
+/** 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
+    versions go out of the support list. 
+**/
+
+#if defined(_MSC_VER) && _MSC_VER < 0x1500 && !defined(__INTEL_COMPILER)
+    /** VS2005 and earlier does not allow to declare a template class as a friend 
+        of classes defined in other namespaces. **/
+    #define __TBB_TEMPLATE_FRIENDS_BROKEN 1
+#endif
+
+#if __GLIBC__==2 && __GLIBC_MINOR__==3 || __MINGW32__
+    /** Some older versions of glibc crash when exception handling happens concurrently. **/
+    #define __TBB_EXCEPTION_HANDLING_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. **/
+    #define __TBB_PRIO_INHERIT_BROKEN 1
+
+    /** A bug in FreeBSD 8.0 results in test hanging when an exception occurs 
+        during (concurrent?) object construction by means of placement new operator. **/
+    #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1
+#endif /* __FreeBSD__ */
+
+
+#endif /* __TBB_tbb_config_H */
diff --git a/include/tbb/tbb_exception.h b/include/tbb/tbb_exception.h
index 5c1f5e7..c4a587a 100644
--- a/include/tbb/tbb_exception.h
+++ b/include/tbb/tbb_exception.h
@@ -32,6 +32,10 @@
 #include "tbb_stddef.h"
 #include <stdexcept>
 
+#if __TBB_EXCEPTIONS && !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC)
+#error The current compilation environment does not support exception handling. Please set __TBB_EXCEPTIONS to 0 in tbb_config.h
+#endif
+
 namespace tbb {
 
 //! Exception for concurrent containers
@@ -41,6 +45,10 @@ public:
     virtual ~bad_last_alloc() throw() {}
 };
 
+namespace internal {
+void __TBB_EXPORTED_FUNC throw_bad_last_alloc_exception_v4() ;
+} // namespace internal
+
 } // namespace tbb
 
 #if __TBB_EXCEPTIONS
@@ -235,6 +243,35 @@ private:
     const char* my_exception_name;
 };
 
+#if !TBB_USE_CAPTURED_EXCEPTION
+namespace internal {
+
+//! Exception container that preserves the exact copy of the original exception
+/** This class can be used only when the appropriate runtime support (mandated 
+    by C++0x) is present **/
+class tbb_exception_ptr {
+    std::exception_ptr  my_ptr;
+
+public:
+    static tbb_exception_ptr* allocate ();
+    static tbb_exception_ptr* allocate ( const tbb_exception& );
+    static tbb_exception_ptr* allocate ( const captured_exception& );
+    
+    //! Destroys this objects
+    /** Note that objects of this type can be created only by the allocate() method. **/
+    void destroy () throw();
+
+    //! Throws the contained exception .
+    void throw_self () { std::rethrow_exception(my_ptr); }
+
+private:
+    tbb_exception_ptr ( const std::exception_ptr& src ) : my_ptr(src) {}
+    tbb_exception_ptr ( const captured_exception& src ) : my_ptr(std::copy_exception(src)) {}
+}; // class tbb::internal::tbb_exception_ptr
+
+} // namespace internal
+#endif /* !TBB_USE_CAPTURED_EXCEPTION */
+
 } // namespace tbb
 
 #endif /* __TBB_EXCEPTIONS */
diff --git a/include/tbb/tbb_machine.h b/include/tbb/tbb_machine.h
index a0ef58c..0673f24 100644
--- a/include/tbb/tbb_machine.h
+++ b/include/tbb/tbb_machine.h
@@ -37,10 +37,14 @@
 #pragma managed(push, off)
 #endif
 
-#if defined(_M_IX86)
+#if __MINGW32__
+#include "machine/linux_ia32.h"
+extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void );
+#define __TBB_Yield()  SwitchToThread()
+#elif defined(_M_IX86)
 #include "machine/windows_ia32.h"
 #elif defined(_M_AMD64) 
-#include "machine/windows_em64t.h"
+#include "machine/windows_intel64.h"
 #else
 #error Unsupported platform
 #endif
@@ -54,9 +58,9 @@
 #if __i386__
 #include "machine/linux_ia32.h"
 #elif __x86_64__
-#include "machine/linux_em64t.h"
+#include "machine/linux_intel64.h"
 #elif __ia64__
-#include "machine/linux_itanium.h"
+#include "machine/linux_ia64.h"
 #endif
 
 #elif __APPLE__
@@ -64,7 +68,7 @@
 #if __i386__
 #include "machine/linux_ia32.h"
 #elif __x86_64__
-#include "machine/linux_em64t.h"
+#include "machine/linux_intel64.h"
 #elif __POWERPC__
 #include "machine/mac_ppc.h"
 #endif
@@ -80,12 +84,15 @@
 #if __i386  || __i386__
 #include "machine/linux_ia32.h"
 #elif __x86_64__
-#include "machine/linux_em64t.h"
+#include "machine/linux_intel64.h"
 #endif
 
 #endif
 
-#if !defined(__TBB_CompareAndSwap4) || !defined(__TBB_CompareAndSwap8) || !defined(__TBB_Yield)
+#if    !defined(__TBB_CompareAndSwap4) \
+    || !defined(__TBB_CompareAndSwap8) \
+    || !defined(__TBB_Yield)           \
+    || !defined(__TBB_release_consistency_helper)
 #error Minimal requirements for tbb_machine.h not satisfied 
 #endif
 
@@ -94,9 +101,7 @@
     template<typename T>
     inline T __TBB_load_with_acquire(const volatile T& location) {
         T temp = location;
-#ifdef __TBB_fence_for_acquire 
-        __TBB_fence_for_acquire();
-#endif /* __TBB_fence_for_acquire */
+        __TBB_release_consistency_helper();
         return temp;
     }
 #endif
@@ -105,9 +110,7 @@
     //! Store with release semantics; i.e., no prior memory operation can move below the store.
     template<typename T, typename V>
     inline void __TBB_store_with_release(volatile T& location, V value) {
-#ifdef __TBB_fence_for_release
-        __TBB_fence_for_release();
-#endif /* __TBB_fence_for_release */
+        __TBB_release_consistency_helper();
         location = T(value); 
     }
 #endif
@@ -122,15 +125,15 @@ namespace tbb {
 namespace internal {
 
 //! Class that implements exponential backoff.
-/** See implementation of SpinwaitWhileEq for an example. */
-class AtomicBackoff {
+/** See implementation of spin_wait_while_eq for an example. */
+class atomic_backoff {
     //! Time delay, in units of "pause" instructions. 
     /** Should be equal to approximately the number of "pause" instructions
         that take the same time as an context switch. */
     static const int32_t LOOPS_BEFORE_YIELD = 16;
     int32_t count;
 public:
-    AtomicBackoff() : count(1) {}
+    atomic_backoff() : count(1) {}
 
     //! Pause for a while.
     void pause() {
@@ -161,6 +164,22 @@ public:
     }
 };
 
+//! Spin WHILE the value of the variable is equal to a given value
+/** T and U should be comparable types. */
+template<typename T, typename U>
+void spin_wait_while_eq( const volatile T& location, U value ) {
+    atomic_backoff backoff;
+    while( location==value ) backoff.pause();
+}
+
+//! Spin UNTIL the value of the variable is equal to a given value
+/** T and U should be comparable types. */
+template<typename T, typename U>
+void spin_wait_until_eq( const volatile T& location, const U value ) {
+    atomic_backoff backoff;
+    while( location!=value ) backoff.pause();
+}
+
 // T should be unsigned, otherwise sign propagation will break correctness of bit manipulations.
 // S should be either 1 or 2, for the mask calculation to work correctly.
 // Together, these rules limit applicability of Masked CAS to unsigned char and unsigned short.
@@ -173,7 +192,7 @@ inline T __TBB_MaskedCompareAndSwap (volatile T *ptr, T value, T comparand ) {
     const uint8_t bitoffset = uint8_t( 8*((uintptr_t)ptr & 0x3) );
 #endif
     const uint32_t mask = ( (1<<(S*8)) - 1 )<<bitoffset;
-    AtomicBackoff b;
+    atomic_backoff b;
     uint32_t result;
     for(;;) {
         result = *base; // reload the base value which might change during the pause
@@ -225,7 +244,7 @@ inline uint64_t __TBB_CompareAndSwapGeneric <8,uint64_t> (volatile void *ptr, ui
 
 template<size_t S, typename T>
 inline T __TBB_FetchAndAddGeneric (volatile void *ptr, T addend) {
-    AtomicBackoff b;
+    atomic_backoff b;
     T result;
     for(;;) {
         result = *reinterpret_cast<volatile T *>(ptr);
@@ -239,7 +258,7 @@ inline T __TBB_FetchAndAddGeneric (volatile void *ptr, T addend) {
 
 template<size_t S, typename T>
 inline T __TBB_FetchAndStoreGeneric (volatile void *ptr, T value) {
-    AtomicBackoff b;
+    atomic_backoff b;
     T result;
     for(;;) {
         result = *reinterpret_cast<volatile T *>(ptr);
@@ -494,7 +513,7 @@ struct work_around_alignment_bug {
 // On 32-bit platforms, "atomic.h" requires definition of __TBB_Store8 and __TBB_Load8
 #ifndef __TBB_Store8
 inline void __TBB_Store8 (volatile void *ptr, int64_t value) {
-    tbb::internal::AtomicBackoff b;
+    tbb::internal::atomic_backoff b;
     for(;;) {
         int64_t result = *(int64_t *)ptr;
         if( __TBB_CompareAndSwap8(ptr,value,result)==result ) break;
@@ -530,7 +549,7 @@ inline intptr_t __TBB_Log2( uintptr_t x ) {
 
 #ifndef __TBB_AtomicOR
 inline void __TBB_AtomicOR( volatile void *operand, uintptr_t addend ) {
-    tbb::internal::AtomicBackoff b;
+    tbb::internal::atomic_backoff b;
     for(;;) {
         uintptr_t tmp = *(volatile uintptr_t *)operand;
         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp);
@@ -542,7 +561,7 @@ inline void __TBB_AtomicOR( volatile void *operand, uintptr_t addend ) {
 
 #ifndef __TBB_AtomicAND
 inline void __TBB_AtomicAND( volatile void *operand, uintptr_t addend ) {
-    tbb::internal::AtomicBackoff b;
+    tbb::internal::atomic_backoff b;
     for(;;) {
         uintptr_t tmp = *(volatile uintptr_t *)operand;
         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp&addend, tmp);
@@ -561,7 +580,7 @@ inline bool __TBB_TryLockByte( unsigned char &flag ) {
 #ifndef __TBB_LockByte
 inline uintptr_t __TBB_LockByte( unsigned char& flag ) {
     if ( !__TBB_TryLockByte(flag) ) {
-        tbb::internal::AtomicBackoff b;
+        tbb::internal::atomic_backoff b;
         do {
             b.pause();
         } while ( !__TBB_TryLockByte(flag) );
diff --git a/include/tbb/tbb_profiling.h b/include/tbb/tbb_profiling.h
index a58c037..f9c686d 100644
--- a/include/tbb/tbb_profiling.h
+++ b/include/tbb/tbb_profiling.h
@@ -30,12 +30,12 @@
 #define __TBB_profiling_H
 
 // Check if the tools support is enabled
-#if (_WIN32||_WIN64||__linux__) && TBB_USE_THREADING_TOOLS && __TBB_NAMING_API_SUPPORT
+#if (_WIN32||_WIN64||__linux__) && TBB_USE_THREADING_TOOLS
 
 #if _WIN32||_WIN64
 #include <stdlib.h>  /* mbstowcs_s */
 #endif
-#include "tbb/tbb_stddef.h"
+#include "tbb_stddef.h"
 
 namespace tbb {
     namespace internal {
diff --git a/include/tbb/tbb_stddef.h b/include/tbb/tbb_stddef.h
index b21c70d..d10826f 100644
--- a/include/tbb/tbb_stddef.h
+++ b/include/tbb/tbb_stddef.h
@@ -31,10 +31,10 @@
 
 // Marketing-driven product version
 #define TBB_VERSION_MAJOR 2
-#define TBB_VERSION_MINOR 1
+#define TBB_VERSION_MINOR 2
 
 // Engineering-focused interface version
-#define TBB_INTERFACE_VERSION 3016
+#define TBB_INTERFACE_VERSION 4000
 #define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000
 
 // The oldest major interface version still supported
@@ -105,7 +105,7 @@
 #       define __TBB_x86_64 1
 #   elif defined(_M_IA64)
 #       define __TBB_ipf 1
-#   elif defined(_M_IX86)
+#   elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support
 #       define __TBB_x86_32 1
 #   endif
 #else /* Assume generic Unix */
@@ -123,7 +123,7 @@
 #   endif
 #endif
 
-#if _WIN32||_WIN64
+#if _MSC_VER
 // define the parts of stdint.h that are needed, but put them inside tbb::internal
 namespace tbb {
 namespace internal {
@@ -139,7 +139,7 @@ namespace internal {
 } // namespace tbb
 #else
 #include <stdint.h>
-#endif
+#endif /* _MSC_VER */
 
 #if _MSC_VER >=1400
 #define __TBB_EXPORTED_FUNC   __cdecl
@@ -151,45 +151,13 @@ namespace internal {
 
 #include <cstddef>      /* Need size_t and ptrdiff_t (the latter on Windows only) from here. */
 
-#if _WIN32||_WIN64
+#if _MSC_VER
 #define __TBB_tbb_windef_H
 #include "_tbb_windef.h"
 #undef __TBB_tbb_windef_H
-#endif /* _WIN32||_WIN64 */
-
-#ifndef TBB_USE_DEBUG
-#ifdef TBB_DO_ASSERT
-#define TBB_USE_DEBUG TBB_DO_ASSERT
-#else
-#define TBB_USE_DEBUG 0
-#endif /* TBB_DO_ASSERT */
-#else
-#define TBB_DO_ASSERT TBB_USE_DEBUG
-#endif /* TBB_USE_DEBUG */
-
-#ifndef TBB_USE_ASSERT
-#ifdef TBB_DO_ASSERT
-#define TBB_USE_ASSERT TBB_DO_ASSERT
-#else 
-#define TBB_USE_ASSERT TBB_USE_DEBUG
-#endif /* TBB_DO_ASSERT */
-#endif /* TBB_USE_ASSERT */
+#endif
 
-#ifndef TBB_USE_THREADING_TOOLS
-#ifdef TBB_DO_THREADING_TOOLS
-#define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS
-#else 
-#define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG
-#endif /* TBB_DO_THREADING_TOOLS */
-#endif /* TBB_USE_THREADING_TOOLS */
-
-#ifndef TBB_USE_PERFORMANCE_WARNINGS
-#ifdef TBB_PERFORMANCE_WARNINGS
-#define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS
-#else 
-#define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG
-#endif /* TBB_PEFORMANCE_WARNINGS */
-#endif /* TBB_USE_PERFORMANCE_WARNINGS */
+#include "tbb_config.h"
 
 namespace tbb {
     //! Type for an assertion handler
@@ -301,13 +269,13 @@ struct allocator_type {
     typedef T value_type;
 };
 
-#if _WIN32||_WIN64
+#if _MSC_VER
 //! Microsoft std::allocator has non-standard extension that strips const from a type. 
 template<typename T>
 struct allocator_type<const T> {
     typedef T value_type;
 };
-#endif /* _WIN32||_WIN64 */
+#endif
 
 // Struct to be used as a version tag for inline functions.
 /** Version tag can be necessary to prevent loader on Linux from using the wrong 
@@ -321,20 +289,5 @@ typedef version_tag_v3 version_tag;
 
 } // tbb
 
-#if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)
-#ifndef __TBB_EXCEPTIONS
-#define __TBB_EXCEPTIONS 1
-#endif /* __TBB_EXCEPTIONS */
-#endif
-
-#ifndef __TBB_SCHEDULER_OBSERVER
-#define __TBB_SCHEDULER_OBSERVER 1
-#endif /* __TBB_SCHEDULER_OBSERVER */
-
-#ifndef __TBB_NAMING_API_SUPPORT
-#define __TBB_NAMING_API_SUPPORT 1
-#endif /* __TBB_NAMING_API_SUPPORT */
-
-
 #endif /* RC_INVOKED */
 #endif /* __TBB_tbb_stddef_H */
diff --git a/src/tbbmalloc/proxy.h b/include/tbb/tbbmalloc_proxy.h
similarity index 54%
copy from src/tbbmalloc/proxy.h
copy to include/tbb/tbbmalloc_proxy.h
index 15c25a9..ebde358 100644
--- a/src/tbbmalloc/proxy.h
+++ b/include/tbb/tbbmalloc_proxy.h
@@ -26,31 +26,49 @@
     the GNU General Public License.
 */
 
-#ifndef _TBB_malloc_proxy_H_
-#define _TBB_malloc_proxy_H_
+/*
+Replacing the standard memory allocation routines in Microsoft* C/C++ RTL 
+(malloc/free, global new/delete, etc.) with the TBB memory allocator. 
+
+Include the following header to a source of any binary which is loaded during 
+application startup
+
+#include "tbb/tbbmalloc_proxy.h"
+
+or add following parameters to the linker options for the binary which is 
+loaded during application startup. It can be either exe-file or dll.
+
+For win32
+tbbmalloc_proxy.lib /INCLUDE:"___TBB_malloc_proxy"
+win64
+tbbmalloc_proxy.lib /INCLUDE:"__TBB_malloc_proxy"
+*/
+
+#ifndef __TBB_tbbmalloc_proxy_H
+#define __TBB_tbbmalloc_proxy_H
 
-#if __linux__
-#define MALLOC_LD_PRELOAD 1
+#if _MSC_VER
+
+#ifdef _DEBUG
+    #pragma comment(lib, "tbbmalloc_proxy_debug.lib")
+#else
+    #pragma comment(lib, "tbbmalloc_proxy.lib")
+#endif
+
+#if defined(_WIN64)
+    #pragma comment(linker, "/include:__TBB_malloc_proxy")
+#else
+    #pragma comment(linker, "/include:___TBB_malloc_proxy")
 #endif
 
-#include <stddef.h>
-
-extern "C" {
-    void * scalable_malloc(size_t size);
-    void * scalable_calloc(size_t nobj, size_t size);
-    void   scalable_free(void *object);
-    void * scalable_realloc(void* ptr, size_t size);
-    void * scalable_aligned_malloc(size_t size, size_t alignment);
-    void * scalable_aligned_realloc(void* ptr, size_t size, size_t alignment);
-    int    scalable_posix_memalign(void **memptr, size_t alignment, size_t size);
-
-    void * __TBB_internal_malloc(size_t size);
-    void * __TBB_internal_calloc(size_t num, size_t size);
-    void   __TBB_internal_free(void *object);
-    void * __TBB_internal_realloc(void* ptr, size_t sz);
-    int    __TBB_internal_posix_memalign(void **memptr, size_t alignment, size_t size);
-    
-    bool   __TBB_internal_find_original_malloc(int num, const char *names[], void *table[]);
-} // extern "C"
-
-#endif /* _TBB_malloc_proxy_H_ */
+#else
+/* Primarily to support MinGW */
+
+extern "C" void __TBB_malloc_proxy();
+struct __TBB_malloc_proxy_caller {
+    __TBB_malloc_proxy_caller() { __TBB_malloc_proxy(); }
+} volatile __TBB_malloc_proxy_helper_object;
+
+#endif // _MSC_VER
+
+#endif //__TBB_tbbmalloc_proxy_H
diff --git a/index.html b/index.html
index 96373a5..d35f392 100644
--- a/index.html
+++ b/index.html
@@ -26,7 +26,7 @@ To port TBB to a new platform, operating system or architecture, see the <A HREF
 <DD>Source code for the library.
 <DT><A HREF="build/index.html">build</A>
 <DD>Internal Makefile infrastructure for TBB.  Do not use directly; see the <A HREF=build/index.html#build>build directions</A>.
-<DT><A HREF="ia32">ia32</A>, <A HREF="em64t">em64t</A>, <A HREF="itanium">itanium</A>
+<DT><A HREF="ia32">ia32</A>, <A HREF="intel64">intel64</A>, <A HREF="ia64">ia64</A>
 <DD>Platform-specific binary files for the library.
 </DL>
 
diff --git a/src/Makefile b/src/Makefile
index 280128d..ac5a66a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -35,6 +35,8 @@ tbb: tbb_release tbb_debug
 
 tbbmalloc: tbbmalloc_release tbbmalloc_debug
 
+rml: rml_release rml_debug
+
 test: tbbmalloc_test_release test_release tbbmalloc_test_debug test_debug
 
 test_no_depends: tbbmalloc_test_release_no_depends test_release_no_depends tbbmalloc_test_debug_no_depends test_debug_no_depends
@@ -59,10 +61,10 @@ ifeq ($(tbb_os),windows)
 else
 	$(MAKE) -s -i -r --no-print-directory -f Makefile tbb_root=. compiler=icc clean all native_examples
 endif
-ifeq ($(arch),em64t)
+ifeq ($(arch),intel64)
 	$(MAKE) -s -i -r --no-print-directory -f Makefile tbb_root=. arch=ia32 clean all
 endif
-# it doesn't test compiler=icc arch=ia32 on em64t systems due to enviroment settings of icc
+# it doesn't test compiler=icc arch=ia32 on intel64 systems due to enviroment settings of icc
 
 native_examples: tbb tbbmalloc
 	$(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. compiler=$(native_compiler) tbb_build_prefix=$(tbb_build_prefix) debug test
@@ -94,6 +96,12 @@ 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) 
@@ -102,6 +110,12 @@ 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: 
+	$(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:
+	$(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
 
@@ -111,6 +125,18 @@ tbbmalloc_release: mkdir_release
 tbbmalloc_debug: mkdir_debug
 	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc tbb_root=$(tbb_root)
 
+tbbmalloc_dll_release: mkdir_release
+	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_dll tbb_root=$(tbb_root)
+
+tbbmalloc_proxy_dll_release: mkdir_release
+	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release  malloc_proxy_dll tbb_root=$(tbb_root)
+
+tbbmalloc_dll_debug: mkdir_debug
+	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_dll tbb_root=$(tbb_root)
+
+tbbmalloc_proxy_dll_debug: mkdir_debug
+	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_proxy_dll tbb_root=$(tbb_root)
+
 tbbmalloc_test_release: $(call cross_cfg,mkdir_release) $(call cross_cfg,tbbmalloc_release) tbbmalloc_test_release_no_depends
 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)
@@ -155,7 +181,7 @@ codecov:
 
 do_codecov:
 	$(MAKE) tbbmalloc_test_release test_release
-	$(RM) $(work_dir)_release$(SLASH)test_*.* >$(NUL) 2>$(NUL)
+	$(MAKE) clean_test_* cfg=release
 	$(MAKE) crosstest=yes tbbmalloc_test_debug test_debug
 
 info:
diff --git a/src/index.html b/src/index.html
index e45ad68..5e53ce7 100644
--- a/src/index.html
+++ b/src/index.html
@@ -14,6 +14,8 @@ This directory contains the source code and unit tests for Threading Building Bl
 <DD>Source code of the TBB unit tests.
 <DT><A HREF="old">old</A>
 <DD>Source code of deprecated TBB entities that are still shipped as part of the TBB library for the sake of backward compatibility.
+<DT><A HREF="rml">rml</A>
+<DD>Source code of the Resource Management Layer (RML).
 </DL>
 
 <HR>
diff --git a/src/old/concurrent_queue_v2.cpp b/src/old/concurrent_queue_v2.cpp
index 066b39b..a6d0d6f 100644
--- a/src/old/concurrent_queue_v2.cpp
+++ b/src/old/concurrent_queue_v2.cpp
@@ -30,7 +30,6 @@
 #include "tbb/cache_aligned_allocator.h"
 #include "tbb/spin_mutex.h"
 #include "tbb/atomic.h"
-#include "../tbb/tbb_misc.h"
 #include <cstring>
 #include <stdio.h>
 
@@ -164,7 +163,7 @@ void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base
     }
     {
         push_finalizer finalizer( *this, k+concurrent_queue_rep::n_queue ); 
-        SpinwaitUntilEq( tail_counter, k );
+        spin_wait_until_eq( tail_counter, k );
         if( p ) {
             spin_mutex::scoped_lock lock( page_mutex );
             if( page* q = tail_page )
@@ -183,8 +182,8 @@ void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base
 
 bool micro_queue::pop( void* dst, ticket k, concurrent_queue_base& base ) {
     k &= -concurrent_queue_rep::n_queue;
-    SpinwaitUntilEq( head_counter, k );
-    SpinwaitWhileEq( tail_counter, k );
+    spin_wait_until_eq( head_counter, k );
+    spin_wait_while_eq( tail_counter, k );
     page& p = *head_page;
     __TBB_ASSERT( &p, NULL );
     size_t index = (k/concurrent_queue_rep::n_queue & base.items_per_page-1);
@@ -239,7 +238,7 @@ void concurrent_queue_base::internal_push( const void* src ) {
     concurrent_queue_rep::ticket k  = r.tail_counter++;
     ptrdiff_t e = my_capacity;
     if( e<concurrent_queue_rep::infinite_capacity ) {
-        ExponentialBackoff backoff;
+        atomic_backoff backoff;
         for(;;) {
             if( (ptrdiff_t)(k-r.head_counter)<e ) break;
             backoff.pause();
@@ -261,7 +260,7 @@ bool concurrent_queue_base::internal_pop_if_present( void* dst ) {
     concurrent_queue_rep& r = *my_rep;
     concurrent_queue_rep::ticket k;
     do {
-        ExponentialBackoff backoff;
+        atomic_backoff backoff;
         for(;;) {
             k = r.head_counter;
             if( r.tail_counter<=k ) {
@@ -281,7 +280,7 @@ bool concurrent_queue_base::internal_pop_if_present( void* dst ) {
 
 bool concurrent_queue_base::internal_push_if_not_full( const void* src ) {
     concurrent_queue_rep& r = *my_rep;
-    ExponentialBackoff backoff;
+    atomic_backoff backoff;
     concurrent_queue_rep::ticket k;
     for(;;) {
         k = r.tail_counter;
diff --git a/src/old/concurrent_vector_v2.cpp b/src/old/concurrent_vector_v2.cpp
index 000ca9f..36186ea 100644
--- a/src/old/concurrent_vector_v2.cpp
+++ b/src/old/concurrent_vector_v2.cpp
@@ -27,7 +27,7 @@
 */
 
 #include "concurrent_vector_v2.h"
-#include "../tbb/tbb_misc.h"
+#include "tbb/tbb_machine.h"
 #include <stdexcept>
 #include "../tbb/itt_notify.h"
 #include "tbb/task.h"
@@ -82,7 +82,7 @@ void concurrent_vector_base::helper::extend_segment( concurrent_vector_base& v )
     std::memset( s, 0, pointers_per_long_segment*sizeof(segment_t) );
     // 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.
-    ExponentialBackoff backoff;
+    atomic_backoff backoff;
     while( !v.my_storage[0].array || !v.my_storage[1].array ) {
         backoff.pause();
     }
@@ -178,7 +178,7 @@ void* concurrent_vector_base::internal_push_back( size_type element_size, size_t
 	    s.array = array;
 	} else {
 	    ITT_NOTIFY(sync_prepare, &s.array);
-	    internal::SpinwaitWhileEq( s.array, (void*)0 );
+	    spin_wait_while_eq( s.array, (void*)0 );
 	    ITT_NOTIFY(sync_acquired, &s.array);
 	    array = s.array;
 	}
@@ -211,7 +211,7 @@ void concurrent_vector_base::internal_grow( const size_type start, size_type fin
                 s.array = array;
             } else {
                 ITT_NOTIFY(sync_prepare, &s.array);
-                internal::SpinwaitWhileEq( s.array, (void*)0 );
+                spin_wait_while_eq( s.array, (void*)0 );
                 ITT_NOTIFY(sync_acquired, &s.array);
                 array = s.array;
             }
diff --git a/src/old/spin_rw_mutex_v2.cpp b/src/old/spin_rw_mutex_v2.cpp
index 912fd8e..9067b09 100644
--- a/src/old/spin_rw_mutex_v2.cpp
+++ b/src/old/spin_rw_mutex_v2.cpp
@@ -28,7 +28,6 @@
 
 #include "spin_rw_mutex_v2.h"
 #include "tbb/tbb_machine.h"
-#include "../tbb/tbb_misc.h"
 #include "../tbb/itt_notify.h"
 
 namespace tbb {
@@ -42,12 +41,15 @@ static inline bool CAS(volatile uintptr &addr, uintptr newv, uintptr oldv) {
 //! Signal that write lock is released
 void spin_rw_mutex::internal_itt_releasing(spin_rw_mutex *mutex) {
     ITT_NOTIFY(sync_releasing, mutex);
+#if !DO_ITT_NOTIFY
+    (void)mutex;
+#endif
 }
 
 bool spin_rw_mutex::internal_acquire_writer(spin_rw_mutex *mutex)
 {
     ITT_NOTIFY(sync_prepare, mutex);
-    ExponentialBackoff backoff;
+    atomic_backoff backoff;
     for(;;) {
         state_t s = mutex->state;
         if( !(s & BUSY) ) { // no readers, no writers
@@ -74,7 +76,7 @@ void spin_rw_mutex::internal_release_writer(spin_rw_mutex *mutex) {
 //! Acquire lock on given mutex.
 void spin_rw_mutex::internal_acquire_reader(spin_rw_mutex *mutex) {
     ITT_NOTIFY(sync_prepare, mutex);
-    ExponentialBackoff backoff;
+    atomic_backoff backoff;
     for(;;) {
         state_t s = mutex->state;
         if( !(s & (WRITER|WRITER_PENDING)) ) { // no writer or write requests
@@ -101,7 +103,7 @@ bool spin_rw_mutex::internal_upgrade(spin_rw_mutex *mutex) {
     while( (s & READERS)==ONE_READER || !(s & WRITER_PENDING) ) {
         if( CAS(mutex->state, s | WRITER_PENDING, s) )
         {
-            ExponentialBackoff backoff;
+            atomic_backoff backoff;
             ITT_NOTIFY(sync_prepare, mutex);
             while( (mutex->state & READERS) != ONE_READER ) // more than 1 reader
                 backoff.pause();
diff --git a/src/perf/fibonacci_cutoff.cpp b/src/perf/fibonacci_cutoff.cpp
new file mode 100644
index 0000000..cb63d77
--- /dev/null
+++ b/src/perf/fibonacci_cutoff.cpp
@@ -0,0 +1,134 @@
+/*
+    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 <cstdio>
+#include <cstdlib>
+
+#include "tbb/task_scheduler_init.h"
+#include "tbb/task.h"
+#include "tbb/tick_count.h"
+
+long CutOff = 1;
+
+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");
+}
+
+inline void output(int P, long n, long c, int T, double serial_elapsed, double elapsed, long result) {
+    printf("%s, %d, %ld, %ld, %d, %g, %ld, %g\n", ( (P == 0) ? "Serial" : "Parallel" ), P, n, c, T, elapsed, result, serial_elapsed / elapsed);
+}
+
+#define MOVE_BY_FOURTHS 1
+inline long calculate_new_cutoff(const long lo, const long hi) {
+#if MOVE_BY_FOURTHS    
+    return lo + (3 + hi - lo ) / 4;
+#else
+    return (hi + lo)/2;
+#endif
+}
+
+void find_cutoff(const int P, const long n, const int T, const double serial_elapsed) {
+    long lo = 1, hi = n;
+    double elapsed = 0, lo_elapsed = 0, hi_elapsed = 0;
+    long final_cutoff = -1;
+
+    tbb::task_scheduler_init init(P);
+
+    while(true) {
+       CutOff = calculate_new_cutoff(lo, hi);
+       long result = 0;
+       tbb::tick_count t0;
+       for (int t = -1; t < T; ++t) {
+           if (t == 0) t0 = tbb::tick_count::now();
+           result += ParallelFib(n);
+       }
+       elapsed = (tbb::tick_count::now() - t0).seconds();
+       output(P,n,CutOff,T,serial_elapsed,elapsed,result);
+
+       if (serial_elapsed / elapsed >= P/2.0) {
+           final_cutoff = CutOff;
+           if (hi == CutOff) {
+               if (hi == lo) {
+                  // we have had this value at both above and below 50%
+                  lo = 1; lo_elapsed = 0;
+               } else  {
+                  break;
+               }
+           }
+           hi = CutOff;
+           hi_elapsed = elapsed;
+       } else {
+           if (lo == CutOff) break;
+           lo = CutOff;
+           lo_elapsed = elapsed;
+       }
+    } 
+
+    double interpolated_cutoff = lo + ( P/2.0 - serial_elapsed/lo_elapsed ) * ( (hi - lo) / ( serial_elapsed/hi_elapsed - serial_elapsed/lo_elapsed ));
+
+    if (final_cutoff != -1) {
+        printf("50%% efficiency cutoff is %ld ( linearly interpolated cutoff is %g )\n", final_cutoff, interpolated_cutoff);
+    } else {
+        printf("Cannot achieve 50%% efficiency\n");
+    }
+
+    return;
+}
+
+int main(int argc, char *argv[]) {
+    if (argc < 4) {
+        printf("Usage: %s threads n repititions\n",argv[0]); 
+        return 1;
+    }
+
+    dump_title();
+
+    int P = atoi(argv[1]);
+    long n = atol(argv[2]);
+    int T = atoi(argv[3]);
+
+    // collect serial time
+    long serial_result = 0;
+    tbb::tick_count t0; 
+    for (int t = -1; t < T; ++t) {
+        if (t == 0) t0 = tbb::tick_count::now();        
+        serial_result += SerialFib(n);
+    }
+    double serial_elapsed = (tbb::tick_count::now() - t0).seconds();
+    output(0,n,0,T,serial_elapsed,serial_elapsed,serial_result);
+
+    // perform search
+    find_cutoff(P,n,T,serial_elapsed);
+
+    return 0;
+}
+
diff --git a/src/test/test_handle_perror.cpp b/src/perf/fibonacci_impl_tbb.cpp
similarity index 51%
copy from src/test/test_handle_perror.cpp
copy to src/perf/fibonacci_impl_tbb.cpp
index ef49048..66c6f24 100644
--- a/src/test/test_handle_perror.cpp
+++ b/src/perf/fibonacci_impl_tbb.cpp
@@ -26,31 +26,61 @@
     the GNU General Public License.
 */
 
-// Program for basic correctness of handle_perror, which is internal
-// to the TBB shared library.
-
-#include <cerrno>
-#include <stdexcept>
-#include "tbb/tbb_misc.h"
-#include "harness.h"
-
-static void TestHandlePerror() {
-    bool caught = false;
-    try {
-	tbb::internal::handle_perror( EAGAIN, "apple" );
-    } catch( std::runtime_error& e ) {
-	if( Verbose )
-	    printf("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;
-    }
-    ASSERT(caught,NULL);
+#include <cstdio>
+#include <cstdlib>
+
+#include "tbb/task_scheduler_init.h"
+#include "tbb/task.h"
+#include "tbb/tick_count.h"
+
+extern long CutOff;
+
+long SerialFib( const long n ) {
+    if( n<2 )
+        return n;
+    else
+        return SerialFib(n-1)+SerialFib(n-2);
 }
 
-int main( int argc, char* argv[] ) {
-    ParseCommandLine( argc, argv );
-    TestHandlePerror();
-    printf("done\n");
-    return 0;
+struct FibContinuation: public tbb::task {
+    long* const sum;
+    long x, y;
+    FibContinuation( long* sum_ ) : sum(sum_) {}
+    tbb::task* execute() {
+        *sum = x+y;
+        return NULL;
+    }
+};
+
+struct FibTask: public tbb::task {
+    long n;
+    long * sum;
+    FibTask( const long n_, long * const sum_ ) :
+        n(n_), sum(sum_)
+    {}
+    tbb::task* execute() {
+        if( n<CutOff ) {
+            *sum = SerialFib(n);
+            return NULL;
+        } else {
+            FibContinuation& c = 
+                *new( allocate_continuation() ) FibContinuation(sum);
+            FibTask& b = *new( c.allocate_child() ) FibTask(n-1,&c.y);
+            recycle_as_child_of(c);
+            n -= 2;
+            sum = &c.x;
+            // Set ref_count to "two children".
+            c.set_ref_count(2);
+            c.spawn( b );
+            return this;
+        }
+    }
+};
+
+long ParallelFib( const long n ) {
+    long sum;
+    FibTask& a = *new(tbb::task::allocate_root()) FibTask(n,&sum);
+    tbb::task::spawn_root_and_wait(a);
+    return sum;
 }
+
diff --git a/src/perf/perf_util.h b/src/perf/perf_util.h
index b5c5c70..812f5d6 100644
--- a/src/perf/perf_util.h
+++ b/src/perf/perf_util.h
@@ -208,7 +208,7 @@ inline
 double RunTestImpl ( const char* title, void (*pfn)(), char* histogramFileName = no_histogram ) {
     double  time = 0, variation = 0, deviation = 0;
     size_t nrep = 1;
-    while (true) {
+    for (;;) {
         CalibrateTiming(NRUNS, 1, nrep);
         StartTiming(NRUNS, 1, nrep);
         pfn();
diff --git a/src/perf/statistics.cpp b/src/perf/statistics.cpp
index 3ced834..5edebb8 100644
--- a/src/perf/statistics.cpp
+++ b/src/perf/statistics.cpp
@@ -31,26 +31,26 @@
 
 #define COUNT_PARAMETERS 3
 
-#ifdef _WIN32
+#ifdef _MSC_VER
 #define snprintf _snprintf
 #endif
 
 void GetTime(char* buff,int size_buff) 
 {
-	tm *newtime;
-	time_t timer;
-	time(&timer);
-	newtime=localtime(&timer);
-	strftime(buff,size_buff,"%H:%M:%S",newtime); 
+    tm *newtime;
+    time_t timer;
+    time(&timer);
+    newtime=localtime(&timer);
+    strftime(buff,size_buff,"%H:%M:%S",newtime); 
 }
 
 void GetDate(char* buff,int size_buff) 
 {
-	tm *newtime;
-	time_t timer;
-	time(&timer);  
-	newtime=localtime(&timer);
-	strftime(buff,size_buff,"%Y-%m-%d",newtime); 
+    tm *newtime;
+    time_t timer;
+    time(&timer);  
+    newtime=localtime(&timer);
+    strftime(buff,size_buff,"%Y-%m-%d",newtime); 
 }
 
 
@@ -59,16 +59,16 @@ StatisticsCollector::TestCase StatisticsCollector::SetTestCase(const char *name,
     string KeyName(name);
     switch (SortMode)
     {
-	case ByThreads: KeyName += Format("_%02d_%s", threads, mode); break;
+    case ByThreads: KeyName += Format("_%02d_%s", threads, mode); break;
     default:
     case ByAlg: KeyName += Format("_%s_%02d", mode, threads); break;
     }
     CurrentKey = Statistics[KeyName];
     if(!CurrentKey) {
         CurrentKey = new StatisticResults;
-	    CurrentKey->Mode = mode;
-	    CurrentKey->Name = name;
-	    CurrentKey->Threads = threads;
+        CurrentKey->Mode = mode;
+        CurrentKey->Name = name;
+        CurrentKey->Threads = threads;
         CurrentKey->Results.reserve(RoundTitles.size());
         Statistics[KeyName] = CurrentKey;
     }
@@ -148,79 +148,79 @@ string ExcelFormula(const string &fmt, size_t place, size_t rounds, bool is_hori
     return result;
 }
 
-void StatisticsCollector::Print(int dataOutput)
+void StatisticsCollector::Print(int dataOutput, const char *ModeName)
 {
-	FILE *OutputFile;
-	if (dataOutput & StatisticsCollector::Stdout)
-	{
+    FILE *OutputFile;
+    if (dataOutput & StatisticsCollector::Stdout)
+    {
         printf("\n-=# %s #=-\n", Title.c_str());
         if(SortMode == ByThreads)
-            printf("    Name    |  #  | Mode ");
+            printf("    Name    |  #  | %s ", ModeName);
         else
-            printf("    Name    | Mode |  #  ");
+            printf("    Name    | %s |  #  ", ModeName);
         for (AnalysisTitles_t::iterator i = AnalysisTitles.begin(); i != AnalysisTitles.end(); i++)
             printf("|%s", i->c_str()+1);
 
-		for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
-		{
+        for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+        {
             if(SortMode == ByThreads)
-			    printf("\n%12s|% 5d|%6s", i->second->Name.c_str(), i->second->Threads, i->second->Mode.c_str());
+                printf("\n%12s|% 5d|%6s", i->second->Name.c_str(), i->second->Threads, i->second->Mode.c_str());
             else
                 printf("\n%12s|%6s|% 5d", i->second->Name.c_str(), i->second->Mode.c_str(), i->second->Threads);
-			Analysis_t &analisis = i->second->Analysis;
+            Analysis_t &analisis = i->second->Analysis;
             AnalysisTitles_t::iterator t = AnalysisTitles.begin();
-			for (Analysis_t::iterator a = analisis.begin(); a != analisis.end(); t++)
-			{
+            for (Analysis_t::iterator a = analisis.begin(); a != analisis.end(); t++)
+            {
                 char fmt[8]; snprintf(fmt, 7, "|%% %us", unsigned(max(size_t(3), t->size())));
                 if(*t != a->first)
-				    printf(fmt, "");
+                    printf(fmt, "");
                 else {
                     printf(fmt, a->second.c_str()); a++;
                 }
-			}
-		}
+            }
+        }
         printf("\n");
-	}
-	if (dataOutput & StatisticsCollector::HTMLFile)
-	{
-		if ((OutputFile = fopen((Name+".html").c_str(), "w+t")) != NULL)
-		{
-			char TimerBuff[100], DateBuff[100];
-			GetTime(TimerBuff,sizeof(TimerBuff));
-			GetDate(DateBuff,sizeof(DateBuff));
-			fprintf(OutputFile, "<html><head>\n<title>%s</title>\n</head><body>\n", Title.c_str());
+    }
+    if (dataOutput & StatisticsCollector::HTMLFile)
+    {
+        if ((OutputFile = fopen((Name+".html").c_str(), "w+t")) != NULL)
+        {
+            char TimerBuff[100], DateBuff[100];
+            GetTime(TimerBuff,sizeof(TimerBuff));
+            GetDate(DateBuff,sizeof(DateBuff));
+            fprintf(OutputFile, "<html><head>\n<title>%s</title>\n</head><body>\n", Title.c_str());
             //-----------------------
-			fprintf(OutputFile, "<table id=\"h\" style=\"position:absolute;top:20\" border=1 cellspacing=0 cellpadding=2>\n");
-			fprintf(OutputFile, "<tr><td><a name=hr href=#vr onclick=\"v.style.visibility='visible';"
+            fprintf(OutputFile, "<table id=\"h\" style=\"position:absolute;top:20\" border=1 cellspacing=0 cellpadding=2>\n");
+            fprintf(OutputFile, "<tr><td><a name=hr href=#vr onclick=\"v.style.visibility='visible';"
                                 "h.style.visibility='hidden';\">Flip[H]</a></td>"
                                 "<td>%s</td><td>%s</td><td colspan=%u>%s</td>",
-				DateBuff, TimerBuff, unsigned(AnalysisTitles.size() + RoundTitles.size()), Title.c_str());
-			fprintf(OutputFile, "</tr>\n<tr bgcolor=#CCFFFF><td>Name</td><td>Threads</td><td>Mode</td>");
-			for (AnalysisTitles_t::iterator i = AnalysisTitles.begin(); i != AnalysisTitles.end(); i++)
-				fprintf(OutputFile, "<td>%s</td>", i->c_str()+1);
+                DateBuff, TimerBuff, unsigned(AnalysisTitles.size() + RoundTitles.size()), Title.c_str());
+            fprintf(OutputFile, "</tr>\n<tr bgcolor=#CCFFFF><td>Name</td><td>Threads</td><td>%s</td>", ModeName);
+            for (AnalysisTitles_t::iterator i = AnalysisTitles.begin(); i != AnalysisTitles.end(); i++)
+                fprintf(OutputFile, "<td>%s</td>", i->c_str()+1);
             for (size_t i = 0; i < RoundTitles.size(); i++)
                 fprintf(OutputFile, "<td>%s</td>", RoundTitles[i].c_str());
-			for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
-			{
-				fprintf(OutputFile, "</tr>\n<tr><td bgcolor=#CCFFCC>%s</td><td bgcolor=#CCFFCC>%d</td><td bgcolor=#CCFFCC>%4s</td>",
+            for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+            {
+                fprintf(OutputFile, "</tr>\n<tr><td bgcolor=#CCFFCC>%s</td><td bgcolor=#CCFFCC>%d</td><td bgcolor=#CCFFCC>%4s</td>",
                     i->second->Name.c_str(), i->second->Threads, i->second->Mode.c_str());
-				//statistics
+                //statistics
                 AnalysisTitles_t::iterator t = AnalysisTitles.begin();
-				for (Analysis_t::iterator j = i->second->Analysis.begin(); j != i->second->Analysis.end(); t++)
-				{
+                for (Analysis_t::iterator j = i->second->Analysis.begin(); j != i->second->Analysis.end(); t++)
+                {
                     fprintf(OutputFile, "<td bgcolor=#FFFF99>%s</td>", (*t != j->first)?" ":(i->second->Analysis[j->first]).c_str());
                     if(*t == j->first) j++;
-				}
-				//data
+                }
+                //data
                 Results_t &r = i->second->Results;
-				for (size_t k = 0; k < r.size(); k++)
-				{
-					fprintf(OutputFile, "<td>");
+                for (size_t k = 0; k < r.size(); k++)
+                {
+                    fprintf(OutputFile, "<td>");
                     fprintf(OutputFile, ResultsFmt, r[k]);
                     fprintf(OutputFile, "</td>");
-				}
-			}
-			fprintf(OutputFile, "</tr>\n</table>\n");
+                }
+            }
+            fprintf(OutputFile, "</tr>\n</table>\n");
             //////////////////////////////////////////////////////
             fprintf(OutputFile, "<table id=\"v\" style=\"visibility:hidden;position:absolute;top:20\" border=1 cellspacing=0 cellpadding=2>\n");
             fprintf(OutputFile, "<tr><td><a name=vr href=#hr onclick=\"h.style.visibility='visible';"
@@ -234,7 +234,7 @@ void StatisticsCollector::Print(int dataOutput)
             fprintf(OutputFile, "</tr>\n<tr bgcolor=#CCFFCC><td bgcolor=#CCFFFF>Threads</td>");
             for (Statistics_t::iterator n = Statistics.begin(); n != Statistics.end(); n++)
                 fprintf(OutputFile, "<td>%d</td>", n->second->Threads);
-            fprintf(OutputFile, "</tr>\n<tr bgcolor=#CCFFCC><td bgcolor=#CCFFFF>Mode</td>");
+            fprintf(OutputFile, "</tr>\n<tr bgcolor=#CCFFCC><td bgcolor=#CCFFFF>%s</td>", ModeName);
             for (Statistics_t::iterator m = Statistics.begin(); m != Statistics.end(); m++)
                 fprintf(OutputFile, "<td>%s</td>", m->second->Mode.c_str());
 
@@ -258,120 +258,117 @@ void StatisticsCollector::Print(int dataOutput)
                 }
             }
             fprintf(OutputFile, "</tr>\n</table>\n</body></html>\n");
-			fclose(OutputFile);
-		}
-	}
-	if (dataOutput & StatisticsCollector::ExcelXML)
-	{
-		if ((OutputFile = fopen((Name+".xml").c_str(), "w+t")) != NULL)
-		{
-			//vector<value_t> *TmpVect;
-			//Statistics_t::iterator ii, i = Statistics.begin();
-			//Analysis_t::iterator jj, j = i->second.Analysis.begin();
-			char UserName[100];
-			char SheetName[20];
-			char TimerBuff[100], DateBuff[100];
+            fclose(OutputFile);
+        }
+    }
+    if (dataOutput & StatisticsCollector::ExcelXML)
+    {
+        if ((OutputFile = fopen((Name+".xml").c_str(), "w+t")) == NULL) {
+            printf("Can't open .xml file\n");
+        } else {
+            //vector<value_t> *TmpVect;
+            //Statistics_t::iterator ii, i = Statistics.begin();
+            //Analysis_t::iterator jj, j = i->second.Analysis.begin();
+            char UserName[100];
+            char SheetName[20];
+            char TimerBuff[100], DateBuff[100];
 #if _WIN32 || _WIN64
-			strcpy(UserName,getenv("USERNAME"));
+            strcpy(UserName,getenv("USERNAME"));
 #else
-			strcpy(UserName,getenv("USER"));
+            strcpy(UserName,getenv("USER"));
 #endif
-			//--------------------------------
-			strcpy(SheetName,"Horizontal");
-			GetTime(TimerBuff,sizeof(TimerBuff));
-			GetDate(DateBuff,sizeof(DateBuff));
-			//--------------------------
-			fprintf(OutputFile, XMLHead, UserName, TimerBuff);
-			fprintf(OutputFile, XMLStyles);
-			fprintf(OutputFile, XMLBeginSheet, SheetName);
-			fprintf(OutputFile, XMLNames,2,1,2,int(AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS));
-			fprintf(OutputFile, XMLBeginTable, int(max(RoundTitles.size()+Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS, size_t(7))), int(Statistics.size()+2));
-            //fprintf(OutputFile, XMLColumsHorizontalTable, COUNT_PARAMETERS+1, AnalysisTitles.size()+1);
-			fprintf(OutputFile, XMLBRow);
-			fprintf(OutputFile, XMLNameAndTime, Name.c_str(), DateBuff, TimerBuff);
-			fprintf(OutputFile, XMLTableParamAndTitle, int(Statistics.size()), int(AnalysisTitles.size()), int(RoundTitles.size()), Title.c_str());
-			fprintf(OutputFile, XMLERow);
-			fprintf(OutputFile, XMLBRow);
-			fprintf(OutputFile, XMLCellTopName);
-			fprintf(OutputFile, XMLCellTopThread);
-			fprintf(OutputFile, XMLCellTopMode);
+            //--------------------------------
+            strcpy(SheetName,"Horizontal");
+            GetTime(TimerBuff,sizeof(TimerBuff));
+            GetDate(DateBuff,sizeof(DateBuff));
+            //--------------------------
+            fprintf(OutputFile, XMLHead, UserName, TimerBuff);
+            fprintf(OutputFile, XMLStyles);
+            fprintf(OutputFile, XMLBeginSheet, SheetName);
+            fprintf(OutputFile, XMLNames,1,1,1,int(AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS));
+            fprintf(OutputFile, XMLBeginTable, int(RoundTitles.size()+Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+1/*title*/), int(Statistics.size()+1));
+            fprintf(OutputFile, XMLBRow);
+            fprintf(OutputFile, XMLCellTopName);
+            fprintf(OutputFile, XMLCellTopThread);
+            fprintf(OutputFile, XMLCellTopMode, ModeName);
             for (AnalysisTitles_t::iterator j = AnalysisTitles.begin(); j != AnalysisTitles.end(); j++)
                 fprintf(OutputFile, XMLAnalysisTitle, j->c_str()+1);
             for (Formulas_t::iterator j = Formulas.begin(); j != Formulas.end(); j++)
                 fprintf(OutputFile, XMLAnalysisTitle, j->first.c_str()+1);
             for (RoundTitles_t::iterator j = RoundTitles.begin(); j != RoundTitles.end(); j++)
                 fprintf(OutputFile, XMLAnalysisTitle, j->c_str());
-			fprintf(OutputFile, XMLERow);
-			//------------------------
-			for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
-			{
-				fprintf(OutputFile, XMLBRow);
-				fprintf(OutputFile, XMLCellName,  i->second->Name.c_str());
-				fprintf(OutputFile, XMLCellThread,i->second->Threads);
-				fprintf(OutputFile, XMLCellMode,  i->second->Mode.c_str());
-				//statistics
+            fprintf(OutputFile, XMLCellEmptyWhite, Title.c_str());
+            fprintf(OutputFile, XMLERow);
+            //------------------------
+            for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+            {
+                fprintf(OutputFile, XMLBRow);
+                fprintf(OutputFile, XMLCellName,  i->second->Name.c_str());
+                fprintf(OutputFile, XMLCellThread,i->second->Threads);
+                fprintf(OutputFile, XMLCellMode,  i->second->Mode.c_str());
+                //statistics
                 AnalysisTitles_t::iterator at = AnalysisTitles.begin();
-				for (Analysis_t::iterator j = i->second->Analysis.begin(); j != i->second->Analysis.end(); at++)
-				{
+                for (Analysis_t::iterator j = i->second->Analysis.begin(); j != i->second->Analysis.end(); at++)
+                {
                     fprintf(OutputFile, XMLCellAnalysis, (*at != j->first)?"":(i->second->Analysis[j->first]).c_str());
                     if(*at == j->first) j++;
-				}
+                }
                 //formulas
                 size_t place = 0;
                 Results_t &v = i->second->Results;
                 for (Formulas_t::iterator f = Formulas.begin(); f != Formulas.end(); f++, place++)
                     fprintf(OutputFile, XMLCellFormula, ExcelFormula(f->second, Formulas.size()-place, v.size(), true).c_str());
-				//data
-				for (size_t k = 0; k < v.size(); k++)
-				{
-					fprintf(OutputFile, XMLCellData, v[k]);
-				}
+                //data
+                for (size_t k = 0; k < v.size(); k++)
+                {
+                    fprintf(OutputFile, XMLCellData, v[k]);
+                }
                 if(v.size() < RoundTitles.size())
                     fprintf(OutputFile, XMLMergeRow, int(RoundTitles.size() - v.size()));
-				fprintf(OutputFile, XMLERow);
-			}
-			//------------------------
-			fprintf(OutputFile, XMLEndTable);
-			fprintf(OutputFile, XMLWorkSheetProperties,2,2,3,3);
-			fprintf(OutputFile,  XMLAutoFilter,2,1,2,int(AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS));
-			fprintf(OutputFile, XMLEndWorkSheet);
-			//----------------------------------------
-			strcpy(SheetName,"Vertical");
-			fprintf(OutputFile, XMLBeginSheet, SheetName);
-			fprintf(OutputFile, XMLNames, int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2),2,int(AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS+2),int(Statistics.size()+1));
-			fprintf(OutputFile, XMLBeginTable, int(max(Statistics.size()+1, size_t(7))), int(RoundTitles.size()+AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS+2));
+                fprintf(OutputFile, XMLERow);
+            }
+            //------------------------
+            fprintf(OutputFile, XMLEndTable);
+            fprintf(OutputFile, XMLWorkSheetProperties,1,1,3,3,int(RoundTitles.size()+AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS));
+            fprintf(OutputFile, XMLAutoFilter,1,1,1,int(AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS));
+            fprintf(OutputFile, XMLEndWorkSheet);
+            //----------------------------------------
+            strcpy(SheetName,"Vertical");
+            fprintf(OutputFile, XMLBeginSheet, SheetName);
+            fprintf(OutputFile, XMLNames, int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2),2,int(AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS+2),int(Statistics.size()+1));
+            fprintf(OutputFile, XMLBeginTable, int(max(Statistics.size()+1, size_t(7))), int(RoundTitles.size()+AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS+2));
             //fprintf(OutputFile, XMLColumsVerticalTable, Statistics.size()+1);
-			//----------------------------------------
+            //----------------------------------------
 
-			fprintf(OutputFile, XMLBRow);
-			fprintf(OutputFile, XMLNameAndTime, Name.c_str(), TimerBuff, DateBuff);
-			fprintf(OutputFile, XMLTableParamAndTitle, int(Statistics.size()), int(AnalysisTitles.size()), int(RoundTitles.size()), Title.c_str());
-			fprintf(OutputFile, XMLERow);
-			fprintf(OutputFile, XMLBRow);
-			//-------------------
-			fprintf(OutputFile, XMLCellTopName);
-			for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
-				fprintf(OutputFile, XMLCellName, i->second->Name.c_str());
-			fprintf(OutputFile, XMLERow);
-			fprintf(OutputFile, XMLBRow);
-			fprintf(OutputFile, XMLCellTopThread);
-			for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
-				fprintf(OutputFile, XMLCellThread, i->second->Threads);
-			fprintf(OutputFile, XMLERow);
-			fprintf(OutputFile, XMLBRow);
-			fprintf(OutputFile, XMLCellTopMode);
-			for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
-				fprintf(OutputFile, XMLCellMode, i->second->Mode.c_str());
+            fprintf(OutputFile, XMLBRow);
+            fprintf(OutputFile, XMLNameAndTime, Name.c_str(), TimerBuff, DateBuff);
+            fprintf(OutputFile, XMLTableParamAndTitle, int(Statistics.size()), int(AnalysisTitles.size()), int(RoundTitles.size()), Title.c_str());
+            fprintf(OutputFile, XMLERow);
+            fprintf(OutputFile, XMLBRow);
+            //-------------------
+            fprintf(OutputFile, XMLCellTopName);
+            for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+                fprintf(OutputFile, XMLCellName, i->second->Name.c_str());
             fprintf(OutputFile, XMLERow);
-			//-----------------
+            fprintf(OutputFile, XMLBRow);
+            fprintf(OutputFile, XMLCellTopThread);
+            for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+                fprintf(OutputFile, XMLCellThread, i->second->Threads);
+            fprintf(OutputFile, XMLERow);
+            fprintf(OutputFile, XMLBRow);
+            fprintf(OutputFile, XMLCellTopMode, ModeName);
+            for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+                fprintf(OutputFile, XMLCellMode, i->second->Mode.c_str());
+            fprintf(OutputFile, XMLERow);
+            //-----------------
             for (AnalysisTitles_t::iterator t = AnalysisTitles.begin(); t != AnalysisTitles.end(); t++)
-			{
-				fprintf(OutputFile, XMLBRow);
-				fprintf(OutputFile, XMLAnalysisTitle, t->c_str()+1);
+            {
+                fprintf(OutputFile, XMLBRow);
+                fprintf(OutputFile, XMLAnalysisTitle, t->c_str()+1);
                 for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
                     fprintf(OutputFile, XMLCellAnalysis, i->second->Analysis.count(*t)?(i->second->Analysis[*t]).c_str():"");
-				fprintf(OutputFile, XMLERow);
-			}
+                fprintf(OutputFile, XMLERow);
+            }
             //-------------------------------------
             for (Formulas_t::iterator t = Formulas.begin(); t != Formulas.end(); t++)
             {
@@ -382,30 +379,30 @@ void StatisticsCollector::Print(int dataOutput)
                     fprintf(OutputFile, XMLCellAnalysis, ExcelFormula(t->second, Formulas.size()-place, i->second->Results.size(), false).c_str());
                 fprintf(OutputFile, XMLERow);
             }
-			//--------------------------------------
-			fprintf(OutputFile, XMLBRow);
-			fprintf(OutputFile, XMLCellEmptyWhite, "Result");
-			fprintf(OutputFile, XMLERow);
-			
-			for (size_t k = 0; k < RoundTitles.size(); k++)
-			{
-				fprintf(OutputFile, XMLBRow);
-				fprintf(OutputFile, XMLAnalysisTitle, RoundTitles[k].c_str());
-				for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+            //--------------------------------------
+            fprintf(OutputFile, XMLBRow);
+            fprintf(OutputFile, XMLCellEmptyWhite, "Result");
+            fprintf(OutputFile, XMLERow);
+            
+            for (size_t k = 0; k < RoundTitles.size(); k++)
+            {
+                fprintf(OutputFile, XMLBRow);
+                fprintf(OutputFile, XMLAnalysisTitle, RoundTitles[k].c_str());
+                for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
                     if(i->second->Results.size() > k)
-					    fprintf(OutputFile, XMLCellData, i->second->Results[k]);
+                        fprintf(OutputFile, XMLCellData, i->second->Results[k]);
                     else
                         fprintf(OutputFile, XMLCellEmptyWhite, "");
-				fprintf(OutputFile, XMLERow);
-			}
-			fprintf(OutputFile, XMLEndTable);
-			//----------------------------------------
-			fprintf(OutputFile, XMLWorkSheetProperties, int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2), int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2),1,1);
-			fprintf(OutputFile, XMLAutoFilter, int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2),2, int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2), int(Statistics.size()+1));
-			//----------------------------------------
-			fprintf(OutputFile, XMLEndWorkSheet);
-			fprintf(OutputFile, XMLEndWorkbook);
-			fclose(OutputFile);
-		}
-	}
+                fprintf(OutputFile, XMLERow);
+            }
+            fprintf(OutputFile, XMLEndTable);
+            //----------------------------------------
+            fprintf(OutputFile, XMLWorkSheetProperties, int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2), int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2),1,1,6);
+            fprintf(OutputFile, XMLAutoFilter, int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2),2, int(Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+2), int(Statistics.size()+1));
+            //----------------------------------------
+            fprintf(OutputFile, XMLEndWorkSheet);
+            fprintf(OutputFile, XMLEndWorkbook);
+            fclose(OutputFile);
+        }
+    }
 }
diff --git a/src/perf/statistics.h b/src/perf/statistics.h
index dd4348c..3066190 100644
--- a/src/perf/statistics.h
+++ b/src/perf/statistics.h
@@ -168,7 +168,7 @@ public:
     void SetStatisticFormula(const char *name, const char *formula);
 
     //! Data output
-    void Print(int dataOutput);
+    void Print(int dataOutput, const char *ModeName = "Mode");
 
 private:
     Sorting SortMode;
diff --git a/src/perf/statistics_xml.h b/src/perf/statistics_xml.h
index bd3244d..7521825 100644
--- a/src/perf/statistics_xml.h
+++ b/src/perf/statistics_xml.h
@@ -131,7 +131,7 @@ const char XMLCellTopName[]=
 const char XMLCellTopThread[]=
 "   <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">Threads</Data></Cell>\n";
 const char XMLCellTopMode[]=
-"   <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">Mode</Data></Cell>\n";
+"   <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">%s</Data></Cell>\n";
 //---------------------
 const char XMLAnalysisTitle[]=
 "   <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">%s</Data></Cell>\n";
@@ -197,7 +197,7 @@ const char XMLWorkSheetProperties[]=
     <Pane>\n\
      <Number>0</Number>\n\
      <ActiveRow>0</ActiveRow>\n\
-     <ActiveCol>6</ActiveCol>\n\
+     <ActiveCol>%d</ActiveCol>\n\
     </Pane>\n\
    </Panes>\n\
    <ProtectObjects>False</ProtectObjects>\n\
diff --git a/src/perf/time_base.cpp b/src/perf/time_base.cpp
index 61a5917..78cbef2 100644
--- a/src/perf/time_base.cpp
+++ b/src/perf/time_base.cpp
@@ -86,6 +86,7 @@ class simple_root_task : public tbb::task
             simple_leaf_task &t = *new( allocate_child() ) simple_leaf_task;
             spawn(t);
         }
+        wait_for_all();
         return NULL;
     }
 };
@@ -121,6 +122,7 @@ class children_launcher_task : public tbb::task
             simple_leaf_task &t = *new( allocate_child() ) simple_leaf_task;
             spawn(t);
         }
+        wait_for_all();
         return NULL;
     }
 };
diff --git a/src/perf/time_framework.h b/src/perf/time_framework.h
index dadc2c3..6a149b6 100644
--- a/src/perf/time_framework.h
+++ b/src/perf/time_framework.h
@@ -26,20 +26,28 @@
     the GNU General Public License.
 */
 
+#ifndef __TIME_FRAMEWORK_H__
+#define __TIME_FRAMEWORK_H__
+
 #include <cstdlib>
 #include <math.h>
 #include <vector>
 #include <string>
+#include <sstream>
 #include "tbb/tbb_stddef.h"
 #include "tbb/task_scheduler_init.h"
-#include "tbb/parallel_for.h"
 #include "tbb/tick_count.h"
-#include "tbb/blocked_range.h"
 #include "../test/harness.h"
-#include "harness_barrier.h"
+#include "../test/harness_barrier.h"
 #define STATISTICS_INLINE
 #include "statistics.h"
 
+#ifndef ARG_TYPE
+typedef intptr_t arg_t;
+#else
+typedef ARG_TYPE arg_t;
+#endif
+
 class Timer {
     tbb::tick_count tick;
 public:
@@ -56,7 +64,7 @@ protected:
     friend class TestRunner;
 
     //! it is barrier for synchronizing between threads
-    spin_barrier *barrier;
+    Harness::SpinBarrier *barrier;
     
     //! number of tests per this tester
     const int tests_count;
@@ -65,8 +73,11 @@ protected:
     int threads_count;
 
     //! some value for tester
-    int value;
-    
+    arg_t value;
+
+    // avoid false sharing
+    char pad[128 - sizeof(arg_t) - sizeof(int)*2 - sizeof(void*) ];
+
 public:
     //! init tester base. @arg ntests is number of embeded tests in this tester.
     TesterBase(int ntests)
@@ -75,7 +86,7 @@ public:
     virtual ~TesterBase() {}
 
     //! internal function
-    void base_init(int v, int t, spin_barrier &b) {
+    void base_init(arg_t v, int t, Harness::SpinBarrier &b) {
         threads_count = t;
         barrier = &b;
         value = v;
@@ -92,6 +103,16 @@ public:
 
     //! Override to provide main test's entry function returns a value to record
     virtual value_t test(int testn, int threadn) = 0;
+
+    //! Type of aggregation from results of threads
+    enum result_t {
+        SUM, AVG, MIN, MAX
+    };
+
+    //! Override to change result type for the test. Return postfix for test name or 0 if result type is not needed.
+    virtual const char *get_result_type(int /*testn*/, result_t type) const {
+        return type == AVG ? "" : 0; // only average result by default
+    }
 };
 
 /*****
@@ -108,22 +129,20 @@ public:
 
 ******/
 
-template<typename Tester, bool longest_time = false>
+template<typename Tester, int scale = 1>
 class TimeTest : public Tester {
     /*override*/ value_t test(int testn, int threadn) {
         Timer timer;
         Tester::test(testn, threadn);
-        if(longest_time) Tester::barrier->wait();
-        return timer.get_time();
+        return timer.get_time() * double(scale);
     }
 };
 
-template<typename Tester, bool longest_time = false>
+template<typename Tester>
 class NanosecPerValue : public Tester {
     /*override*/ value_t test(int testn, int threadn) {
         Timer timer;
         Tester::test(testn, threadn);
-        if(longest_time) Tester::barrier->wait();
         // return time (ns) per value
         return timer.get_time()*1000000.0/double(Tester::value);
     }
@@ -144,12 +163,12 @@ public:
 
     template<typename Test>
     TestRunner(const char *name, Test *test)
-        : tester_name(name), tester(*dynamic_cast<TesterBase*>(test))
+        : tester_name(name), tester(*static_cast<TesterBase*>(test))
     {}
     
     ~TestRunner() { delete &tester; }
 
-    void init(int value, int threads, spin_barrier &barrier, StatisticsCollector *s) {
+    void init(arg_t value, int threads, Harness::SpinBarrier &barrier, StatisticsCollector *s) {
         tester.base_init(value, threads, barrier);
         stat = s;
         keys.resize(tester.tests_count);
@@ -161,9 +180,9 @@ public:
         }
     }
 
-    void test(int threadn) {
+    void run_test(int threadn) {
         for(int testn = 0; testn < tester.tests_count; testn++) {
-            tester.barrier->wait();
+            tester.barrier->wait();                                 // <<<<<<<<<<<<<<<<< Barrier before running test mode
             value_t result = tester.test(testn, threadn);
             stat->AddRoundResult(keys[testn][threadn], result);
         }
@@ -173,14 +192,35 @@ public:
         const int threads = tester.threads_count;
         for(int testn = 0; testn < tester.tests_count; testn++) {
             size_t coln = keys[testn][0].getResults().size()-1;
-            value_t result = keys[testn][0].getResults()[coln];
+            value_t rsum = keys[testn][0].getResults()[coln];
+            value_t rmin = rsum, rmax = rsum;
             for(int threadn = 1; threadn < threads; threadn++) {
-                result += keys[testn][threadn].getResults()[coln]; // for SUM or AVG
-                // can do also: MIN/MAX
+                value_t result = keys[testn][threadn].getResults()[coln];
+                rsum += result; // for both SUM or AVG
+                if(rmin > result) rmin = result;
+                if(rmax < result) rmax = result;
+            }
+            std::string test_name(tester.get_name(testn));
+            const char *rname = tester.get_result_type(testn, TesterBase::SUM);
+            if( rname ) {
+                report.SetTestCase(tester_name, (test_name+rname).c_str(), threads);
+                report.AddRoundResult(rsum);
+            }
+            rname = tester.get_result_type(testn, TesterBase::MIN);
+            if( rname ) {
+                report.SetTestCase(tester_name, (test_name+rname).c_str(), threads);
+                report.AddRoundResult(rmin);
+            }
+            rname = tester.get_result_type(testn, TesterBase::AVG);
+            if( rname ) {
+                report.SetTestCase(tester_name, (test_name+rname).c_str(), threads);
+                report.AddRoundResult(rsum / threads);
+            }
+            rname = tester.get_result_type(testn, TesterBase::MAX);
+            if( rname ) {
+                report.SetTestCase(tester_name, (test_name+rname).c_str(), threads);
+                report.AddRoundResult(rmax);
             }
-            result /= threads; // AVG
-            report.SetTestCase(tester_name, tester.get_name(testn).c_str(), threads);
-            report.AddRoundResult(result); // final result
         }
     }
 };
@@ -188,17 +228,22 @@ public:
 struct RunArgsBody {
     const vector<TestRunner*> &run_list;
     RunArgsBody(const vector<TestRunner*> &a) : run_list(a) { }
-    void operator()(const tbb::blocked_range<int>& threads) const {
-        for(int thread = threads.begin(); thread < threads.end(); thread++)
-            for(size_t i = 0; i < run_list.size(); i++)
-                run_list[i]->test(thread);
+#ifndef __TBB_parallel_for_H
+    void operator()(int thread) const {
+#else
+    void operator()(const tbb::blocked_range<int> &r) const {
+        ASSERT( r.begin() + 1 == r.end(), 0);
+        int thread = r.begin();
+#endif
+        for(size_t i = 0; i < run_list.size(); i++)
+            run_list[i]->run_test(thread);
     }
 };
 
 //! Main test processor.
 /** Override or use like this:
  class MyTestCollection : public TestProcessor {
-    void factory(int value, int threads) {
+    void factory(arg_t value, int threads) {
         process( value, threads,
             run("my1", new tester<my1>() ),
             run("my2", new tester<my2>() ),
@@ -224,10 +269,6 @@ protected:
     // token
     size_t end;
 
-    // iterations parameters
-    //int min_value, act_index, max_value;
-    //int min_thread, act_thread, max_thread;
-
 public:
     StatisticsCollector report;
 
@@ -238,14 +279,14 @@ public:
     }
 
     // iteration processing
-    void process(int value, int threads, ...) {
+    void process(arg_t value, int threads, ...) {
         // prepare items
         stat = stat_by_threads[threads];
         if(!stat) {
             stat_by_threads[threads] = stat = new StatisticsCollector((collection_name + Format("@%d", threads)).c_str(), StatisticsCollector::ByAlg);
-            stat->SetTitle("Detailed log of %s running with %d threads. Thread #0 is AVG across all threads", collection_name, threads);
+            stat->SetTitle("Detailed log of %s running with %d threads.", collection_name, threads);
         }
-        spin_barrier barrier(threads);
+        Harness::SpinBarrier barrier(threads);
         // init args
         va_list args; va_start(args, threads);
         vector<TestRunner*> run_list; run_list.reserve(16);
@@ -256,11 +297,17 @@ public:
             run_list.push_back(item);
         }
         va_end(args);
+        std::ostringstream buf;
+        buf << value;
         const size_t round_number = stat->GetRoundsCount();
-        stat->SetRoundTitle(round_number, value);
-        report.SetRoundTitle(round_number, value);
+        stat->SetRoundTitle(round_number, buf.str().c_str());
+        report.SetRoundTitle(round_number, buf.str().c_str());
         // run them
-        NativeParallelFor(tbb::blocked_range<int>(0, threads, 1), RunArgsBody(run_list));
+#ifndef __TBB_parallel_for_H
+        NativeParallelFor(threads, RunArgsBody(run_list));
+#else
+        tbb::parallel_for(tbb::blocked_range<int>(0,threads,1), RunArgsBody(run_list));
+#endif
         // destroy args
         for(size_t i = 0; i < run_list.size(); i++) {
             run_list[i]->post_process(report);
@@ -269,8 +316,8 @@ public:
     }
 
 public:
-    TestProcessor(const char *name)
-        : collection_name(name), stat(NULL), end(0), report(collection_name, StatisticsCollector::ByAlg)
+    TestProcessor(const char *name, StatisticsCollector::Sorting sort_by = StatisticsCollector::ByAlg)
+        : collection_name(name), stat(NULL), end(0), report(collection_name, sort_by)
     { }
 
     ~TestProcessor() {
@@ -278,3 +325,5 @@ public:
             delete i->second;
     }
 };
+
+#endif// __TIME_FRAMEWORK_H__
diff --git a/src/perf/time_hash_map.cpp b/src/perf/time_hash_map.cpp
index f19edbb..a72cf48 100644
--- a/src/perf/time_hash_map.cpp
+++ b/src/perf/time_hash_map.cpp
@@ -36,8 +36,9 @@
 #define OLDTABLEHEADER "tbb/concurrent_hash_map-4078.h"//-4329
 
 //! enable/disable experimental implementation tests (correct include file also)
+
 #define TESTTABLE 0
-#define TESTTABLEHEADER "tbb/concurrent_hash_map-4148.h"
+#define TESTTABLEHEADER "tbb/concurrent_unordered_map.h"
 
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -56,16 +57,17 @@
 #include "tbb/spin_rw_mutex.h"
 #include "tbb/aligned_space.h"
 #include "tbb/atomic.h"
-#include "../tbb/tbb_misc.h"  // tbb::internal::ExponentialBackoff
 // for test
 #include "tbb/spin_mutex.h"
 #include "time_framework.h"
 
+
 using namespace tbb;
 using namespace tbb::internal;
 
 struct IntHashCompare {
     size_t operator() ( int x ) const { return x; }
+    bool operator() ( int x, int y ) const { return x==y; }
     static long hash( int x ) { return x; }
     bool equal( int x, int y ) const { return x==y; }
 };
@@ -91,14 +93,14 @@ namespace version_new {
     namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
     #include TESTTABLEHEADER
 }
-typedef version_new::tbb::concurrent_hash_map<int,int,IntHashCompare> TestTable;
+typedef version_new::tbb::concurrent_unordered_map<int,int,IntHashCompare,IntHashCompare> TestTable;
 #define TESTTABLE 1
 #endif
 
 ///////////////////////////////////////
 
 static const char *map_testnames[] = {
-    "fill", "work", "clean"
+    "1.insert", "2.count(w/rehash)", "3.find/wr", "4.erase"
 };
 
 template<typename TableType>
@@ -108,7 +110,7 @@ struct TestTBBMap : TesterBase {
     TableType Table;
     int n_items;
 
-    TestTBBMap() : TesterBase(3) {}
+    TestTBBMap() : TesterBase(4) {}
     void init() { n_items = value/threads_count; }
 
     std::string get_name(int testn) {
@@ -125,16 +127,23 @@ struct TestTBBMap : TesterBase {
                 a->second = 0;
             }
             break;
-          case 1: // work
+          case 1: // work1
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                size_t c = Table.count( i );
+                ASSERT( c == 1, NULL);
+            }
+            break;
+          case 2: // work2
             for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
                 accessor a;
                 Table.find( a, i );
+                ASSERT( !a->second, "A key should be incremented only once");
                 a->second += 1;
             }
             break;
-          case 2: // clean
+          case 3: // clean
             for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
-                Table.erase( i );
+                ASSERT( Table.erase( i ), NULL);
             }
         }
         return 0;
@@ -147,7 +156,7 @@ struct TestSTLMap : TesterBase {
     M mutex;
 
     int n_items;
-    TestSTLMap() : TesterBase(3) {}
+    TestSTLMap() : TesterBase(4) {}
     void init() { n_items = value/threads_count; }
 
     std::string get_name(int testn) {
@@ -163,13 +172,20 @@ struct TestSTLMap : TesterBase {
                 Table[i] = 0;
             }
             break;
-          case 1: // work
+          case 1: // work1
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                typename M::scoped_lock with(mutex);
+                size_t c = Table.count(i);
+                ASSERT( c == 1, NULL);
+            }
+            break;
+          case 2: // work2
             for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
                 typename M::scoped_lock with(mutex);
                 Table[i] += 1;
             }
             break;
-          case 2: // clean
+          case 3: // clean
             for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
                 typename M::scoped_lock with(mutex);
                 Table.erase(i);
@@ -225,7 +241,7 @@ struct TestHashMapFind : TesterBase {
     int n_items;
 
     std::string get_name(int testn) {
-        return std::string(!testn?"find()":"insert()");
+        return std::string(!testn?"find":"insert");
     }
 
     TestHashMapFind() : TesterBase(2) {}
@@ -269,7 +285,7 @@ struct TestHashCountStrings : TesterBase {
     int n_items;
 
     std::string get_name(int testn) {
-        return !testn?"example":"just find";
+        return !testn?"insert":"find";
     }
 
     TestHashCountStrings() : TesterBase(2) {}
@@ -299,15 +315,18 @@ public:
         if(Verbose) printf("Processing with %d threads: %d...\n", threads, value);
         process( value, threads,
 #if OLDTABLE
-            run("old::hashmap", new NanosecPerValue<TestHashMapFind<OldTable> >() ),
+            run("Filled old::hashmap", new NanosecPerValue<TestHashMapFind<OldTable> >() ),
+#endif
+            run("Filled tbb::hashmap", new NanosecPerValue<TestHashMapFind<IntTable> >() ),
+#if TESTTABLE
+            run("Filled new::hashmap", new NanosecPerValue<TestHashMapFind<TestTable> >() ),
 #endif
-            run("tbb::hashmap", new NanosecPerValue<TestHashMapFind<IntTable> >() ),
 #if OLDTABLE
-            run("old::countstr", new TimeTest<TestHashCountStrings<OldTable> >() ),
+            run("CountStr old::hashmap", new TimeTest<TestHashCountStrings<OldTable> >() ),
 #endif
-            run("tbb::countstr", new TimeTest<TestHashCountStrings<IntTable> >() ),
+            run("CountStr tbb::hashmap", new TimeTest<TestHashCountStrings<IntTable> >() ),
 #if TESTTABLE
-            run("new::countstr", new TimeTest<TestHashCountStrings<TestTable> >() ),
+            run("CountStr new::hashmap", new TimeTest<TestHashCountStrings<TestTable> >() ),
 #endif
         end );
         //stat->Print(StatisticsCollector::HTMLFile);
@@ -319,7 +338,7 @@ public:
 int main(int argc, char* argv[]) {
     if(argc>1) Verbose = true;
     //if(argc>2) ExtraVerbose = true;
-    MinThread = 1; MaxThread = 8;
+    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");
@@ -336,7 +355,7 @@ int main(int argc, char* argv[]) {
     {
         test_hash_map the_test;
         for( int t=MinThread; t <= MaxThread; t*=2)
-            for( int o=/*4096*/(1<<8)*8*2; o<2200000; o*=2 )
+            for( int o=/*2048*/(1<<8)*8; o<2200000; o*=2 )
                 the_test.factory(o, t);
         the_test.report.SetTitle("Nanoseconds per operation of (Mode) for N items in container (Name)");
         the_test.report.SetStatisticFormula("1AVG per size", "=AVERAGE(ROUNDS)");
diff --git a/src/perf/time_locked_work.cpp b/src/perf/time_locked_work.cpp
new file mode 100644
index 0000000..62b9f38
--- /dev/null
+++ b/src/perf/time_locked_work.cpp
@@ -0,0 +1,174 @@
+/*
+    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.
+*/
+
+////// Test configuration ////////////////////////////////////////////////////
+#define SECONDS_RATIO 1000000 // microseconds
+
+#ifndef REPEAT_K
+#define REPEAT_K 50 // repeat coefficient
+#endif
+
+int outer_work[] = {/*256,*/ 64, 16, 4, 0};
+int inner_work[] = {32, 8, 0 };
+
+// keep it to calibrate the time of work without synchronization
+#define BOX1 "baseline"
+#define BOX1TEST TimeTest< TBB_Mutex<tbb::null_mutex>, SECONDS_RATIO >
+
+// enable/disable tests for:
+#define BOX2 "spin_mutex"
+#define BOX2TEST TimeTest< TBB_Mutex<tbb::spin_mutex>, SECONDS_RATIO >
+
+// enable/disable tests for:
+#define BOX3 "spin_rw_mutex"
+#define BOX3TEST TimeTest< TBB_Mutex<tbb::spin_rw_mutex>, SECONDS_RATIO >
+
+// enable/disable tests for:
+#define BOX4 "queuing_mutex"
+#define BOX4TEST TimeTest< TBB_Mutex<tbb::queuing_mutex>, SECONDS_RATIO >
+
+// enable/disable tests for:
+//#define BOX5 "queuing_rw_mutex"
+#define BOX5TEST TimeTest< TBB_Mutex<tbb::queuing_rw_mutex>, SECONDS_RATIO >
+
+//////////////////////////////////////////////////////////////////////////////
+
+#include <cstdlib>
+#include <math.h>
+#include <algorithm>                 // std::swap
+#include <utility>      // Need std::pair from here
+#include <sstream>
+#include "tbb/tbb_stddef.h"
+#include "tbb/null_mutex.h"
+#include "tbb/spin_rw_mutex.h"
+#include "tbb/spin_mutex.h"
+#include "tbb/queuing_mutex.h"
+#include "tbb/queuing_rw_mutex.h"
+#include "tbb/mutex.h"
+
+#if INTEL_TRIAL==2
+#include "tbb/parallel_for.h" // enable threading by TBB scheduler
+#include "tbb/task_scheduler_init.h"
+#include "tbb/blocked_range.h" 
+#endif
+// for test
+#include "time_framework.h"
+
+using namespace tbb;
+using namespace tbb::internal;
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+//! base class for tests family
+struct TestLocks : TesterBase {
+    // Inherits "value", "threads_count", and other variables
+    TestLocks() : TesterBase(/*number of modes*/sizeof(outer_work)/sizeof(int)) {}
+    //! returns name of test part/mode
+    /*override*/std::string get_name(int testn) {
+        std::ostringstream buf;
+        buf.width(4); buf.fill('0');
+        buf << outer_work[testn]; // mode number
+        return buf.str();
+    }
+    //! enables results types and returns theirs suffixes
+    /*override*/const char *get_result_type(int, result_t type) const {
+        switch(type) {
+            case MIN: return " min";
+            case MAX: return " max";
+            default: return 0;
+        }
+    }
+    //! repeats count
+    int repeat_until(int /*test_n*/) const {
+        return REPEAT_K*100;//TODO: suggest better?
+    }
+    //! fake work
+    void do_work(int work) volatile {
+        for(int i = 0; i < work; i++) {
+            volatile int x = i;
+            __TBB_Pause(0); // just to call inline assembler
+            x *= work/threads_count;
+        }
+    }
+};
+
+//! template test unit for any of TBB mutexes
+template<typename M>
+struct TBB_Mutex : TestLocks {
+    M mutex;
+
+    double test(int testn, int /*threadn*/)
+    {
+        for(int r = 0; r < repeat_until(testn); ++r) {
+            do_work(outer_work[testn]);
+            {
+                typename M::scoped_lock with(mutex);
+                do_work(/*inner work*/value);
+            }
+        }
+        return 0;
+    }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+//Using BOX declarations
+#include "time_sandbox.h"
+
+// run tests for each of inner work value
+void RunLoops(test_sandbox &the_test, int thread) {
+    for( unsigned i=0; i<sizeof(inner_work)/sizeof(int); ++i )
+        the_test.factory(inner_work[i], thread);
+}
+
+int main(int argc, char* argv[]) {
+    if(argc>1) Verbose = true;
+    int DefThread = task_scheduler_init::default_num_threads();
+    MinThread = 1; MaxThread = DefThread+1;
+    ParseCommandLine( argc, argv );
+    ASSERT(MinThread <= MaxThread, 0);
+#if INTEL_TRIAL && defined(__TBB_parallel_for_H)
+    task_scheduler_init me(MaxThread);
+#endif
+    {
+        test_sandbox the_test("time_locked_work", StatisticsCollector::ByThreads);
+        //TODO: refactor this out as RunThreads(test&)
+        for( int t = MinThread; t < DefThread && t <= MaxThread; t *= 2)
+            RunLoops( the_test, t ); // execute undersubscribed threads
+        if( DefThread > MinThread && DefThread <= MaxThread )
+            RunLoops( the_test, DefThread ); // execute on all hw threads
+        if( DefThread < MaxThread)
+            RunLoops( the_test, MaxThread ); // execute requested oversubscribed threads
+
+        the_test.report.SetTitle("Time of lock/unlock for mutex Name with Outer and Inner work");
+        //the_test.report.SetStatisticFormula("1AVG per size", "=AVERAGE(ROUNDS)");
+        the_test.report.Print(StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML, /*ModeName*/ "Outer work");
+    }
+    return 0;
+}
+
diff --git a/src/perf/time_sandbox.h b/src/perf/time_sandbox.h
new file mode 100644
index 0000000..158ebe7
--- /dev/null
+++ b/src/perf/time_sandbox.h
@@ -0,0 +1,168 @@
+/*
+    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 __TIME_FRAMEWORK_H__
+#error time_framework.h must be included
+#endif
+
+#ifdef BOX1
+namespace sandbox1 {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+#   ifdef BOX1HEADER
+#   include BOX1HEADER
+#   endif
+    typedef ::BOX1TEST testbox;
+}
+#endif
+#ifdef BOX2
+namespace sandbox2 {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+#   ifdef BOX2HEADER
+#   include BOX2HEADER
+#   endif
+    typedef ::BOX2TEST testbox;
+}
+#endif
+#ifdef BOX3
+namespace sandbox3 {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+#   ifdef BOX3HEADER
+#   include BOX3HEADER
+#   endif
+    typedef ::BOX3TEST testbox;
+}
+#endif
+#ifdef BOX4
+namespace sandbox4 {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+#   ifdef BOX4HEADER
+#   include BOX4HEADER
+#   endif
+    typedef ::BOX4TEST testbox;
+}
+#endif
+#ifdef BOX5
+namespace sandbox5 {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+#   ifdef BOX5HEADER
+#   include BOX5HEADER
+#   endif
+    typedef ::BOX5TEST testbox;
+}
+#endif
+#ifdef BOX6
+namespace sandbox6 {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+#   ifdef BOX6HEADER
+#   include BOX6HEADER
+#   endif
+    typedef ::BOX6TEST testbox;
+}
+#endif
+#ifdef BOX7
+namespace sandbox7 {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+#   ifdef BOX7HEADER
+#   include BOX7HEADER
+#   endif
+    typedef ::BOX7TEST testbox;
+}
+#endif
+#ifdef BOX8
+namespace sandbox8 {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+#   ifdef BOX8HEADER
+#   include BOX8HEADER
+#   endif
+    typedef ::BOX8TEST testbox;
+}
+#endif
+#ifdef BOX9
+namespace sandbox9 {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+#   ifdef BOX9HEADER
+#   include BOX9HEADER
+#   endif
+    typedef ::BOX9TEST testbox;
+}
+#endif
+
+//if harness.h included
+#if defined(ASSERT) && !HARNESS_NO_PARSE_COMMAND_LINE
+#ifndef TEST_PREFIX
+#define TEST_PREFIX if(Verbose) printf("Processing with %d threads: %ld...\n", threads, value);
+#endif
+#endif//harness included
+
+#ifndef TEST_PROCESSOR_NAME
+#define TEST_PROCESSOR_NAME test_sandbox
+#endif
+
+class TEST_PROCESSOR_NAME : public TestProcessor {
+public:
+    TEST_PROCESSOR_NAME(const char *name, StatisticsCollector::Sorting sort_by = StatisticsCollector::ByAlg)
+        : TestProcessor(name, sort_by) {}
+    void factory(arg_t value, int threads) {
+#ifdef TEST_PREFIX
+        TEST_PREFIX
+#endif
+        process( value, threads,
+#define RUNBOX(n) run(#n"."BOX##n, new sandbox##n::testbox() )
+#ifdef BOX1
+        RUNBOX(1),
+#endif
+#ifdef BOX2
+        RUNBOX(2),
+#endif
+#ifdef BOX3
+        RUNBOX(3),
+#endif
+#ifdef BOX4
+        RUNBOX(4),
+#endif
+#ifdef BOX5
+        RUNBOX(5),
+#endif
+#ifdef BOX6
+        RUNBOX(6),
+#endif
+#ifdef BOX7
+        RUNBOX(7),
+#endif
+#ifdef BOX8
+        RUNBOX(8),
+#endif
+#ifdef BOX9
+        RUNBOX(9),
+#endif
+        end );
+#ifdef TEST_POSTFIX
+        TEST_POSTFIX
+#endif
+    }
+};
diff --git a/src/rml/client/index.html b/src/rml/client/index.html
new file mode 100644
index 0000000..5c7bd50
--- /dev/null
+++ b/src/rml/client/index.html
@@ -0,0 +1,43 @@
+<HTML>
+<BODY>
+<H2>Overview</H2>
+
+This directory has source code that must be statically linked into an RML client.
+
+<H2>Files</H2>
+
+<DL>
+<DT><P><A HREF="rml_factory.h">rml_factory.h</A>
+<DD>Text shared by <A HREF="rml_omp.cpp">rml_omp.cpp</A> and <A HREF="rml_tbb.cpp">rml_tbb.cpp</A>.
+       This is not an ordinary include file, so it does not have an #ifndef guard.</P>
+</DL>
+
+<H3> Specific to client=OpenMP</H3>
+<DL>
+<DT><P><A HREF="rml_omp.cpp">rml_omp.cpp</A>
+<DD>Source file for OpenMP client.</P>
+<DT><P><A HREF="omp_dynamic_link.h">omp_dynamic_link.h</A>
+<DT><A HREF="omp_dynamic_link.cpp">omp_dynamic_link.cpp</A>
+<DD>Source files for dynamic linking support.  
+       The code is the code from the TBB source directory, but adjusted so that it 
+       appears in namespace <TT>__kmp</TT> instead of namespace <TT>tbb::internal</TT>.
+</DL>
+<H3> Specific to client=TBB</H3>
+<DL>
+<DT><P><A HREF="rml_tbb.cpp">rml_tbb.cpp</A>
+<DD>Source file for TBB client.  It uses the dynamic linking support from the TBB source directory.
+</DL>
+
+<HR>
+<A HREF="../index.html">Up to parent directory</A>
+<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.
+</BODY>
+</HTML>
+
diff --git a/src/tbbmalloc/lin-tbbmalloc-export.def b/src/rml/client/omp_dynamic_link.cpp
similarity index 81%
copy from src/tbbmalloc/lin-tbbmalloc-export.def
copy to src/rml/client/omp_dynamic_link.cpp
index 66db63d..b6e327a 100644
--- a/src/tbbmalloc/lin-tbbmalloc-export.def
+++ b/src/rml/client/omp_dynamic_link.cpp
@@ -26,20 +26,7 @@
     the GNU General Public License.
 */
 
-{
-global:
-scalable_calloc;
-scalable_free;
-scalable_malloc;
-scalable_realloc;
-scalable_posix_memalign;
-scalable_aligned_malloc;
-scalable_aligned_realloc;
-scalable_aligned_free;
-__TBB_internal_calloc;
-__TBB_internal_free;
-__TBB_internal_malloc;
-__TBB_internal_realloc;
-__TBB_internal_posix_memalign;
-local:*;
-};
+#include "omp_dynamic_link.h"
+#define LIBRARY_ASSERT(x,y) /*((void)0)*/ /* FIXME - replace with whatever OpenMP uses for internal assertions */
+#include "tbb/dynamic_link.cpp" // Refers to src/tbb, not include/tbb
+
diff --git a/src/tbbmalloc/lin-tbbmalloc-export.def b/src/rml/client/omp_dynamic_link.h
similarity index 81%
copy from src/tbbmalloc/lin-tbbmalloc-export.def
copy to src/rml/client/omp_dynamic_link.h
index 66db63d..327a1fb 100644
--- a/src/tbbmalloc/lin-tbbmalloc-export.def
+++ b/src/rml/client/omp_dynamic_link.h
@@ -26,20 +26,12 @@
     the GNU General Public License.
 */
 
-{
-global:
-scalable_calloc;
-scalable_free;
-scalable_malloc;
-scalable_realloc;
-scalable_posix_memalign;
-scalable_aligned_malloc;
-scalable_aligned_realloc;
-scalable_aligned_free;
-__TBB_internal_calloc;
-__TBB_internal_free;
-__TBB_internal_malloc;
-__TBB_internal_realloc;
-__TBB_internal_posix_memalign;
-local:*;
-};
+#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 */
diff --git a/src/rml/client/rml_factory.h b/src/rml/client/rml_factory.h
new file mode 100644
index 0000000..ba3681f
--- /dev/null
+++ b/src/rml/client/rml_factory.h
@@ -0,0 +1,98 @@
+/*
+    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.
+*/
+
+// No ifndef guard because this file is not a normal include file.
+
+// FIXME - resolve whether _debug version of the RML should have different suffix. */
+
+#if TBB_USE_DEBUG
+#define DEBUG_SUFFIX "_debug"
+#else
+#define DEBUG_SUFFIX
+#endif /* TBB_USE_DEBUG */
+
+// RML_SERVER_NAME is the name of the RML server library.
+#if _WIN32||_WIN64
+#define RML_SERVER_NAME "irml" DEBUG_SUFFIX ".dll"
+#elif __APPLE__
+#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".dylib"
+#elif __linux__
+#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so.1"
+#elif __FreeBSD__ || __sun
+#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so"
+#else
+#error Unknown OS
+#endif
+
+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 );
+    status_type (*open_factory_routine)( factory&, version_type&, version_type );
+    dynamic_link_descriptor server_link_table[4] = {
+        DLD(__RML_open_factory,open_factory_routine),
+        MAKE_SERVER(my_make_server_routine),
+        DLD(__RML_close_factory,my_wait_to_close_routine),
+        GET_INFO(my_call_with_server_info_routine),
+    };
+    status_type result;
+    dynamic_link_handle h;
+    if( dynamic_link( RML_SERVER_NAME, server_link_table, 4, 4, &h ) ) {
+        library_handle = h; 
+        version_type server_version;
+        status_type result = (*open_factory_routine)( *this, server_version, CLIENT_VERSION );
+        // server_version can be checked here for incompatibility here if necessary.
+        return result;
+    } else {
+        library_handle = NULL;
+        result = st_not_found;
+    }
+    return result;
+}
+
+void FACTORY::close() {
+    if( library_handle ) {
+        (*my_wait_to_close_routine)(*this);
+        dynamic_link_handle h = library_handle;
+        dynamic_unlink(h);
+        library_handle = NULL;
+    }
+}
+
+::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 );
+    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 );
+    (*my_call_with_server_info_routine)( cb, arg );
+}
diff --git a/src/test/test_ScalableAllocator_STL.cpp b/src/rml/client/rml_omp.cpp
similarity index 80%
copy from src/test/test_ScalableAllocator_STL.cpp
copy to src/rml/client/rml_omp.cpp
index 4b1397f..38a5a5f 100644
--- a/src/test/test_ScalableAllocator_STL.cpp
+++ b/src/rml/client/rml_omp.cpp
@@ -26,16 +26,19 @@
     the GNU General Public License.
 */
 
-// Test whether scalable_allocator works with some of the host's STL containers.
-
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "tbb/scalable_allocator.h"
-
-// The actual body of the test is there:
-#include "test_allocator_STL.h"
-
-int main() {
-    TestAllocatorWithSTL<tbb::scalable_allocator>();
-    printf("done\n");
-    return 0;
-}
+#include "rml_omp.h"
+#include "omp_dynamic_link.h"
+#include <assert.h>
+
+namespace __kmp {
+namespace rml {
+
+#define MAKE_SERVER(x) DLD(__KMP_make_rml_server,x)
+#define GET_INFO(x) DLD(__KMP_call_with_my_server_info,x)
+#define SERVER omp_server 
+#define CLIENT omp_client
+#define FACTORY omp_factory
+#include "rml_factory.h"
+
+} // rml
+} // __kmp
diff --git a/src/test/test_ScalableAllocator_STL.cpp b/src/rml/client/rml_tbb.cpp
similarity index 78%
copy from src/test/test_ScalableAllocator_STL.cpp
copy to src/rml/client/rml_tbb.cpp
index 4b1397f..7e1612e 100644
--- a/src/test/test_ScalableAllocator_STL.cpp
+++ b/src/rml/client/rml_tbb.cpp
@@ -26,16 +26,21 @@
     the GNU General Public License.
 */
 
-// Test whether scalable_allocator works with some of the host's STL containers.
-
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "tbb/scalable_allocator.h"
-
-// The actual body of the test is there:
-#include "test_allocator_STL.h"
-
-int main() {
-    TestAllocatorWithSTL<tbb::scalable_allocator>();
-    printf("done\n");
-    return 0;
-}
+#include "../include/rml_tbb.h"
+#include "tbb/dynamic_link.h"
+#include <assert.h>
+
+namespace tbb {
+namespace internal {
+namespace rml {
+
+#define MAKE_SERVER(x) DLD(__TBB_make_rml_server,x)
+#define GET_INFO(x) DLD(__TBB_call_with_my_server_info,x)
+#define SERVER tbb_server 
+#define CLIENT tbb_client
+#define FACTORY tbb_factory
+#include "rml_factory.h"
+
+} // rml
+} // internal
+} // tbb
diff --git a/examples/pipeline/index.html b/src/rml/include/index.html
similarity index 57%
copy from examples/pipeline/index.html
copy to src/rml/include/index.html
index d7ae979..aacad33 100644
--- a/examples/pipeline/index.html
+++ b/src/rml/include/index.html
@@ -1,13 +1,18 @@
 <HTML>
 <BODY>
-
 <H2>Overview</H2>
-This directory has examples of the template <code>pipeline</code>.
 
-<H2>Directories</H2>
+This directory has the include files for the Resource Management Layer (RML).
+
+<H2>Files</H2>
+
 <DL>
-<DT><A HREF="text_filter/index.html">text_filter</A>
-<DD>A simple text filter.
+<DT><P><A HREF="rml_base.h">rml_base.h</A>
+<DD>Interfaces shared by TBB and OpenMP.</P>
+<DT><P><A HREF="rml_omp.h">rml_omp.h</A>
+<DD>Interface exclusive to OpenMP.</P>
+<DT><P><A HREF="rml_tbb.h">rml_tbb.h</A>
+<DD>Interface exclusive to TBB.</P>
 </DL>
 
 <HR>
diff --git a/src/rml/include/rml_base.h b/src/rml/include/rml_base.h
new file mode 100644
index 0000000..1b78abe
--- /dev/null
+++ b/src/rml/include/rml_base.h
@@ -0,0 +1,186 @@
+/*
+    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.
+*/
+
+// Header guard and namespace names follow rml conventions.
+
+#ifndef __RML_rml_base_H
+#define __RML_rml_base_H
+
+#include <cstddef>
+#if _WIN32||_WIN64
+#include <windows.h>
+#endif /* _WIN32||_WIN64 */
+
+#ifdef RML_PURE_VIRTUAL_HANDLER
+#define RML_PURE(T) {RML_PURE_VIRTUAL_HANDLER(); return (T)0;}
+#else
+#define RML_PURE(T) = 0;
+#endif
+
+namespace rml {
+
+//! Base class for denying assignment and copy constructor.
+class no_copy {
+    void operator=( no_copy& );
+    no_copy( no_copy& );
+public:
+    no_copy() {}
+};
+
+class server;
+
+class versioned_object {
+public:
+    //! A version number
+    typedef unsigned version_type;
+    
+    //! Get version of this object
+    /** The version number is incremented when a incompatible change is introduced.
+        The version number is invariant for the lifetime of the object. */
+    virtual version_type version() const RML_PURE(version_type)
+};
+
+//! Represents a client's job for an execution context.
+/** A job object is constructed by the client.
+    Not derived from versioned_object because version is same as for client. */
+class job {
+    friend class server;
+
+    //! Word for use by server
+    /** Typically the server uses it to speed up internal lookup.
+        Clients must not modify the word. */
+    void* scratch_ptr;
+};
+
+//! Information that client provides to server when asking for a server.
+/** The instance must endure at least until acknowledge_close_connection is called. */
+class client: public versioned_object {
+public:
+    //! Typedef for convenience of derived classes in other namespaces.
+    typedef ::rml::job job;
+
+    //! Index of a job in a job pool
+    typedef unsigned size_type;
+
+    //! Maximum number of threads that client can exploit profitably if nothing else is running on the machine.  
+    /** The returned value should remain invariant for the lifetime of the connection.  [idempotent] */
+    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)
+
+    //! 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 
+        interval [0,max_job_count) */
+    virtual job* create_one_job() RML_PURE(job*)
+
+    //! Acknowledge that all jobs have been cleaned up.
+    /** Called by server in response to request_close_connection
+        after cleanup(job) has been called for each job. */
+    virtual void acknowledge_close_connection() RML_PURE(void)
+
+    enum policy_type {turnaround,throughput};
+
+    //! Inform server of desired policy. [idempotent]
+    virtual policy_type policy() const RML_PURE(policy_type)
+
+    //! Inform client that server is done with *this.   
+    /** Client should destroy the job.
+        Not necessarily called by execution context represented by *this.
+        Never called while any other thread is working on the job. */
+    virtual void cleanup( job& ) RML_PURE(void)
+
+    // In general, we should not add new virtual methods, because that would 
+    // break derived classes.  Think about reserving some vtable slots.  
+};
+
+// Information that server provides to client.
+// Virtual functions are routines provided by the server for the client to call. 
+class server: public versioned_object {
+public:
+    //! Typedef for convenience of derived classes.
+    typedef ::rml::job job;
+
+    //! Request that connection to server be closed.
+    /** Causes each job associated with the client to have its cleanup method called,
+        possibly by a thread different than the thread that created the job. 
+        This method can return before all cleanup methods return. 
+        Actions that have to wait after all cleanup methods return should be part of 
+        client::acknowledge_close_connection. */
+    virtual void request_close_connection() = 0;
+
+    //! Called by client thread when it reaches a point where it cannot make progress until other threads do.  
+    virtual void yield() = 0;
+
+    //! Called by client to indicate a change in the number of non-RML threads that are running.
+    /** This is a performance hint to the RML to adjust how many many threads it should let run 
+        concurrently.  The delta is the change in the number of non-RML threads that are running.
+        For example, a value of 1 means the client has started running another thread, and a value 
+        of -1 indicates that the client has blocked or terminated one of its threads. */
+    virtual void independent_thread_number_changed( int delta ) = 0;
+
+    //! Default level of concurrency for which RML strives when there are no non-RML threads running.
+    /** Normally, the value is the hardware concurrency minus one. 
+        The "minus one" accounts for the thread created by main(). */
+    virtual unsigned default_concurrency() const = 0;
+
+protected:
+    static void*& scratch_ptr( job& j ) {return j.scratch_ptr;}
+};
+
+class factory {
+public:
+    //! status results
+    enum status_type {
+        st_success=0,
+        st_connection_exists,
+        st_not_found,
+        st_incompatible
+    };
+
+    //! Scratch pointer for use by RML.
+    void* scratch_ptr;
+
+protected:
+    //! Pointer to routine that waits for server to indicate when client can close itself.
+    status_type (*my_wait_to_close_routine)( factory& );
+
+public:
+    //! Library handle for use by RML.
+#if _WIN32||_WIN64
+    HMODULE library_handle;
+#else
+    void* library_handle;
+#endif /* _WIN32||_WIN64 */ 
+};
+
+typedef void (*server_info_callback_t)( void* arg, const char* server_info );
+
+} // namespace rml
+
+#endif /* __RML_rml_base_H */
diff --git a/src/rml/include/rml_omp.h b/src/rml/include/rml_omp.h
new file mode 100644
index 0000000..302e76e
--- /dev/null
+++ b/src/rml/include/rml_omp.h
@@ -0,0 +1,123 @@
+/*
+    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.
+*/
+
+// Header guard and namespace names follow OpenMP runtime conventions.
+
+#ifndef KMP_RML_OMP_H
+#define KMP_RML_OMP_H
+
+#include "rml_base.h"
+
+namespace __kmp {
+namespace rml {
+
+class omp_client;
+
+//------------------------------------------------------------------------
+// Classes instantiated by the server
+//------------------------------------------------------------------------
+
+//! Represents a set of worker threads provided by the server.
+class omp_server: public ::rml::server {
+public:
+    //! A number of threads
+    typedef unsigned size_type;
+
+    //! Return the number of coins in the bank. (negative if machine is oversubscribed).
+    virtual int current_balance() const RML_PURE(int);
+  
+    //! Request n coins.  Returns number of coins granted. Oversubscription amount if negative.
+    /** Always granted if is_strict is true.
+        - Positive or zero result indicates that the number of coins was taken from the bank.
+        - 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)
+
+    //! Return n coins into the bank.
+    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);
+
+    /** Putting a thread to sleep - convert a thread into a coin
+        Waking up a thread        - convert a coin into a thread
+      
+       Note: conversion between a coin and a thread does not affect the accounting.
+     */
+};
+
+
+//------------------------------------------------------------------------
+// Classes (or base classes thereof) instantiated by the client
+//------------------------------------------------------------------------
+
+class omp_client: public ::rml::client {
+public:
+    //! Called by server thread when it runs its part of a parallel region.  
+    /** The index argument is a 0-origin index of this thread within the array
+        returned by method get_threads.  Server decreases the load by 1 after this method returns. */
+    virtual void process( job&, void* /*cookie*/, size_type /*index*/ ) RML_PURE(void)
+};
+
+/** Client must ensure that instance is zero-inited, typically by being a file-scope object. */
+class omp_factory: public ::rml::factory {
+
+    //! Pointer to routine that creates an RML server.
+    status_type (*my_make_server_routine)( omp_factory&, omp_server*&, omp_client& );
+
+    //! Pointer to routine that returns server version info.
+    void (*my_call_with_server_info_routine)( ::rml::server_info_callback_t cb, void* arg );
+
+public:
+    typedef ::rml::versioned_object::version_type version_type;
+    typedef omp_client client_type;
+    typedef omp_server server_type;
+
+    //! Open factory.
+    /** Dynamically links against RML library. 
+        Returns st_success, st_incompatible, or st_not_found. */
+    status_type open();
+
+    //! Factory method to be called by client to create a server object.
+    /** Factory must be open. 
+        Returns st_success or st_incompatible . */
+    status_type make_server( server_type*&, client_type& );
+
+    //! Close factory.
+    void close();
+
+    //! Call the callback with the server build info.
+    void call_with_server_info( ::rml::server_info_callback_t cb, void* arg ) const;
+};
+
+} // namespace rml
+} // namespace __kmp
+
+#endif /* KMP_RML_OMP_H */
diff --git a/src/rml/include/rml_tbb.h b/src/rml/include/rml_tbb.h
new file mode 100644
index 0000000..578e778
--- /dev/null
+++ b/src/rml/include/rml_tbb.h
@@ -0,0 +1,98 @@
+/*
+    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.
+*/
+
+// Header guard and namespace names follow TBB conventions.
+
+#ifndef __TBB_rml_tbb_H
+#define __TBB_rml_tbb_H
+
+#include "rml_base.h"
+
+namespace tbb {
+namespace internal {
+namespace rml {
+
+class tbb_client;
+
+//------------------------------------------------------------------------
+// Classes instantiated by the server
+//------------------------------------------------------------------------
+class tbb_server: public ::rml::server {
+public:
+    //! Inform server of adjustments in the number of workers that the client can profitably use.
+    virtual void adjust_job_count_estimate( int delta ) = 0;
+};
+
+//------------------------------------------------------------------------
+// Classes instantiated by the client
+//------------------------------------------------------------------------
+
+class tbb_client: public ::rml::client {
+public:
+    //! Defined by TBB to steal a task and execute it.  
+    /** Called by server when wants an execution context to do some TBB work.
+        The method should return when it is okay for the thread to yield indefinitely. */
+    virtual void process( job& ) = 0;
+};
+
+/** Client must ensure that instance is zero-inited, typically by being a file-scope object. */
+class tbb_factory: public ::rml::factory {
+
+    //! Pointer to routine that creates an RML server.
+    status_type (*my_make_server_routine)( tbb_factory&, tbb_server*&, tbb_client& );
+
+    //! Pointer to routine that returns server version info.
+    void (*my_call_with_server_info_routine)( ::rml::server_info_callback_t cb, void* arg );
+
+public:
+    typedef ::rml::versioned_object::version_type version_type;
+    typedef tbb_client client_type;
+    typedef tbb_server server_type;
+
+    //! Open factory.
+    /** Dynamically links against RML library. 
+        Returns st_success, st_incompatible, or st_not_found. */
+    status_type open();
+
+    //! Factory method to be called by client to create a server object.
+    /** Factory must be open. 
+        Returns st_success or st_incompatible . */
+    status_type make_server( server_type*&, client_type& );
+
+    //! Close factory
+    void close();
+
+    //! Call the callback with the server build info
+    void call_with_server_info( ::rml::server_info_callback_t cb, void* arg ) const;
+};
+
+} // namespace rml
+} // namespace internal
+} // namespace tbb
+
+#endif /*__TBB_rml_tbb_H */
diff --git a/examples/parallel_for/index.html b/src/rml/index.html
similarity index 51%
copy from examples/parallel_for/index.html
copy to src/rml/index.html
index a917dc1..9c403af 100644
--- a/examples/parallel_for/index.html
+++ b/src/rml/index.html
@@ -1,17 +1,20 @@
 <HTML>
 <BODY>
-
 <H2>Overview</H2>
-This directory has examples of the template <code>parallel_for</code>.
+
+The subdirectories pertain to the Resource Management Layer (RML).
 
 <H2>Directories</H2>
+
 <DL>
-<DT><A HREF="seismic/index.html">seismic</A>
-<DD>Parallel seismic wave simulation.
-<DT><A HREF="tachyon/index.html">tachyon</A>
-<DD>Parallel 2-D raytracer/renderer.
-<DT><A HREF="polygon_overlay/index.html">polygon_overlay</A>
-<DD>Simple polygon overlay.
+<DT><P><A HREF="include/index.html">include/</A>
+<DD>Include files used by clients of RML.</P>
+<DT><P><A HREF="client/index.html">client/</A>
+<DD>Source files for code that must be statically linked with a client.</P>
+<DT><P><A HREF="server/index.html">server/</A>
+<DD>Source files for the RML server.</P>
+<DT><P><A HREF="test">test/</A>
+<DD>Unit tests for RML server and its components.</P>
 </DL>
 
 <HR>
diff --git a/src/rml/perfor/omp_nested.cpp b/src/rml/perfor/omp_nested.cpp
new file mode 100644
index 0000000..b63358c
--- /dev/null
+++ b/src/rml/perfor/omp_nested.cpp
@@ -0,0 +1,135 @@
+/*
+    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 <cstddef>
+#include <cstdlib>
+#include <cstdio>
+#include <float.h>
+#include <math.h>
+#include <time.h>
+#include <unistd.h>
+#include <pthread.h>
+
+#include <omp.h>
+#include <assert.h>
+
+#include "thread_level.h"
+
+using namespace std;
+using namespace tbb;
+
+// Algorithm parameters
+const int Max_OMP_Outer_Threads = 16;
+const int Max_OMP_Inner_Threads = 16;
+
+// Global variables
+int max_outer_threads = Max_OMP_Outer_Threads;
+int max_inner_threads = Max_OMP_Inner_Threads;
+
+// Print help on command-line arguments
+void help_message(char *prog_name) {
+  fprintf(stderr, "\n%s usage:\n", prog_name);
+  fprintf(stderr, 
+	  "  Parameters:\n"
+	  "    -o<num> : max # of threads OMP should use at outer level\n"
+	  "    -i<num> : max # of threads OMP should use at inner level\n"
+	  "\n  Help:\n"
+	  "    -h : print this help message\n");
+}
+
+// Process command-line arguments
+void process_args(int argc, char *argv[], int *max_outer_t, int *max_inner_t) {
+  for (int i=1; i<argc; ++i) {  
+    if (argv[i][0] == '-') {
+      switch (argv[i][1]) {
+      case 'i': // set max_inner_threads
+	if (sscanf(&argv[i][2], "%d", max_inner_t) != 1 || *max_inner_t < 1) {
+	  fprintf(stderr, "%s Warning: argument of -i option unacceptable: %s\n", argv[0], &argv[i][2]);
+	  help_message(argv[0]);
+	}
+	break;
+      case 'o': // set max_outer_threads
+	if (sscanf(&argv[i][2], "%d", max_outer_t) != 1 || *max_outer_t < 1) {
+	  fprintf(stderr, "%s Warning: argument of -o option unacceptable: %s\n", argv[0], &argv[i][2]);
+	  help_message(argv[0]);
+	}
+	break;
+      case 'h': // print help message
+	help_message(argv[0]);
+	exit(0);
+	break;
+      default:
+	fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]);
+	help_message(argv[0]);
+	break;
+      }
+    } else {
+      fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]);
+      help_message(argv[0]);
+    }
+  }
+}
+
+int main(int argc, char *argv[]) { 
+  process_args(argc, argv, &max_outer_threads, &max_inner_threads);
+  TotalThreadLevel.init();
+
+  double start, end;
+  start = omp_get_wtime( );
+  
+#pragma omp parallel num_threads(max_outer_threads)
+  {
+    int omp_thread = omp_get_thread_num();
+    if (omp_thread == 0)
+      TotalThreadLevel.change_level(omp_get_num_threads(), omp_outer);
+    if (omp_thread == 0) {
+      sleep(3);
+      TotalThreadLevel.change_level(-1, omp_outer);
+#pragma omp parallel num_threads(max_inner_threads)
+      {
+	int my_omp_thread = omp_get_thread_num();
+	if (my_omp_thread == 0)
+	  TotalThreadLevel.change_level(omp_get_num_threads(), omp_inner);
+	printf("Inner thread %d nested inside outer thread %d\n", my_omp_thread, omp_thread);
+	if (my_omp_thread == 0)
+	  TotalThreadLevel.change_level(-omp_get_num_threads(), omp_inner);
+      }
+      TotalThreadLevel.change_level(1, omp_outer);
+    }
+    else {
+      sleep(6);
+    }
+    if (omp_thread == 0)
+      TotalThreadLevel.change_level(-omp_get_num_threads(), omp_outer);
+  }
+  end = omp_get_wtime( );
+  printf("Simple test of nested OMP (%d outer threads max, %d inner threads max) took: %6.6f\n",
+	 max_outer_threads, max_inner_threads, end-start);
+  TotalThreadLevel.dump();
+  return 0;
+}
diff --git a/src/rml/perfor/omp_simple.cpp b/src/rml/perfor/omp_simple.cpp
new file mode 100644
index 0000000..3436778
--- /dev/null
+++ b/src/rml/perfor/omp_simple.cpp
@@ -0,0 +1,159 @@
+/*
+    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 <cstddef>
+#include <cstdlib>
+#include <cstdio>
+#include <float.h>
+#include <math.h>
+#include <time.h>
+#include <unistd.h>
+#include <pthread.h>
+
+#include <omp.h>
+#include <assert.h>
+
+#include "thread_level.h"
+#define LOG_THREADS
+
+#include "tbb/task.h"
+#include "tbb/tick_count.h"
+#include "tbb/task_scheduler_init.h"
+#include "tbb/scalable_allocator.h"
+#include "tbb/parallel_for.h"
+#include "tbb/blocked_range.h"
+
+using namespace std;
+using namespace tbb;
+
+// Algorithm parameters
+const int Max_TBB_Threads = 16;
+const int Max_OMP_Threads = 16;
+
+// Global variables
+int max_tbb_threads = Max_TBB_Threads;
+int max_omp_threads = Max_OMP_Threads;
+
+// Print help on command-line arguments
+void help_message(char *prog_name) {
+  fprintf(stderr, "\n%s usage:\n", prog_name);
+  fprintf(stderr, 
+	  "  Parameters:\n"
+	  "    -t<num> : max # of threads TBB should use\n"
+	  "    -o<num> : max # of threads OMP should use\n"
+	  "\n  Help:\n"
+	  "    -h : print this help message\n");
+}
+
+// Process command-line arguments
+void process_args(int argc, char *argv[], int *max_tbb_t, int *max_omp_t) {
+  for (int i=1; i<argc; ++i) {  
+    if (argv[i][0] == '-') {
+      switch (argv[i][1]) {
+      case 't': // set max_tbb_threads
+	if (sscanf(&argv[i][2], "%d", max_tbb_t) != 1 || *max_tbb_t < 1) {
+	  fprintf(stderr, "%s Warning: argument of -t option unacceptable: %s\n", argv[0], &argv[i][2]);
+	  help_message(argv[0]);
+	}
+	break;
+      case 'o': // set max_omp_threads
+	if (sscanf(&argv[i][2], "%d", max_omp_t) != 1 || *max_omp_t < 1) {
+	  fprintf(stderr, "%s Warning: argument of -o option unacceptable: %s\n", argv[0], &argv[i][2]);
+	  help_message(argv[0]);
+	}
+	break;
+      case 'h': // print help message
+	help_message(argv[0]);
+	exit(0);
+	break;
+      default:
+	fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]);
+	help_message(argv[0]);
+	break;
+      }
+    } else {
+      fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]);
+      help_message(argv[0]);
+    }
+  }
+}
+
+int main(int argc, char *argv[]) { 
+  process_args(argc, argv, &max_tbb_threads, &max_omp_threads);
+  TotalThreadLevel.init();
+
+  tick_count start, end;
+  start = tick_count::now();
+  
+#pragma omp parallel num_threads(max_omp_threads)
+  {
+    int omp_thread = omp_get_thread_num();
+#ifdef LOG_THREADS
+    if (omp_thread == 0)
+      TotalThreadLevel.change_level(omp_get_num_threads(), omp_outer);
+#endif
+    task_scheduler_init phase(max_tbb_threads);
+    if (omp_thread == 0) {
+      sleep(3);
+#ifdef LOG_THREADS
+      TotalThreadLevel.change_level(-1, omp_outer);
+#endif
+      parallel_for(blocked_range<size_t>(0, 1000), 
+		   [=](const blocked_range<size_t>& range) {
+#ifdef LOG_THREADS
+	TotalThreadLevel.change_level(1, tbb_inner);
+#endif
+#pragma ivdep
+	for (size_t i=range.begin(); i!=range.end(); ++i) {
+	  if (i==range.begin())
+	    printf("TBB range starting at %d on OMP thread %d\n", (int)i, omp_thread);
+	}
+#ifdef LOG_THREADS
+	TotalThreadLevel.change_level(-1, tbb_inner);
+#endif
+      }, auto_partitioner());
+#ifdef LOG_THREADS
+      TotalThreadLevel.change_level(1, omp_outer);
+#endif
+    }
+    else {
+      sleep(6);
+    }
+#ifdef LOG_THREADS
+    if (omp_thread == 0)
+      TotalThreadLevel.change_level(-omp_get_num_threads(), omp_outer);
+#endif
+  }
+  end = tick_count::now();
+  printf("Simple test of OMP (%d threads max) with TBB (%d threads max) inside took: %6.6f\n",
+	 max_omp_threads, max_tbb_threads, (end-start).seconds());
+#ifdef LOG_THREADS
+  TotalThreadLevel.dump();
+#endif
+  return 0;
+}
diff --git a/src/rml/perfor/tbb_multi_omp.cpp b/src/rml/perfor/tbb_multi_omp.cpp
new file mode 100644
index 0000000..c3432f2
--- /dev/null
+++ b/src/rml/perfor/tbb_multi_omp.cpp
@@ -0,0 +1,168 @@
+/*
+    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 <cstddef>
+#include <cstdlib>
+#include <cstdio>
+#include <float.h>
+#include <math.h>
+#include <time.h>
+#include <unistd.h>
+#include <pthread.h>
+
+#include <omp.h>
+#include <assert.h>
+
+#include "thread_level.h"
+
+#include "tbb/task.h"
+#include "tbb/tick_count.h"
+#include "tbb/task_scheduler_init.h"
+#include "tbb/scalable_allocator.h"
+
+using namespace std;
+using namespace tbb;
+
+// Algorithm parameters
+const int Max_TBB_Threads = 16;
+const int Max_OMP_Threads = 16;
+
+// Global variables
+int max_tbb_threads = Max_TBB_Threads;
+int max_omp_threads = Max_OMP_Threads;
+
+// Print help on command-line arguments
+void help_message(char *prog_name) {
+  fprintf(stderr, "\n%s usage:\n", prog_name);
+  fprintf(stderr, 
+	  "  Parameters:\n"
+	  "    -t<num> : max # of threads TBB should use\n"
+	  "    -o<num> : max # of threads OMP should use\n"
+	  "\n  Help:\n"
+	  "    -h : print this help message\n");
+}
+
+// Process command-line arguments
+void process_args(int argc, char *argv[], int *max_tbb_t, int *max_omp_t) {
+  for (int i=1; i<argc; ++i) {  
+    if (argv[i][0] == '-') {
+      switch (argv[i][1]) {
+      case 't': // set max_tbb_threads
+	if (sscanf(&argv[i][2], "%d", max_tbb_t) != 1 || *max_tbb_t < 1) {
+	  fprintf(stderr, "%s Warning: argument of -t option unacceptable: %s\n", argv[0], &argv[i][2]);
+	  help_message(argv[0]);
+	}
+	break;
+      case 'o': // set max_omp_threads
+	if (sscanf(&argv[i][2], "%d", max_omp_t) != 1 || *max_omp_t < 1) {
+	  fprintf(stderr, "%s Warning: argument of -o option unacceptable: %s\n", argv[0], &argv[i][2]);
+	  help_message(argv[0]);
+	}
+	break;
+      case 'h': // print help message
+	help_message(argv[0]);
+	exit(0);
+	break;
+      default:
+	fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]);
+	help_message(argv[0]);
+	break;
+      }
+    } else {
+      fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]);
+      help_message(argv[0]);
+    }
+  }
+}
+
+class SimpleTask : public task {
+  bool isLeaf;
+  int myId;
+public:
+  SimpleTask(bool isLeaf_, int myId_) : isLeaf(isLeaf_), myId(myId_) {}
+  task* execute() {
+    TotalThreadLevel.change_level(1, tbb_outer);
+    omp_set_num_threads(max_omp_threads);
+    if (!isLeaf) {
+      set_ref_count(65);
+      for (int i=0; i<64; ++i) {
+	SimpleTask& st = *new(allocate_child()) SimpleTask(true, i);
+	spawn(st);
+      }
+      TotalThreadLevel.change_level(-1, tbb_outer);
+      wait_for_all();
+      TotalThreadLevel.change_level(1, tbb_outer);
+    }
+    else {
+      if (myId%2 == 0) {
+	sleep(3);
+	TotalThreadLevel.change_level(-1, tbb_outer);
+#pragma omp parallel
+	{
+	  if (omp_get_thread_num() == 0) {
+	    TotalThreadLevel.change_level(omp_get_num_threads(), omp_inner);
+	  }
+	  printf("In OMP parallel region on TBB task with myId=0: thread %d of %d\n", 
+		 omp_get_thread_num(), omp_get_num_threads());
+	  if (omp_get_thread_num() == 0) {
+	    TotalThreadLevel.change_level(-omp_get_num_threads(), omp_inner);
+	  }
+	}
+	TotalThreadLevel.change_level(1, tbb_outer);
+      }
+      else {
+	sleep(6);
+      }
+    }
+    TotalThreadLevel.change_level(-1, tbb_outer);
+    return NULL;
+  }
+};
+
+
+int main(int argc, char *argv[]) { 
+  TotalThreadLevel.init();
+  int dbg=0;
+  TotalThreadLevel.change_level(1, tbb_outer);
+  process_args(argc, argv, &max_tbb_threads, &max_omp_threads);
+
+  task_scheduler_init phase(max_tbb_threads);
+  tick_count start, end;
+  start = tick_count::now();
+  SimpleTask& st = *new(task::allocate_root()) SimpleTask(false, -1);
+  TotalThreadLevel.change_level(-1, tbb_outer);
+  task::spawn_root_and_wait(st);
+  TotalThreadLevel.change_level(1, tbb_outer);
+  end = tick_count::now();
+  printf("Simple Test of TBB (%d threads max) with OMP (%d threads max) inside took: %6.6f\n", 
+	 max_tbb_threads, max_omp_threads, (end-start).seconds());
+
+  TotalThreadLevel.change_level(-1, tbb_outer);
+  TotalThreadLevel.dump();
+  return 0;
+}
diff --git a/src/rml/perfor/tbb_simple.cpp b/src/rml/perfor/tbb_simple.cpp
new file mode 100644
index 0000000..a72ed0d
--- /dev/null
+++ b/src/rml/perfor/tbb_simple.cpp
@@ -0,0 +1,167 @@
+/*
+    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 <cstddef>
+#include <cstdlib>
+#include <cstdio>
+#include <float.h>
+#include <math.h>
+#include <time.h>
+#include <unistd.h>
+#include <pthread.h>
+
+#include <omp.h>
+#include <assert.h>
+
+#include "thread_level.h"
+
+#include "tbb/task.h"
+#include "tbb/tick_count.h"
+#include "tbb/task_scheduler_init.h"
+#include "tbb/scalable_allocator.h"
+
+using namespace std;
+using namespace tbb;
+
+// Algorithm parameters
+const int Max_TBB_Threads = 16;
+const int Max_OMP_Threads = 16;
+
+// Global variables
+int max_tbb_threads = Max_TBB_Threads;
+int max_omp_threads = Max_OMP_Threads;
+
+// Print help on command-line arguments
+void help_message(char *prog_name) {
+  fprintf(stderr, "\n%s usage:\n", prog_name);
+  fprintf(stderr, 
+	  "  Parameters:\n"
+	  "    -t<num> : max # of threads TBB should use\n"
+	  "    -o<num> : max # of threads OMP should use\n"
+	  "\n  Help:\n"
+	  "    -h : print this help message\n");
+}
+
+// Process command-line arguments
+void process_args(int argc, char *argv[], int *max_tbb_t, int *max_omp_t) {
+  for (int i=1; i<argc; ++i) {  
+    if (argv[i][0] == '-') {
+      switch (argv[i][1]) {
+      case 't': // set max_tbb_threads
+	if (sscanf(&argv[i][2], "%d", max_tbb_t) != 1 || *max_tbb_t < 1) {
+	  fprintf(stderr, "%s Warning: argument of -t option unacceptable: %s\n", argv[0], &argv[i][2]);
+	  help_message(argv[0]);
+	}
+	break;
+      case 'o': // set max_omp_threads
+	if (sscanf(&argv[i][2], "%d", max_omp_t) != 1 || *max_omp_t < 1) {
+	  fprintf(stderr, "%s Warning: argument of -o option unacceptable: %s\n", argv[0], &argv[i][2]);
+	  help_message(argv[0]);
+	}
+	break;
+      case 'h': // print help message
+	help_message(argv[0]);
+	exit(0);
+	break;
+      default:
+	fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]);
+	help_message(argv[0]);
+	break;
+      }
+    } else {
+      fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]);
+      help_message(argv[0]);
+    }
+  }
+}
+
+class SimpleTask : public task {
+  bool isLeaf;
+  int myId;
+public:
+  SimpleTask(bool isLeaf_, int myId_) : isLeaf(isLeaf_), myId(myId_) {}
+  task* execute() {
+    TotalThreadLevel.change_level(1, tbb_outer);
+    omp_set_num_threads(max_omp_threads);
+    if (!isLeaf) {
+      set_ref_count(17);
+      for (int i=0; i<16; ++i) {
+	SimpleTask& st = *new(allocate_child()) SimpleTask(true, i);
+	spawn(st);
+      }
+      TotalThreadLevel.change_level(-1, tbb_outer);
+      wait_for_all();
+      TotalThreadLevel.change_level(1, tbb_outer);
+    }
+    else {
+      if (myId == 0) {
+	sleep(3);
+	TotalThreadLevel.change_level(-1, tbb_outer);
+#pragma omp parallel
+	{
+	  if (omp_get_thread_num() == 0) {
+	    TotalThreadLevel.change_level(omp_get_num_threads(), omp_inner);
+	  }
+	  printf("In OMP parallel region on TBB task with myId=0: thread %d of %d\n", 
+		 omp_get_thread_num(), omp_get_num_threads());
+	  if (omp_get_thread_num() == 0) {
+	    TotalThreadLevel.change_level(-omp_get_num_threads(), omp_inner);
+	  }
+	}
+	TotalThreadLevel.change_level(1, tbb_outer);
+      }
+      else {
+	sleep(6);
+      }
+    }
+    TotalThreadLevel.change_level(-1, tbb_outer);
+    return NULL;
+  }
+};
+
+
+int main(int argc, char *argv[]) { 
+  TotalThreadLevel.init();
+  TotalThreadLevel.change_level(1, tbb_outer);
+  process_args(argc, argv, &max_tbb_threads, &max_omp_threads);
+
+  task_scheduler_init phase(max_tbb_threads);
+  tick_count start, end;
+  start = tick_count::now();
+  SimpleTask& st = *new(task::allocate_root()) SimpleTask(false, -1);
+  TotalThreadLevel.change_level(-1, tbb_outer);
+  task::spawn_root_and_wait(st);
+  TotalThreadLevel.change_level(1, tbb_outer);
+  end = tick_count::now();
+  printf("Simple Test of TBB (%d threads max) with OMP (%d threads max) inside took: %6.6f\n", 
+	 max_tbb_threads, max_omp_threads, (end-start).seconds());
+
+  TotalThreadLevel.change_level(-1, tbb_outer);
+  TotalThreadLevel.dump();
+  return 0;
+}
diff --git a/src/rml/perfor/thread_level.h b/src/rml/perfor/thread_level.h
new file mode 100644
index 0000000..a73afa8
--- /dev/null
+++ b/src/rml/perfor/thread_level.h
@@ -0,0 +1,140 @@
+/*
+    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.
+*/
+
+// Thread level recorder
+#ifndef __THREAD_LEVEL_H
+#define __THREAD_LEVEL_H
+#include <cstdio>
+#include <omp.h>
+#include "tbb/atomic.h"
+#include "tbb/tick_count.h"
+#include "../src/test/harness.h"
+
+//#define LOG_THREADS // use this to ifdef out calls to this class 
+
+using namespace tbb;
+
+typedef enum {tbb_outer, tbb_inner, omp_outer, omp_inner} client_t;
+
+class ThreadLevelRecorder {
+  tbb::atomic<int> tbb_outer_level;
+  tbb::atomic<int> tbb_inner_level;
+  tbb::atomic<int> omp_outer_level;
+  tbb::atomic<int> omp_inner_level;
+  struct record {
+    tbb::tick_count time;
+    int n_tbb_outer_thread;
+    int n_tbb_inner_thread;
+    int n_omp_outer_thread;
+    int n_omp_inner_thread;
+  };
+  tbb::atomic<unsigned> next;
+  /** Must be power of two */
+  static const unsigned max_record_count = 1<<20;
+  record array[max_record_count];
+  int max_threads;
+  bool fail;
+ public:
+  void change_level(int delta, client_t whichClient);
+  void dump();
+  void init();
+};
+
+void ThreadLevelRecorder::change_level(int delta, client_t whichClient) {
+  int tox=tbb_outer_level, tix=tbb_inner_level, oox=omp_outer_level, oix=omp_inner_level;
+  if (whichClient == tbb_outer) {
+    tox = tbb_outer_level+=delta;
+  } else if (whichClient == tbb_inner) {
+    tix = tbb_inner_level+=delta;
+  } else if (whichClient == omp_outer) {
+    oox = omp_outer_level+=delta;
+  } else if (whichClient == omp_inner) {
+    oix = omp_inner_level+=delta;
+  } else {
+    printf("WARNING: Bad client type; ignoring.\n");
+    return;
+  }
+  // log non-negative entries
+  tbb::tick_count t = tbb::tick_count::now();
+  unsigned k = next++;
+  if (k<max_record_count) {
+    record& r = array[k];
+    r.time = t;
+    r.n_tbb_outer_thread = tox>=0?tox:0;
+    r.n_omp_outer_thread = oox>=0?oox:0;
+    r.n_tbb_inner_thread = tix>=0?tix:0;
+    r.n_omp_inner_thread = oix>=0?oix:0;
+  }
+  char errStr[100];
+  int tot_threads;
+  tot_threads = tox+tix+oox+oix;
+  sprintf(errStr, "ERROR: Number of threads (%d+%d+%d+%d=%d) in use exceeds maximum (%d).\n", 
+	  tox, tix, oox, oix, tot_threads, max_threads);
+  if (tot_threads > max_threads) {
+#ifdef NO_BAIL_OUT
+    if (!fail) {
+      printf("%sContinuing...\n", errStr);
+      fail = true;
+    }
+#else
+    dump();
+    ASSERT(tot_threads <= max_threads, errStr);
+#endif
+  }
+}
+
+void ThreadLevelRecorder::dump() {
+  FILE* f = fopen("time.txt","w");
+  if (!f) {
+    perror("fopen(time.txt)\n");
+    exit(1);
+  }
+  unsigned limit = next;
+  if (limit>max_record_count) { // Clip
+    limit = max_record_count;
+  }
+  for (unsigned i=0; i<limit; ++i) {
+    fprintf(f,"%f\t%d\t%d\t%d\t%d\n",(array[i].time-array[0].time).seconds(), array[i].n_tbb_outer_thread,
+	    array[i].n_tbb_inner_thread, array[i].n_omp_outer_thread, array[i].n_omp_inner_thread);
+  }
+  fclose(f);
+  int tox=tbb_outer_level, tix=tbb_inner_level, oox=omp_outer_level, oix=omp_inner_level;
+  int tot_threads;
+  tot_threads = tox+tix+oox+oix;
+  if (!fail) printf("INFO: Passed.\n");
+  else printf("INFO: Failed.\n");
+}
+
+void ThreadLevelRecorder::init() {
+  fail = false;
+  max_threads = omp_get_max_threads();
+  printf("INFO: Getting maximum hardware threads... %d.\n", max_threads);
+}
+
+ThreadLevelRecorder TotalThreadLevel;
+#endif
diff --git a/src/rml/server/hunk.h b/src/rml/server/hunk.h
new file mode 100644
index 0000000..ca86290
--- /dev/null
+++ b/src/rml/server/hunk.h
@@ -0,0 +1,114 @@
+/*
+    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/include/index.html b/src/rml/server/index.html
similarity index 74%
copy from include/index.html
copy to src/rml/server/index.html
index c37ff34..e2750c6 100644
--- a/include/index.html
+++ b/src/rml/server/index.html
@@ -1,14 +1,8 @@
 <HTML>
 <BODY>
-
 <H2>Overview</H2>
-Include files for Threading Building Blocks.
 
-<H2>Directories</H2>
-<DL>
-<DT><A HREF="tbb">tbb</A>
-<DD>Include files for Threading Building Blocks.
-</DL>
+This directory has source code internal to the server.
 
 <HR>
 <A HREF="../index.html">Up to parent directory</A>
@@ -22,3 +16,4 @@ subsidiaries in the United States and other countries.
 * Other names and brands may be claimed as the property of others.
 </BODY>
 </HTML>
+
diff --git a/src/tbbmalloc/tbbmalloc.rc b/src/rml/server/irml.rc
similarity index 87%
copy from src/tbbmalloc/tbbmalloc.rc
copy to src/rml/server/irml.rc
index 0bce7f2..35e5db8 100644
--- a/src/tbbmalloc/tbbmalloc.rc
+++ b/src/rml/server/irml.rc
@@ -45,9 +45,6 @@
 #define ENDL "\r\n"
 #include "tbb/tbb_version.h"
 
-#define TBBMALLOC_VERNUMBERS 1, 0, __TBB_VERSION_YMD
-#define TBBMALLOC_VERSION __TBB_STRING(TBBMALLOC_VERNUMBERS)
-
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
 
@@ -73,7 +70,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION TBBMALLOC_VERNUMBERS
+ FILEVERSION TBB_VERNUMBERS
  PRODUCTVERSION TBB_VERNUMBERS
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
@@ -90,15 +87,15 @@ BEGIN
         BLOCK "000004b0"
         BEGIN
             VALUE "CompanyName", "Intel Corporation\0"
-            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 "FileDescription", "Resource manager library\0"
+            VALUE "FileVersion", TBB_VERSION "\0"
+//what is it?            VALUE "InternalName", "irml\0"
+            VALUE "LegalCopyright", "Copyright (C) 2009\0"
             VALUE "LegalTrademarks", "\0"
 #ifndef TBB_USE_DEBUG
-            VALUE "OriginalFilename", "tbbmalloc.dll\0"
+            VALUE "OriginalFilename", "irml.dll\0"
 #else
-            VALUE "OriginalFilename", "tbbmalloc_debug.dll\0"
+            VALUE "OriginalFilename", "irml_debug.dll\0"
 #endif
             VALUE "ProductName", "Threading Building Blocks\0"
             VALUE "ProductVersion", TBB_VERSION "\0"
diff --git a/src/rml/server/job_automaton.h b/src/rml/server/job_automaton.h
new file mode 100644
index 0000000..bb4223d
--- /dev/null
+++ b/src/rml/server/job_automaton.h
@@ -0,0 +1,146 @@
+/*
+    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_job_automaton_H
+#define __RML_job_automaton_H
+
+#include "rml_base.h"
+#include "tbb/atomic.h"
+
+namespace rml {
+
+namespace internal {
+
+//! Finite state machine.   
+/**   /--------------\
+     /                V
+    0 --> 1--> ptr --> -1 
+                ^
+                |
+                |
+                V
+              ptr|1
+
+"owner" = corresponding server_thread.
+Odd states indicate that someone is executing code on the job.
+Furthermore, odd states!=-1 indicate that owner will read its mailbox shortly.
+Most transitions driven only by owner.
+Transition 0-->-1 is driven by non-owner.
+Transition ptr->-1 is driven  by owner or non-owner.
+*/ 
+class job_automaton: no_copy {
+private:
+    tbb::atomic<intptr_t> my_job;
+public:
+    /** Created by non-owner */
+    job_automaton() {
+        my_job = 0;
+    }
+ 
+    ~job_automaton() {
+        __TBB_ASSERT( my_job==-1, "must plug before destroying" );
+    }
+
+    //! Try to transition 0-->1 or ptr-->ptr|1.
+    /** Should only be called by owner. */
+    bool try_acquire() {
+        intptr_t snapshot = my_job;
+        if( snapshot==-1 ) {
+            return false;
+        } else {
+            __TBB_ASSERT( (snapshot&1)==0, "already marked that way" );
+            intptr_t old = my_job.compare_and_swap( snapshot|1,  snapshot );
+            __TBB_ASSERT( old==snapshot || old==-1, "unexpected interference" );  
+            return old==snapshot;
+        }
+    }
+    //! Transition ptr|1-->ptr
+    /** Should only be called by owner. */
+    void release() {
+        intptr_t snapshot = my_job;
+        __TBB_ASSERT( snapshot&1, NULL );
+        // Atomic store suffices here.
+        my_job = snapshot&~1;
+    }
+
+    //! Transition 1-->ptr
+    /** Should only be called by owner. */
+    void set_and_release( rml::job& job ) {
+        intptr_t value = reinterpret_cast<intptr_t>(&job);
+        __TBB_ASSERT( (value&1)==0, "job misaligned" );
+        __TBB_ASSERT( value!=0, "null job" );
+        __TBB_ASSERT( my_job==1, "already set, or not marked busy?" );
+        // Atomic store suffices here.
+        my_job = value;
+    }
+
+    //! Transition 0-->-1
+    /** If successful, return true. */
+    bool try_plug_null() {
+        return my_job.compare_and_swap( -1, 0 )==0;
+    }
+
+    //! Try to transition to -1.  If successful, set j to contents and return true.
+    /** Called by owner or non-owner. */
+    bool try_plug( rml::job*&j ) {
+        for(;;) {
+            intptr_t snapshot = my_job;
+            if( snapshot&1 ) {
+                // server_thread that owns job is executing a mailbox item for the job,
+                // and will thus read its mailbox afterwards, and see a terminate request
+                // for the job.
+                j = NULL;
+                return false;
+            } 
+            // Not busy
+            if( my_job.compare_and_swap( -1, snapshot )==snapshot ) {
+                j = reinterpret_cast<rml::job*>(snapshot);
+                return true;
+            } 
+            // Need to retry, because current thread may be nonowner that read a 0, and owner might have
+            // caused transition 0->1->ptr after we took our snapshot.
+        }
+    }
+
+    /** Called by non-owner to wait for transition to ptr. */
+    rml::job& wait_for_job() const {
+        intptr_t snapshot;
+        for(;;) {
+            snapshot = my_job;
+            if( snapshot&~1 ) break;
+            __TBB_Yield();
+        }
+        __TBB_ASSERT( snapshot!=-1, "wait on plugged job_automaton" );
+        return *reinterpret_cast<rml::job*>(snapshot&~1);
+    }
+};
+
+} // namespace internal
+} // namespace rml
+
+#endif /* __RML_job_automaton_H */
diff --git a/src/tbbmalloc/lin-tbbmalloc-export.def b/src/rml/server/lin-rml-export.def
similarity index 82%
copy from src/tbbmalloc/lin-tbbmalloc-export.def
copy to src/rml/server/lin-rml-export.def
index 66db63d..2c332aa 100644
--- a/src/tbbmalloc/lin-tbbmalloc-export.def
+++ b/src/rml/server/lin-rml-export.def
@@ -28,18 +28,11 @@
 
 {
 global:
-scalable_calloc;
-scalable_free;
-scalable_malloc;
-scalable_realloc;
-scalable_posix_memalign;
-scalable_aligned_malloc;
-scalable_aligned_realloc;
-scalable_aligned_free;
-__TBB_internal_calloc;
-__TBB_internal_free;
-__TBB_internal_malloc;
-__TBB_internal_realloc;
-__TBB_internal_posix_memalign;
+__RML_open_factory;
+__RML_close_factory;
+__TBB_make_rml_server;
+__KMP_make_rml_server;
+__TBB_call_with_my_server_info;
+__KMP_call_with_my_server_info;
 local:*;
 };
diff --git a/src/rml/server/ring.h b/src/rml/server/ring.h
new file mode 100644
index 0000000..4a865f7
--- /dev/null
+++ b/src/rml/server/ring.h
@@ -0,0 +1,140 @@
+/*
+    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
new file mode 100644
index 0000000..832bc99
--- /dev/null
+++ b/src/rml/server/rml_server.cpp
@@ -0,0 +1,1377 @@
+/*
+    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 "rml_tbb.h"
+#define private public /* Sleazy trick to avoid publishing internal names in public header. */
+#include "rml_omp.h"
+#undef private
+
+#include "tbb/tbb_allocator.h"
+#include "tbb/cache_aligned_allocator.h"
+#include "ring.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 )
+#pragma warning( disable: 4985 )
+#endif
+#include "tbb/concurrent_vector.h"
+#if _MSC_VER==1500 && !defined(__INTEL_COMPILER)
+#pragma warning( pop )
+#endif
+
+namespace rml {
+
+namespace internal {
+
+//! Number of hardware contexts
+static inline unsigned hardware_concurrency() {
+    static unsigned DefaultNumberOfThreads = 0;
+    unsigned n = DefaultNumberOfThreads;
+    if( !n ) DefaultNumberOfThreads = n = tbb::internal::DetectNumberOfWorkers();
+    return n;
+}
+
+using tbb::internal::rml::tbb_client;
+using tbb::internal::rml::tbb_server;
+
+using __kmp::rml::omp_client;
+using __kmp::rml::omp_server;
+
+typedef versioned_object::version_type version_type;
+
+const version_type SERVER_VERSION = 1;
+
+static const size_t cache_line_size = tbb::internal::NFS_MaxLineSize;
+
+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 );        
+    }
+};
+
+//! State of a server_thread
+/** Below is a diagram of legal state transitions.
+
+              ts_tbb_busy               
+              ^          ^       
+             /            \       
+            /              V       
+    ts_asleep <-----------> ts_idle 
+            \              ^       
+             \            /       
+              V          V       
+              ts_omp_busy               
+ */
+enum thread_state_t {
+    //! Thread not doing anything useful, but running and looking for work. 
+    ts_idle,
+    //! Thread not doing anything useful and is asleep */
+    ts_asleep,
+    //! Thread is enlisted into OpenMP team
+    ts_omp_busy,
+    //! Thread is busy doing TBB work.
+    ts_tbb_busy,
+    //! For tbb threads only
+    ts_done,
+    ts_created,
+    ts_started,
+    ts_visited
+};
+
+#if TBB_USE_ASSERT
+#define PRODUCE_ARG(x) ,x
+#else
+#define PRODUCE_ARG(x) 
+#endif
+
+//! Synchronizes dispatch of OpenMP work.
+class omp_dispatch_type {
+    typedef ::rml::job job_type;
+    omp_client* client;
+    void* cookie;
+    omp_client::size_type index;
+    tbb::atomic<job_type*> job;
+#if TBB_USE_ASSERT
+    omp_connection_v1* server;
+#endif /* TBB_USE_ASSERT */
+public:
+    omp_dispatch_type() {job=NULL;}
+    void consume();
+    void produce( omp_client& c, job_type& j, void* cookie_, omp_client::size_type index_ PRODUCE_ARG( omp_connection_v1& s )) {
+        __TBB_ASSERT( &j, NULL );
+        __TBB_ASSERT( !job, "job already set" );
+        client = &c;
+#if TBB_USE_ASSERT
+        server = &s;
+#endif /* TBB_USE_ASSERT */
+        cookie = cookie_;
+        index = index_;
+        // Must be last
+        job = &j;
+    }
+};
+
+//! A reference count.
+/** No default constructor, because clients must be very careful about whether the 
+    initial reference count is 0 or 1. */
+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" );
+    }
+
+    //! 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; 
+        __TBB_ASSERT(k>=0,"reference count underflow");
+        return k;
+    }
+};
+
+//! Forward declaration
+class server_thread;
+class thread_map;
+
+//! thread_map_base; we need to make the iterator type available to server_thread
+struct thread_map_base {
+    //! A value in the map
+    class value_type {
+    public:
+        server_thread& thread() {
+            __TBB_ASSERT( my_thread, "thread_map::value_type::thread() called when !my_thread" );
+            return *my_thread;
+        }
+        rml::job& job() {
+            __TBB_ASSERT( my_job, "thread_map::value_type::job() called when !my_job" );
+            return *my_job;
+        }
+        value_type() : my_thread(NULL), my_job(NULL) {}
+        server_thread& wait_for_thread() const {
+            for(;;) {
+                server_thread* ptr=const_cast<server_thread*volatile&>(my_thread);
+                if( ptr ) 
+                    return *ptr;
+                __TBB_Yield();
+            } 
+        }
+        /** Shortly after when a connection is established, it is possible for the server
+            to grab a server_thread that has not yet created a job object for that server. */
+        rml::job& wait_for_job() const {
+            if( !my_job ) {
+                my_job = &my_automaton.wait_for_job();
+            }
+            return *my_job;
+        }
+    private:
+        server_thread* my_thread;
+        /** Marked mutable because though it is physically modified, conceptually it is a duplicate of 
+            the job held by job_automaton. */
+        mutable rml::job* my_job;
+        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;
+};
+
+template<typename T>
+class padded: public T {
+    char pad[cache_line_size - sizeof(T)%cache_line_size];
+};
+
+// FIXME - should we pad out memory to avoid false sharing of our global variables?
+
+static tbb::atomic<int> the_balance;
+static tbb::atomic<int> the_balance_inited;
+
+//! Per thread information 
+/** ref_count holds number of clients that are using this, 
+    plus 1 if a host thread owns this instance. */
+class server_thread: public ref_count {
+    friend class thread_map;
+    //! Integral type that can hold a thread_state_t
+    typedef int thread_state_rep_t;
+    tbb::atomic<thread_state_rep_t> state;
+public:
+    thread_monitor monitor;
+    // FIXME: make them private...
+    bool    is_omp_thread;
+    tbb::atomic<thread_state_rep_t> tbb_state;
+    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;
+
+#if TBB_USE_ASSERT
+    //! Flag used to check if thread is still using *this.
+    bool has_active_thread;
+#endif /* TBB_USE_ASSERT */
+
+    //! Volunteer to sleep. 
+    void sleep_perhaps( thread_state_t asleep );
+
+    //! 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 );
+
+    //! Process requests
+    /** Return true if thread must quit. */
+    bool process_requests();
+
+    void loop();
+    static __RML_DECL_THREAD_ROUTINE thread_routine( void* arg ); 
+public:
+    thread_state_t read_state() const {
+        thread_state_rep_t s = state;
+        __TBB_ASSERT( unsigned(s)<=unsigned(ts_done), "corrupted server thread?" );
+        return thread_state_t(s);
+    }
+
+    //! Current stack size of the thread.  
+    size_t stack_size;
+    mailbox requests;
+
+    omp_dispatch_type omp_dispatch;
+
+    server_thread();
+    ~server_thread();
+
+    //! Launch a thread that is bound to *this.
+    void launch( size_t stack_size );
+
+    //! 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 );
+
+    //! Attempt to enslave a thread for OpenMP/TBB.
+    bool try_grab_for( thread_state_t s );
+};
+
+//! Bag of threads that are private to a client.
+class private_thread_bag {
+    struct list_thread: server_thread {
+       list_thread* next;
+    };
+    //! Root of atomic linked list of list_thread
+    /** ABA problem is avoided because items are only atomically pushed, never popped. */
+    tbb::atomic<list_thread*> my_root; 
+    tbb::cache_aligned_allocator<padded<list_thread> > my_allocator; 
+public:
+    //! Construct empty bag
+    private_thread_bag() {my_root=NULL;}
+
+    //! Create a fresh server_thread object.
+    server_thread& add_one_thread() {
+        list_thread* t = my_allocator.allocate(1);
+        new( t ) list_thread;
+        // Atomically add to list
+        list_thread* old_root;
+        do {
+            old_root = my_root;
+            t->next = old_root;
+        } while( my_root.compare_and_swap( t, old_root )!=old_root );
+        return *t;  
+    }
+
+    //! Destroy the bag and threads in it. 
+    ~private_thread_bag() {
+        while( my_root ) {
+            // Unlink thread from list.
+            list_thread* t = my_root;
+            my_root = t->next;
+            // Destroy and deallocate the thread.
+            t->~list_thread();
+            my_allocator.deallocate(static_cast<padded<list_thread>*>(t),1);    
+        }
+    }
+};
+
+//! Forward declaration
+void wakeup_some_tbb_threads();
+
+//! Type-independent part of class generic_connection. *
+/** One to one map from server threads to jobs, and associated reference counting. */
+class thread_map : public thread_map_base {
+public:
+    typedef rml::client::size_type size_type;
+
+    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;
+    }
+    ~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 assist_cleanup( bool assist_null_only );
+
+    /** Returns number of unrealized threads to create. */
+    size_type wakeup_tbb_threads( size_type n );
+    bool wakeup_next_thread( iterator i, tbb_connection_v1& conn );
+    void release_tbb_threads( server_thread* t );
+    void adjust_balance( int delta );
+
+    //! Add a server_thread object to the map, but do not bind it.
+    /** 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 remove_client_ref();
+    int add_server_ref() {return my_server_ref_count.add_ref();}
+    int remove_server_ref() {return my_server_ref_count.remove_ref();}
+
+    ::rml::client& client() const {return my_client;}
+
+    size_type get_unrealized_threads() { return my_unrealized_threads; }
+
+private:
+    private_thread_bag my_private_threads;
+    bool all_visited_at_least_once;
+    array_type my_array;
+    size_t my_min_stack_size;
+    tbb::atomic<size_type> my_unrealized_threads;
+
+    //! Number of threads referencing *this, plus one extra.
+    /** When it becomes zero, the containing server object can be safely deleted. */
+    ref_count my_server_ref_count;
+
+    //! Number of jobs that need cleanup, plus one extra.
+    /** When it becomes zero, acknowledge_close_connection is called. */
+    ref_count my_client_ref_count;
+    ::rml::client& my_client;
+    //! Counter owned by factory that produced this thread_map.
+    wait_counter& my_factory_counter;
+};
+
+void thread_map::bind_one_thread( rml::server& server, message_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();
+    my_client_ref_count.add_ref();
+#if TBB_USE_ASSERT
+    __TBB_ASSERT( t.add_ref()==1, NULL );
+#else
+    t.add_ref();
+#endif
+    // Have responsibility to start the thread.
+    t.requests.push( message( initialize, &server, &x.my_automaton ) );
+    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 );
+}
+
+thread_map::value_type* thread_map::add_one_thread( bool is_omp_thread_ ) {
+    size_type u;
+    do {
+        u = my_unrealized_threads;
+        if( !u ) return NULL;
+    } 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( t.state!=ts_tbb_busy, NULL );
+    if( !t.is_omp_thread )
+        t.tbb_state = ts_created;
+    iterator i = t.my_map_pos = my_array.grow_by(1);
+    value_type& v = *i;
+    v.my_thread = &t;
+    return &v;
+}
+
+void thread_map::bind( /* rml::server& server, message_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 ) {
+    // Ask each server_thread to cleanup its job for this server.
+    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 );
+    }
+    // Remove extra ref to client.
+    remove_client_ref();
+}
+
+void thread_map::assist_cleanup( bool assist_null_only ) {
+    // To avoid deadlock, the current thread *must* help out with cleanups that have not started,
+    // becausd the thread that created the job may be busy for a long time.
+    for( iterator i = begin(); i!=end(); ++i ) {
+        rml::job* j=0;
+        job_automaton& ja = i->my_automaton;
+        if( assist_null_only ? ja.try_plug_null() : ja.try_plug(j) ) {
+            if( j ) {
+                my_client.cleanup(*j);
+            } else {
+                // server thread did not get a chance to create a job.
+            }
+            remove_client_ref();
+        } 
+    }
+}
+
+thread_map::size_type thread_map::wakeup_tbb_threads( size_type n ) {
+    __TBB_ASSERT(n>0,"must specify positive number of threads to wake up");
+    iterator e = end();
+    for( iterator k=begin(); k!=e; ++k ) {
+        // If another thread added *k, there is a tiny timing window where thread() is invalid.
+        server_thread& t = k->wait_for_thread();
+        if( t.tbb_state==ts_created || t.read_state()==ts_tbb_busy )
+            continue;
+        if( --the_balance>=0 ) { // try to withdraw a coin from the deposit
+            while( !t.try_grab_for( ts_tbb_busy ) ) {
+                if( t.read_state()==ts_tbb_busy ) {
+                    // we lost; move on to the next.
+                    ++the_balance;
+                    goto skip;
+                }
+            }
+            if( --n==0 ) 
+                return 0;
+        } else {
+            // overdraft.
+            ++the_balance;
+            break;
+        }
+skip:
+        ;
+    }
+    return n<my_unrealized_threads ? n : my_unrealized_threads;
+}
+
+void thread_map::remove_client_ref() {
+    int k = my_client_ref_count.remove_ref();
+    if( k==0 ) {
+        // Notify factory that thread has crossed back into RML.
+        --my_factory_counter;
+        // Notify client that RML is done with the client object.
+        my_client.acknowledge_close_connection();
+    } 
+}
+
+//------------------------------------------------------------------------
+// generic_connection
+//------------------------------------------------------------------------
+
+template<typename Server, typename Client>
+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;
+    }
+
+protected:
+    thread_map my_thread_map;
+
+    void do_open() {
+        my_thread_map.bind( /* *this, connection_traits<Server,Client>::initialize */ );
+    }
+    
+    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();
+    }
+};
+
+//------------------------------------------------------------------------
+// TBB server
+//------------------------------------------------------------------------
+
+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 bool assist_null_only = true;
+    static const bool is_tbb = true;
+};
+
+//! Represents a server and client binding.
+/** 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;
+#endif /* TBB_USE_ASSERT */
+
+    // pad these? or use a single variable w/ atomic add/subtract?
+    tbb::atomic<int> n_adjust_job_count_requests;
+
+    ~tbb_connection_v1();
+
+public:
+    enum tbb_conn_t {
+        c_empty  =  0,
+        c_init   = -1,
+        c_locked = -2
+    };
+
+    //! True if there is slack that try_process can use.
+    bool has_slack() const {
+        return my_slack>0;
+    }
+
+    bool try_process( job& job ) {
+        bool visited = false;
+        // No check for my_slack>0 here because caller is expected to do that check.
+        int k = --my_slack;
+        if( k>=0 ) {
+            client().process(job);
+            visited = true;
+        }
+        ++my_slack; 
+        return visited;
+    }
+
+    tbb_connection_v1( wait_counter& fc, tbb_client& client ) : generic_connection<tbb_server,tbb_client>(fc,client) {
+        my_slack = 0;
+#if TBB_USE_ASSERT
+        my_job_count_estimate = 0;
+#endif /* TBB_USE_ASSERT */
+        __TBB_ASSERT( !my_slack, NULL );
+        do_open();
+        __TBB_ASSERT( this_tbb_connection==reinterpret_cast<tbb_connection_v1*>(tbb_connection_v1::c_init), NULL );
+        n_adjust_job_count_requests = 0;
+        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();
+    }
+};
+
+/* to deal with cases where the machine is oversubscribed; we want each thread to trip to try_process() at least once */
+/* this should not involve computing the_balance */
+bool thread_map::wakeup_next_thread( thread_map::iterator this_thr, tbb_connection_v1& conn ) {
+    if( all_visited_at_least_once ) 
+        return false;
+
+    iterator e = end();
+
+retry:
+    bool exist = false;
+    iterator k=this_thr; 
+    for( ++k; k!=e; ++k ) {
+        // If another thread added *k, there is a tiny timing window where thread() is invalid.
+        server_thread& t = k->wait_for_thread();
+        if( t.tbb_state!=ts_visited )
+            exist = true;
+        if( t.read_state()!=ts_tbb_busy && t.tbb_state==ts_started )
+            if( t.try_grab_for( ts_tbb_busy ) )
+                return true;
+    }
+    for( k=begin(); k!=this_thr; ++k ) {
+        server_thread& t = k->wait_for_thread();
+        if( t.tbb_state!=ts_visited )
+            exist = true;
+        if( t.read_state()!=ts_tbb_busy && t.tbb_state==ts_started )
+            if( t.try_grab_for( ts_tbb_busy ) )
+                return true;
+    }
+
+    if( exist ) 
+        if( conn.has_slack() )
+            goto retry;
+    else 
+        all_visited_at_least_once = true;
+
+    return false;
+}
+
+void thread_map::release_tbb_threads( server_thread* t ) {
+    for( ; t; t = t->link ) {
+        while( t->read_state()!=ts_asleep )
+            __TBB_Yield();
+        t->tbb_state = ts_started;
+    }
+}
+
+void thread_map::adjust_balance( int delta ) {
+    int new_balance = the_balance += delta;
+    if( new_balance>0 && 0>=new_balance-delta /*== old the_balance*/ )
+        wakeup_some_tbb_threads();
+}
+
+//------------------------------------------------------------------------
+// OpenMP server
+//------------------------------------------------------------------------
+
+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 bool assist_null_only = false;
+    static const bool is_tbb = false;
+};
+
+class omp_connection_v1: public generic_connection<omp_server,omp_client> {
+    /*override*/ int current_balance() const {return the_balance;}
+    /*override*/ int try_increase_load( size_type n, bool strict ); 
+    /*override*/ void decrease_load( size_type n ); 
+    /*override*/ void get_threads( size_type request_size, void* cookie, job* array[] );
+public:
+#if TBB_USE_ASSERT
+    //! Net change in delta caused by this connection.
+    /** Should be zero when connection is broken */
+    tbb::atomic<int> net_delta;
+#endif /* TBB_USE_ASSERT */
+
+    omp_connection_v1( wait_counter& fc, omp_client& client ) : generic_connection<omp_server,omp_client>(fc,client) {
+#if TBB_USE_ASSERT
+        net_delta = 0;
+#endif /* TBB_USE_ASSERT */
+        do_open();
+    }
+    ~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)
+// Suppress "conditional expression is constant" warning.
+#pragma warning( push )
+#pragma warning( disable: 4127 ) 
+#endif          
+    if( connection_traits<Server,Client>::is_tbb ) {
+        __TBB_ASSERT( this_tbb_connection==reinterpret_cast<tbb_connection_v1*>(this), NULL );
+        tbb_connection_v1* conn;
+        do {
+            while( (conn=this_tbb_connection)==reinterpret_cast<tbb_connection_v1*>(tbb_connection_v1::c_locked) )
+                __TBB_Yield();
+        } while  ( this_tbb_connection.compare_and_swap(0, conn)!=conn );
+    }
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+#pragma warning( pop )
+#endif
+    my_thread_map.unbind( *this, connection_traits<Server,Client>::terminate );
+    my_thread_map.assist_cleanup( connection_traits<Server,Client>::assist_null_only );
+    // Remove extra reference
+    remove_server_ref();
+}
+
+tbb_connection_v1::~tbb_connection_v1() {
+#if TBB_USE_ASSERT
+    if( my_job_count_estimate!=0 ) {
+        fprintf(stderr, "TBB client tried to disconnect with non-zero net job count estimate of %d\n", int(my_job_count_estimate ));
+        abort();
+    }
+    __TBB_ASSERT( !my_slack, "attempt to destroy tbb_server with nonzero slack" );
+    __TBB_ASSERT( this!=this_tbb_connection, "request_close_connection() must be called" );
+#endif /* TBB_USE_ASSERT */
+    // if the next connection has unstarted threads, start one of them.
+    wakeup_some_tbb_threads();
+}
+
+void tbb_connection_v1::adjust_job_count_estimate( int delta ) {
+#if TBB_USE_ASSERT
+    my_job_count_estimate += delta;
+#endif /* TBB_USE_ASSERT */
+    // Atomically update slack.
+    int c = my_slack+=delta;
+    if( c>0 ) {
+        ++n_adjust_job_count_requests;
+        // The client has work to do and there are threads available
+        thread_map::size_type n = my_thread_map.wakeup_tbb_threads(c); 
+
+        server_thread* new_threads_anchor = NULL;
+        thread_map::size_type i;
+        for( i=0; i<n; ++i ) {
+            // Obtain unrealized threads
+            thread_map::value_type* k = my_thread_map.add_one_thread( false );
+            if( !k ) 
+                // No unrealized threads left.
+                break;
+            // eagerly start the thread off.
+            my_thread_map.bind_one_thread( *this, mk_initialize_tbb_job, *k );
+            server_thread& t = k->thread();
+            __TBB_ASSERT( !t.link, NULL );
+            t.link = new_threads_anchor;
+            new_threads_anchor = &t;
+        }
+
+        thread_map::size_type j=0; 
+        for( ; the_balance>0 && j<i; ++j ) {
+            if( --the_balance>=0 ) {
+                // withdraw a coin from the bank
+                __TBB_ASSERT( new_threads_anchor, NULL );
+
+                server_thread* t = new_threads_anchor;
+                new_threads_anchor = t->link;
+                while( !t->try_grab_for( ts_tbb_busy ) ) 
+                    __TBB_Yield();
+                t->tbb_state = ts_started;
+            } else {
+                // overdraft. return it to the bank
+                ++the_balance;
+                break;
+            }
+        }
+        __TBB_ASSERT( i-j!=0||new_threads_anchor==NULL, NULL );
+        // mark the ones that did not get started as eligible for being snatched.
+        if( new_threads_anchor )
+            my_thread_map.release_tbb_threads( new_threads_anchor );
+
+        --n_adjust_job_count_requests;
+    }
+}
+
+//! wake some available tbb threads
+/**
+     First, atomically grab the connection, then increase the server ref count to keep it from being released prematurely.
+     Second, check if the balance is available for TBB and the tbb conneciton has slack to exploit.
+     If the answer is true, go ahead and try to wake some up.
+ */
+void wakeup_some_tbb_threads()
+{
+    for( ;; ) {
+        tbb_connection_v1* conn = this_tbb_connection;
+        /*
+            if( conn==0 or conn==tbb_connection_v1::c_init )
+                the next connection will see my last change to the deposit; do nothing
+            if( conn==tbb_connection_v1::c_locked )
+                a thread is already in the region A-B below. 
+                it will read the change made by threads of my connection to the_balance;
+                do nothing
+
+            0==c_empty, -1==c_init, -2==c_locked
+        */
+        if( ((-ptrdiff_t(conn))&~3 )==0 )
+            return;
+
+        // FIXME: place the_balance next to tbb_this_connection ? to save some cache moves ?
+        /* region A: this is the only place to set this_tbb_connection to c_locked */
+        tbb_connection_v1* old_ttc = this_tbb_connection.compare_and_swap( reinterpret_cast<tbb_connection_v1*>(tbb_connection_v1::c_locked), conn );
+        if( old_ttc==conn ) {
+#if USE_TBB_ASSERT
+            __TBB_ASSERT( conn->add_server_ref()>1, NULL );
+#else
+            conn->add_server_ref();
+#endif
+            /* region B: this is the only place to restore this_tbb_connection from c_locked */
+            this_tbb_connection = conn; // restoring it means releasing it
+
+            /* some threads are creating tbb server threads; they may not see my changes made to the_balance */
+            while( conn->n_adjust_job_count_requests>0 )
+                __TBB_Yield();
+
+            int bal = the_balance;
+            if( bal>0 && conn->has_slack() ) 
+                conn->wakeup_tbb_threads( bal );
+            conn->remove_server_ref();
+            break;
+        } else if( ((-ptrdiff_t(old_ttc))&~3)==0 ) {
+            return; /* see above */
+        } else {
+            __TBB_Yield();
+        }
+    }
+}
+
+int omp_connection_v1::try_increase_load( size_type n, bool strict ) { 
+    __TBB_ASSERT(int(n)>=0,NULL);
+    if( strict ) {
+        the_balance-=int(n);
+    } else {
+        int avail, old;
+        do {
+            avail = the_balance;
+            if( avail<=0 ) {
+                // No atomic read-write-modify operation necessary.
+                return avail;
+            }
+            // don't read the_balance; if it changes, compare_and_swap will fail anyway.
+            old = the_balance.compare_and_swap( int(n)<avail ? avail-n : 0, avail );
+        } while( old!=avail );
+        if( int(n)>avail ) 
+            n=avail;
+    }
+#if TBB_USE_ASSERT
+    net_delta += n;
+#endif /* TBB_USE_ASSERT */
+    return n;
+}
+
+void omp_connection_v1::decrease_load( size_type n ) {
+    __TBB_ASSERT(int(n)>=0,NULL);
+    my_thread_map.adjust_balance(int(n));
+#if TBB_USE_ASSERT
+    net_delta -= n;
+#endif /* TBB_USE_ASSERT */
+}
+
+void omp_connection_v1::get_threads( size_type request_size, void* cookie, job* array[] ) {
+
+    if( !request_size ) 
+        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();
+        // FIXME - this search is going to be *very* slow when there is a large number of threads and most are in use.
+        // Consider starting search at random point, or high water mark of sorts.
+        for( thread_map::iterator k=my_thread_map.begin(); k!=k_end; ++k ) {
+            // If another thread added *k, there is a tiny timing window where thread() is invalid.
+            server_thread& t = k->wait_for_thread();
+            if( t.try_grab_for( ts_omp_busy ) ) {
+                // The preincrement instead of post-increment of index is deliberate.
+                job& j = k->wait_for_job();
+                    array[index] = &j;
+                t.omp_dispatch.produce( client(), j, cookie, index PRODUCE_ARG(*this) );
+                if( ++index==request_size ) 
+                    return;
+            } 
+        }
+        // Need to allocate more threads
+        for( unsigned i=index; i<request_size; ++i ) {
+            __TBB_ASSERT( index<request_size, NULL );
+            thread_map::value_type* k = my_thread_map.add_one_thread( true );
+            if( !k ) {
+                // Client erred
+                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 );
+            server_thread& t = k->thread();
+            if( t.try_grab_for( ts_omp_busy ) ) {
+                job& j = k->wait_for_job();
+                array[index] = &j;
+                // The preincrement instead of post-increment of index is deliberate.
+                t.omp_dispatch.produce( client(), j, cookie, index PRODUCE_ARG(*this) );
+                if( ++index==request_size ) 
+                    return;
+            } // else someone else snatched it.
+        }
+    }
+}
+
+//------------------------------------------------------------------------
+// Methods of omp_dispatch_type
+//------------------------------------------------------------------------
+void omp_dispatch_type::consume() {
+    job_type* j; 
+    // Wait for short window between when master sets state of this thread to ts_omp_busy
+    // and master thread calls produce.
+    // FIXME - this is a very short spin while the producer is setting fields of *this, 
+    // but nonetheless the loop should probably use exponential backoff, or at least pause instructions.
+    do {
+        j = job;
+    } while( !j );
+    job = static_cast<job_type*>(NULL);
+    client->process(*j,cookie,index);
+#if TBB_USE_ASSERT
+    // Return of method process implies "decrease_load" from client's viewpoint, even though
+    // the actual adjustment of the_balance only happens when this thread really goes to sleep.
+    --server->net_delta;
+#endif /* TBB_USE_ASSERT */
+}
+
+//------------------------------------------------------------------------
+// Methods of server_thread
+//------------------------------------------------------------------------
+
+server_thread::server_thread() : 
+    ref_count(0),
+    link(NULL), // FIXME: remove when all fixes are done.
+    my_map_pos(),
+    stack_size(0) 
+{
+    state = ts_idle;
+#if TBB_USE_ASSERT
+    has_active_thread = false;
+#endif /* TBB_USE_ASSERT */
+}
+
+server_thread::~server_thread() {
+    __TBB_ASSERT( !has_active_thread, NULL );
+}
+
+__RML_DECL_THREAD_ROUTINE server_thread::thread_routine( void* arg ) {
+    server_thread* self = static_cast<server_thread*>(arg);
+#if TBB_USE_ASSERT
+    __TBB_ASSERT( !self->has_active_thread, NULL );
+    self->has_active_thread = true;
+#endif /* TBB_USE_ASSERT */
+    self->loop();
+    return NULL;
+}
+
+void server_thread::launch( size_t stack_size ) {
+    this->stack_size = stack_size;
+    thread_monitor::launch( thread_routine, this, stack_size );
+}
+
+void server_thread::sleep_perhaps( thread_state_t asleep ) {
+    __TBB_ASSERT( asleep==ts_asleep, NULL );
+    thread_monitor::cookie c; 
+    monitor.prepare_wait(c);
+    if( state.compare_and_swap( asleep, ts_idle )==ts_idle ) {
+        if( requests.empty() ) {
+            monitor.commit_wait(c);
+            // Someone else woke me up.  The compare_and_swap further below deals with spurious wakeups.
+        } else {
+            monitor.cancel_wait();
+        }
+        // Following compare-and-swap logic tries to transition from asleep to idle while both ignoring the
+        // preserving the reserved_flag bit in state, because some other thread may be asynchronously clearing
+        // the reserved_flag bit within state.
+        thread_state_t s = read_state();
+        if( s==ts_asleep ) {
+            state.compare_and_swap( ts_idle, ts_asleep );
+            // I woke myself up, either because I cancelled the wait or suffered a spurious wakeup.
+        } else {
+            // Someone else woke me up; there the_balance is decremented by 1. -- tbb only
+            if( !is_omp_thread ) {
+                __TBB_ASSERT( state==ts_tbb_busy||state==ts_idle, NULL );
+            }
+        }
+    } else {
+        // someone else made it busy ; see try_grab_for when state==ts_idle.
+        __TBB_ASSERT( state==ts_omp_busy||state==ts_tbb_busy, NULL );
+        monitor.cancel_wait();
+    }
+    __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 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;
+        }
+    } 
+    return success;
+}
+
+//! Attempt to change a thread's state to ts_omp_busy, and waking it up if necessary. 
+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 );
+            break;
+        case ts_idle:
+            success = state.compare_and_swap( target_state, ts_idle )==ts_idle;
+            break;
+        default:
+            // Thread is not available to be part of an OpenMP thread team.
+            break;
+    }
+    return success;
+}
+
+template<typename Ring>
+inline bool server_thread::destroy_job( Ring& ring, typename Ring::connection_type& 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 ) {
+        __TBB_ASSERT( state==ts_idle||state==ts_tbb_busy, NULL );
+        if( state==ts_idle )
+            state.compare_and_swap( ts_done, ts_idle );
+        // 'state' may be set to ts_tbb_busy by another thread..
+
+        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;
+        }
+    }
+    if( job_automaton* ja = ring.erase( c ) ) {
+        rml::job* j;
+        if( ja->try_plug(j) ) {
+            __TBB_ASSERT( j, NULL );
+            c.client().cleanup(*j);
+            c.remove_client_ref();
+        } else {
+            // Some other thread took responsibility for cleaning up the job.
+        }
+    }
+    //! Must do remove client reference first, because execution of c.remove_ref() can cause *this to be destroyed.
+#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" );
+    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 );
+                break;
+            
+            case mk_initialize_omp_job: 
+                make_job( *static_cast<omp_connection_v1*>(m.connection), omp_ring, *this, *m.automaton );
+                break;
+
+            case mk_terminate_tbb_job:
+                if( destroy_job( tbb_ring, *static_cast<tbb_connection_v1*>(m.connection) ) )
+                    return true;
+                break; 
+
+            case mk_terminate_omp_job:
+                if( destroy_job( omp_ring, *static_cast<omp_connection_v1*>(m.connection) ) )
+                    return true;
+                break; 
+         }
+    } while( !requests.empty() );
+    return false;
+}
+
+//! Loop that each thread executes
+void server_thread::loop() {
+    for(;;) {
+        __TBB_Yield();
+        if( state==ts_idle )
+            sleep_perhaps( ts_asleep );   
+
+        // Drain mailbox before reading the state.
+        if( !requests.empty() ) 
+            if( process_requests() )
+                return;     
+             
+        // read the state after draining the mail box
+        thread_state_t s = read_state();
+        __TBB_ASSERT( s==ts_idle||s==ts_omp_busy||s==ts_tbb_busy, NULL );
+
+        if( s==ts_omp_busy ) {
+            // Enslaved by OpenMP team.  
+            omp_dispatch.consume();
+            /* here wake a tbb thread up if feasible */
+            int bal = ++the_balance;
+            if( bal>0 )
+                wakeup_some_tbb_threads();
+            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();
+            // give openmp higher priority
+            bool has_coin = true;
+            while( has_coin && conn.has_slack() && the_balance>=0 ) {
+                if( conn.try_process(item->job()) ) {
+                    tbb_state = ts_visited;
+                    if( conn.has_slack() && the_balance>=0 )
+                        has_coin = !conn.wakeup_next_thread( my_map_pos );
+                }
+            }
+            state = ts_idle;
+            if( has_coin ) {
+                ++the_balance; // return the coin back to the deposit
+                if( conn.has_slack() ) { // a new adjust_job_request_estimate() is in progress
+                                         // it may have missed my changes to state and/or the_balance
+                    int bal = --the_balance; // try to grab the coin back
+                    if( bal>=0 ) { // I got the coin
+                        if( state.compare_and_swap( ts_tbb_busy, ts_idle )!=ts_idle )
+                            ++the_balance; // someone else enlisted me.
+                    } else {
+                        // overdraft. return the coin
+                        ++the_balance;
+                    }
+                } // else the new request will see my changes to state & the_balance.
+            }
+        }
+    }
+}
+
+template<typename Connection, typename Server, typename Client>
+static factory::status_type connect( factory& f, Server*& server, Client& client ) {
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+// Suppress "conditional expression is constant" warning.
+#pragma warning( push )
+#pragma warning( disable: 4127 ) 
+#endif          
+    if( connection_traits<Server,Client>::is_tbb )
+        if( this_tbb_connection.compare_and_swap(reinterpret_cast<tbb_connection_v1*>(-1), reinterpret_cast<tbb_connection_v1*>(0))!=0 )
+            return factory::st_connection_exists;
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+#pragma warning( pop )
+#endif
+    server = new Connection(*static_cast<wait_counter*>(f.scratch_ptr),client);
+    return factory::st_success; 
+}
+
+extern "C" factory::status_type __RML_open_factory( factory& f, version_type& server_version, version_type client_version ) {
+    // Hack to keep this library from being closed by causing the first client's dlopen to not have a corresponding dlclose. 
+    // This code will be removed once we figure out how to do shutdown of the RML perfectly.
+    static tbb::atomic<bool> one_time_flag;
+    if( one_time_flag.compare_and_swap(true,false)==false) {
+        f.library_handle = NULL;
+    }
+    // End of hack
+
+    // initialize the_balance only once
+    if( the_balance_inited==0 ) {
+        if( the_balance_inited.compare_and_swap( 1, 0 )==0 ) {
+            the_balance = hardware_concurrency()-1;
+            the_balance_inited = 2;
+        } else {
+            tbb::internal::spin_wait_until_eq( the_balance_inited, 2 );
+        }
+    }
+
+    server_version = SERVER_VERSION;
+    f.scratch_ptr = 0;
+    if( client_version==0 ) {
+        return factory::st_incompatible;
+    } else {
+        f.scratch_ptr = new wait_counter;
+        return factory::st_success;
+    }
+}
+
+extern "C" void __RML_close_factory( factory& f ) {
+    if( wait_counter* fc = static_cast<wait_counter*>(f.scratch_ptr) ) {
+        f.scratch_ptr = 0;
+        fc->wait();
+        delete fc;
+    }
+}
+
+void call_with_build_date_str( ::rml::server_info_callback_t cb, void* arg );
+
+}} // rml::internal 
+
+namespace tbb {
+namespace internal {
+namespace rml {
+
+extern "C" tbb_factory::status_type __TBB_make_rml_server( tbb_factory& f, tbb_server*& server, tbb_client& client ) {
+    return ::rml::internal::connect< ::rml::internal::tbb_connection_v1>(f,server,client);
+}
+
+extern "C" void __TBB_call_with_my_server_info( ::rml::server_info_callback_t cb, void* arg ) {
+    return ::rml::internal::call_with_build_date_str( cb, arg );
+}
+
+}}}
+
+namespace __kmp {
+namespace rml {
+
+extern "C" omp_factory::status_type __KMP_make_rml_server( omp_factory& f, omp_server*& server, omp_client& client ) {
+    return ::rml::internal::connect< ::rml::internal::omp_connection_v1>(f,server,client);
+}
+
+extern "C" void __KMP_call_with_my_server_info( ::rml::server_info_callback_t cb, void* arg ) {
+    return ::rml::internal::call_with_build_date_str( cb, arg );
+}
+
+}}
+
+/*
+ * RML server info
+ */
+#include "version_string.tmp"
+
+#ifndef __TBB_VERSION_STRINGS
+#pragma message("Warning: version_string.tmp isn't generated properly by version_info.sh script!")
+#endif
+
+// We pass the build time as the RML server info.  TBB is required to build RML, so we make it the same as the TBB build time.
+#ifndef __TBB_DATETIME
+#define __TBB_DATETIME __DATE__ " " __TIME__
+#endif
+#define RML_SERVER_INFO "Intel(R) RML library built: " __TBB_DATETIME
+
+namespace rml {
+namespace internal {
+void call_with_build_date_str( ::rml::server_info_callback_t cb, void* arg )
+{
+    (*cb)( arg, RML_SERVER_INFO );
+}
+}} // rml::internal 
diff --git a/src/rml/server/thread_monitor.h b/src/rml/server/thread_monitor.h
new file mode 100644
index 0000000..19cc7e0
--- /dev/null
+++ b/src/rml/server/thread_monitor.h
@@ -0,0 +1,224 @@
+/*
+    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.
+*/
+
+// All platform-specific threading support is encapsulated here. */
+ 
+#ifndef __RML_thread_monitor_H
+#define __RML_thread_monitor_H
+
+#if USE_WINTHREAD
+#include <windows.h>
+#include <process.h>
+#elif USE_PTHREAD
+#include <pthread.h>
+#include <string.h>
+#include <stdlib.h>
+#else
+#error Unsupported platform
+#endif 
+#include <stdio.h>
+
+// All platform-specific threading support is in this header.
+
+namespace rml {
+
+namespace internal {
+
+//! Monitor with limited two-phase commit form of wait.  
+/** At most one thread should wait on an instance at a time. */
+class thread_monitor {
+public:
+    class cookie {
+        friend class thread_monitor;
+        unsigned long long my_version;
+    };
+    thread_monitor();
+    ~thread_monitor();
+
+    //! If a thread is waiting or started a two-phase wait, notify it.
+    /** Can be called by any thread. */
+    void notify();
+
+    //! Begin two-phase wait.
+    /** Should only be called by thread that owns the monitor. 
+        The caller must either complete the wait or cancel it. */
+    void prepare_wait( cookie& c );
+
+    //! Complete a two-phase wait and wait until notification occurs after the earlier prepare_wait.
+    void commit_wait( cookie& c );
+
+    //! Cancel a two-phase wait.
+    void cancel_wait();
+
+#if USE_WINTHREAD
+#define __RML_DECL_THREAD_ROUTINE unsigned WINAPI
+    typedef unsigned (WINAPI *thread_routine_type)(void*);
+#endif /* USE_WINTHREAD */
+
+#if USE_PTHREAD
+#define __RML_DECL_THREAD_ROUTINE void*
+    typedef void*(*thread_routine_type)(void*);
+#endif /* USE_PTHREAD */
+
+    //! Launch a thread
+    static void launch( thread_routine_type thread_routine, void* arg, size_t stack_size );
+    static void yield();
+
+private:
+    cookie my_cookie;
+#if USE_WINTHREAD
+    CRITICAL_SECTION critical_section;
+    HANDLE event;
+#endif /* USE_WINTHREAD */
+#if USE_PTHREAD
+    pthread_mutex_t my_mutex;
+    pthread_cond_t my_cond;
+    static void check( int error_code, const char* routine );
+#endif /* USE_PTHREAD */
+};
+
+
+#if USE_WINTHREAD
+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 );
+    if( status==0 ) {
+        fprintf(stderr,"thread_monitor::launch: _beginthreadex failed\n");
+        exit(1); 
+    } else {
+        CloseHandle((HANDLE)status);
+    }
+}
+
+inline void thread_monitor::yield() {
+    SwitchToThread();
+}
+
+inline thread_monitor::thread_monitor() {
+    event = CreateEvent( NULL, /*manualReset=*/true, /*initialState=*/false, NULL );
+    InitializeCriticalSection( &critical_section );
+    my_cookie.my_version = 0;
+}
+
+inline thread_monitor::~thread_monitor() {
+    CloseHandle( event );
+    DeleteCriticalSection( &critical_section );
+}
+     
+inline void thread_monitor::notify() {
+    EnterCriticalSection( &critical_section );
+    ++my_cookie.my_version;
+    SetEvent( event );
+    LeaveCriticalSection( &critical_section );
+}
+
+inline void thread_monitor::prepare_wait( cookie& c ) {
+    EnterCriticalSection( &critical_section );
+    c = my_cookie;
+}
+
+inline void thread_monitor::commit_wait( cookie& c ) {
+    ResetEvent( event );
+    LeaveCriticalSection( &critical_section );
+    while( my_cookie.my_version==c.my_version ) {
+        WaitForSingleObject( event, INFINITE );
+        ResetEvent( event );
+    }
+}
+
+inline void thread_monitor::cancel_wait() {
+    LeaveCriticalSection( &critical_section );
+}
+#endif /* USE_WINTHREAD */
+
+#if USE_PTHREAD
+inline void thread_monitor::check( int error_code, const char* routine ) {
+    if( error_code ) {
+        fprintf(stderr,"thread_monitor %s\n", strerror(error_code) );
+        exit(1);
+    }
+}
+
+inline void thread_monitor::launch( void* (*thread_routine)(void*), void* arg, size_t stack_size ) {
+    // FIXME - consider more graceful recovery than just exiting if a thread cannot be launched.
+    // Note that there are some tricky situations to deal with, such that the thread is already 
+    // grabbed as part of an OpenMP team, or is being launched as a replacement for a thread with
+    // too small a stack.
+    pthread_attr_t s;
+    check(pthread_attr_init( &s ), "pthread_attr_init");
+    if( stack_size>0 ) {
+        check(pthread_attr_setstacksize( &s, stack_size ),"pthread_attr_setstack_size");
+    }
+    pthread_t handle;
+    check( pthread_create( &handle, &s, thread_routine, arg ), "pthread_create" );
+    check( pthread_detach( handle ), "pthread_detach" );
+}
+
+inline void thread_monitor::yield() {
+    sched_yield();
+}
+
+inline thread_monitor::thread_monitor() {
+    check( pthread_mutex_init(&my_mutex,NULL), "pthread_mutex_init" );
+    check( pthread_cond_init(&my_cond,NULL), "pthread_cond_init" );
+    my_cookie.my_version = 0;
+}
+
+inline thread_monitor::~thread_monitor() {
+    pthread_cond_destroy(&my_cond);
+    pthread_mutex_destroy(&my_mutex);
+}
+
+inline void thread_monitor::notify() {
+    check( pthread_mutex_lock( &my_mutex ), "pthread_mutex_lock" );
+    ++my_cookie.my_version;
+    check( pthread_mutex_unlock( &my_mutex ), "pthread_mutex_unlock" );
+    check( pthread_cond_signal(&my_cond), "pthread_cond_signal" );
+}
+
+inline void thread_monitor::prepare_wait( cookie& c ) {
+    check( pthread_mutex_lock( &my_mutex ), "pthread_mutex_lock" );
+    c = my_cookie;
+}
+
+inline void thread_monitor::commit_wait( cookie& c ) {
+    while( my_cookie.my_version==c.my_version ) {
+        pthread_cond_wait( &my_cond, &my_mutex );
+    }
+    check( pthread_mutex_unlock( &my_mutex ), "pthread_mutex_unlock" );
+}
+
+inline void thread_monitor::cancel_wait() {
+    check( pthread_mutex_unlock( &my_mutex ), "pthread_mutex_unlock" );
+}
+#endif /* USE_PTHREAD */
+
+} // namespace internal
+} // namespace rml
+
+#endif /* __RML_thread_monitor_H */
diff --git a/src/tbb/concurrent_hash_map.cpp b/src/rml/server/wait_counter.h
similarity index 53%
copy from src/tbb/concurrent_hash_map.cpp
copy to src/rml/server/wait_counter.h
index 4d476c6..0951f97 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/src/rml/server/wait_counter.h
@@ -26,20 +26,56 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#ifndef __RML_wait_counter_H
+#define __RML_wait_counter_H
 
-namespace tbb {
+#include "thread_monitor.h"
+#include "tbb/atomic.h"
 
+namespace rml {
 namespace internal {
 
-bool hash_map_segment_base::internal_grow_predicate() const {
-    // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the 
-    // library so that Intel(R) Thread Checker will ignore them.  The reads are used in a double-check
-    // context, so the program is nonetheless correct despite the race.
-    return my_logical_size >= my_physical_size && my_physical_size < internal::hash_map_base::max_physical_size;
-}
+class wait_counter {
+    thread_monitor my_monitor;
+    tbb::atomic<int> my_count;
+    tbb::atomic<int> n_transients;
+public:
+    wait_counter() { 
+        // The "1" here is subtracted by the call to "wait".
+        my_count=1;
+        n_transients=0;
+    }
 
-} // namespace internal
+    //! Wait for number of operator-- invocations to match number of operator++ invocations.
+    /** Exactly one thread should call this method. */
+    void wait() {
+        int k = --my_count;
+        __TBB_ASSERT( k>=0, "counter underflow" );
+        if( k>0 ) {
+            thread_monitor::cookie c;
+            my_monitor.prepare_wait(c);
+            if( my_count )
+                my_monitor.commit_wait(c);
+            else 
+                my_monitor.cancel_wait();
+        }
+        while( n_transients>0 )
+            __TBB_Yield();
+    }
+    void operator++() {
+        ++my_count;
+    }
+    void operator--() {
+        ++n_transients;
+        int k = --my_count;
+        __TBB_ASSERT( k>=0, "counter underflow" );
+        if( k==0 ) 
+            my_monitor.notify();
+        --n_transients;
+    }
+};
 
-} // namespace tbb
+} // namespace internal
+} // namespace rml
 
+#endif /* __RML_wait_counter_H */
diff --git a/src/tbbmalloc/win32-tbbmalloc-export.def b/src/rml/server/win32-rml-export.def
similarity index 88%
copy from src/tbbmalloc/win32-tbbmalloc-export.def
copy to src/rml/server/win32-rml-export.def
index 3697e52..54be4b1 100644
--- a/src/tbbmalloc/win32-tbbmalloc-export.def
+++ b/src/rml/server/win32-rml-export.def
@@ -26,12 +26,10 @@
 
 EXPORTS
 
-; MemoryAllocator.cpp
-scalable_calloc
-scalable_free
-scalable_malloc
-scalable_realloc
-scalable_posix_memalign
-scalable_aligned_malloc
-scalable_aligned_realloc
-scalable_aligned_free
+__RML_open_factory
+__RML_close_factory
+__TBB_make_rml_server
+__KMP_make_rml_server
+__TBB_call_with_my_server_info
+__KMP_call_with_my_server_info
+
diff --git a/src/tbbmalloc/win32-tbbmalloc-export.def b/src/rml/server/win64-rml-export.def
similarity index 88%
copy from src/tbbmalloc/win32-tbbmalloc-export.def
copy to src/rml/server/win64-rml-export.def
index 3697e52..54be4b1 100644
--- a/src/tbbmalloc/win32-tbbmalloc-export.def
+++ b/src/rml/server/win64-rml-export.def
@@ -26,12 +26,10 @@
 
 EXPORTS
 
-; MemoryAllocator.cpp
-scalable_calloc
-scalable_free
-scalable_malloc
-scalable_realloc
-scalable_posix_memalign
-scalable_aligned_malloc
-scalable_aligned_realloc
-scalable_aligned_free
+__RML_open_factory
+__RML_close_factory
+__TBB_make_rml_server
+__KMP_make_rml_server
+__TBB_call_with_my_server_info
+__KMP_call_with_my_server_info
+
diff --git a/src/tbbmalloc/proxy.h b/src/rml/test/rml_omp_stub.cpp
similarity index 52%
copy from src/tbbmalloc/proxy.h
copy to src/rml/test/rml_omp_stub.cpp
index 15c25a9..d9d6ba4 100644
--- a/src/tbbmalloc/proxy.h
+++ b/src/rml/test/rml_omp_stub.cpp
@@ -26,31 +26,41 @@
     the GNU General Public License.
 */
 
-#ifndef _TBB_malloc_proxy_H_
-#define _TBB_malloc_proxy_H_
+// This file is compiled with C++, but linked with a program written in C.
+// The intent is to find dependencies on the C++ run-time.
 
-#if __linux__
-#define MALLOC_LD_PRELOAD 1
+#include <stdlib.h>
+#define RML_PURE_VIRTUAL_HANDLER abort
+
+#if _MSC_VER==1500 && !defined(__INTEL_COMPILER)
+// VS2008/VC9 seems to have an issue; 
+#pragma warning( push )
+#pragma warning( disable: 4100 ) 
+#endif          
+#include "rml_omp.h"
+#if _MSC_VER==1500 && !defined(__INTEL_COMPILER)
+#pragma warning( pop )
 #endif
 
-#include <stddef.h>
-
-extern "C" {
-    void * scalable_malloc(size_t size);
-    void * scalable_calloc(size_t nobj, size_t size);
-    void   scalable_free(void *object);
-    void * scalable_realloc(void* ptr, size_t size);
-    void * scalable_aligned_malloc(size_t size, size_t alignment);
-    void * scalable_aligned_realloc(void* ptr, size_t size, size_t alignment);
-    int    scalable_posix_memalign(void **memptr, size_t alignment, size_t size);
-
-    void * __TBB_internal_malloc(size_t size);
-    void * __TBB_internal_calloc(size_t num, size_t size);
-    void   __TBB_internal_free(void *object);
-    void * __TBB_internal_realloc(void* ptr, size_t sz);
-    int    __TBB_internal_posix_memalign(void **memptr, size_t alignment, size_t size);
-    
-    bool   __TBB_internal_find_original_malloc(int num, const char *names[], void *table[]);
-} // extern "C"
-
-#endif /* _TBB_malloc_proxy_H_ */
+rml::versioned_object::version_type Version;
+
+class MyClient: public __kmp::rml::omp_client {
+public:
+    /*override*/rml::versioned_object::version_type version() const {return 0;}
+    /*override*/size_type max_job_count() const {return 1024;}
+    /*override*/size_t min_stack_size() const {return 1<<20;}
+    /*override*/rml::job* create_one_job() {return NULL;}
+    /*override*/void acknowledge_close_connection() {}
+    /*override*/void cleanup(job&) {}
+    /*override*/policy_type policy() const {return throughput;}
+    /*override*/void process( job&, void*, __kmp::rml::omp_client::size_type ) {}
+   
+};
+
+//! Never actually set, because point of test is to find linkage issues.
+__kmp::rml::omp_server* MyServerPtr;
+
+extern "C" void Cplusplus() {
+    MyClient client;
+    Version = client.version();
+}
diff --git a/src/rml/test/test_hunk.cpp b/src/rml/test/test_hunk.cpp
new file mode 100644
index 0000000..d8f4d60
--- /dev/null
+++ b/src/rml/test/test_hunk.cpp
@@ -0,0 +1,104 @@
+/*
+    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_job_automaton.cpp b/src/rml/test/test_job_automaton.cpp
new file mode 100644
index 0000000..29fd792
--- /dev/null
+++ b/src/rml/test/test_job_automaton.cpp
@@ -0,0 +1,154 @@
+/*
+    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 "job_automaton.h"
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
+#include "harness_barrier.h"
+
+class State {
+    Harness::SpinBarrier barrier;
+    rml::internal::job_automaton ja;
+    rml::job job;
+    tbb::atomic<int> job_created;
+    tbb::atomic<int> job_destroyed;
+    tbb::atomic<bool> job_received;
+public:
+    State() : barrier(2) {
+        job_created = 0;
+        job_destroyed = 0;
+        job_received = false;
+    }
+    void exercise( bool is_owner );
+    ~State() {
+        ASSERT( job_created==job_destroyed, "accounting error" );
+        ASSERT( job_destroyed<=1, "destroyed job twice" );
+    }
+};
+
+int DelayMask;
+const int N = 14; 
+tbb::atomic<int> Coverage[N];
+
+//! Mark kth interval as covered and insert delay if kth bit of DelayMask is set.
+/** An interval is the code between two operations on the job_automaton that we are testing. */
+void Cover( int k ) {
+    ASSERT( k<N, NULL );
+    ++Coverage[k];
+    if( DelayMask>>k&1 ) {
+        // Introduce delay (and possibly a thread context switch)
+        __TBB_Yield();
+    }
+}
+
+void State::exercise( bool is_owner ) {
+    barrier.wait();
+    if( is_owner ) {
+        Cover(0);
+        if( ja.try_acquire() ) {
+            Cover(1);
+            ++job_created; 
+            ja.set_and_release(job);
+            Cover(2);
+            if( ja.try_acquire() ) {
+                Cover(3);
+                ja.release();
+                Cover(4);
+                if( ja.try_acquire() ) {
+                    Cover(5);
+                    ja.release();
+                }
+            }
+            Cover(6);
+        } else {
+            Cover(7);
+        }
+        if( DelayMask&1<<N ) {
+            while( !job_received ) 
+                __TBB_Yield();
+        }
+    } else {
+        // Using extra bit of DelayMask for choosing whether to run wait_for_job or not.
+        if( DelayMask&1<<N ) {
+            rml::job* j= &ja.wait_for_job(); 
+ if( j!=&job ) printf("%p\n",j);
+            ASSERT( j==&job, NULL );
+            job_received = true;
+        }
+        Cover(8);
+    }   
+    rml::job* j;
+    if( ja.try_plug(j) ) {
+        ASSERT( j==&job || !j, NULL );
+        if( j ) {
+            Cover(9+is_owner);
+            ++job_destroyed;
+        } else {
+            __TBB_ASSERT( !is_owner, "owner failed to create job but plugged self" );
+            Cover(11);
+        } 
+    } else {
+        Cover(12+is_owner);
+    }
+}
+
+class Loop: NoAssign {
+    State& s;
+public:
+    Loop(State& s_) : s(s_) {}
+    void operator()( int i ) const {s.exercise(i==0);}
+};
+
+/** Return true if coverage is acceptable.
+    If report==true, issue message if it is unacceptable. */
+bool CheckCoverage( bool report ) {
+    bool okay = true;
+    for( int i=0; i<N; ++i ) {
+        const int min_coverage = 4; 
+        if( Coverage[i]<min_coverage ) {
+            okay = false;
+            if( report )
+                printf("Warning: Coverage[%d]=%d is less than acceptable minimum of %d\n", i, int(Coverage[i]),min_coverage);
+        }
+    }
+    return okay;
+}
+
+int main() {
+    for( DelayMask=0; DelayMask<8<<N; ++DelayMask ) {
+        State s;
+        NativeParallelFor( 2, Loop(s) );
+        if( CheckCoverage(false) ) { 
+            // Reached acceptable code coverage level
+            break;
+        }
+    }
+    CheckCoverage(true);
+    printf("done\n");
+    return 0;
+}
diff --git a/src/rml/test/test_ring.cpp b/src/rml/test/test_ring.cpp
new file mode 100644
index 0000000..75ca0f1
--- /dev/null
+++ b/src/rml/test/test_ring.cpp
@@ -0,0 +1,139 @@
+/*
+    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/rml/test/test_rml_mixed.cpp b/src/rml/test/test_rml_mixed.cpp
new file mode 100644
index 0000000..b70d914
--- /dev/null
+++ b/src/rml/test/test_rml_mixed.cpp
@@ -0,0 +1,247 @@
+/*
+    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 "rml_tbb.h"
+#include "rml_omp.h"
+#include "tbb/atomic.h"
+#include "tbb/tick_count.h"
+#include "harness.h"
+
+const int OMP_ParallelRegionSize = 16;
+int TBB_MaxThread = 4;           // Includes master 
+int OMP_MaxThread = int(~0u>>1); // Includes master
+
+template<typename Client>
+class ClientBase: public Client {
+protected:
+    typedef typename Client::version_type version_type;
+    typedef typename Client::job job;
+    typedef typename Client::policy_type policy_type;
+
+private:
+    /*override*/version_type version() const {
+        return 0;
+    }
+    /*override*/size_t min_stack_size() const {
+        return 1<<20;
+    }
+    /*override*/job* create_one_job() {
+        return new rml::job;
+    }
+    /*override*/policy_type policy() const {
+        return Client::turnaround;
+    }
+    /*override*/void acknowledge_close_connection() {
+        delete this;
+    }
+    /*override*/void cleanup( job& j ) {delete &j;}
+};
+
+//! Represents a TBB or OpenMP run-time that uses RML.
+template<typename Factory, typename Client>
+class RunTime {
+public:
+    //! Factory that run-time uses to make servers.
+    Factory factory;
+    Client* client;
+    typename Factory::server_type* server;
+    RunTime() {
+        factory.open();
+    }
+    ~RunTime() {
+        factory.close();
+    }
+    //! Create server for this run-time
+    void create_connection();
+
+    //! Destroy server for this run-time
+    void destroy_connection();
+};
+
+class ThreadLevelRecorder {
+    tbb::atomic<int> level;
+    struct record {
+        tbb::tick_count time;
+        int nthread;
+    };
+    tbb::atomic<unsigned> next;
+    /** Must be power of two */
+    static const unsigned max_record_count = 1<<20;
+    record array[max_record_count];
+public:
+    void change_level( int delta );
+    void dump();
+};
+
+void ThreadLevelRecorder::change_level( int delta ) {
+    int x = level+=delta;
+    tbb::tick_count t = tbb::tick_count::now();
+    unsigned k = next++;
+    if( k<max_record_count ) {
+        record& r = array[k];
+        r.time = t;
+        r.nthread = x;
+    } 
+}
+
+void ThreadLevelRecorder::dump() {
+    FILE* f = fopen("time.txt","w");
+    if( !f ) {
+        perror("fopen(time.txt)\n");
+        exit(1);
+    }
+    unsigned limit = next;
+    if( limit>max_record_count ) {
+        // Clip
+        limit = next;
+    }
+    for( unsigned i=0; i<limit; ++i ) {
+        fprintf(f,"%f\t%d\n",(array[i].time-array[0].time).seconds(),array[i].nthread);
+    }
+    fclose(f);
+}
+
+ThreadLevelRecorder TotalThreadLevel;
+
+class TBB_Client: public ClientBase<tbb::internal::rml::tbb_client> {
+    /*override*/void process( job& j );
+    /*override*/size_type max_job_count() const {
+        return TBB_MaxThread-1;
+    }
+};
+
+class OMP_Client: public ClientBase<__kmp::rml::omp_client> {
+    /*override*/void process( job&, void* cookie, omp_client::size_type );
+    /*override*/size_type max_job_count() const {
+        return OMP_MaxThread-1;
+    }
+};
+
+RunTime<tbb::internal::rml::tbb_factory, TBB_Client> TBB_RunTime;
+RunTime<__kmp::rml::omp_factory, OMP_Client> OMP_RunTime;
+
+template<typename Factory, typename Client>
+void RunTime<Factory,Client>::create_connection() {
+    client = new Client;
+    typename Factory::status_type status = factory.make_server( server, *client );
+    ASSERT( status==Factory::st_success, NULL );
+}
+
+template<typename Factory, typename Client>
+void RunTime<Factory,Client>::destroy_connection() {
+    server->request_close_connection();
+    server = NULL;
+}
+
+class OMP_Team {
+public:
+    OMP_Team( __kmp::rml::omp_server& ) {}
+    tbb::atomic<unsigned> barrier;
+};
+
+tbb::atomic<int> AvailWork;
+tbb::atomic<int> CompletionCount;
+ 
+void OMPWork() {
+    tbb::atomic<int> x;
+    for( x=0; x<2000000; ++x ) {
+        continue;
+    }
+}
+
+void TBBWork() {
+    if( AvailWork>=0 ) {
+        int k = --AvailWork;
+        if( k==-1 ) {
+            TBB_RunTime.server->adjust_job_count_estimate(-(TBB_MaxThread-1));
+            ++CompletionCount;
+        } else if( k>=0 ) {
+            for( int k=0; k<4; ++k ) {
+                OMP_Team team( *OMP_RunTime.server );
+                int n = OMP_RunTime.server->try_increase_load( OMP_ParallelRegionSize-1, /*strict=*/false );
+                team.barrier = 0;
+                ::rml::job* array[OMP_ParallelRegionSize-1];
+                if( n>0)
+                    OMP_RunTime.server->get_threads( n, &team, array );
+                // Master does work inside parallel region too.
+                OMPWork();
+                // Master waits for workers to finish
+                if( n>0 )
+                    while( team.barrier!=unsigned(n) ) {
+                        __TBB_Yield();
+                    } 
+            }
+            ++CompletionCount;
+        }
+    }
+}
+
+/*override*/void TBB_Client::process( job& ) {
+    TotalThreadLevel.change_level(1);
+    TBBWork();
+    TotalThreadLevel.change_level(-1);
+}  
+
+/*override*/void OMP_Client::process( job& /* j */, void* cookie, omp_client::size_type ) {
+    TotalThreadLevel.change_level(1);
+    ASSERT( OMP_RunTime.server, NULL );
+    OMPWork();
+    ASSERT( OMP_RunTime.server, NULL );
+    static_cast<OMP_Team*>(cookie)->barrier+=1;
+    TotalThreadLevel.change_level(-1);
+}
+
+void TBBOutSideOpenMPInside() {
+    TotalThreadLevel.change_level(1);
+    CompletionCount = 0;
+    int tbbtasks = 32;
+    AvailWork = tbbtasks;
+    TBB_RunTime.server->adjust_job_count_estimate(TBB_MaxThread-1);
+    while( CompletionCount!=tbbtasks+1 ) {
+        TBBWork();
+    }
+    TotalThreadLevel.change_level(-1);
+}  
+
+int main( int argc, char* argv[] ) {
+    // Set defaults
+    MinThread = 4;
+    MaxThread = 4;
+    ParseCommandLine(argc,argv);
+    for( int TBB_MaxThread=MinThread; TBB_MaxThread<=MaxThread; ++TBB_MaxThread ) {
+        if( Verbose ) printf("Testing with TBB_MaxThread=%d\n", TBB_MaxThread);
+        TBB_RunTime.create_connection();
+        OMP_RunTime.create_connection();
+        TBBOutSideOpenMPInside();
+        OMP_RunTime.destroy_connection();
+        TBB_RunTime.destroy_connection();
+    }
+    TotalThreadLevel.dump();
+    printf("done\n");
+    return 0;
+}
diff --git a/src/rml/test/test_rml_omp.cpp b/src/rml/test/test_rml_omp.cpp
new file mode 100644
index 0000000..fedf851
--- /dev/null
+++ b/src/rml/test/test_rml_omp.cpp
@@ -0,0 +1,173 @@
+/*
+    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 "rml_omp.h"
+#include "test_server.h"
+#include "tbb/tbb_misc.h"
+
+typedef __kmp::rml::omp_server MyServer;
+typedef __kmp::rml::omp_factory MyFactory;
+
+static bool StrictTeam;
+
+class MyTeam {
+    MyTeam& operator=( const MyTeam& ) ;
+public:
+    struct info_type {
+        rml::job* job;
+        bool ran;
+        info_type() : job(NULL), ran(false) {}
+    };
+    MyTeam( MyServer& /* server */, size_t max_thread_ ) :
+        max_thread(max_thread_)
+    {
+        self_ptr = this;
+        info = new info_type[max_thread];
+    }
+    ~MyTeam() {
+        delete[] info;
+    }
+    const size_t max_thread;
+    size_t n_thread;
+    tbb::atomic<int> barrier;
+    /** Indexed with 1-origin index */
+    info_type* info;
+    int iteration;
+    MyTeam* self_ptr;
+};
+
+class MyClient: public ClientBase<__kmp::rml::omp_client> {
+public:
+    MyServer* server;
+    /*override*/void process( job& j, void* cookie, size_type index ) {
+        MyTeam& t = *static_cast<MyTeam*>(cookie);
+        ASSERT( t.self_ptr==&t, "trashed cookie" ); 
+        ASSERT( index<t.max_thread, NULL ); 
+        ASSERT( !t.info[index].ran, "duplicate index?" ); 
+        t.info[index].job = &j;
+        t.info[index].ran = true;
+        do_process(j);
+        if( index==1 && nesting.level<nesting.limit ) {
+            DoOneConnection<MyFactory,MyClient> doc(MaxThread,Nesting(nesting.level+1,nesting.limit),0,false);
+            doc(0);
+        }
+        ++t.barrier;
+    }
+    static const bool is_omp = true;
+    bool is_strict() const {return StrictTeam;}
+};
+
+void FireUpJobs( MyServer& server, MyClient& client, int max_thread, int n_extra, Checker* checker ) {
+    ASSERT( max_thread>=0, NULL );
+    client.server = &server;
+    MyTeam team(server,size_t(max_thread));
+    MyServer::size_type n_thread = 0;
+    for( int iteration=0; iteration<4; ++iteration ) {
+        for( size_t i=0; i<team.max_thread; ++i ) 
+            team.info[i].ran = false;
+        switch( iteration ) {
+            default:
+                n_thread = int(max_thread);
+                break;
+            case 1:
+                // No change in number of threads
+                break;
+            case 2:
+                // Decrease number of threads.  
+                n_thread = int(max_thread)/2;
+                break;
+            // Case 3 is same code as the default, but has effect of increasing the number of threads.
+        }
+        team.barrier = 0;
+        if( Verbose ) {
+            printf("client %d: server.run with n_thread=%d\n", client.client_id(), int(n_thread) );
+        }
+        server.independent_thread_number_changed( n_extra );
+        if( checker ) {
+            // Give RML time to respond to change in number of threads.
+            MilliSleep(1);
+        }
+        int n_delivered = server.try_increase_load( n_thread, StrictTeam );
+        team.n_thread = n_delivered;
+        ::rml::job* job_array[JobArraySize];
+        job_array[n_delivered] = (::rml::job*)intptr_t(-1);
+        server.get_threads( n_delivered, &team, job_array );
+        __TBB_ASSERT( job_array[n_delivered]== (::rml::job*)intptr_t(-1), NULL );
+        for( int i=0; i<n_delivered; ++i ) {
+            MyJob* j = static_cast<MyJob*>(job_array[i]);
+            int s = j->state;
+            ASSERT( s==MyJob::idle||s==MyJob::busy, NULL );
+        }
+        server.independent_thread_number_changed( -n_extra );
+        if( Verbose ) {
+            printf("client %d: team size is %d\n", client.client_id(), n_delivered);
+        }
+        if( checker ) {
+            checker->check_number_of_threads_delivered( n_delivered, n_thread, n_extra );
+        }      
+        // Protocol requires that master wait until workers have called "done_processing"
+        while( team.barrier!=n_delivered ) {
+            ASSERT( team.barrier>=0, NULL );
+            ASSERT( team.barrier<=n_delivered, NULL );
+            __TBB_Yield();
+        }
+        if( Verbose ) {
+            printf("client %d: team completed\n", client.client_id() );
+        }
+        for( int i=0; i<n_delivered; ++i ) {
+            ASSERT( team.info[i].ran, "thread on team allegedly delivered, but did not run?" );
+        }
+        for( MyServer::size_type i=n_delivered; i<MyServer::size_type(max_thread); ++i ) {
+            ASSERT( !team.info[i].ran, "thread on team ran with illegal index" );
+        }
+        ASSERT( !StrictTeam || n_delivered==int(n_thread), "server failed to satisfy strict request" );
+    }
+}
+
+void DoClientSpecificVerification( MyServer& server, int /*n_thread*/ )
+{
+    ASSERT( server.current_balance()==int(tbb::internal::DetectNumberOfWorkers())-1, NULL );
+}
+
+int main( int argc, char* argv[] ) {
+    // Set defaults
+    MinThread = 0;
+    MaxThread = 4;
+    ParseCommandLine(argc,argv);
+
+    StrictTeam = true;
+    VerifyInitialization<MyFactory,MyClient>( MaxThread );
+    SimpleTest<MyFactory,MyClient>();
+
+    StrictTeam = false;
+    VerifyInitialization<MyFactory,MyClient>( MaxThread );
+    SimpleTest<MyFactory,MyClient>();
+
+    printf("done\n");
+    return 0;
+}
diff --git a/src/test/test_ScalableAllocator_STL.cpp b/src/rml/test/test_rml_omp_c_linkage.c
similarity index 83%
copy from src/test/test_ScalableAllocator_STL.cpp
copy to src/rml/test/test_rml_omp_c_linkage.c
index 4b1397f..e94790f 100644
--- a/src/test/test_ScalableAllocator_STL.cpp
+++ b/src/rml/test/test_rml_omp_c_linkage.c
@@ -26,16 +26,12 @@
     the GNU General Public License.
 */
 
-// Test whether scalable_allocator works with some of the host's STL containers.
+#include <stdio.h>
 
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "tbb/scalable_allocator.h"
-
-// The actual body of the test is there:
-#include "test_allocator_STL.h"
+void Cplusplus();
 
 int main() {
-    TestAllocatorWithSTL<tbb::scalable_allocator>();
+    Cplusplus();      
     printf("done\n");
     return 0;
-}
+} 
diff --git a/src/rml/test/test_rml_tbb.cpp b/src/rml/test/test_rml_tbb.cpp
new file mode 100644
index 0000000..a3cd666
--- /dev/null
+++ b/src/rml/test/test_rml_tbb.cpp
@@ -0,0 +1,122 @@
+/*
+    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 "rml_tbb.h"
+#include "test_server.h"
+
+typedef tbb::internal::rml::tbb_server MyServer;
+typedef tbb::internal::rml::tbb_factory MyFactory;
+
+class MyClient: public ClientBase<tbb::internal::rml::tbb_client> {
+    tbb::atomic<int> counter;
+    /*override*/void process( job& j ) {
+        do_process(j);
+    }
+public:
+    MyClient() {counter=1;}
+    static const bool is_omp = false;
+    bool is_strict() const {return false;}
+};
+
+void FireUpJobs( MyServer& server, MyClient& client, int n_thread, int n_extra, Checker* checker ) {
+    if( Verbose ) 
+        printf("client %d: calling adjust_job_count_estimate(%d)\n", client.client_id(),n_thread); 
+    // Exercise independent_thread_number_changed, even for zero values.
+    server.independent_thread_number_changed( n_extra );
+    // Experiments indicate that when oversubscribing, the main thread should wait a little
+    // while for the RML worker threads to do some work. 
+    int delay = n_thread>int(server.default_concurrency()) ? 50 : 1;
+    if( checker ) {
+        // Give RML time to respond to change in number of threads.
+        MilliSleep(delay);
+        for( int k=0; k<n_thread; ++k )
+            client.job_array[k].processing_count = 0;
+    }
+    server.adjust_job_count_estimate( n_thread );
+    int n_used = 0;
+    if( checker ) {
+        MilliSleep(delay);
+        for( int k=0; k<n_thread; ++k )
+            if( client.job_array[k].processing_count )
+                ++n_used;
+    }
+    // Logic further below presumes that jobs never starve, so undo previous call
+    // to independent_thread_number_changed before waiting on those jobs.
+    server.independent_thread_number_changed( -n_extra );
+    if( Verbose ) 
+        printf("client %d: wait for each job to be processed at least once\n",client.client_id());
+    // Calculate the number of jobs that are expected to get threads.
+    // Typically this is equal to n_thread.  But if nested, subtract 1 to account for the fact
+    // that this thread itself cannot process the job.
+    int expected = client.nesting.level==0 ? n_thread : n_thread-1;
+    // Wait for expected number of jobs to be processed.
+    if( client.nesting.level==0 ) {
+        for(;;) {
+            int n = 0;
+            for( int k=0; k<n_thread; ++k ) 
+                if( client.job_array[k].processing_count!=0 ) 
+                    ++n;
+            if( n>=expected ) break;
+            server.yield();
+        }
+    } else {
+        printf("testing of nested tbb execution is yet to be supported\n");
+    }
+    server.adjust_job_count_estimate(-n_thread);
+    if( checker ) 
+        checker->check_number_of_threads_delivered( n_used, n_thread, n_extra );
+}
+
+void DoClientSpecificVerification( MyServer&, int n_thread )
+{
+    MyClient* client = new MyClient;
+    client->initialize( n_thread, Nesting(), ClientStackSize[0] );
+    MyFactory factory;
+    memset( &factory, 0, sizeof(factory) );
+    MyFactory::status_type status = factory.open();
+    ASSERT( status!=MyFactory::st_not_found, "could not find RML library" );
+    ASSERT( status!=MyFactory::st_incompatible, NULL );
+    ASSERT( status==MyFactory::st_success, NULL );
+    MyFactory::server_type* server; 
+    status = factory.make_server( server, *client );
+    ASSERT( status==MyFactory::st_connection_exists, "Did the first connection get lost?" );
+    factory.close();
+    client->update(MyClient::destroyed, MyClient::live);
+    delete client;
+}
+
+int main( int argc, char* argv[] ) {
+    // Set defaults
+    MinThread = 0;
+    MaxThread = 4;
+    ParseCommandLine(argc,argv);
+    VerifyInitialization<MyFactory,MyClient>( MaxThread );
+    SimpleTest<MyFactory,MyClient>();
+    printf("done\n");
+    return 0;
+}
diff --git a/src/rml/test/test_server.h b/src/rml/test/test_server.h
new file mode 100644
index 0000000..65e07af
--- /dev/null
+++ b/src/rml/test/test_server.h
@@ -0,0 +1,398 @@
+/*
+    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.
+*/
+
+/* This header contains code shared by test_omp_server.cpp and test_tbb_server.cpp 
+   There is no ifndef guard - test is supposed to include this file exactly once.
+   The test is also exected to have #include of rml_omp.h or rml_tbb.h before 
+   including this header. 
+
+   This header should not use any parts of TBB that require linking in the TBB run-time. 
+   It uses a few instances of tbb::atomic<T>, all of which are completely inlined. */
+
+#include "tbb/atomic.h"
+#include "tbb/tbb_thread.h"
+#include "harness.h"
+#include "harness_memory.h"
+
+//! Define TRIVIAL as 1 to test only a single client, no nesting, no extra threads.
+#define TRIVIAL 0
+
+//! Maximum number of clients 
+#if TRIVIAL 
+const size_t MaxClient = 1;
+#else
+const size_t MaxClient = 4;
+#endif
+
+const size_t ClientStackSize[MaxClient] = {
+    1000000
+#if !TRIVIAL
+   ,2000000
+   ,1000000
+   ,4000000
+#endif /* TRIVIAL */
+};
+
+const size_t OverheadStackSize = 500000;
+
+const size_t JobArraySize = 1000;
+
+#if _WIN32||_WIN64
+#include <Windows.h> /* Need Sleep */
+#else
+#include <unistd.h>  /* Need usleep */   
+#endif
+
+void MilliSleep( unsigned milliseconds ) {
+#if _WIN32||_WIN64
+    Sleep( milliseconds );
+#else
+    usleep( milliseconds*1000 );
+#endif /* _WIN32||_WIN64 */
+}
+
+class MyJob: public ::rml::job {
+public:
+    //! Enumeration for tracking states of a job.
+    enum state_t {
+        //! Job has not yet been allocated.
+        unallocated,
+        //! Is idle.
+        idle,
+        //! Has a thread working on it.
+        busy,
+        //! After call to client::cleanup 
+        clean
+    };
+    tbb::atomic<int> state;
+    volatile int processing_count;
+    void update( state_t new_state, state_t old_state ) {
+        int o = state.compare_and_swap(new_state,old_state);
+        ASSERT( o==old_state, "illegal transition" );
+    }
+    void update_from_either( state_t new_state, state_t old_state1, state_t old_state2 ) {
+        int snapshot;
+        do {
+            snapshot = state;
+            ASSERT( snapshot==old_state1||snapshot==old_state2, "illegal transition" );
+        } while( state.compare_and_swap(new_state,snapshot)!=snapshot );
+    }
+    MyJob() {
+        state=unallocated;
+        processing_count=0;
+    }
+    ~MyJob() {
+        // Overwrite so that accidental use after destruction can be detected.
+        memset(this,-1,sizeof(*this));
+    }
+};
+
+static tbb::atomic<int> ClientConstructions;
+static tbb::atomic<int> ClientDestructions;
+
+struct Nesting {
+    int level;
+    int limit;
+    Nesting() : level(0), limit(0) {}
+    Nesting( int level_, int limit_ ) : level(level_), limit(limit_) {}
+};
+
+template<typename Client>
+class ClientBase: public Client {
+protected:
+    typedef typename Client::size_type size_type;
+    typedef typename Client::version_type version_type;
+    typedef typename Client::policy_type policy_type;
+    typedef typename Client::job job;
+private:
+    size_type my_max_job_count;
+    size_t my_stack_size;
+    tbb::atomic<size_t> next_job_index;
+    int my_client_id;
+    rml::server* my_server;
+
+public:
+    enum state_t {
+        //! Treat *this as constructed.
+        live=0x1,
+        //! Treat *this as destroyed.
+        destroyed=0xDEAD
+    };
+
+    tbb::atomic<int> state;
+    void update( state_t new_state, state_t old_state ) {
+        int o = state.compare_and_swap(new_state,old_state);
+        ASSERT( o==old_state, NULL );
+    }
+
+    tbb::atomic<bool> expect_close_connection;
+
+    MyJob *job_array;
+ 
+    /*override*/version_type version() const {
+        ASSERT( state==live, NULL );
+        return 1;
+    }
+ 
+    /*override*/size_type max_job_count() const {
+        ASSERT( state==live, NULL );
+        return my_max_job_count;
+    }
+
+    /*override*/size_t min_stack_size() const {
+        ASSERT( state==live, NULL );
+        return my_stack_size;
+    }
+
+    /*override*/policy_type policy() const {return Client::throughput;} 
+
+    /*override*/void acknowledge_close_connection() {
+        ASSERT( expect_close_connection, NULL );
+        for( size_t k=next_job_index; k>0; ) {
+            --k;
+            ASSERT( job_array[k].state==MyJob::clean, NULL );
+        }
+        delete[] job_array;
+        job_array = NULL;
+        ASSERT( my_server, NULL );
+        update( destroyed, live );
+        delete this; 
+    }
+
+    /*override*/void cleanup( job& j_ ) {
+        if( Verbose ) 
+            printf("client %d: cleanup(%p) called\n",client_id(),&j_);
+        ASSERT( state==live, NULL );
+        MyJob& j = static_cast<MyJob&>(j_);
+        j.update(MyJob::clean,MyJob::idle);
+        if( Verbose ) 
+            printf("client %d: cleanup(%p) returns\n",client_id(),&j_);
+    }
+   
+    job* create_one_job();
+
+protected:
+    void do_process( job& j_ ) {
+        ASSERT( state==live, NULL );
+        MyJob& j = static_cast<MyJob&>(j_);
+        ASSERT( &j, NULL );
+        j.update(MyJob::busy,MyJob::idle);
+        ++j.processing_count;
+        ASSERT( my_stack_size>OverheadStackSize, NULL ); 
+#ifdef __ia64__
+        // Half of the stack is reserved for RSE, so test only remaining half.
+        UseStackSpace( (my_stack_size-OverheadStackSize)/2 );
+#else
+        UseStackSpace( my_stack_size-OverheadStackSize );
+#endif 
+        j.update(MyJob::idle,MyJob::busy);
+        my_server->yield();
+    } 
+public:
+    ClientBase() : my_server(NULL) {
+        my_client_id = ClientConstructions++;
+        next_job_index = 0; 
+    }
+    int client_id() const {return my_client_id;}
+
+    Nesting nesting;
+
+    void initialize( size_type max_job_count, Nesting nesting_, size_t stack_size ) {
+        ASSERT( stack_size>0, NULL );
+        my_max_job_count = max_job_count;
+        nesting = nesting_;
+        my_stack_size = stack_size;
+        job_array = new MyJob[JobArraySize];
+        expect_close_connection = false;
+        state = live;
+    }
+
+    void set_server( rml::server* s ) {my_server=s;}
+
+    virtual ~ClientBase() {
+        ASSERT( state==destroyed, NULL );
+        ++ClientDestructions;
+    }
+};
+
+template<typename Client>
+typename Client::job* ClientBase<Client>::create_one_job() {
+    if( Verbose ) 
+        printf("client %d: create_one_job() called\n",client_id());
+    size_t k = next_job_index++;
+    ASSERT( state==live, NULL );
+    // Following assertion depends on assumption that implementation does not destroy jobs until 
+    // the connection is closed.  If the implementation is changed to destroy jobs sooner, the 
+    // test logic in this header will have to be reworked.
+    ASSERT( k<my_max_job_count, "RML allocated more than max_job_count jobs simultaneously" );
+    ASSERT( k<JobArraySize, "JobArraySize not big enough (problem is in test, not RML)" );
+    MyJob& j = job_array[k];
+    j.update(MyJob::idle,MyJob::unallocated);
+    if( Verbose ) 
+        printf("client %d: create_one_job() for k=%d returns %p\n",client_id(),int(k),&j);
+    return &j;
+}
+
+class Checker {
+public:
+    int default_concurrency;
+    void check_number_of_threads_delivered( int n_delivered, int n_requested, int n_extra ) const;
+    Checker( rml::server& server ) : default_concurrency(int(server.default_concurrency())) {}
+};
+
+void Checker::check_number_of_threads_delivered( int n_delivered, int n_requested, int n_extra ) const {
+    ASSERT( default_concurrency>=0, NULL );
+    // Check that number of threads delivered is reasonable.
+    int n_avail = default_concurrency;
+    if( n_extra>0 )
+        n_avail-=n_extra;
+    if( n_avail<0 ) 
+        n_avail=0;
+    // If the client asked for more threads than the hardware provides, the difference becomes private threads
+    // that are available regardless of what else is running.
+    if( n_requested>default_concurrency ) 
+        n_avail += n_requested-default_concurrency;
+    int n_expected = n_requested;
+    if( n_expected>n_avail )
+        n_expected=n_avail;
+    const char* msg = NULL;
+    if( n_delivered>n_avail ) 
+        msg = "server delivered more threads than were theoretically available";
+    else if( n_delivered>n_expected ) 
+        msg = "server delivered more threads than expected";
+    else if( n_delivered<n_expected ) 
+        msg = "server delivered fewer threads than ideal";
+    if( msg ) {
+        printf("Warning: %s (n_delivered=%d n_avail=%d n_requested=%d n_extra=%d default_concurrency=%d)\n",
+               msg, n_delivered, n_avail, n_requested, n_extra, default_concurrency );
+    }
+}
+
+template<typename Factory,typename Client>
+class DoOneConnection: NoAssign {
+    //! Number of threads to request
+    const int n_thread;
+    //! Nesting 
+    const Nesting nesting;
+    //! Number of extra threads to pretend having outside the RML
+    const int n_extra;
+    //! If true, check number of threads actually delivered.
+    const bool check_delivered;
+public:
+    DoOneConnection( int n_thread_, Nesting nesting_, int n_extra_, bool check_delivered_ ) : 
+        n_thread(n_thread_), 
+        nesting(nesting_), 
+        n_extra(n_extra_), 
+        check_delivered(check_delivered_)
+    {
+    }
+   
+    //! Test ith connection 
+    void operator()( size_t i ) const;
+};
+
+template<typename Factory,typename Client>
+void DoOneConnection<Factory,Client>::operator()( size_t i ) const {
+    ASSERT( i<MaxClient, NULL );
+    Client* client = new Client;
+    client->initialize( Client::is_omp ? JobArraySize : n_thread, nesting, ClientStackSize[i] );
+    Factory factory;
+    memset( &factory, 0, sizeof(factory) );
+    typename Factory::status_type status = factory.open();
+
+    typename Factory::server_type* server; 
+    status = factory.make_server( server, *client );
+    if( Verbose ) 
+        printf("client %d: opened server n_thread=%d nesting=(%d,%d)\n",
+               client->client_id(), n_thread, nesting.level, nesting.limit);
+
+    client->set_server( server );
+    Checker checker( *server );
+ 
+    FireUpJobs( *server, *client, n_thread, n_extra, check_delivered && !client->is_strict() ? &checker : NULL );
+
+    // Close the connection
+    client->expect_close_connection = true;
+    if( Verbose )
+        printf("client %d: calling request_close_connection\n", client->client_id());
+    server->request_close_connection();
+    // Client deletes itself when it sees call to acknowledge_close_connection from server.
+    factory.close();
+}
+
+//! Test with n_threads threads and n_client clients.
+template<typename Factory, typename Client>
+void SimpleTest() {
+    for( int n_thread=MinThread; n_thread<=MaxThread; ++n_thread ) {
+        // Test nested connections
+        DoOneConnection<Factory,Client> doc(n_thread,Nesting(0,1),0,false);
+        doc(0);
+    }
+    // Let RML catch up.
+    while( ClientConstructions!=ClientDestructions ) {
+        MilliSleep(1);
+    }
+}
+
+static void check_server_info( void* arg, const char* server_info )
+{
+    ASSERT( strstr(server_info, (char*)arg), NULL );
+}
+
+template<typename Factory, typename Client>
+void VerifyInitialization( int n_thread ) {
+    Client* client = new Client;
+    client->initialize( Client::is_omp ? JobArraySize : n_thread, Nesting(), ClientStackSize[0] );
+    Factory factory;
+    memset( &factory, 0, sizeof(factory) );
+    typename Factory::status_type status = factory.open();
+    ASSERT( status!=Factory::st_not_found, "could not find RML library" );
+    ASSERT( status!=Factory::st_incompatible, NULL );
+    ASSERT( status==Factory::st_success, NULL );
+    factory.call_with_server_info( check_server_info, (void*)"Intel(R) RML library built:" );
+    typename Factory::server_type* server; 
+    status = factory.make_server( server, *client );
+    ASSERT( status!=Factory::st_incompatible, NULL );
+    ASSERT( status!=Factory::st_not_found, NULL );
+    ASSERT( status==Factory::st_success, NULL );
+    if( Verbose ) 
+        printf("client %d: opened server n_thread=%d nesting=(%d,%d)\n",
+               client->client_id(), n_thread, 0, 0);
+    ASSERT( server, NULL );
+    client->set_server( server );
+
+    DoClientSpecificVerification( *server, n_thread );
+ 
+    // Close the connection
+    client->expect_close_connection = true;
+    if( Verbose )
+        printf("client %d: calling request_close_connection\n", client->client_id());
+    server->request_close_connection();
+    // Client deletes itself when it sees call to acknowledge_close_connection from server.
+    factory.close();
+}
diff --git a/src/rml/test/test_thread_monitor.cpp b/src/rml/test/test_thread_monitor.cpp
new file mode 100644
index 0000000..89ef325
--- /dev/null
+++ b/src/rml/test/test_thread_monitor.cpp
@@ -0,0 +1,129 @@
+/*
+    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 "thread_monitor.h"
+#include "harness.h"
+#include "harness_memory.h"
+
+class ThreadState {
+    void loop();
+public:
+    static __RML_DECL_THREAD_ROUTINE routine( void* arg ) {
+        static_cast<ThreadState*>(arg)->loop();
+        return 0;
+    }
+    typedef rml::internal::thread_monitor thread_monitor;
+    thread_monitor monitor;
+    volatile int request;
+    volatile int ack;
+    volatile unsigned clock;
+    volatile unsigned stamp;
+    ThreadState() : request(-1), ack(-1) {}
+};
+
+void ThreadState::loop() {
+    for(;;) {
+        ++clock;
+        if( ack==request ) {
+            thread_monitor::cookie c;
+            monitor.prepare_wait(c);
+            if( ack==request ) {
+                if( Verbose ) {
+                    printf("%p: request=%d ack=%d\n", this, request, ack );
+                }
+                monitor.commit_wait(c);
+            } else
+                monitor.cancel_wait();
+        } else {
+            // Throw in delay occasionally
+            switch( request%8 ) {
+                case 0: 
+                case 1:
+                case 5:
+                    rml::internal::thread_monitor::yield();
+            }
+            int r = request;
+            ack = request;
+            if( !r ) return;
+        }
+    }
+}
+
+// Linux on Itanium seems to require at least 1<<18 bytes per stack.
+const size_t MinStackSize = 1<<18;
+const size_t MaxStackSize = 1<<22;
+
+int main( int argc, char* argv[] ) {
+    // Set defaults
+    MinThread = 1;
+    MaxThread = 4;
+    ParseCommandLine( argc, argv );
+
+    for( int p=MinThread; p<=MaxThread; ++p ) {
+        ThreadState* t = new ThreadState[p];
+        for( size_t stack_size = MinStackSize; stack_size<=MaxStackSize; stack_size*=2 ) {
+            if( Verbose )
+                printf("launching %d threads\n",p);
+            for( int i=0; i<p; ++i )
+                rml::internal::thread_monitor::launch( ThreadState::routine, t+i, stack_size ); 
+            for( int k=1000; k>=0; --k ) {
+                if( k%8==0 ) {
+                    // Wait for threads to wait.
+                    for( int i=0; i<p; ++i ) {
+                        unsigned count = 0;
+                        do {
+                            t[i].stamp = t[i].clock;
+                            rml::internal::thread_monitor::yield();
+                            if( ++count>=1000 ) {
+                                printf("Warning: thread %d not waiting\n",i);
+                                break;
+                            }
+                        } while( t[i].stamp!=t[i].clock );
+                    }
+                }
+                if( Verbose ) 
+                    printf("notifying threads\n");
+                for( int i=0; i<p; ++i ) {
+                    // Change state visible to launched thread
+                    t[i].request = k;
+                    t[i].monitor.notify();
+                }
+                if( Verbose ) 
+                    printf("waiting for threads to respond\n");
+                for( int i=0; i<p; ++i ) 
+                    // Wait for thread to respond 
+                    while( t[i].ack!=k ) 
+                        rml::internal::thread_monitor::yield();
+            }
+        }
+        delete[] t;
+    }
+
+    printf("done\n");
+    return 0;
+}
diff --git a/src/tbb/cache_aligned_allocator.cpp b/src/tbb/cache_aligned_allocator.cpp
index 97a5e6e..18e3d13 100644
--- a/src/tbb/cache_aligned_allocator.cpp
+++ b/src/tbb/cache_aligned_allocator.cpp
@@ -29,6 +29,7 @@
 #include "tbb/cache_aligned_allocator.h"
 #include "tbb/tbb_allocator.h"
 #include "tbb_misc.h"
+#include "dynamic_link.h"
 #include <cstdlib>
 
 #if _WIN32||_WIN64
@@ -70,7 +71,7 @@ static void* (*MallocHandler)( size_t size ) = &DummyMalloc;
 static void (*FreeHandler)( void* pointer ) = &DummyFree;
 
 //! Table describing the how to link the handlers.
-static const DynamicLinkDescriptor MallocLinkTable[] = {
+static const dynamic_link_descriptor MallocLinkTable[] = {
     DLD(scalable_malloc, MallocHandler),
     DLD(scalable_free, FreeHandler),
 };
@@ -125,7 +126,7 @@ static void (*padded_free_handler)( void* p ) = &dummy_padded_free;
     If that allocator is not found, it links to malloc and free. */
 void initialize_cache_aligned_allocator() {
     __TBB_ASSERT( MallocHandler==&DummyMalloc, NULL );
-    bool success = FillDynamicLinks( MALLOCLIB_NAME, MallocLinkTable, 2 );
+    bool success = dynamic_link( MALLOCLIB_NAME, MallocLinkTable, 2 );
     if( !success ) {
         // If unsuccessful, set the handlers to the default routines.
         // This must be done now, and not before FillDynanmicLinks runs, because if other
@@ -142,13 +143,15 @@ void initialize_cache_aligned_allocator() {
         padded_free_handler = FreeHandler;
 #endif // __TBB_IS_SCALABLE_MALLOC_FIX_READY 
     }
+#if !__TBB_RML_STATIC
     PrintExtraVersionInfo( "ALLOCATOR", success?"scalable_malloc":"malloc" );
+#endif
 }
 
 //! Defined in task.cpp
 extern void DoOneTimeInitializations();
 
-//! Executed on very first call throught MallocHandler
+//! Executed on very first call through MallocHandler
 static void* DummyMalloc( size_t size ) {
     DoOneTimeInitializations();
     __TBB_ASSERT( MallocHandler!=&DummyMalloc, NULL );
@@ -163,7 +166,7 @@ static void DummyFree( void * ptr ) {
 }
 
 #if __TBB_IS_SCALABLE_MALLOC_FIX_READY 
-//! Executed on very first call throught padded_allocate_handler
+//! Executed on very first call through padded_allocate_handler
 static void* dummy_padded_allocate( size_t bytes, size_t alignment ) {
     DoOneTimeInitializations();
     __TBB_ASSERT( padded_allocate_handler!=&dummy_padded_allocate, NULL );
@@ -304,3 +307,23 @@ bool __TBB_EXPORTED_FUNC is_malloc_used_v3() {
 } // namespace internal
 
 } // namespace tbb
+
+#if __TBB_RML_STATIC
+#include "tbb/atomic.h"
+static tbb::atomic<int> module_inited;
+namespace tbb {
+namespace internal {
+void DoOneTimeInitializations() {
+    if( module_inited!=2 ) {
+        if( module_inited.compare_and_swap(1, 0)==0 ) {
+            initialize_cache_aligned_allocator();
+            module_inited = 2;
+        } else {
+            do {
+                __TBB_Yield();
+            } while( module_inited!=2 );
+        }
+    }
+}
+}} //namespace tbb::internal
+#endif
diff --git a/src/tbb/concurrent_hash_map.cpp b/src/tbb/concurrent_hash_map.cpp
index 4d476c6..d393710 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/src/tbb/concurrent_hash_map.cpp
@@ -31,13 +31,34 @@
 namespace tbb {
 
 namespace internal {
+#if !TBB_NO_LEGACY
+struct hash_map_segment_base {
+    typedef spin_rw_mutex segment_mutex_t;
+    //! Type of a hash code.
+    typedef size_t hashcode_t;
+    //! Log2 of n_segment
+    static const size_t n_segment_bits = 6;
+    //! Maximum size of array of chains
+    static const size_t max_physical_size = size_t(1)<<(8*sizeof(hashcode_t)-n_segment_bits);
+    //! Mutex that protects this segment
+    segment_mutex_t my_mutex;
+    // Number of nodes
+    atomic<size_t> my_logical_size;
+    // Size of chains
+    /** Always zero or a power of two */
+    size_t my_physical_size;
+    //! True if my_logical_size>=my_physical_size.
+    /** Used to support Intel(R) Thread Checker. */
+    bool __TBB_EXPORTED_METHOD internal_grow_predicate() const;
+};
 
 bool hash_map_segment_base::internal_grow_predicate() const {
     // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the 
     // library so that Intel(R) Thread Checker will ignore them.  The reads are used in a double-check
     // context, so the program is nonetheless correct despite the race.
-    return my_logical_size >= my_physical_size && my_physical_size < internal::hash_map_base::max_physical_size;
+    return my_logical_size >= my_physical_size && my_physical_size < max_physical_size;
 }
+#endif//!TBB_NO_LEGACY
 
 } // namespace internal
 
diff --git a/src/tbb/concurrent_queue.cpp b/src/tbb/concurrent_queue.cpp
index 4b8c2ab..ac7e67a 100644
--- a/src/tbb/concurrent_queue.cpp
+++ b/src/tbb/concurrent_queue.cpp
@@ -26,21 +26,15 @@
     the GNU General Public License.
 */
 
-#include <cstring>
-#include <cstdio>
-
+#include <cstring>   // for memset()
+#include "tbb/tbb_stddef.h"
 #include "tbb/tbb_machine.h"
-#include "tbb/cache_aligned_allocator.h"
-#include "tbb/spin_mutex.h"
-#include "tbb/atomic.h"
-#include "tbb/concurrent_queue.h"
-#include "tbb/tbb_exception.h"
-#include "tbb_misc.h"
+#include "tbb/_concurrent_queue_internal.h"
 #include "itt_notify.h"
-#if __SUNPRO_CC
-#include <memory.h>
+#include <new>
+#if _WIN32||_WIN64
+#include <windows.h>
 #endif
-
 using namespace std;
 
 // enable sleep support
@@ -64,7 +58,7 @@ namespace tbb {
 
 namespace internal {
 
-class concurrent_queue_rep;
+typedef concurrent_queue_base_v3 concurrent_queue_base;
 
 typedef size_t ticket;
 
@@ -200,7 +194,6 @@ public:
     #pragma warning( disable: 4146 )
 #endif
 
-
 static void* invalid_page;
 
 //------------------------------------------------------------------------
@@ -222,7 +215,7 @@ void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base
     }
 
     if( tail_counter!=k ) {
-        ExponentialBackoff backoff;
+        atomic_backoff backoff;
         do {
             backoff.pause();
             // no memory. throws an exception; assumes concurrent_queue_rep::n_queue>1
@@ -260,8 +253,8 @@ void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base
 
 bool micro_queue::pop( void* dst, ticket k, concurrent_queue_base& base ) {
     k &= -concurrent_queue_rep::n_queue;
-    SpinwaitUntilEq( head_counter, k );
-    SpinwaitWhileEq( tail_counter, k );
+    spin_wait_until_eq( head_counter, k );
+    spin_wait_while_eq( tail_counter, k );
     page& p = *head_page;
     __TBB_ASSERT( &p, NULL );
     size_t index = k/concurrent_queue_rep::n_queue & (base.items_per_page-1);
@@ -297,7 +290,7 @@ micro_queue& micro_queue::assign( const micro_queue& src, concurrent_queue_base&
         ticket g_index = head_counter;
         try {
             size_t n_items  = (tail_counter-head_counter)/concurrent_queue_rep::n_queue;
-            size_t index = (head_counter/concurrent_queue_rep::n_queue & base.items_per_page-1);
+            size_t index = head_counter/concurrent_queue_rep::n_queue & (base.items_per_page-1);
             size_t end_in_first_page = (index+n_items<base.items_per_page)?(index+n_items):base.items_per_page;
 
             head_page = make_copy( base, srcp, index, end_in_first_page, g_index );
@@ -387,7 +380,7 @@ concurrent_queue_base_v3::concurrent_queue_base_v3( size_t item_size ) {
     // initialize pthread_mutex_t, and pthread_cond_t
     pthread_mutexattr_t m_attr;
     pthread_mutexattr_init( &m_attr );
-#ifdef PTHREAD_PRIO_INHERIT 
+#if defined(PTHREAD_PRIO_INHERIT) && !__TBB_PRIO_INHERIT_BROKEN
     pthread_mutexattr_setprotocol( &m_attr, PTHREAD_PRIO_INHERIT );
 #endif
     pthread_mutex_init( &my_rep->mtx_items_avail, &m_attr );
@@ -426,10 +419,10 @@ concurrent_queue_base_v3::~concurrent_queue_base_v3() {
 void concurrent_queue_base_v3::internal_push( const void* src ) {
     concurrent_queue_rep& r = *my_rep;
 #if !__TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
-    ticket k  = r.tail_counter++;
+    ticket k = r.tail_counter++;
     ptrdiff_t e = my_capacity;
     if( e<concurrent_queue_rep::infinite_capacity ) {
-        AtomicBackoff backoff;
+        atomic_backoff backoff;
         for(;;) {
             if( (ptrdiff_t)(k-r.head_counter)<e ) break;
             backoff.pause();
@@ -440,7 +433,7 @@ void concurrent_queue_base_v3::internal_push( const void* src ) {
 #elif _WIN32||_WIN64
     ticket k = r.tail_counter++;
     ptrdiff_t e = my_capacity;
-    AtomicBackoff backoff;
+    atomic_backoff backoff;
 #if DO_ITT_NOTIFY
     bool sync_prepare_done = false;
 #endif
@@ -492,7 +485,7 @@ void concurrent_queue_base_v3::internal_push( const void* src ) {
 #else 
     ticket k = r.tail_counter++;
     ptrdiff_t e = my_capacity;
-    AtomicBackoff backoff;
+    atomic_backoff backoff;
 #if DO_ITT_NOTIFY
     bool sync_prepare_done = false;
 #endif
@@ -541,7 +534,7 @@ void concurrent_queue_base_v3::internal_pop( void* dst ) {
     } while( !r.choose(k).pop(dst,k,*this) );
 #elif _WIN32||_WIN64
     ticket k;
-    AtomicBackoff backoff;
+    atomic_backoff backoff;
 #if DO_ITT_NOTIFY
     bool sync_prepare_done = false;
 #endif
@@ -592,7 +585,7 @@ void concurrent_queue_base_v3::internal_pop( void* dst ) {
     }
 #else 
     ticket k;
-    AtomicBackoff backoff;
+    atomic_backoff backoff;
 #if DO_ITT_NOTIFY
     bool sync_prepare_done = false;
 #endif
@@ -716,10 +709,16 @@ bool concurrent_queue_base_v3::internal_push_if_not_full( const void* src ) {
 
 ptrdiff_t concurrent_queue_base_v3::internal_size() const {
     __TBB_ASSERT( sizeof(ptrdiff_t)<=sizeof(size_t), NULL );
-    __TBB_ASSERT( ptrdiff_t(my_rep->tail_counter-my_rep->head_counter)>=0 || my_rep->n_invalid_entries==0, NULL );
     return ptrdiff_t(my_rep->tail_counter-my_rep->head_counter-my_rep->n_invalid_entries);
 }
 
+bool concurrent_queue_base_v3::internal_empty() const {
+    ticket tc = my_rep->tail_counter;
+    ticket hc = my_rep->head_counter;
+    // if tc!=r.tail_counter, the queue was not empty at some point between the two reads.
+    return ( tc==my_rep->tail_counter && ptrdiff_t(tc-hc-my_rep->n_invalid_entries)<=0 );
+}
+
 void concurrent_queue_base_v3::internal_set_capacity( ptrdiff_t capacity, size_t /*item_size*/ ) {
     my_capacity = capacity<0 ? concurrent_queue_rep::infinite_capacity : capacity;
 }
@@ -740,7 +739,7 @@ void concurrent_queue_base_v3::internal_throw_exception() const {
     throw bad_alloc();
 }
 
-void concurrent_queue_base_v3::assign( const concurrent_queue_base_v3& src ) {
+void concurrent_queue_base_v3::assign( const concurrent_queue_base& src ) {
     items_per_page = src.items_per_page;
     my_capacity = src.my_capacity;
 
@@ -781,7 +780,7 @@ public:
         } else {
             concurrent_queue_base::page* p = array[concurrent_queue_rep::index(k)];
             __TBB_ASSERT(p,NULL);
-            size_t i = k/concurrent_queue_rep::n_queue & my_queue.items_per_page-1;
+            size_t i = k/concurrent_queue_rep::n_queue & (my_queue.items_per_page-1);
             item = static_cast<unsigned char*>(static_cast<void*>(p+1)) + my_queue.item_size*i;
             return (p->mask & uintptr(1)<<i)!=0;
         }
diff --git a/src/tbb/concurrent_vector.cpp b/src/tbb/concurrent_vector.cpp
index ce7fba9..5a31c33 100644
--- a/src/tbb/concurrent_vector.cpp
+++ b/src/tbb/concurrent_vector.cpp
@@ -53,17 +53,26 @@ public:
     }
 
     inline static size_type find_segment_end(const concurrent_vector_base_v3 &v) {
-        segment_index_t u = v.my_segment==(&(v.my_storage[0])) ? pointers_per_short_table
-                                                               : pointers_per_long_table;
+        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 && v.my_segment[k].array )
+        while( k < u && s[k].array > __TBB_BAD_ALLOC )
             ++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, size_type /*element_size*/) {
+    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) )
+                --k; // while previous vector size is compact, decrement
+            // reasons to not do it:
+            // * constructor(n) is not ready to accept fragmented segments
+            // * backward compatibility due to that constructor
+            // * current version gives additional guarantee and faster init.
+            // * two calls to reserve() will give the same effect.
+            */
             v.my_first_block.compare_and_swap(k+1, 0); // store number of segments
         }
     }
@@ -76,15 +85,15 @@ public:
 
     //! Publish segment so other threads can see it.
     inline static void publish_segment( segment_t& s, void* rhs ) {
-    //TODO: see also itt_store_pointer_with_release_v3()
+    // see also itt_store_pointer_with_release_v3()
         ITT_NOTIFY( sync_releasing, &s.array );
         __TBB_store_with_release( s.array, rhs );
     }
 
-    inline static size_type enable_segment(concurrent_vector_base_v3 &v, size_type k, size_type element_size) {
-        __TBB_ASSERT( !v.my_segment[k].array, "concurrent operation during growth?" );
+    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?" );
         if( !k ) {
-            assign_first_segment_if_neccessary(v, default_initial_segments-1, element_size);
+            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
@@ -93,8 +102,8 @@ public:
             return 2;
         }
         size_type m = segment_size(k);
-        if( !v.my_first_block )
-            internal::SpinwaitWhileEq( v.my_first_block, segment_index_t(0) );
+        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
@@ -102,7 +111,7 @@ public:
             if( !array0 ) {
                 // sync_prepare called only if there is a wait
                 ITT_NOTIFY(sync_prepare, &s[0].array );
-                internal::SpinwaitWhileEq( s[0].array, (void*)0 );
+                spin_wait_while_eq( s[0].array, (void*)0 );
                 array0 = __TBB_load_with_acquire(s[0].array);
             }
             ITT_NOTIFY(sync_acquired, &s[0].array);
@@ -133,10 +142,10 @@ public:
         // if( !s ) throw bad_alloc() -- implemented in NFS_Allocate
         memset( s, 0, pointers_per_long_table*sizeof(segment_t) );
         // 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.
+        // 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)
-                internal::SpinwaitWhileEq(v.my_storage[i].array, (void*)0);
+                spin_wait_while_eq(v.my_storage[i].array, (void*)0);
 
         for( segment_index_t i = 0; i < pointers_per_short_table; i++)
             s[i] = v.my_storage[i];
@@ -151,6 +160,10 @@ 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
+        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");
+#endif
         my_segment = my_storage;
         NFS_Free( s );
     }
@@ -162,9 +175,9 @@ concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_capacit
 
 void concurrent_vector_base_v3::internal_throw_exception(size_type t) const {
     switch(t) {
-        case 0: throw out_of_range("Index out of range");
-        case 1: throw out_of_range("Index out of segments table range");
-        case 2: throw range_error ("Index is inside segment which failed to be allocated");
+        case 0: throw out_of_range("Index out of requested size range");
+        case 1: throw range_error ("Index out of allocated segment slots");
+        case 2: throw range_error ("Index is not allocated");
     }
 }
 
@@ -172,14 +185,17 @@ void concurrent_vector_base_v3::internal_reserve( size_type n, size_type element
     if( n>max_size ) {
         throw length_error("argument to ConcurrentVector::reserve exceeds ConcurrentVector::max_size()");
     }
-    helper::assign_first_segment_if_neccessary(*this, segment_index_of(n-1), element_size);
-    for( segment_index_t k = helper::find_segment_end(*this); segment_base(k)<n; ++k ) {
-        try {
+    __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);
-            helper::enable_segment(*this, k, element_size);
-        } catch(...) { // intercept exception here
-            my_segment[k].array = NULL; throw; // repair and rethrow
+            if(my_segment[k].array <= __TBB_BAD_ALLOC)
+                helper::enable_segment(*this, k, element_size);
         }
+    } catch(...) {
+        my_segment[k].array = NULL; throw; // repair and rethrow
     }
 }
 
@@ -188,7 +204,7 @@ void concurrent_vector_base_v3::internal_copy( const concurrent_vector_base_v3&
     my_early_size = n;
     my_segment = my_storage;
     if( n ) {
-        helper::assign_first_segment_if_neccessary(*this, segment_index_of(n), element_size);
+        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 ) {
             if( (src.my_segment == (segment_t*)src.my_storage && k >= pointers_per_short_table)
@@ -218,7 +234,7 @@ void concurrent_vector_base_v3::internal_assign( const concurrent_vector_base_v3
     }
     size_type dst_initialized_size = my_early_size;
     my_early_size = n;
-    helper::assign_first_segment_if_neccessary(*this, segment_index_of(n), element_size);
+    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);
@@ -257,7 +273,7 @@ void* concurrent_vector_base_v3::internal_push_back( size_type element_size, siz
             helper::enable_segment(*this, k_old, element_size);
         } else {
             ITT_NOTIFY(sync_prepare, &s.array);
-            internal::SpinwaitWhileEq( s.array, (void*)0 );
+            spin_wait_while_eq( s.array, (void*)0 );
             ITT_NOTIFY(sync_acquired, &s.array);
         }
     } else {
@@ -270,15 +286,38 @@ void* concurrent_vector_base_v3::internal_push_back( size_type element_size, siz
 }
 
 void concurrent_vector_base_v3::internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op2 init, const void *src ) {
+    internal_grow_to_at_least_with_result( new_size, element_size, init, src );
+}
+
+concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_grow_to_at_least_with_result( size_type new_size, size_type element_size, internal_array_op2 init, const void *src ) {
     size_type e = my_early_size;
     while( e<new_size ) {
         size_type f = my_early_size.compare_and_swap(new_size,e);
         if( f==e ) {
             internal_grow( e, new_size, element_size, init, src );
-            return;
+            break;
         }
         e = f;
     }
+    // Check/wait for segments allocation completes
+    segment_index_t i, k_old = segment_index_of( new_size-1 );
+    if( k_old >= pointers_per_short_table && my_segment == my_storage ) {
+        spin_wait_while_eq( my_segment, my_storage );
+    }
+    for( i = 0; i <= k_old; ++i ) {
+        segment_t &s = my_segment[i];
+        if(!s.array) {
+            ITT_NOTIFY(sync_prepare, &s.array);
+            atomic_backoff backoff;
+            do backoff.pause();
+            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 )
+            throw bad_last_alloc();
+    }
+    __TBB_ASSERT( internal_capacity() >= new_size, NULL);
+    return e;
 }
 
 concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_grow_by( size_type delta, size_type element_size, internal_array_op2 init, const void *src ) {
@@ -290,7 +329,7 @@ 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), element_size);
+    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);
@@ -301,7 +340,7 @@ void concurrent_vector_base_v3::internal_grow( const size_type start, size_type
                 helper::enable_segment(*this, k_old, element_size);
             } else {
                 ITT_NOTIFY(sync_prepare, &s.array);
-                internal::SpinwaitWhileEq( s.array, (void*)0 );
+                spin_wait_while_eq( s.array, (void*)0 );
                 ITT_NOTIFY(sync_acquired, &s.array);
             }
         } else {
@@ -317,6 +356,52 @@ void concurrent_vector_base_v3::internal_grow( const size_type start, size_type
     } while( tmp<finish );
 }
 
+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 );
+    } 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);
+    }
+}
+
 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);
diff --git a/src/tbb/dynamic_link.cpp b/src/tbb/dynamic_link.cpp
new file mode 100644
index 0000000..12d9a30
--- /dev/null
+++ b/src/tbb/dynamic_link.cpp
@@ -0,0 +1,133 @@
+/*
+    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 "dynamic_link.h"
+
+#ifndef LIBRARY_ASSERT
+#include "tbb/tbb_stddef.h"
+#define LIBRARY_ASSERT(x,y) __TBB_ASSERT(x,y)
+#endif /* LIBRARY_ASSERT */
+
+#if _WIN32||_WIN64
+    #include <malloc.h>     /* alloca */
+#else
+    #include <dlfcn.h>
+#if __FreeBSD__
+    #include <stdlib.h>     /* alloca */
+#else
+    #include <alloca.h>
+#endif
+#endif
+
+OPEN_INTERNAL_NAMESPACE
+
+#if __TBB_WEAK_SYMBOLS
+
+bool dynamic_link( const char* /*library*/, const dynamic_link_descriptor descriptors[], size_t n, size_t required )
+{
+    if ( required == ~(size_t)0 )
+        required = n;
+    LIBRARY_ASSERT( required<=n, "Number of required entry points exceeds their total number" );
+    size_t k = 0;
+    // Check if the first required entries are present in what was loaded into our process
+    while ( k < required && descriptors[k].ptr )
+        ++k;
+    if ( k < required )
+        return false;
+    // Commit all the entry points.
+    for ( k = 0; k < n; ++k )
+        *descriptors[k].handler = (pointer_to_handler) descriptors[k].ptr;
+    return true;
+}
+
+#else /* !__TBB_WEAK_SYMBOLS */
+
+bool dynamic_link( void* module, const dynamic_link_descriptor descriptors[], size_t n, size_t required )
+{
+    pointer_to_handler *h = (pointer_to_handler*)alloca(n * sizeof(pointer_to_handler));
+    if ( required == ~(size_t)0 )
+        required = n;
+    LIBRARY_ASSERT( required<=n, "Number of required entry points exceeds their total number" );
+    size_t k = 0;
+    for ( ; k < n; ++k ) {
+#if _WIN32||_WIN64
+        h[k] = pointer_to_handler(GetProcAddress( (HMODULE)module, descriptors[k].name ));
+#else
+        // Lvalue casting is used; this way icc -strict-ansi does not warn about nonstandard pointer conversion
+        (void *&)h[k] = dlsym( module, descriptors[k].name );
+#endif /* _WIN32||_WIN64 */
+        if ( !h[k] && k < required )
+            return false;
+    }
+    LIBRARY_ASSERT( k == n, "if required entries are initialized, all entries are expected to be walked");
+    // Commit the entry points.
+    // Cannot use memset here, because the writes must be atomic.
+    for( k = 0; k < n; ++k )
+        *descriptors[k].handler = h[k];
+    return true;
+}
+
+bool dynamic_link( const char* library, const dynamic_link_descriptor descriptors[], size_t n, size_t required, dynamic_link_handle* handle )
+{
+#if _WIN32||_WIN64
+    // Interpret non-NULL handle parameter as request to really link against another library.
+    if ( !handle && dynamic_link( GetModuleHandle(NULL), descriptors, n, required ) )
+        // Target library was statically linked into this executable
+        return true;
+    // Prevent Windows from displaying silly message boxes if it fails to load library
+    // (e.g. because of MS runtime problems - one of those crazy manifest related ones)
+    UINT prev_mode = SetErrorMode (SEM_FAILCRITICALERRORS);
+    dynamic_link_handle module = LoadLibrary (library);
+    SetErrorMode (prev_mode);
+#else
+    dynamic_link_handle module = dlopen( library, RTLD_LAZY ); 
+#endif /* _WIN32||_WIN64 */
+    if( module ) {
+        if( !dynamic_link( module, descriptors, n, required ) ) {
+            // Return true if the library is there and it contains all the expected entry points.
+            dynamic_unlink(module);
+            module = NULL;
+        }
+    }
+    if( handle ) 
+        *handle = module;
+    return module!=NULL;
+}
+
+void dynamic_unlink( dynamic_link_handle handle ) {
+    if( handle ) {
+#if _WIN32||_WIN64
+        FreeLibrary( handle );
+#else
+        dlclose( 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
new file mode 100644
index 0000000..b0c02e0
--- /dev/null
+++ b/src/tbb/dynamic_link.h
@@ -0,0 +1,104 @@
+/*
+    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_dynamic_link
+#define __TBB_dynamic_link
+
+// Support for dynamically linking to a shared library.
+// By default, the symbols defined here go in namespace tbb::internal.
+// The symbols can be put in another namespace by defining the preprocessor
+// symbols OPEN_INTERNAL_NAMESPACE and CLOSE_INTERNAL_NAMESPACE to open and
+// close the other namespace.  See default definition below for an example.
+
+#ifndef OPEN_INTERNAL_NAMESPACE
+#define OPEN_INTERNAL_NAMESPACE namespace tbb { namespace internal {
+#define CLOSE_INTERNAL_NAMESPACE }}
+#endif /* OPEN_INTERNAL_NAMESPACE */
+
+#include <stddef.h>
+#if _WIN32||_WIN64
+#include <windows.h>
+#endif /* _WIN32||_WIN64 */
+
+OPEN_INTERNAL_NAMESPACE
+
+//! Type definition for a pointer to a void somefunc(void)
+typedef void (*pointer_to_handler)();
+
+// Double cast through the void* from func_ptr in DLD macro is necessary to 
+// prevent warnings from some compilers (g++ 4.1)
+#if __TBB_WEAK_SYMBOLS
+
+#define DLD(s,h) {(pointer_to_handler)&s, (pointer_to_handler*)(void*)(&h)}
+//! Association between a handler name and location of pointer to it.
+struct dynamic_link_descriptor {
+    //! pointer to the handler
+    pointer_to_handler ptr;
+    //! Pointer to the handler
+    pointer_to_handler* handler;
+};
+
+#else /* !__TBB_WEAK_SYMBOLS */
+
+#define DLD(s,h) {#s, (pointer_to_handler*)(void*)(&h)}
+//! Association between a handler name and location of pointer to it.
+struct dynamic_link_descriptor {
+    //! Name of the handler
+    const char* name;
+    //! Pointer to the handler
+    pointer_to_handler* handler;
+};
+
+#endif /* !__TBB_WEAK_SYMBOLS */
+
+#if _WIN32||_WIN64
+typedef HMODULE dynamic_link_handle;
+#else 
+typedef void* dynamic_link_handle;
+#endif /* _WIN32||_WIN64 */
+
+//! Fill in dynamically linked handlers.
+/** 'n' is the length of the array descriptors[].
+    'required' is the number of the initial entries in the array descriptors[] 
+    that have to be found in order for the call to succeed. If the library and 
+    all the required handlers are found, then the corresponding handler pointers 
+    are set, and the return value is true.  Otherwise the original array of 
+    descriptors is left untouched and the return value is false. **/
+bool dynamic_link( const char* libraryname, 
+                   const dynamic_link_descriptor descriptors[], 
+                   size_t n, 
+                   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
+
+#endif /* __TBB_dynamic_link */
diff --git a/src/tbb/enumerable_thread_specific.cpp b/src/tbb/enumerable_thread_specific.cpp
new file mode 100644
index 0000000..f576fb3
--- /dev/null
+++ b/src/tbb/enumerable_thread_specific.cpp
@@ -0,0 +1,172 @@
+/*
+    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 "tbb/enumerable_thread_specific.h"
+#include "tbb/concurrent_queue.h"
+#include "tbb/cache_aligned_allocator.h"
+#include "tbb/atomic.h"
+#include "tbb/spin_mutex.h"
+
+namespace tbb {
+
+    namespace internal {
+
+        // Manages fake TLS keys and fake TLS space
+        // Uses only a single native TLS key through use of an enumerable_thread_specific< ... , ets_key_per_instance >
+        class tls_single_key_manager {
+
+            // Typedefs
+            typedef concurrent_vector<void *> local_vector_type;
+            typedef enumerable_thread_specific< local_vector_type, cache_aligned_allocator<local_vector_type>, ets_key_per_instance > my_ets_type;
+            typedef local_vector_type::size_type fake_key_t;
+
+            // The fake TLS space
+            my_ets_type my_vectors;
+
+            // The next never-yet-assigned fake TLS key
+            atomic< fake_key_t > next_key;
+
+            // A Q of fake TLS keys that can be reused
+            typedef spin_mutex free_mutex_t;
+            free_mutex_t free_mutex;
+
+            struct free_node_t {
+                fake_key_t key;        
+                free_node_t *next;
+            };
+
+            cache_aligned_allocator< free_node_t > my_allocator;
+            free_node_t *free_stack;
+
+            bool pop_if_present( fake_key_t &k ) { 
+                free_node_t *n = NULL;
+                {
+                    free_mutex_t::scoped_lock(free_mutex);
+                    n = free_stack;
+                    if (n) free_stack = n->next;
+                }
+                if ( n ) {
+                    k = n->key;
+                    my_allocator.deallocate(n,1);
+                    return true;
+                }
+                return false;
+            }
+
+            void push( fake_key_t &k ) { 
+                free_node_t *n = my_allocator.allocate(1); 
+                n->key = k;
+                {
+                    free_mutex_t::scoped_lock(free_mutex);
+                    n->next = free_stack;
+                    free_stack = n;
+                }
+            }
+
+        public:
+
+            tls_single_key_manager() : free_stack(NULL)  {
+                next_key = 0;
+            }
+
+            ~tls_single_key_manager() {
+                free_node_t *n = free_stack; 
+                while (n != NULL) {
+                    free_node_t *next = n->next;
+                    my_allocator.deallocate(n,1);
+                    n = next;
+                }
+            }
+
+            // creates or finds an available fake TLS key
+            inline void create_key( fake_key_t &k ) {
+                if ( !(free_stack && pop_if_present( k )) ) {
+                    k = next_key.fetch_and_add(1);     
+                } 
+            }
+
+            // resets the fake TLS space associated with the key and then recycles the key
+            inline void destroy_key( fake_key_t &k ) {
+                for ( my_ets_type::iterator i = my_vectors.begin(); i != my_vectors.end(); ++i ) {
+                    local_vector_type &ivec = *i;
+                    if (ivec.size() > k) 
+                        ivec[k] = NULL;
+                } 
+                push(k);
+            }
+
+            // sets the fake TLS space to point to the given value for this thread
+            inline void set_tls( fake_key_t &k, void *value ) {
+                local_vector_type &my_vector = my_vectors.local();
+                local_vector_type::size_type size = my_vector.size();
+
+                if ( size <= k ) { 
+                    // We use grow_by so that we can initialize the pointers to NULL
+                    my_vector.grow_by( k - size + 1, NULL );
+                }
+                my_vector[k] = value;
+            }
+
+            inline void *get_tls( fake_key_t &k ) {
+                local_vector_type &my_vector = my_vectors.local();
+                if (my_vector.size() > k) 
+                    return my_vector[k];
+                else
+                    return NULL;
+            }
+
+        };
+
+        // The single static instance of tls_single_key_manager
+        static tls_single_key_manager tls_key_manager;
+
+        // The EXPORTED functions
+        void
+        tls_single_key_manager_v4::create_key( tls_key_t &k) {
+            tls_key_manager.create_key( k );
+        }
+
+        void
+        tls_single_key_manager_v4::destroy_key( tls_key_t &k) {
+            tls_key_manager.destroy_key( k );
+        }
+
+        void
+        tls_single_key_manager_v4::set_tls( tls_key_t &k, void *value) {
+             tls_key_manager.set_tls( k, value);
+        }
+
+        void *
+        tls_single_key_manager_v4::get_tls( tls_key_t &k ) {
+            return tls_key_manager.get_tls( k );
+        }
+ 
+    }
+
+}
+
diff --git a/src/tbb/gate.h b/src/tbb/gate.h
index 3b39624..fb12836 100644
--- a/src/tbb/gate.h
+++ b/src/tbb/gate.h
@@ -35,7 +35,33 @@ namespace tbb {
 
 namespace internal {
 
-#if __TBB_USE_FUTEX
+#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. */
@@ -94,17 +120,18 @@ private:
     HANDLE event;
 public:
     //! Initialize with count=0
-    Gate() :   
-    state(0) 
-    {
+    Gate() : state(0) {
         event = CreateEvent( NULL, true, false, NULL );
         InitializeCriticalSection( &critical_section );
-        ITT_SYNC_CREATE(event, SyncType_Scheduler, SyncObj_Gate);
+        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 {
diff --git a/src/tbb/itanium-gas/atomic_support.s b/src/tbb/ia64-gas/atomic_support.s
similarity index 100%
rename from src/tbb/itanium-gas/atomic_support.s
rename to src/tbb/ia64-gas/atomic_support.s
diff --git a/src/tbb/itanium-gas/pause.s b/src/tbb/ia64-gas/ia64_misc.s
similarity index 80%
copy from src/tbb/itanium-gas/pause.s
copy to src/tbb/ia64-gas/ia64_misc.s
index bead89b..999bfb9 100644
--- a/src/tbb/itanium-gas/pause.s
+++ b/src/tbb/ia64-gas/ia64_misc.s
@@ -24,18 +24,12 @@
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.
 
-	.section .text
-	.align 16
-	// void __TBB_machine_pause( long count );
-	// r32 = count
-	.proc  __TBB_machine_pause#
-	.global __TBB_machine_pause#
-count = r32
-__TBB_machine_pause:
-        hint.m 0
-	add count=-1,count
-;;
-	cmp.eq p6,p7=0,count
-(p7)	br.cond.dpnt __TBB_machine_pause
-(p6)   	br.ret.sptk.many b0	
-	.endp __TBB_machine_pause#
+	// RSE backing store pointer retrieval
+    .section .text
+    .align 16
+    .proc __TBB_get_bsp#
+    .global __TBB_get_bsp#
+__TBB_get_bsp:
+        mov r8=ar.bsp
+        br.ret.sptk.many b0
+    .endp __TBB_get_bsp#
diff --git a/src/tbb/itanium-gas/lock_byte.s b/src/tbb/ia64-gas/lock_byte.s
similarity index 100%
rename from src/tbb/itanium-gas/lock_byte.s
rename to src/tbb/ia64-gas/lock_byte.s
diff --git a/src/tbb/itanium-gas/log2.s b/src/tbb/ia64-gas/log2.s
similarity index 100%
rename from src/tbb/itanium-gas/log2.s
rename to src/tbb/ia64-gas/log2.s
diff --git a/src/tbb/itanium-gas/pause.s b/src/tbb/ia64-gas/pause.s
similarity index 100%
rename from src/tbb/itanium-gas/pause.s
rename to src/tbb/ia64-gas/pause.s
diff --git a/src/tbb/index.html b/src/tbb/index.html
new file mode 100644
index 0000000..c927b94
--- /dev/null
+++ b/src/tbb/index.html
@@ -0,0 +1,32 @@
+<HTML>
+<BODY>
+
+<H2>Overview</H2>
+This directory contains the source code of the TBB core components.
+
+<H2>Directories</H2>
+<DL>
+<DT><A HREF="tools_api">tools_api</A>
+<DD>Source code of the interface components provided by the Intel® Parallel Studio tools.
+<DT><A HREF="intel64-masm">intel64-masm</A>
+<DD>Assembly code for the Intel® 64 architecture.
+<DT><A HREF="ia32-masm">ia32-masm</A>
+<DD>Assembly code for IA32 architecture.
+<DT><A HREF="ia64-gas">ia64-gas</A>
+<DD>Assembly code for IA64 architecture.
+<DT><A HREF="ibm_aix51">ibm_aix51</A>
+<DD>Assembly code for AIX 5.1 port.
+</DL>
+
+<HR>
+<A HREF="../index.html">Up to parent directory</A>
+<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.
+</BODY>
+</HTML>
diff --git a/src/tbb/em64t-masm/atomic_support.asm b/src/tbb/intel64-masm/atomic_support.asm
similarity index 100%
rename from src/tbb/em64t-masm/atomic_support.asm
rename to src/tbb/intel64-masm/atomic_support.asm
diff --git a/src/tbb/itt_notify.cpp b/src/tbb/itt_notify.cpp
index f6901c5..27ebbff 100644
--- a/src/tbb/itt_notify.cpp
+++ b/src/tbb/itt_notify.cpp
@@ -26,12 +26,56 @@
     the GNU General Public License.
 */
 
-#if !defined(INSTANTIATE_ITT_NOTIFY)
-#define INSTANTIATE_ITT_NOTIFY 1
-#endif
 #include "itt_notify.h"
-#include "tbb_misc.h"
 #include "tbb/tbb_machine.h"
+
+#include <stdio.h>
+
+namespace tbb {
+    namespace internal {
+
+#if __TBB_NEW_ITT_NOTIFY
+#if DO_ITT_NOTIFY
+
+    extern "C" int __TBB_load_ittnotify();
+
+    bool InitializeITT () {
+        return __TBB_load_ittnotify() != 0;
+    }
+
+
+#endif /* DO_ITT_NOTIFY */
+#endif /* __TBB_NEW_ITT_NOTIFY */
+
+    void itt_store_pointer_with_release_v3( void* dst, void* src ) {
+        ITT_NOTIFY(sync_releasing, dst);
+        __TBB_store_with_release(*static_cast<void**>(dst),src);
+    }
+
+    void* itt_load_pointer_with_acquire_v3( const void* src ) {
+        void* result = __TBB_load_with_acquire(*static_cast<void*const*>(src));
+        ITT_NOTIFY(sync_acquired, const_cast<void*>(src));
+        return result;
+    }
+
+    void* itt_load_pointer_v3( const void* src ) {
+        void* result = *static_cast<void*const*>(src);
+        return result;
+    }
+
+    void itt_set_sync_name_v3( void* obj, const tchar* name) {
+        ITT_SYNC_RENAME(obj, name);
+        (void)obj, (void)name;  // Prevents compiler warning when ITT support is switched off
+    }
+
+    } // namespace internal
+} // namespace tbb
+
+
+#if !__TBB_NEW_ITT_NOTIFY
+
+#include "tbb_misc.h"
+#include "dynamic_link.h"
 #include "tbb/cache_aligned_allocator.h" /* NFS_MaxLineSize */
 
 #if _WIN32||_WIN64
@@ -45,10 +89,8 @@
     #pragma weak __itt_notify_sync_cancel
     #pragma weak __itt_thr_name_set
     #pragma weak __itt_thread_set_name
-#if __TBB_NAMING_API_SUPPORT
     #pragma weak __itt_sync_create
     #pragma weak __itt_sync_rename
-#endif /* __TBB_NAMING_API_SUPPORT */
     extern "C" {
         void __itt_notify_sync_prepare(void *p);
         void __itt_notify_sync_cancel(void *p);
@@ -56,10 +98,8 @@
         void __itt_notify_sync_releasing(void *p);
         int __itt_thr_name_set (void* p, int len);
         void __itt_thread_set_name (const char* name);
-#if __TBB_NAMING_API_SUPPORT
         void __itt_sync_create( void* obj, const char* name, const char* type, int attribute );
         void __itt_sync_rename( void* obj, const char* new_name );
-#endif /* __TBB_NAMING_API_SUPPORT */
     }
 #endif /* __TBB_WEAK_SYMBOLS */
 #endif /* !WIN */
@@ -69,8 +109,9 @@ namespace internal {
 
 #if DO_ITT_NOTIFY
 
+
 //! Table describing the __itt_notify handlers.
-static const DynamicLinkDescriptor ITT_HandlerTable[] = {
+static const dynamic_link_descriptor ITT_HandlerTable[] = {
     DLD( __itt_notify_sync_prepare, ITT_Handler_sync_prepare),
     DLD( __itt_notify_sync_acquired, ITT_Handler_sync_acquired),
     DLD( __itt_notify_sync_releasing, ITT_Handler_sync_releasing),
@@ -83,7 +124,7 @@ static const DynamicLinkDescriptor ITT_HandlerTable[] = {
     DLD( __itt_thread_set_name, ITT_Handler_thread_set_name),
 # endif /* _WIN32 || _WIN64 */
 
-#if __TBB_NAMING_API_SUPPORT
+
 # if _WIN32||_WIN64
     DLD( __itt_sync_createW, ITT_Handler_sync_create),
     DLD( __itt_sync_renameW, ITT_Handler_sync_rename)
@@ -91,11 +132,10 @@ static const DynamicLinkDescriptor ITT_HandlerTable[] = {
     DLD( __itt_sync_create, ITT_Handler_sync_create),
     DLD( __itt_sync_rename, ITT_Handler_sync_rename)
 # endif
-#endif /* __TBB_NAMING_API_SUPPORT */
 };
 
 static const int ITT_HandlerTable_size = 
-    sizeof(ITT_HandlerTable)/sizeof(DynamicLinkDescriptor);
+    sizeof(ITT_HandlerTable)/sizeof(dynamic_link_descriptor);
 
 // LIBITTNOTIFY_NAME is the name of the ITT notification library 
 # if _WIN32||_WIN64
@@ -117,7 +157,7 @@ bool InitializeITT() {
 	__TBB_ASSERT(!(t_checker&&t_profiler), NULL);
     if ( t_checker || t_profiler ) {
         // Yes, we are in the tool mode. Try to load libittnotify library.
-        result = FillDynamicLinks( LIBITTNOTIFY_NAME, ITT_HandlerTable, ITT_HandlerTable_size, 4 );
+        result = dynamic_link( LIBITTNOTIFY_NAME, ITT_HandlerTable, ITT_HandlerTable_size, 4 );
     }
     if (result){
         if ( t_checker ) {
@@ -135,10 +175,6 @@ bool InitializeITT() {
     return result;
 }
 
-#if !__TBB_NAMING_API_SUPPORT
-    #define ITT_DoOneTimeInitialization DoOneTimeInitializations
-#endif
-
 //! Performs one-time initialization of tools interoperability mechanisms.
 /** Defined in task.cpp. Makes a protected do-once call to InitializeITT(). **/
 void ITT_DoOneTimeInitialization();
@@ -192,7 +228,6 @@ void dummy_thread_set_name( const tchar* name ) {
         (*ITT_Handler_thread_set_name)( name );
 }
 
-#if __TBB_NAMING_API_SUPPORT
 void dummy_sync_create( void* obj, const tchar* objname, const tchar* objtype, int /*attribute*/ ) {
     ITT_DoOneTimeInitialization();
     __TBB_ASSERT( ITT_Handler_sync_create!=&dummy_sync_create, NULL );
@@ -205,7 +240,7 @@ void dummy_sync_rename( void* obj, const tchar* new_name ) {
     ITT_SYNC_RENAME(obj, new_name);
 }
 
-#endif /* __TBB_NAMING_API_SUPPORT */
+
 
 //! Leading padding before the area where tool notification handlers are placed.
 /** Prevents cache lines where the handler pointers are stored from thrashing.
@@ -224,41 +259,15 @@ PointerToITT_Handler ITT_Handler_sync_releasing = &dummy_sync_releasing;
 PointerToITT_Handler ITT_Handler_sync_cancel = &dummy_sync_cancel;
 PointerToITT_thr_name_set ITT_Handler_thr_name_set = &dummy_thr_name_set;
 PointerToITT_thread_set_name ITT_Handler_thread_set_name = &dummy_thread_set_name;
-#if __TBB_NAMING_API_SUPPORT
 PointerToITT_sync_create ITT_Handler_sync_create = &dummy_sync_create;
 PointerToITT_sync_rename ITT_Handler_sync_rename = &dummy_sync_rename;
-#endif /* __TBB_NAMING_API_SUPPORT */
 char __ITT_Handler_trailing_padding[NFS_MaxLineSize] = {0};
 
 target_tool current_tool = TO_BE_INITIALIZED;
 
 #endif /* DO_ITT_NOTIFY */
-
-void itt_store_pointer_with_release_v3( void* dst, void* src ) {
-    ITT_NOTIFY(sync_releasing, dst);
-    __TBB_store_with_release(*static_cast<void**>(dst),src);
-}
-
-void* itt_load_pointer_with_acquire_v3( const void* src ) {
-    void* result = __TBB_load_with_acquire(*static_cast<void*const*>(src));
-    ITT_NOTIFY(sync_acquired, const_cast<void*>(src));
-    return result;
-}
-
-void* itt_load_pointer_v3( const void* src ) {
-    void* result = *static_cast<void*const*>(src);
-    return result;
-}
-
-#if __TBB_NAMING_API_SUPPORT
-void itt_set_sync_name_v3( void *obj, const tchar* name) {
-#if DO_ITT_NOTIFY
-    __TBB_ASSERT( ITT_Handler_sync_rename!=&dummy_sync_rename, NULL );
-#endif
-    ITT_SYNC_RENAME(obj, name);
-}
-#endif /* __TBB_NAMING_API_SUPPORT */
-
 } // namespace internal 
 
 } // namespace tbb
+
+#endif /* !__TBB_NEW_ITT_NOTIFY */
diff --git a/src/tbb/itt_notify.h b/src/tbb/itt_notify.h
index 5de6146..c5dc20b 100644
--- a/src/tbb/itt_notify.h
+++ b/src/tbb/itt_notify.h
@@ -31,17 +31,28 @@
 
 #include "tbb/tbb_stddef.h"
 
-// IMPORTANT: To use itt_notify.cpp/itt_notify.h in a library, exactly
-// one of the files that #includes itt_notify.h should have
-//     #define INSTANTIATE_ITT_NOTIFY 1
-// just before the #include of "itt_notify.h".  
-// That file is the one that will have the instances of the hooks.
-//
-// The intent is to allow precise placement of the hooks.  Ideally, they
-// should reside on a hot mostly-read cache line.
+#if DO_ITT_NOTIFY
+#if __TBB_NEW_ITT_NOTIFY
 
-namespace tbb {
+#if _WIN32||_WIN64
+    #ifndef UNICODE
+        #define UNICODE
+    #endif
+#endif /* WIN */
+
+#include "tools_api/ittnotify.h"
+
+#if _WIN32||_WIN64
+    #undef _T
+    #undef __itt_event_create
+    #define __itt_event_create __itt_event_createA
+#endif /* WIN */
+
+#endif /* __TBB_NEW_ITT_NOTIFY */
+
+#endif /* DO_ITT_NOTIFY */
 
+namespace tbb {
 //! Unicode support
 #if _WIN32||_WIN64
     //! Unicode character type. Always wchar_t on Windows.
@@ -49,16 +60,66 @@ namespace tbb {
     typedef wchar_t tchar;
     //! Standard Windows macro to markup the string literals. 
     #define _T(string_literal) L ## string_literal
+#if !__TBB_NEW_ITT_NOTIFY
     #define tstrlen wcslen
+#endif /* !__TBB_NEW_ITT_NOTIFY */
 #else /* !WIN */
     typedef char tchar;
     //! Standard Windows style macro to markup the string literals.
     #define _T(string_literal) string_literal
+#if !__TBB_NEW_ITT_NOTIFY
     #define tstrlen strlen
+#endif /* !__TBB_NEW_ITT_NOTIFY */
 #endif /* !WIN */
+} // namespace tbb
+
+#if DO_ITT_NOTIFY
+namespace tbb {
+    //! Display names of internal synchronization types
+    extern const tchar 
+            *SyncType_GlobalLock,
+            *SyncType_Scheduler;
+    //! Display names of internal synchronization components/scenarios
+    extern const tchar 
+            *SyncObj_LibraryInitialization,
+            *SyncObj_SchedulerInitialization,
+            *SyncObj_SchedulersList,
+            *SyncObj_TaskStealingLoop,
+            *SyncObj_WorkerTaskPool,
+            *SyncObj_MasterTaskPool,
+            *SyncObj_GateLock,
+            *SyncObj_Gate,
+            *SyncObj_SchedulerTermination,
+            *SyncObj_ContextsList
+            ;
+
+    namespace internal {
+        void __TBB_EXPORTED_FUNC itt_set_sync_name_v3( void* obj, const tchar* name); 
+
+    } // namespace internal
 
 } // namespace tbb
 
+#if __TBB_NEW_ITT_NOTIFY
+// const_cast<void*>() is necessary to cast off volatility
+#define ITT_NOTIFY(name,obj)            __itt_notify_##name(const_cast<void*>(static_cast<volatile void*>(obj)))
+#define ITT_THREAD_SET_NAME(name)       __itt_thread_set_name(name)
+#define ITT_SYNC_CREATE(obj, type, name) __itt_sync_create(obj, type, name, 2)
+#define ITT_SYNC_RENAME(obj, name)      __itt_sync_rename(obj, name)
+#endif /* __TBB_NEW_ITT_NOTIFY */
+
+#else /* !DO_ITT_NOTIFY */
+
+#define ITT_NOTIFY(name,obj)            ((void)0)
+#define ITT_THREAD_SET_NAME(name)       ((void)0)
+#define ITT_SYNC_CREATE(obj, type, name) ((void)0)
+#define ITT_SYNC_RENAME(obj, name)      ((void)0)
+
+#endif /* !DO_ITT_NOTIFY */
+
+
+#if !__TBB_NEW_ITT_NOTIFY
+
 #if DO_ITT_NOTIFY
 
 namespace tbb {
@@ -79,26 +140,6 @@ enum target_tool {
     TO_BE_INITIALIZED = ~0ul
 };
 
-#if __TBB_NAMING_API_SUPPORT
-    //! Display names of internal synchronization types
-    extern const tchar 
-            *SyncType_GlobalLock,
-            *SyncType_Scheduler;
-    //! Display names of internal synchronization components/scenarios
-    extern const tchar 
-            *SyncObj_LibraryInitialization,
-            *SyncObj_SchedulerInitialization,
-            *SyncObj_SchedulersList,
-            *SyncObj_TaskStealingLoop,
-            *SyncObj_WorkerTaskPool,
-            *SyncObj_MasterTaskPool,
-            *SyncObj_GateLock,
-            *SyncObj_Gate,
-            *SyncObj_SchedulerTermination,
-            *SyncObj_ContextsList
-            ;
-#endif /* __TBB_NAMING_API_SUPPORT */
-
 namespace internal {
 
 //! Types of the tool notification functions (and corresponding proxy handlers). 
@@ -106,27 +147,18 @@ typedef void (*PointerToITT_Handler)(volatile void*);
 typedef int  (*PointerToITT_thr_name_set)(const tchar*, int);
 typedef void (*PointerToITT_thread_set_name)(const tchar*);
 
-#if __TBB_NAMING_API_SUPPORT
+
 typedef void (*PointerToITT_sync_create)(void* obj, const tchar* type, const tchar* name, int attribute);
 typedef void (*PointerToITT_sync_rename)(void* obj, const tchar* new_name);
 
-#if _WIN32||_WIN64
-void itt_set_sync_name_v3( void* obj, const wchar_t* src ); 
-#else
-void itt_set_sync_name_v3( void* obj, const char* name); 
-#endif
-#endif /* __TBB_NAMING_API_SUPPORT */
-
 extern PointerToITT_Handler ITT_Handler_sync_prepare;
 extern PointerToITT_Handler ITT_Handler_sync_acquired;
 extern PointerToITT_Handler ITT_Handler_sync_releasing;
 extern PointerToITT_Handler ITT_Handler_sync_cancel;
 extern PointerToITT_thr_name_set ITT_Handler_thr_name_set;
 extern PointerToITT_thread_set_name ITT_Handler_thread_set_name;
-#if __TBB_NAMING_API_SUPPORT
 extern PointerToITT_sync_create ITT_Handler_sync_create;
 extern PointerToITT_sync_rename ITT_Handler_sync_rename;
-#endif /* __TBB_NAMING_API_SUPPORT */
 
 extern target_tool current_tool;
 
@@ -151,28 +183,18 @@ extern target_tool current_tool;
             ITT_HANDLER(thread_set_name) ? ITT_HANDLER(thread_set_name)(name)   \
                                          : CALL_ITT_HANDLER(thr_name_set,(name, tstrlen(name))) )
 
-#if __TBB_NAMING_API_SUPPORT
 
 /** 2 is the value of __itt_attr_mutex attribute. **/
 #define ITT_SYNC_CREATE(obj, type, name) CALL_ITT_HANDLER(sync_create,(obj, type, name, 2))
 #define ITT_SYNC_RENAME(obj, name) CALL_ITT_HANDLER(sync_rename,(obj, name))
 
-#else /* !__TBB_NAMING_API_SUPPORT */
-
-#define ITT_SYNC_CREATE(obj, type, name) ((void)0)
-#define ITT_SYNC_RENAME(obj, name) ((void)0)
 
-#endif /* !__TBB_NAMING_API_SUPPORT */
 
 #else /* !DO_ITT_NOTIFY */
 
-#define ITT_NOTIFY(name,obj) ((void)0)
 #define ITT_NOTIFY_TOOL(tools,name,obj) ((void)0)
-#define ITT_THREAD_SET_NAME(name) ((void)0)
-#define ITT_SYNC_CREATE(obj, type, name) ((void)0)
-#define ITT_SYNC_RENAME(obj, name) ((void)0)
 
-#endif /* DO_ITT_NOTIFY */
+#endif /* !DO_ITT_NOTIFY */
 
 #if DO_ITT_QUIET
 #define ITT_QUIET(x) (__itt_thr_mode_set(__itt_thr_prop_quiet,(x)?__itt_thr_state_set:__itt_thr_state_clr))
@@ -180,4 +202,6 @@ extern target_tool current_tool;
 #define ITT_QUIET(x) ((void)0)
 #endif /* DO_ITT_QUIET */
 
+#endif /* !__TBB_NEW_ITT_NOTIFY */
+
 #endif /* _TBB_ITT_NOTIFY */
diff --git a/src/test/test_cache_aligned_allocator.cpp b/src/tbb/itt_notify_proxy.c
similarity index 71%
copy from src/test/test_cache_aligned_allocator.cpp
copy to src/tbb/itt_notify_proxy.c
index b5930a2..9d4e672 100644
--- a/src/test/test_cache_aligned_allocator.cpp
+++ b/src/tbb/itt_notify_proxy.c
@@ -26,20 +26,30 @@
     the GNU General Public License.
 */
 
-// Test whether cache_aligned_allocator works with some of the host's STL containers.
+#include "tbb/tbb_config.h"
 
-#include "tbb/cache_aligned_allocator.h"
-#include "tbb/tbb_allocator.h"
+/* This declaration in particular shuts up "empty translation unit" warning */
+extern int __TBB_load_ittnotify();
 
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-// the real body of the test is there:
-#include "test_allocator.h"
+#if __TBB_NEW_ITT_NOTIFY
+#if DO_ITT_NOTIFY
 
-int main(void)
-{
-    int result = TestMain<tbb::cache_aligned_allocator<void> >();
-    result += TestMain<tbb::tbb_allocator<void> >();   
+#if _WIN32||_WIN64
+    #ifndef UNICODE
+        #define UNICODE
+    #endif
+#endif /* WIN */
 
-    printf("done\n");
-    return result;
+extern void ITT_DoOneTimeInitialization();
+
+#define ITT_SIMPLE_INIT 1
+#define __itt_init_lib_name ITT_DoOneTimeInitialization
+
+#include "tools_api/ittnotify_static.c"
+
+int __TBB_load_ittnotify() {
+    return __itt_init_lib();
 }
+
+#endif /* DO_ITT_NOTIFY */
+#endif /* __TBB_NEW_ITT_NOTIFY */
diff --git a/src/tbb/lin32-tbb-export.def b/src/tbb/lin32-tbb-export.def
index ee00565..5fc2f53 100644
--- a/src/tbb/lin32-tbb-export.def
+++ b/src/tbb/lin32-tbb-export.def
@@ -26,6 +26,8 @@
     the GNU General Public License.
 */
 
+#include "tbb/tbb_config.h"
+
 {
 global:
 
@@ -40,6 +42,7 @@ _ZN3tbb8internal17is_malloc_used_v3Ev;
 /* task.cpp v3 */
 _ZN3tbb4task13note_affinityEt;
 _ZN3tbb4task22internal_set_ref_countEi;
+_ZN3tbb4task28internal_decrement_ref_countEv;
 _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE;
 _ZN3tbb4task4selfEv;
 _ZN3tbb4task7destroyERS0_;
@@ -69,10 +72,12 @@ _ZTSN3tbb10empty_taskE;
 _ZTVN3tbb10empty_taskE;
 
 /* exception handling support */
+#if __TBB_EXCEPTIONS
 _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEj;
 _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE;
 _ZNK3tbb18task_group_context28is_group_execution_cancelledEv;
 _ZN3tbb18task_group_context22cancel_group_executionEv;
+_ZN3tbb18task_group_context26register_pending_exceptionEv;
 _ZN3tbb18task_group_context5resetEv;
 _ZN3tbb18task_group_context4initEv;
 _ZN3tbb18task_group_contextD1Ev;
@@ -100,6 +105,7 @@ _ZNK3tbb14bad_last_alloc4whatEv;
 _ZTIN3tbb14bad_last_allocE;
 _ZTSN3tbb14bad_last_allocE;
 _ZTVN3tbb14bad_last_allocE;
+#endif /* __TBB_EXCEPTIONS */
 
 /* tbb_misc.cpp */
 _ZN3tbb17assertion_failureEPKciS1_S1_;
@@ -110,6 +116,7 @@ _ZN3tbb8internal15runtime_warningEPKcz;
 __TBB_machine_store8_slow_perf_warning;
 __TBB_machine_store8_slow;
 TBB_runtime_interface_version;
+_ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev;
 
 /* itt_notify.cpp */
 _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv;
@@ -126,8 +133,12 @@ _ZN3tbb8pipeline10add_filterERNS_6filterE;
 _ZN3tbb8pipeline12inject_tokenERNS_4taskE;
 _ZN3tbb8pipeline13remove_filterERNS_6filterE;
 _ZN3tbb8pipeline3runEj;
+#if __TBB_EXCEPTIONS
 _ZN3tbb8pipeline3runEjRNS_18task_group_contextE;
+#endif
 _ZN3tbb8pipeline5clearEv;
+_ZN3tbb19thread_bound_filter12process_itemEv;
+_ZN3tbb19thread_bound_filter16try_process_itemEv;
 _ZTIN3tbb8pipelineE;
 _ZTSN3tbb8pipelineE;
 _ZTVN3tbb8pipelineE;
@@ -195,10 +206,10 @@ _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_;
 _ZN3tbb13queuing_mutex11scoped_lock7releaseEv;
 _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_;
 
+#if !TBB_NO_LEGACY
 /* concurrent_hash_map */
 _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv;
 
-#if !TBB_NO_LEGACY
 /* concurrent_queue.cpp v2 */
 _ZN3tbb8internal21concurrent_queue_base12internal_popEPv;
 _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv;
@@ -238,6 +249,7 @@ _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv;
 _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv;
 _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityEij;
 _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv;
+_ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv;
 _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv;
 _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv;
 _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_;
@@ -267,6 +279,8 @@ _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEjPvPFvS2_jEPFvS2_P
 _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_;
 _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEj;
 _ZN3tbb8internal25concurrent_vector_base_v3D2Ev;
+_ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEjjjPKvPFvPvjEPFvS4_S3_jE;
+_ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEjjPFvPvPKvjES4_;
 
 /* tbb_thread */
 _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_;
diff --git a/src/tbb/lin64-tbb-export.def b/src/tbb/lin64-tbb-export.def
index a9d93a1..40b245b 100644
--- a/src/tbb/lin64-tbb-export.def
+++ b/src/tbb/lin64-tbb-export.def
@@ -26,6 +26,8 @@
     the GNU General Public License.
 */
 
+#include "tbb/tbb_config.h"
+
 {
 global:
 
@@ -40,6 +42,7 @@ _ZN3tbb8internal17is_malloc_used_v3Ev;
 /* task.cpp v3 */
 _ZN3tbb4task13note_affinityEt;
 _ZN3tbb4task22internal_set_ref_countEi;
+_ZN3tbb4task28internal_decrement_ref_countEv;
 _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE;
 _ZN3tbb4task4selfEv;
 _ZN3tbb4task7destroyERS0_;
@@ -69,10 +72,12 @@ _ZTSN3tbb10empty_taskE;
 _ZTVN3tbb10empty_taskE;
 
 /* exception handling support */
+#if __TBB_EXCEPTIONS
 _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm;
 _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE;
 _ZNK3tbb18task_group_context28is_group_execution_cancelledEv;
 _ZN3tbb18task_group_context22cancel_group_executionEv;
+_ZN3tbb18task_group_context26register_pending_exceptionEv;
 _ZN3tbb18task_group_context5resetEv;
 _ZN3tbb18task_group_context4initEv;
 _ZN3tbb18task_group_contextD1Ev;
@@ -100,6 +105,7 @@ _ZNK3tbb14bad_last_alloc4whatEv;
 _ZTIN3tbb14bad_last_allocE;
 _ZTSN3tbb14bad_last_allocE;
 _ZTVN3tbb14bad_last_allocE;
+#endif /* __TBB_EXCEPTIONS */
 
 /* tbb_misc.cpp */
 _ZN3tbb17assertion_failureEPKciS1_S1_;
@@ -108,6 +114,7 @@ _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv;
 _ZN3tbb8internal13handle_perrorEiPKc;
 _ZN3tbb8internal15runtime_warningEPKcz;
 TBB_runtime_interface_version;
+_ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev;
 
 /* itt_notify.cpp */
 _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv;
@@ -124,8 +131,12 @@ _ZN3tbb8pipeline10add_filterERNS_6filterE;
 _ZN3tbb8pipeline12inject_tokenERNS_4taskE;
 _ZN3tbb8pipeline13remove_filterERNS_6filterE;
 _ZN3tbb8pipeline3runEm;
+#if __TBB_EXCEPTIONS
 _ZN3tbb8pipeline3runEmRNS_18task_group_contextE;
+#endif
 _ZN3tbb8pipeline5clearEv;
+_ZN3tbb19thread_bound_filter12process_itemEv;
+_ZN3tbb19thread_bound_filter16try_process_itemEv;
 _ZTIN3tbb8pipelineE;
 _ZTSN3tbb8pipelineE;
 _ZTVN3tbb8pipelineE;
@@ -193,10 +204,10 @@ _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_;
 _ZN3tbb13queuing_mutex11scoped_lock7releaseEv;
 _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_;
 
+#if !TBB_NO_LEGACY
 /* concurrent_hash_map */
 _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv;
 
-#if !TBB_NO_LEGACY
 /* concurrent_queue.cpp v2 */
 _ZN3tbb8internal21concurrent_queue_base12internal_popEPv;
 _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv;
@@ -237,6 +248,7 @@ _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv;
 _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv;
 _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityElm;
 _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv;
+_ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv;
 _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv;
 _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_;
 
@@ -265,6 +277,8 @@ _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_P
 _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_;
 _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm;
 _ZN3tbb8internal25concurrent_vector_base_v3D2Ev;
+_ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE;
+_ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_;
 
 /* tbb_thread */
 _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv;
diff --git a/src/tbb/lin64ipf-tbb-export.def b/src/tbb/lin64ipf-tbb-export.def
index 5589dad..22514d8 100644
--- a/src/tbb/lin64ipf-tbb-export.def
+++ b/src/tbb/lin64ipf-tbb-export.def
@@ -26,6 +26,8 @@
     the GNU General Public License.
 */
 
+#include "tbb/tbb_config.h"
+
 {
 global:
 
@@ -40,6 +42,7 @@ _ZN3tbb8internal17is_malloc_used_v3Ev;
 /* task.cpp v3 */
 _ZN3tbb4task13note_affinityEt;
 _ZN3tbb4task22internal_set_ref_countEi;
+_ZN3tbb4task28internal_decrement_ref_countEv;
 _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE;
 _ZN3tbb4task4selfEv;
 _ZN3tbb4task7destroyERS0_;
@@ -69,10 +72,12 @@ _ZTSN3tbb10empty_taskE;
 _ZTVN3tbb10empty_taskE;
 
 /* exception handling support */
+#if __TBB_EXCEPTIONS
 _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm;
 _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE;
 _ZNK3tbb18task_group_context28is_group_execution_cancelledEv;
 _ZN3tbb18task_group_context22cancel_group_executionEv;
+_ZN3tbb18task_group_context26register_pending_exceptionEv;
 _ZN3tbb18task_group_context5resetEv;
 _ZN3tbb18task_group_context4initEv;
 _ZN3tbb18task_group_contextD1Ev;
@@ -100,6 +105,7 @@ _ZNK3tbb14bad_last_alloc4whatEv;
 _ZTIN3tbb14bad_last_allocE;
 _ZTSN3tbb14bad_last_allocE;
 _ZTVN3tbb14bad_last_allocE;
+#endif /* __TBB_EXCEPTIONS */
 
 /* tbb_misc.cpp */
 _ZN3tbb17assertion_failureEPKciS1_S1_;
@@ -108,6 +114,7 @@ _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv;
 _ZN3tbb8internal13handle_perrorEiPKc;
 _ZN3tbb8internal15runtime_warningEPKcz;
 TBB_runtime_interface_version;
+_ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev;
 
 /* itt_notify.cpp */
 _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv;
@@ -124,8 +131,12 @@ _ZN3tbb8pipeline10add_filterERNS_6filterE;
 _ZN3tbb8pipeline12inject_tokenERNS_4taskE;
 _ZN3tbb8pipeline13remove_filterERNS_6filterE;
 _ZN3tbb8pipeline3runEm;
+#if __TBB_EXCEPTIONS
 _ZN3tbb8pipeline3runEmRNS_18task_group_contextE;
+#endif
 _ZN3tbb8pipeline5clearEv;
+_ZN3tbb19thread_bound_filter12process_itemEv;
+_ZN3tbb19thread_bound_filter16try_process_itemEv;
 _ZTIN3tbb8pipelineE;
 _ZTSN3tbb8pipelineE;
 _ZTVN3tbb8pipelineE;
@@ -193,10 +204,10 @@ _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_;
 _ZN3tbb13queuing_mutex11scoped_lock7releaseEv;
 _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_;
 
+#if !TBB_NO_LEGACY
 /* concurrent_hash_map */
 _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv;
 
-#if !TBB_NO_LEGACY
 /* concurrent_queue.cpp v2 */
 _ZN3tbb8internal21concurrent_queue_base12internal_popEPv;
 _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv;
@@ -237,6 +248,7 @@ _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv;
 _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv;
 _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityElm;
 _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv;
+_ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv;
 _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv;
 _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_;
 
@@ -265,6 +277,8 @@ _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_P
 _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_;
 _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm;
 _ZN3tbb8internal25concurrent_vector_base_v3D2Ev;
+_ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE;
+_ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_;
 
 /* tbb_thread */
 _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv;
diff --git a/src/tbb/mac32-tbb-export.def b/src/tbb/mac32-tbb-export.def
index 40d0904..9366805 100644
--- a/src/tbb/mac32-tbb-export.def
+++ b/src/tbb/mac32-tbb-export.def
@@ -35,6 +35,7 @@ __ZN3tbb8internal17is_malloc_used_v3Ev
 # task.cpp v3
 __ZN3tbb4task13note_affinityEt
 __ZN3tbb4task22internal_set_ref_countEi
+__ZN3tbb4task28internal_decrement_ref_countEv
 __ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE
 __ZN3tbb4task4selfEv
 __ZN3tbb4task7destroyERS0_
@@ -69,6 +70,7 @@ __ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm
 __ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE
 __ZNK3tbb18task_group_context28is_group_execution_cancelledEv
 __ZN3tbb18task_group_context22cancel_group_executionEv
+__ZN3tbb18task_group_context26register_pending_exceptionEv
 __ZN3tbb18task_group_context5resetEv
 __ZN3tbb18task_group_context4initEv
 __ZN3tbb18task_group_contextD1Ev
@@ -115,6 +117,7 @@ __ZN3tbb8internal15runtime_warningEPKcz
 ___TBB_machine_store8_slow_perf_warning
 ___TBB_machine_store8_slow
 _TBB_runtime_interface_version
+__ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev
 
 # itt_notify.cpp
 __ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv
@@ -133,6 +136,8 @@ __ZN3tbb8pipeline13remove_filterERNS_6filterE
 __ZN3tbb8pipeline3runEm
 __ZN3tbb8pipeline3runEmRNS_18task_group_contextE
 __ZN3tbb8pipeline5clearEv
+__ZN3tbb19thread_bound_filter12process_itemEv
+__ZN3tbb19thread_bound_filter16try_process_itemEv
 __ZN3tbb8pipelineC1Ev
 __ZN3tbb8pipelineC2Ev
 __ZN3tbb8pipelineD0Ev
@@ -200,10 +205,10 @@ __ZN3tbb13queuing_mutex11scoped_lock7releaseEv
 __ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_
 __ZN3tbb13queuing_mutex18internal_constructEv
 
+#if !TBB_NO_LEGACY
 # concurrent_hash_map
 __ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv
 
-#if !TBB_NO_LEGACY
 # concurrent_queue.cpp v2
 __ZN3tbb8internal21concurrent_queue_base12internal_popEPv
 __ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv
@@ -243,6 +248,7 @@ __ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv
 __ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv
 __ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityEim
 __ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv
+__ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv
 __ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv
 __ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv
 __ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_
@@ -272,6 +278,8 @@ __ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_
 __ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_
 __ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm
 __ZN3tbb8internal25concurrent_vector_base_v3D2Ev
+__ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE
+__ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_
 
 # tbb_thread
 __ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_
diff --git a/src/tbb/mac64-tbb-export.def b/src/tbb/mac64-tbb-export.def
index 731e488..c91c8ce 100644
--- a/src/tbb/mac64-tbb-export.def
+++ b/src/tbb/mac64-tbb-export.def
@@ -35,6 +35,7 @@ __ZN3tbb8internal17is_malloc_used_v3Ev
 # task.cpp v3
 __ZN3tbb4task13note_affinityEt
 __ZN3tbb4task22internal_set_ref_countEi
+__ZN3tbb4task28internal_decrement_ref_countEv
 __ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE
 __ZN3tbb4task4selfEv
 __ZN3tbb4task7destroyERS0_
@@ -69,6 +70,7 @@ __ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm
 __ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE
 __ZNK3tbb18task_group_context28is_group_execution_cancelledEv
 __ZN3tbb18task_group_context22cancel_group_executionEv
+__ZN3tbb18task_group_context26register_pending_exceptionEv
 __ZN3tbb18task_group_context5resetEv
 __ZN3tbb18task_group_context4initEv
 __ZN3tbb18task_group_contextD1Ev
@@ -112,6 +114,7 @@ __ZN3tbb17assertion_failureEPKciS1_S1_
 __ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E
 __ZN3tbb8internal13handle_perrorEiPKc
 __ZN3tbb8internal15runtime_warningEPKcz
+__ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev
 _TBB_runtime_interface_version
 
 # itt_notify.cpp
@@ -131,6 +134,8 @@ __ZN3tbb8pipeline13remove_filterERNS_6filterE
 __ZN3tbb8pipeline3runEm
 __ZN3tbb8pipeline3runEmRNS_18task_group_contextE
 __ZN3tbb8pipeline5clearEv
+__ZN3tbb19thread_bound_filter12process_itemEv
+__ZN3tbb19thread_bound_filter16try_process_itemEv
 __ZN3tbb8pipelineC1Ev
 __ZN3tbb8pipelineC2Ev
 __ZN3tbb8pipelineD0Ev
@@ -198,10 +203,10 @@ __ZN3tbb13queuing_mutex11scoped_lock7releaseEv
 __ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_
 __ZN3tbb13queuing_mutex18internal_constructEv
 
+#if !TBB_NO_LEGACY
 # concurrent_hash_map
 __ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv
 
-#if !TBB_NO_LEGACY
 # concurrent_queue.cpp v2
 __ZN3tbb8internal21concurrent_queue_base12internal_popEPv
 __ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv
@@ -242,6 +247,7 @@ __ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv
 __ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv
 __ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityElm
 __ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv
+__ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv
 __ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv
 __ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_
 
@@ -270,6 +276,8 @@ __ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_
 __ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_
 __ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm
 __ZN3tbb8internal25concurrent_vector_base_v3D2Ev
+__ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE
+__ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_
 
 # tbb_thread
 __ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv
diff --git a/src/tbb/pipeline.cpp b/src/tbb/pipeline.cpp
index 4c1d9f8..78ecb99 100644
--- a/src/tbb/pipeline.cpp
+++ b/src/tbb/pipeline.cpp
@@ -31,21 +31,28 @@
 #include "tbb/cache_aligned_allocator.h"
 #include "itt_notify.h"
 
+
 namespace tbb {
 
 namespace internal {
 
-//! This structure is used to store task information in ordered buffer
-struct task_info{
+//! This structure is used to store task information in a input buffer
+struct task_info {
     void* my_object;
+    //! Invalid unless a task went through an ordered stage.
     Token my_token;
+    //! False until my_token is set.
     bool my_token_ready;
     bool is_valid;
 };
+static task_info empty_info = {NULL, 0, false, false};
 
-//! A buffer of ordered items.
-/** Each item is a task, inserted into a position in the buffer corrsponding to a Token. */
+//! 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 {
+    friend class tbb::internal::pipeline_root_task;
+    friend class tbb::thread_bound_filter;
+
     typedef  Token  size_type;
 
     //! Array of deferred tasks that cannot yet start executing. 
@@ -75,10 +82,15 @@ class ordered_buffer {
 
     //! True for ordered filter, false otherwise. 
     bool is_ordered;
+
+    //! True for thread-bound filter, false otherwise. 
+    bool is_bound;
 public:
     //! Construct empty buffer.
-    ordered_buffer( bool is_ordered_ ) : array(NULL), array_size(0),
-                                         low_token(0), high_token(0), is_ordered(is_ordered_) {
+    ordered_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_) {
         grow(initial_buffer_size);
         __TBB_ASSERT( array, NULL );
     }
@@ -99,11 +111,19 @@ public:
     bool put_token( StageTask& putter ) {
         {
             spin_mutex::scoped_lock lock( array_mutex );
-            Token token = is_ordered ? putter.next_token_number() : high_token++;
-            if( token!=low_token ) {
+            Token token;
+            if( is_ordered ) {
+                if( !putter.my_token_ready ) {
+                    putter.my_token = high_token++;
+                    putter.my_token_ready = true;
+                }
+                token = putter.my_token;
+            } else
+                token = high_token++;
+            __TBB_ASSERT( (tokendiff_t)(token-low_token)>=0, NULL );
+            if( token!=low_token || is_bound ) {
                 // Trying to put token that is beyond low_token.
                 // Need to wait until low_token catches up before dispatching.
-                __TBB_ASSERT( (tokendiff_t)(token-low_token)>0, NULL );
                 if( token-low_token>=array_size ) 
                     grow( token-low_token+1 );
                 ITT_NOTIFY( sync_releasing, this );
@@ -119,7 +139,7 @@ public:
     // Using template to avoid explicit dependency on stage_task
     template<typename StageTask>
     void note_done( Token token, StageTask& spawner ) {
-        task_info wakee = {NULL, 0, 0, false};
+        task_info wakee = empty_info;
         {
             spin_mutex::scoped_lock lock( array_mutex );
             if( !is_ordered || token==low_token ) {
@@ -147,6 +167,38 @@ public:
         }
     }
 #endif
+
+    bool return_item(task_info& info, bool advance) {
+        spin_mutex::scoped_lock lock( array_mutex );
+        task_info& item = array[low_token&array_size-1];
+        ITT_NOTIFY( sync_acquired, this );
+        if( item.is_valid ) {
+            info = item;
+            item.is_valid = false;
+            if (advance) low_token++;
+            return true;
+        }
+        return false;
+    }
+
+    void put_item( task_info& info ) {
+        info.is_valid = true;
+        spin_mutex::scoped_lock lock( array_mutex );
+        Token token;
+        if( is_ordered ) {
+            if( !info.my_token_ready ) {
+                info.my_token = high_token++;
+                info.my_token_ready = true;
+            }
+            token = info.my_token;
+        } else
+            token = high_token++;
+        __TBB_ASSERT( (tokendiff_t)(token-low_token)>=0, NULL );
+        if( token-low_token>=array_size ) 
+            grow( token-low_token+1 );
+        ITT_NOTIFY( sync_releasing, this );
+        array[token&array_size-1] = info;
+    }
 };
 
 void ordered_buffer::grow( size_type minimum_size ) {
@@ -167,44 +219,29 @@ void ordered_buffer::grow( size_type minimum_size ) {
         cache_aligned_allocator<task_info>().deallocate(old_array,old_size);
 }
 
-class stage_task: public task {
+class stage_task: public task, public task_info {
 private:
     friend class tbb::pipeline;
     pipeline& my_pipeline;
-    void* my_object;
     filter* my_filter;  
-    //! Invalid until this task went through an ordered stage.
-    Token my_token;
-    //! False until my_token is set.
-    bool my_token_ready;
     //! True if this task has not yet read the input.
     bool my_at_start;
 public:
     //! Construct stage_task for first stage in a pipeline.
     /** Such a stage has not read any input yet. */
-    stage_task( pipeline& pipeline ) : 
+    stage_task( pipeline& pipeline ) :
+        task_info(empty_info),
         my_pipeline(pipeline), 
-        my_object(NULL),
         my_filter(pipeline.filter_list),
-        my_token_ready(false),
         my_at_start(true)
     {}
     //! Construct stage_task for a subsequent stage in a pipeline.
-    stage_task( pipeline& pipeline, filter* filter_list ) : 
+    stage_task( pipeline& pipeline, filter* filter_, const task_info& info ) :
+        task_info(info),
         my_pipeline(pipeline), 
-        my_filter(filter_list),
-        my_token_ready(false),
+        my_filter(filter_),
         my_at_start(false)
     {}
-    //! Requests the pipeline for the next token number
-    /** It's not thread safe! Callers should guarantee exclusive execution */
-    inline Token next_token_number () {
-        if(!my_token_ready) {
-            my_token = my_pipeline.token_counter++;
-            my_token_ready = true;
-        }
-        return my_token;
-    }
     //! The virtual task execution method
     /*override*/ task* execute();
 #if __TBB_EXCEPTIONS
@@ -220,11 +257,8 @@ public:
     //! Creates and spawns stage_task from task_info
     void spawn_stage_task(const task_info& info)
     {
-        stage_task* clone = new( allocate_additional_child_of(*my_pipeline.end_counter) ) stage_task( my_pipeline, my_filter );
-        clone->my_token = info.my_token;
-        clone->my_token_ready = info.my_token_ready;
-        clone->my_object = info.my_object;                
-        
+        stage_task* clone = new (allocate_additional_child_of(*parent())) 
+                                stage_task( my_pipeline, my_filter, info );
         spawn(*clone);
     }
     //! Puts current task information
@@ -238,15 +272,21 @@ public:
 
 task* stage_task::execute() {
     __TBB_ASSERT( !my_at_start || !my_object, NULL );
+    __TBB_ASSERT( !my_filter->is_bound(), NULL );
     if( my_at_start ) {
         if( my_filter->is_serial() ) {
             my_object = (*my_filter)(my_object);
             if( my_object ) {
-                my_token = my_pipeline.token_counter++;
-                my_token_ready = true;
+                if( my_filter->is_ordered() ) {
+                    my_token = my_pipeline.token_counter++; // ideally, with relaxed semantics
+                    my_token_ready = true;
+                } else if( (my_filter->my_filter_mode & my_filter->version_mask) >= __TBB_PIPELINE_VERSION(5) ) {
+                    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(*my_pipeline.end_counter) ) stage_task( my_pipeline ) );
+                    spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) );
             } else {
                 my_pipeline.end_of_input = true; 
                 return NULL;
@@ -254,20 +294,28 @@ task* stage_task::execute() {
         } else /*not is_serial*/ {
             if( my_pipeline.end_of_input )
                 return NULL;
+            if( (my_filter->my_filter_mode & my_filter->version_mask) >= __TBB_PIPELINE_VERSION(5) ) {
+                if( my_pipeline.has_thread_bound_filters )
+                    my_pipeline.token_counter++;
+            }
             ITT_NOTIFY( sync_releasing, &my_pipeline.input_tokens );
             if( --my_pipeline.input_tokens>0 )
-                spawn( *new( allocate_additional_child_of(*my_pipeline.end_counter) ) stage_task( my_pipeline ) );
+                spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) );
             my_object = (*my_filter)(my_object);
             if( !my_object ) {
                 my_pipeline.end_of_input = true; 
+                if( (my_filter->my_filter_mode & my_filter->version_mask) >= __TBB_PIPELINE_VERSION(5) ) {
+                    if( my_pipeline.has_thread_bound_filters )
+                        my_pipeline.token_counter--;
+                }
                 return NULL;
             }
         }
         my_at_start = false;
     } else {
         my_object = (*my_filter)(my_object);
-        if( ordered_buffer* input_buffer = my_filter->input_buffer )
-            input_buffer->note_done(my_token, *this);
+        if( my_filter->is_serial() )
+            my_filter->input_buffer->note_done(my_token, *this);
     }
     task* next = NULL;
     my_filter = my_filter->next_filter_in_pipeline; 
@@ -275,13 +323,24 @@ task* stage_task::execute() {
         // There is another filter to execute.
         // Crank up priority a notch.
         add_to_depth(1);
-        if( ordered_buffer* input_buffer = my_filter->input_buffer ) {
-            // The next filter must execute tokens in order.
-            if (input_buffer->put_token(*this )){
+        if( my_filter->is_serial() ) {
+            // The next filter must execute tokens in order
+            if( my_filter->input_buffer->put_token(*this) ){
+                // Can't proceed with the same item
+                if( my_filter->is_bound() ) {
+                    // Find the next non-thread-bound filter
+                    do {
+                        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()) ) 
+                        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. */
@@ -290,17 +349,115 @@ task* stage_task::execute() {
     } else {
         // Reached end of the pipe.  Inject a new token.
         // The token must be injected before execute() returns, in order to prevent the
-        // end_counter task's reference count from prematurely reaching 0.
-        set_depth( my_pipeline.end_counter->depth()+1 ); 
+        // 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 ) 
-                spawn( *new( allocate_additional_child_of(*my_pipeline.end_counter) ) stage_task( my_pipeline ) );
+            if( !my_pipeline.end_of_input && !my_pipeline.filter_list->is_bound() ) 
+                spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) );
         }
     }
     return next;
 }
 
+class pipeline_root_task: public task {
+    pipeline& my_pipeline;
+    bool do_segment_scanning;
+
+    /*override*/ task* execute() {
+        if( !my_pipeline.end_of_input )
+            if( !my_pipeline.filter_list->is_bound() )
+                if( my_pipeline.input_tokens > 0 ) {
+                    recycle_as_continuation();
+                    set_ref_count(1);
+                    return new( allocate_child() ) stage_task( my_pipeline );
+                }
+        if( do_segment_scanning ) {
+            filter* current_filter = my_pipeline.filter_list->next_segment;
+            /* first non-thread-bound filter that follows thread-bound one 
+            and may have valid items to process */
+            filter* first_suitable_filter = current_filter;
+            while( current_filter ) {
+                __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 )
+                {
+                    task_info info = empty_info;
+                    if( current_filter->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);
+                    }
+                    current_filter = current_filter->next_segment;
+                    if( !current_filter ) {
+                        if( !my_pipeline.end_of_input ) {
+                            recycle_as_continuation();
+                            return this;
+                        }
+                        current_filter = first_suitable_filter;
+                        __TBB_Yield();
+                    }
+                } else { 
+                    /* The preceding pipeline segment is empty. 
+                    Fast-forward to the next post-TBF segment. */
+                    first_suitable_filter = first_suitable_filter->next_segment;
+                    current_filter = first_suitable_filter; 
+                }
+            } /* end of while */
+            return NULL;
+        } else { 
+            if( !my_pipeline.end_of_input ) {
+                recycle_as_continuation();
+                return this;
+            }
+            return NULL;
+        }
+    }
+public:
+    pipeline_root_task( pipeline& pipeline ): my_pipeline(pipeline), do_segment_scanning(false)
+    {
+        __TBB_ASSERT( my_pipeline.filter_list, NULL );
+        filter* first = my_pipeline.filter_list;
+        if( (first->my_filter_mode & first->version_mask) >= __TBB_PIPELINE_VERSION(5) ) {
+            // Scanning the pipeline for segments 
+            filter* head_of_previous_segment = first;
+            for(  filter* subfilter=first->next_filter_in_pipeline;
+                  subfilter!=NULL;
+                  subfilter=subfilter->next_filter_in_pipeline )
+            {
+                if( subfilter->prev_filter_in_pipeline->is_bound() && !subfilter->is_bound() ) {
+                    do_segment_scanning = true;
+                    head_of_previous_segment->next_segment = subfilter;
+                    head_of_previous_segment = subfilter;
+                }
+            }
+        }
+    }
+};
+
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    // Workaround for overzealous compiler warnings
+    // Suppress compiler warning about constant conditional expression
+    #pragma warning (disable: 4127)
+#endif
+
+// The class destroys end_counter and clears all input buffers if pipeline was cancelled.
+class pipeline_cleaner: internal::no_copy {
+    pipeline& my_pipeline;  
+public:
+    pipeline_cleaner(pipeline& _pipeline) : 
+        my_pipeline(_pipeline)
+    {}
+    ~pipeline_cleaner(){
+#if __TBB_EXCEPTIONS
+        if (my_pipeline.end_counter->is_cancelled()) // Pipeline was cancelled
+            my_pipeline.clear_filters(); 
+#endif
+        my_pipeline.end_counter = NULL;            
+    }
+};
+
 } // namespace internal
 
 void pipeline::inject_token( task& ) {
@@ -321,9 +478,10 @@ pipeline::pipeline() :
     filter_list(NULL),
     filter_end(NULL),
     end_counter(NULL),
-    token_counter(0),
-    end_of_input(false)
+    end_of_input(false),
+    has_thread_bound_filters(false)
 {
+    token_counter = 0;
     input_tokens = 0;
 }
 
@@ -344,6 +502,8 @@ void pipeline::clear() {
             f->prev_filter_in_pipeline = filter::not_in_pipeline();
             f->my_pipeline = NULL;
         }
+        if ( (f->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(5) )
+            f->next_segment = NULL;
     }
     filter_list = filter_end = NULL;
 }
@@ -355,9 +515,6 @@ void pipeline::add_filter( filter& filter_ ) {
     __TBB_ASSERT( filter_.next_filter_in_pipeline==filter::not_in_pipeline(), "filter already part of pipeline?" );
     __TBB_ASSERT( !end_counter, "invocation of add_filter on running pipeline" );
 #endif    
-    if( filter_.is_serial() ) {
-        filter_.input_buffer = new internal::ordered_buffer( filter_.is_ordered() );
-    }
     if ( (filter_.my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(3) ) {
         filter_.my_pipeline = this;
         filter_.prev_filter_in_pipeline = filter_end;
@@ -377,6 +534,22 @@ void pipeline::add_filter( filter& filter_ ) {
         filter_end = reinterpret_cast<filter*>(&filter_.next_filter_in_pipeline);
         *reinterpret_cast<filter**>(filter_end) = NULL;
     }
+    if( (filter_.my_filter_mode & filter_.version_mask) >= __TBB_PIPELINE_VERSION(5) ) {
+        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() );
+        }
+        else {
+            if( filter_.prev_filter_in_pipeline && filter_.prev_filter_in_pipeline->is_bound() )
+                filter_.input_buffer = new internal::ordered_buffer( false, false );
+        }
+    } else {
+        if( filter_.is_serial() ) {
+            filter_.input_buffer = new internal::ordered_buffer( filter_.is_ordered(), false );
+        }
+    }
+
 }
 
 void pipeline::remove_filter( filter& filter_ ) {
@@ -397,6 +570,8 @@ void pipeline::remove_filter( filter& filter_ ) {
         filter_.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) )
+        filter_.next_segment = NULL;
     filter_.my_pipeline = NULL;
 }
 
@@ -407,35 +582,18 @@ 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?" );
-    // The class destroys end_counter and clears all ordered buffers if pipeline was cancelled.
-    class pipeline_cleaner: internal::no_copy {
-        pipeline& my_pipeline;        
-    public:
-        pipeline_cleaner(pipeline& _pipeline) : my_pipeline(_pipeline)
-        {}
-        ~pipeline_cleaner(){
-#if __TBB_EXCEPTIONS
-            if (my_pipeline.end_counter->is_cancelled()) // Pipeline was cancelled
-                my_pipeline.clear_filters(); 
-#endif
-            my_pipeline.end_counter->destroy(*my_pipeline.end_counter);
-            my_pipeline.end_counter = NULL;            
-        }
-    };
     if( filter_list ) {
         if( filter_list->next_filter_in_pipeline || !filter_list->is_serial() ) {
-            pipeline_cleaner my_pipeline_cleaner(*this);
+            internal::pipeline_cleaner my_pipeline_cleaner(*this);
             end_of_input = false;
 #if __TBB_EXCEPTIONS            
-            end_counter = new( task::allocate_root(context) ) empty_task;
+            end_counter = new( task::allocate_root(context) ) internal::pipeline_root_task( *this );
 #else
-            end_counter = new( task::allocate_root() ) empty_task;
+            end_counter = new( task::allocate_root() ) internal::pipeline_root_task( *this );
 #endif
-            // 2 = 1 for spawned child + 1 for wait
-            end_counter->set_ref_count(2);
             input_tokens = internal::Token(max_number_of_live_tokens);
-            // Prime the pump with the non-waiter
-            end_counter->spawn_and_wait_for_all( *new( end_counter->allocate_child() ) internal::stage_task( *this ) );
+            // 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.
@@ -464,5 +622,57 @@ filter::~filter() {
     }
 }
 
+thread_bound_filter::result_type thread_bound_filter::process_item() {
+    return internal_process_item(true);
+}
+
+thread_bound_filter::result_type thread_bound_filter::try_process_item() {
+    return internal_process_item(false);
+}
+
+thread_bound_filter::result_type thread_bound_filter::internal_process_item(bool is_blocking) {
+    internal::task_info info = internal::empty_info;
+    
+    if( !prev_filter_in_pipeline ) {
+        if( my_pipeline->end_of_input )
+            return end_of_stream;
+        while( my_pipeline->input_tokens == 0 ) {
+            if( is_blocking )
+                __TBB_Yield();
+            else
+                return item_not_available;
+        }
+        info.my_object = (*this)(info.my_object);
+        if( info.my_object ) {
+            my_pipeline->input_tokens--;
+            if( is_ordered() ) {
+                info.my_token = my_pipeline->token_counter;
+                info.my_token_ready = true;
+            }
+            my_pipeline->token_counter++; // ideally, with relaxed semantics
+        } else {
+            my_pipeline->end_of_input = true; 
+            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 )
+                return end_of_stream;
+            if( is_blocking )
+                __TBB_Yield();
+            else
+                return item_not_available;
+        }
+        info.my_object = (*this)(info.my_object);
+    }
+    if( next_filter_in_pipeline ) {
+        next_filter_in_pipeline->input_buffer->put_item(info);
+    } else {
+        my_pipeline->input_tokens++;
+    }
+
+    return success;
+}
+
 } // tbb
 
diff --git a/src/tbb/private_server.cpp b/src/tbb/private_server.cpp
new file mode 100644
index 0000000..b41ef0e
--- /dev/null
+++ b/src/tbb/private_server.cpp
@@ -0,0 +1,333 @@
+/*
+    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 "rml_tbb.h"
+#include "../server/thread_monitor.h"
+#include "tbb/atomic.h"
+#include "tbb/cache_aligned_allocator.h"
+#include "tbb/spin_mutex.h"
+#include "tbb/tbb_thread.h"
+
+using rml::internal::thread_monitor;
+
+namespace tbb {
+namespace internal {
+namespace rml {
+
+class private_server;
+
+class private_worker: no_copy {
+    //! State in finite-state machine that controls the worker.
+    /** State diagram:
+        open --> normal --> quit
+          |
+          V
+        plugged
+      */ 
+    enum state_t {
+        //! *this is initialized
+        st_init,
+        //! Associated thread is doing normal life sequence.
+        st_normal,
+        //! Associated thread is end normal life sequence.
+        st_quit,
+        //! Associated thread should skip normal life sequence, because private_server is shutting down.
+        st_plugged
+    };
+    atomic<state_t> my_state;
+    
+    //! Associated server
+    private_server& my_server; 
+
+    //! Associated client
+    tbb_client& my_client; 
+
+    //! 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" */
+    thread_monitor my_thread_monitor;
+
+    //! Link for list of sleeping workers
+    private_worker* my_next;
+
+    friend class private_server;
+
+    //! Actions executed by the associated thread 
+    void run();
+
+    //! Called by a thread (usually not the associated thread) to commence termination.
+    void start_shutdown();
+
+    static __RML_DECL_THREAD_ROUTINE thread_routine( void* arg );
+
+protected:
+    private_worker( private_server& server, tbb_client& client ) : 
+        my_server(server),
+        my_client(client)
+    {
+        my_state = st_init;
+    }
+
+};
+
+static const size_t cache_line_size = tbb::internal::NFS_MaxLineSize;
+
+
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    // Suppress overzealous compiler warnings about uninstantiatble class
+    #pragma warning(push)
+    #pragma warning(disable:4510 4610)
+#endif
+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) {}
+};
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    #pragma warning(pop)
+#endif
+
+class private_server: public tbb_server, no_copy {
+    tbb_client& my_client;
+    const tbb_client::size_type my_n_thread;
+
+    //! Number of jobs that could use their associated thread minus number of active threads.
+    /** If negative, indicates oversubscription.
+        If positive, indicates that more threads should run. 
+        Can be lowered asynchronously, but must be raised only while holding my_asleep_list_mutex,
+        because raising it impacts the invariant for sleeping threads. */
+    atomic<int> my_slack;
+
+    //! Counter used to determine when to delete this.
+    atomic<int> my_ref_count;
+
+    padded_private_worker* my_thread_array;
+
+    //! List of workers that are asleep or committed to sleeping until notified by another thread.
+    tbb::atomic<private_worker*> my_asleep_list_root;
+
+    //! Protects my_asleep_list_root
+    tbb::spin_mutex my_asleep_list_mutex;
+
+#if TBB_USE_ASSERT
+    atomic<int> my_net_slack_requests;
+#endif /* TBB_USE_ASSERT */
+
+    //! Used for double-check idiom
+    bool has_sleepers() const {
+        return my_asleep_list_root!=NULL;
+    }
+
+    //! Try to add t to list of sleeping workers
+    bool try_insert_in_asleep_list( private_worker& t );
+
+    //! Equivalent of adding additional_slack to my_slack and waking up to 2 threads if my_slack permits.
+    void wake_some( int additional_slack );
+
+    virtual ~private_server();
+    
+    void remove_server_ref() {
+        if( --my_ref_count==0 ) {
+            my_client.acknowledge_close_connection();
+            this->~private_server();
+            tbb::cache_aligned_allocator<private_server>().deallocate( this, 1 );
+        } 
+    }
+
+    friend class private_worker;
+public:
+    private_server( tbb_client& client );
+
+    /*override*/ version_type version() const {
+        return 0;
+    } 
+
+    /*override*/ void request_close_connection() {
+        for( size_t i=0; i<my_n_thread; ++i ) 
+            my_thread_array[i].start_shutdown();
+        remove_server_ref();
+    }
+
+    /*override*/ void yield() {__TBB_Yield();}
+
+    /*override*/ void independent_thread_number_changed( int ) {__TBB_ASSERT(false,NULL);}
+
+    /*override*/ unsigned default_concurrency() const {return tbb::tbb_thread::hardware_concurrency()-1;}
+
+    /*override*/ void adjust_job_count_estimate( int delta );
+};
+
+//------------------------------------------------------------------------
+// Methods of private_worker
+//------------------------------------------------------------------------
+__RML_DECL_THREAD_ROUTINE private_worker::thread_routine( void* arg ) {
+    private_worker* self = static_cast<private_worker*>(arg);
+    self->run();
+    return NULL;
+}
+
+void private_worker::start_shutdown() {
+    state_t s; 
+    // Transition from st_init or st_normal to st_plugged or st_quit
+    do {
+        s = my_state;
+        __TBB_ASSERT( s==st_init||s==st_normal, NULL );
+    } while( my_state.compare_and_swap( s==st_init? st_plugged : st_quit, s )!=s );
+    if( s==st_normal ) {
+        // May have invalidated invariant for sleeping, so wake up the thread.
+        // Note that the notify() here occurs without maintaining invariants for my_slack.
+        // It does not matter, because my_state==st_quit overrides checking of my_slack.
+        my_thread_monitor.notify();
+    } 
+}
+
+void private_worker::run() {
+    if( my_state.compare_and_swap( st_normal, st_init )==st_init ) {
+        ::rml::job& j = *my_client.create_one_job();
+        --my_server.my_slack;
+        while( my_state==st_normal ) {
+            if( my_server.my_slack>=0 ) {
+                my_client.process(j);
+            } else {
+                thread_monitor::cookie c;
+                // Prepare to wait
+                my_thread_monitor.prepare_wait(c);
+                // Check/set the invariant for sleeping
+                if( my_state==st_normal && my_server.try_insert_in_asleep_list(*this) ) {
+                    my_thread_monitor.commit_wait(c);
+                    // Propagate chain reaction
+                    if( my_server.has_sleepers() )
+                        my_server.wake_some(0);
+                } else {
+                    // Invariant broken
+                    my_thread_monitor.cancel_wait();
+                }
+            }
+        }
+        my_client.cleanup(j);
+        ++my_server.my_slack;
+    }
+    my_server.remove_server_ref();
+}
+
+//------------------------------------------------------------------------
+// Methods of private_server
+//------------------------------------------------------------------------
+private_server::private_server( tbb_client& client ) : 
+    my_client(client), 
+    my_n_thread(client.max_job_count()),
+    my_thread_array(NULL) 
+{
+    my_ref_count = my_n_thread+1;
+    my_slack = 0;
+#if TBB_USE_ASSERT
+    my_net_slack_requests = 0;
+#endif /* TBB_USE_ASSERT */
+    my_asleep_list_root = NULL;
+    size_t stack_size = client.min_stack_size();
+    my_thread_array = tbb::cache_aligned_allocator<padded_private_worker>().allocate( my_n_thread );
+    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 ); 
+        thread_monitor::launch( private_worker::thread_routine, t, stack_size );
+    } 
+}
+
+private_server::~private_server() {
+    __TBB_ASSERT( my_net_slack_requests==0, NULL );
+    for( size_t i=my_n_thread; i--; ) 
+        my_thread_array[i].~padded_private_worker();
+    tbb::cache_aligned_allocator<padded_private_worker>().deallocate( my_thread_array, my_n_thread );
+    tbb::internal::poison_pointer( my_thread_array );
+}
+
+inline bool private_server::try_insert_in_asleep_list( private_worker& t ) {
+    tbb::spin_mutex::scoped_lock lock(my_asleep_list_mutex);
+    // Contribute to slack under lock so that if another takes that unit of slack,
+    // it sees us sleeping on the list and wakes us up.
+    int k = ++my_slack;
+    if( k<=0 ) {
+        t.my_next = my_asleep_list_root;
+        my_asleep_list_root = &t;
+        return true;
+    } else {
+        --my_slack;
+        return false;
+    }
+}
+
+void private_server::wake_some( int additional_slack ) {
+    __TBB_ASSERT( additional_slack>=0, NULL );
+    private_worker* wakee[2];
+    private_worker**w = wakee;
+    {
+        tbb::spin_mutex::scoped_lock lock(my_asleep_list_mutex);
+        while( my_asleep_list_root && w<wakee+2 ) {
+            if( additional_slack>0 ) {
+                --additional_slack;
+            } else {
+                // Try to claim unit of slack
+                int old;
+                do {
+                    old = my_slack;
+                    if( old<=0 ) goto done;
+                } while( my_slack.compare_and_swap(old-1,old)!=old );
+            }
+            // Pop sleeping worker to combine with claimed unit of slack
+            my_asleep_list_root = (*w++ = my_asleep_list_root)->my_next;
+        }
+        if( additional_slack ) {
+            // Contribute our unused slack to my_slack.
+            my_slack += additional_slack;
+        }
+    }
+done:
+    while( w>wakee ) 
+        (*--w)->my_thread_monitor.notify();
+}
+
+void private_server::adjust_job_count_estimate( int delta ) {
+#if TBB_USE_ASSERT
+    my_net_slack_requests+=delta;
+#endif /* TBB_USE_ASSERT */
+    if( delta<0 ) {
+        my_slack+=delta;
+    } else if( delta>0 ) {
+        wake_some( delta );
+    }
+}
+
+//! Factory method called from task.cpp to create a private_server.
+tbb_server* make_private_server( tbb_client& client ) {
+    return new( tbb::cache_aligned_allocator<private_server>().allocate(1) ) private_server(client);
+}
+        
+} // namespace rml
+} // namespace internal
+} // namespace tbb
diff --git a/src/tbb/queuing_mutex.cpp b/src/tbb/queuing_mutex.cpp
index 9d62867..db2b986 100644
--- a/src/tbb/queuing_mutex.cpp
+++ b/src/tbb/queuing_mutex.cpp
@@ -55,7 +55,7 @@ void queuing_mutex::scoped_lock::acquire( queuing_mutex& m )
         ITT_NOTIFY(sync_prepare, mutex);
         __TBB_ASSERT( !pred->next, "the predecessor has another successor!");
         pred->next = this;
-        SpinwaitWhileEq( going, 0ul );
+        spin_wait_while_eq( going, 0ul );
     }
     ITT_NOTIFY(sync_acquired, mutex);
 
@@ -102,7 +102,7 @@ void queuing_mutex::scoped_lock::release( )
             goto done;
         }
         // Someone in the queue
-        SpinwaitWhileEq( next, (scoped_lock*)0 );
+        spin_wait_while_eq( next, (scoped_lock*)0 );
     }
     __TBB_ASSERT(next,NULL);
     __TBB_store_with_release(next->going, 1);
diff --git a/src/tbb/queuing_rw_mutex.cpp b/src/tbb/queuing_rw_mutex.cpp
index 45c03ce..4c70347 100644
--- a/src/tbb/queuing_rw_mutex.cpp
+++ b/src/tbb/queuing_rw_mutex.cpp
@@ -32,10 +32,11 @@
 
 #include "tbb/tbb_machine.h"
 #include "tbb/tbb_stddef.h"
-#include "tbb_misc.h"
+#include "tbb/tbb_machine.h"
 #include "tbb/queuing_rw_mutex.h"
 #include "itt_notify.h"
 
+
 namespace tbb {
 
 using namespace internal;
@@ -84,7 +85,7 @@ inline void queuing_rw_mutex::scoped_lock::release_internal_lock()
 
 inline void queuing_rw_mutex::scoped_lock::wait_for_release_of_internal_lock()
 {
-    SpinwaitUntilEq(internal_lock, RELEASED);
+    spin_wait_until_eq(internal_lock, RELEASED);
 }
 
 inline void queuing_rw_mutex::scoped_lock::unblock_or_wait_on_internal_lock( uintptr_t flag ) {
@@ -94,10 +95,18 @@ inline void queuing_rw_mutex::scoped_lock::unblock_or_wait_on_internal_lock( uin
         release_internal_lock();
 }
 
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+    // Workaround for overzealous compiler warnings
+    #pragma warning (push)
+    #pragma warning (disable: 4311 4312)
+#endif
+
+//! A view of a T* with additional functionality for twiddling low-order bits.
 template<typename T>
 class tricky_atomic_pointer: no_copy {
 public:
-    typedef typename atomic_word<sizeof(T*)>::word word;
+    typedef typename atomic_rep<sizeof(T*)>::word word;
+
     template<memory_semantics M>
     static T* fetch_and_add( T* volatile * location, word addend ) {
         return reinterpret_cast<T*>( atomic_traits<sizeof(T*),M>::fetch_and_add(location, addend) );
@@ -127,6 +136,11 @@ public:
 
 typedef tricky_atomic_pointer<queuing_rw_mutex::scoped_lock> tricky_pointer;
 
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+    // Workaround for overzealous compiler warnings
+    #pragma warning (pop)
+#endif
+
 //! Mask for low order bit of a pointer.
 static const tricky_pointer::word FLAG = 0x1;
 
@@ -163,7 +177,7 @@ void queuing_rw_mutex::scoped_lock::acquire( queuing_rw_mutex& m, bool write )
             __TBB_ASSERT( !pred->next, "the predecessor has another successor!");
             // ensure release semantics on IPF
            __TBB_store_with_release(pred->next,this);
-            SpinwaitUntilEq(going, 1);
+            spin_wait_until_eq(going, 1);
         }
 
     } else {            // Acquiring for read
@@ -192,7 +206,7 @@ void queuing_rw_mutex::scoped_lock::acquire( queuing_rw_mutex& m, bool write )
                 sync_prepare_done = true;
                 ITT_NOTIFY(sync_prepare, mutex);
 #endif
-                SpinwaitUntilEq(going, 1);
+                spin_wait_until_eq(going, 1);
             }
         }
         unsigned short old_state = state.compare_and_swap<tbb::acquire>(STATE_ACTIVEREADER, STATE_READER);
@@ -203,7 +217,7 @@ void queuing_rw_mutex::scoped_lock::acquire( queuing_rw_mutex& m, bool write )
 #endif
             // Failed to become active reader -> need to unblock the next waiting reader first
             __TBB_ASSERT( state==STATE_READER_UNBLOCKNEXT, "unexpected state" );
-            SpinwaitWhileEq(next, (scoped_lock*)NULL);
+            spin_wait_while_eq(next, (scoped_lock*)NULL);
             /* state should be changed before unblocking the next otherwise it might finish
                and another thread can get our old state and left blocked */
             state = STATE_ACTIVEREADER;
@@ -266,7 +280,7 @@ void queuing_rw_mutex::scoped_lock::release( )
                 // this was the only item in the queue, and the queue is now empty.
                 goto done;
             }
-            SpinwaitWhileEq( next, (scoped_lock*)NULL );
+            spin_wait_while_eq( next, (scoped_lock*)NULL );
             n = next;
         }
         n->going = 2; // protect next queue node from being destroyed too early
@@ -300,7 +314,7 @@ retry:
                 tmp = tricky_pointer::compare_and_swap<tbb::release>(&(this->prev), pred, tricky_pointer(pred)|FLAG );
                 if( !(tricky_pointer(tmp)&FLAG) ) {
                     // Wait for the predecessor to change this->prev (e.g. during unlink)
-                    SpinwaitWhileEq( this->prev, tricky_pointer(pred)|FLAG );
+                    spin_wait_while_eq( this->prev, tricky_pointer(pred)|FLAG );
                     // Now owner of pred is waiting for _us_ to release its lock
                     pred->release_internal_lock();
                 }
@@ -316,7 +330,7 @@ retry:
             __TBB_store_with_release(pred->next,reinterpret_cast<scoped_lock *>(NULL));
 
             if( !next && this != mutex->q_tail.compare_and_swap<tbb::release>(pred, this) ) {
-                SpinwaitWhileEq( next, (void*)NULL );
+                spin_wait_while_eq( next, (void*)NULL );
             }
             __TBB_ASSERT( !get_flag(next), "use of corrupted pointer" );
 
@@ -325,7 +339,7 @@ retry:
                 // Equivalent to I->next->prev = I->prev but protected against (prev[n]&FLAG)!=0
                 tmp = tricky_pointer::fetch_and_store<tbb::release>(&(next->prev), pred);
                 // I->prev->next = I->next;
-                __TBB_ASSERT(this->prev==pred, "");
+                __TBB_ASSERT(this->prev==pred, NULL);
                 __TBB_store_with_release(pred->next,next);
             }
             // Safe to release in the order opposite to acquiring which makes the code simplier
@@ -337,7 +351,7 @@ retry:
             scoped_lock* n = __TBB_load_with_acquire(next);
             if( !n ) {
                 if( this != mutex->q_tail.compare_and_swap<tbb::release>(NULL, this) ) {
-                    SpinwaitWhileEq( next, (scoped_lock*)NULL );
+                    spin_wait_while_eq( next, (scoped_lock*)NULL );
                     n = next;
                 } else {
                     goto unlock_self;
@@ -352,7 +366,7 @@ unlock_self:
         unblock_or_wait_on_internal_lock(get_flag(tmp));
     }
 done:
-    SpinwaitWhileEq( going, 2 );
+    spin_wait_while_eq( going, 2 );
 
     initialize();
 }
@@ -373,7 +387,7 @@ bool queuing_rw_mutex::scoped_lock::downgrade_to_reader()
             }
         }
         /* wait for the next to register */
-        SpinwaitWhileEq( next, (void*)NULL );
+        spin_wait_while_eq( next, (void*)NULL );
     }
     __TBB_ASSERT( next, "still no successor at this point!" );
     if( next->state & STATE_COMBINED_WAITINGREADER )
@@ -400,7 +414,7 @@ requested:
     __TBB_ASSERT( !( tricky_pointer(next) & FLAG ), "use of corrupted pointer!" );
     acquire_internal_lock();
     if( this != mutex->q_tail.compare_and_swap<tbb::release>(tricky_pointer(me)|FLAG, this) ) {
-        SpinwaitWhileEq( next, (void*)NULL );
+        spin_wait_while_eq( next, (void*)NULL );
         queuing_rw_mutex::scoped_lock * n;
         n = tricky_pointer::fetch_and_add<tbb::acquire>(&(this->next), FLAG);
         unsigned short n_state = n->state;
@@ -412,7 +426,7 @@ requested:
         if( n_state & (STATE_COMBINED_READER | STATE_UPGRADE_REQUESTED) ) {
             // save n|FLAG for simplicity of following comparisons
             tmp = tricky_pointer(n)|FLAG;
-            ExponentialBackoff backoff;
+            atomic_backoff backoff;
             while(next==tmp) {
                 if( state & STATE_COMBINED_UPGRADING ) {
                     if( __TBB_load_with_acquire(next)==tmp )
@@ -449,16 +463,16 @@ waiting:
         if( !success ) {
             tmp = tricky_pointer::compare_and_swap<tbb::release>(&(this->prev), pred, tricky_pointer(pred)|FLAG );
             if( tricky_pointer(tmp)&FLAG ) {
-                SpinwaitWhileEq(this->prev, pred);
+                spin_wait_while_eq(this->prev, pred);
                 pred = this->prev;
             } else {
-                SpinwaitWhileEq( this->prev, tricky_pointer(pred)|FLAG );
+                spin_wait_while_eq( this->prev, tricky_pointer(pred)|FLAG );
                 pred->release_internal_lock();
             }
         } else {
             this->prev = pred;
             pred->release_internal_lock();
-            SpinwaitWhileEq(this->prev, pred);
+            spin_wait_while_eq(this->prev, pred);
             pred = this->prev;
         }
         if( pred )
@@ -467,14 +481,14 @@ waiting:
         // restore the corrupted prev field for possible further use (e.g. if downgrade back to reader)
         this->prev = pred;
     }
-    __TBB_ASSERT( !pred && !this->prev, "" );
+    __TBB_ASSERT( !pred && !this->prev, NULL );
 
     // additional lifetime issue prevention checks
     // wait for the successor to finish working with my fields
     wait_for_release_of_internal_lock();
     // now wait for the predecessor to finish working with my fields
-    SpinwaitWhileEq( going, 2 );
-    // there is an acquire semantics statement in the end of SpinwaitWhileEq.
+    spin_wait_while_eq( going, 2 );
+    // there is an acquire semantics statement in the end of spin_wait_while_eq.
 
     bool result = ( state != STATE_UPGRADE_LOSER );
     state = STATE_WRITER;
diff --git a/src/tbb/spin_rw_mutex.cpp b/src/tbb/spin_rw_mutex.cpp
index 2b80a18..b3ce9d8 100644
--- a/src/tbb/spin_rw_mutex.cpp
+++ b/src/tbb/spin_rw_mutex.cpp
@@ -27,7 +27,7 @@
 */
 
 #include "tbb/spin_rw_mutex.h"
-#include "tbb_misc.h"
+#include "tbb/tbb_machine.h"
 #include "itt_notify.h"
 
 #if defined(_MSC_VER) && defined(_Wp64)
@@ -48,7 +48,7 @@ static inline T CAS(volatile T &addr, T newv, T oldv) {
 bool spin_rw_mutex_v3::internal_acquire_writer()
 {
     ITT_NOTIFY(sync_prepare, this);
-    internal::ExponentialBackoff backoff;
+    internal::atomic_backoff backoff;
     for(;;) {
         state_t s = const_cast<volatile state_t&>(state); // ensure reloading
         if( !(s & BUSY) ) { // no readers, no writers
@@ -75,7 +75,7 @@ void spin_rw_mutex_v3::internal_release_writer()
 void spin_rw_mutex_v3::internal_acquire_reader() 
 {
     ITT_NOTIFY(sync_prepare, this);
-    internal::ExponentialBackoff backoff;
+    internal::atomic_backoff backoff;
     for(;;) {
         state_t s = const_cast<volatile state_t&>(state); // ensure reloading
         if( !(s & (WRITER|WRITER_PENDING)) ) { // no writer or write requests
@@ -104,7 +104,7 @@ bool spin_rw_mutex_v3::internal_upgrade()
     while( (s & READERS)==ONE_READER || !(s & WRITER_PENDING) ) {
         state_t old_s = s;
         if( (s=CAS(state, s | WRITER | WRITER_PENDING, s))==old_s ) {
-            internal::ExponentialBackoff backoff;
+            internal::atomic_backoff backoff;
             ITT_NOTIFY(sync_prepare, this);
             // the state should be 0...0111, i.e. 1 reader and waiting writer;
             // both new readers and writers are blocked
diff --git a/src/tbb/task.cpp b/src/tbb/task.cpp
index d0df8ef..1404057 100644
--- a/src/tbb/task.cpp
+++ b/src/tbb/task.cpp
@@ -33,14 +33,16 @@
 
 #if USE_PTHREAD
 
-    // Some pthreads documentation says that <pthreads.h> must be first header.
+    // Some pthreads documentation says that <pthread.h> must be first header.
     #include <pthread.h>
+    #define __TBB_THREAD_ROUTINE 
 
 #elif USE_WINTHREAD
 
     #include <windows.h>
     #include <process.h>        /* Need _beginthreadex from there */
     #include <malloc.h>         /* Need _alloca from there */
+    #define __TBB_THREAD_ROUTINE WINAPI
 
 #else
 
@@ -56,9 +58,9 @@
 #include <new>
 #include "tbb/tbb_stddef.h"
 
-/* Temporarily change "private" to "public" while including "tbb/task.h"
-   This hack allows us to avoid publishing types Arena and CustomScheduler
-   in the public header files. */
+/* Temporarily change "private" to "public" while including "tbb/task.h".
+   This hack allows us to avoid publishing internal types and methods
+   in the public header files just for sake of friend declarations. */
 #define private public
 #include "tbb/task.h"
 #if __TBB_EXCEPTIONS
@@ -68,9 +70,7 @@
 
 #include "tbb/task_scheduler_init.h"
 #include "tbb/cache_aligned_allocator.h"
-#include "tbb/tbb_stddef.h"
 #include "tbb/tbb_machine.h"
-#include "tbb_misc.h"
 #include "tbb/mutex.h"
 #include "tbb/atomic.h"
 #include "tbb/gate.h"
@@ -85,6 +85,18 @@
 
 #include "tbb/partitioner.h"
 
+#if __TBB_RML
+#include "../rml/include/rml_tbb.h"
+
+namespace tbb {
+    namespace internal {
+        namespace rml {
+            tbb_server* make_private_server( tbb_client& client );
+        }
+    }
+}
+#endif /*__TBB_RML */
+
 #if DO_TBB_TRACE
 #include <cstdio>
 #define TBB_TRACE(x) ((void)std::printf x)
@@ -110,12 +122,31 @@
 #if __TBB_EXCEPTIONS
 // The standard offsetof macro does not work for us since its usage is restricted 
 // by POD-types only. Using 0x1000 (not NULL) is necessary to appease GCC.
-#define __TBB_offsetof(class_name, member_name) ((ptrdiff_t)&(reinterpret_cast<class_name*>(0x1000)->member_name) - 0x1000)
-// Returns address of the oject containing member with the given name and address
+#define __TBB_offsetof(class_name, member_name) \
+    ((ptrdiff_t)&(reinterpret_cast<class_name*>(0x1000)->member_name) - 0x1000)
+// Returns address of the object containing a member with the given name and address
 #define __TBB_get_object_addr(class_name, member_name, member_addr) \
     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. 
+// 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 */
+#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 */
+#endif /* !__TBB_EXCEPTIONS */
+
 #if _MSC_VER && !defined(__INTEL_COMPILER)
     // Workaround for overzealous compiler warnings
     // These particular warnings are so ubquitous that no attempt is made to narrow 
@@ -123,43 +154,173 @@
     #pragma warning (disable: 4100 4127 4312 4244 4267 4706)
 #endif
 
+// internal headers
+#include "tbb_misc.h"
 #include "itt_notify.h"
+#include "tls.h"
 
 namespace tbb {
 
 using namespace std;
 
-#if DO_ITT_NOTIFY && __TBB_NAMING_API_SUPPORT
+#if DO_ITT_NOTIFY
     const tchar 
             *SyncType_GlobalLock = _T("TbbGlobalLock"),
-            *SyncType_Scheduler = _T("TbbScheduler")
+            *SyncType_Scheduler = _T("%Constant")
             ;
     const tchar 
             *SyncObj_LibraryInitialization = _T("TbbLibraryInitialization"),
             *SyncObj_SchedulerInitialization = _T("TbbSchedulerInitialization"),
             *SyncObj_SchedulersList = _T("TbbSchedulersList"),
+            *SyncObj_WorkerLifeCycleMgmt = _T("TBB Scheduler"),
             *SyncObj_TaskStealingLoop = _T("TBB Scheduler"),
             *SyncObj_WorkerTaskPool = _T("TBB Scheduler"),
             *SyncObj_MasterTaskPool = _T("TBB Scheduler"),
+            *SyncObj_TaskPoolSpinning = _T("TBB Scheduler"),
+            *SyncObj_Mailbox = _T("TBB Scheduler"),
+            *SyncObj_TaskReturnList = _T("TBB Scheduler"),
             *SyncObj_GateLock = _T("TBB Scheduler"),
             *SyncObj_Gate = _T("TBB Scheduler"),
-            *SyncObj_SchedulerTermination = _T("TBB Scheduler"),
             *SyncObj_ContextsList = _T("TBB Scheduler")
             ;
-#endif /* DO_ITT_NOTIFY && __TBB_NAMING_API_SUPPORT */
+#endif /* DO_ITT_NOTIFY */
 
 namespace internal {
 
+const stack_size_type MByte = 1<<20;
+#if !defined(__TBB_WORDSIZE)
+const stack_size_type ThreadStackSize = 1*MByte;
+#elif __TBB_WORDSIZE<=4
+const stack_size_type ThreadStackSize = 2*MByte;
+#else
+const stack_size_type ThreadStackSize = 4*MByte;
+#endif
+
+#if USE_PTHREAD
+typedef void* thread_routine_return_type;
+#else
+typedef unsigned thread_routine_return_type;
+#endif
+
+#if __TBB_TASK_DEQUE
+//------------------------------------------------------------------------
+// General utility section
+//------------------------------------------------------------------------
+
+#if TBB_USE_ASSERT
+    #define __TBB_POISON_DEQUE 1
+#endif /* TBB_USE_ASSERT */
+
+#if __TBB_POISON_DEQUE
+    #if __ia64__
+        task* const poisoned_taskptr = (task*)0xDDEEAADDDEADBEEF;
+    #elif _WIN64
+        task* const poisoned_taskptr = (task*)0xDDEEAADDDEADBEEF;
+    #else
+        task* const poisoned_taskptr = (task*)0xDEADBEEF;
+    #endif
+
+    #define __TBB_POISON_TASK_PTR(ptr) ptr = poisoned_taskptr
+    #define __TBB_ASSERT_VALID_TASK_PTR(ptr) __TBB_ASSERT( ptr != poisoned_taskptr, "task pointer in the deque is poisoned" )
+#else /* !__TBB_POISON_DEQUE */
+    #define __TBB_POISON_TASK_PTR(ptr) ((void)0)
+    #define __TBB_ASSERT_VALID_TASK_PTR(ptr) ((void)0)
+#endif /* !__TBB_POISON_DEQUE */
+
+
+//! Vector that grows without reallocations, and stores items in the reverse order.
+/** Requires to initialize its first segment with a preallocated memory chunk
+    (usually it is static array or an array allocated on the stack).
+    The second template parameter specifies maximal number of segments. Each next 
+    segment is twice as large as the previous one. **/
+template<typename T, size_t max_segments = 16>
+class fast_reverse_vector
+{
+public:
+    fast_reverse_vector ( T* initial_segment, size_t segment_size )
+        : m_cur_segment(initial_segment)
+        , m_cur_segment_size(segment_size)
+        , m_pos(segment_size)
+        , m_num_segments(0)
+        , m_size(0)
+    {
+        __TBB_ASSERT ( initial_segment && segment_size, "Nonempty initial segment must be supplied");
+    }
+
+    ~fast_reverse_vector ()
+    {
+        for ( size_t i = 1; i < m_num_segments; ++i )
+            NFS_Free( m_segments[i] );
+    }
+
+    size_t size () const { return m_size + m_cur_segment_size - m_pos; }
+
+    void push_back ( const T& val )
+    {
+        if ( !m_pos ) {
+            m_segments[m_num_segments++] = m_cur_segment;
+            __TBB_ASSERT ( m_num_segments < max_segments, "Maximal capacity exceeded" );
+            m_size += m_cur_segment_size;
+            m_cur_segment_size *= 2;
+            m_pos = m_cur_segment_size;
+            m_cur_segment = (T*)NFS_Allocate( m_cur_segment_size * sizeof(T), 1, NULL );
+        }
+        m_cur_segment[--m_pos] = val;
+    }
+
+    //! Copies the contents of the vector into the dst array. 
+    /** Can only be used when T is a POD type, as copying does not invoke copy constructors. **/
+    void copy_memory ( T* dst ) const
+    {
+        size_t size = m_cur_segment_size - m_pos;
+        memcpy( dst, m_cur_segment + m_pos, size * sizeof(T) );
+        dst += size;
+        size = m_cur_segment_size / 2;
+        for ( long i = (long)m_num_segments - 1; i >= 0; --i ) {
+            memcpy( dst, m_segments[i], size * sizeof(T) );
+            dst += size;
+            size /= 2;
+        }
+    }
+
+protected:
+    //! The current (not completely filled) segment
+    T       *m_cur_segment;
+
+    //! Capacity of m_cur_segment
+    size_t  m_cur_segment_size;
+
+    //! Insertion position in m_cur_segment
+    size_t  m_pos;
+
+    //! Array of filled segments (has fixed size specified by the second template parameter)
+    T       *m_segments[max_segments];
+    
+    //! Number of filled segments (the size of m_segments)
+    size_t  m_num_segments;
+
+    //! Number of items in the segments in m_segments
+    size_t  m_size;
+
+}; // class fast_reverse_vector
+
+//------------------------------------------------------------------------
+// End of general utility section
+//------------------------------------------------------------------------
+#endif /* __TBB_TASK_DEQUE */
+
 //! Alignment for a task object
 const size_t task_alignment = 16;
 
 //! Number of bytes reserved for a task prefix
 /** If not exactly sizeof(task_prefix), the extra bytes *precede* the task_prefix. */
-static const size_t task_prefix_reservation_size = ((sizeof(internal::task_prefix)-1)/task_alignment+1)*task_alignment;
+const size_t task_prefix_reservation_size = ((sizeof(internal::task_prefix)-1)/task_alignment+1)*task_alignment;
 
 template<typename SchedulerTraits> class CustomScheduler;
 
+#if !__TBB_TASK_DEQUE
 typedef task::depth_type depth_type;
+#endif /* !__TBB_TASK_DEQUE */
 
 class mail_outbox;
 
@@ -200,7 +361,7 @@ class mail_outbox: unpadded_mail_outbox {
 
     //! Acquire lock on the box.
     task_proxy* acquire() {
-        ExponentialBackoff backoff;
+        atomic_backoff backoff;
         for(;;) {
             // No fence on load, because subsequent compare-and-swap has the necessary fence.
             intptr last = (intptr)my_last;
@@ -336,6 +497,7 @@ public:
 };
 #endif /* __TBB_SCHEDULER_OBSERVER */
 
+#if !__TBB_TASK_DEQUE
 //------------------------------------------------------------------------
 // TaskPool
 //------------------------------------------------------------------------
@@ -396,6 +558,7 @@ class TaskPool {
     }
 #endif /* TBB_USE_ASSERT */
 }; // class TaskPool
+#endif /* !__TBB_TASK_DEQUE */
 
 //------------------------------------------------------------------------
 // Arena
@@ -405,37 +568,36 @@ class Arena;
 class GenericScheduler;
 
 struct WorkerDescriptor {
-    Arena* arena;
     //! NULL until worker is published.  -1 if worker should not be published.
     GenericScheduler* scheduler;
-#if USE_WINTHREAD
-    //! Handle of the owning thread.
-    HANDLE thread_handle;
-#elif USE_PTHREAD
-    //! Handle of the owning thread.
-    pthread_t thread_handle;
-#else
-    unsigned long dummy_handle;
-#endif /* USE_WINTHREAD */
 
-    //! Stack size for working threads.
-    stack_size_type thread_stack_size;
-    
+#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 {
+class UnpaddedArenaPrefix: no_copy 
+#if __TBB_RML
+   ,rml::tbb_client
+#endif /* __TBB_RML */
+{
     friend class GenericScheduler;
     template<typename SchedulerTraits> friend class internal::CustomScheduler;
     friend class Arena;
-    friend size_t get_initial_auto_partitioner_divisor();
-    friend class tbb::task_scheduler_init;
-    friend class affinity_partitioner_base_v3;
+    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. */
@@ -447,8 +609,18 @@ 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;
 
     //! Array of workers.
     WorkerDescriptor* worker_list;
@@ -472,8 +644,45 @@ 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:
+    //! Return reference to corresponding arena.
+    Arena& arena();
+
+    /*override*/ version_type version() const {
+        return 0;
+    }
+
+    /*override*/ unsigned max_job_count() const {
+        return number_of_workers;
+    }
+
+    /*override*/ size_t min_stack_size() const {
+        return stack_size;
+    }
+
+    /*override*/ policy_type policy() const {
+        return throughput;
     }
+
+    /*override*/ job* create_one_job();
+
+    /*override*/ void cleanup( job& j );
+
+    /*override*/ void acknowledge_close_connection();
+
+    /*override*/ void process( job& j );
+#endif /* __TBB_RML */
 };
 
 //! The prefix to Arena with padding.
@@ -488,6 +697,32 @@ public:
     }
 };
 
+#if __TBB_TASK_DEQUE
+
+struct ArenaSlot {
+    // Task pool (the deque of task pointers) of the scheduler that owns this slot
+    /** Also is used to specify if the slot is empty or locked:
+         0 - empty
+        -1 - locked **/
+    task** task_pool;
+
+    //! Index of the first ready task in the deque.
+    /** Modified by thieves, and by the owner during compaction/reallocation **/
+    size_t head;
+
+    //! Padding to avoid false sharing caused by the thieves accessing this slot
+    char pad1[NFS_MaxLineSize - sizeof(size_t) - sizeof(task**)];
+
+    //! Index of the element following the last ready task in the deque.
+    /** Modified by the owner thread. **/
+    size_t tail;
+
+    //! Padding to avoid false sharing caused by the thieves accessing the next slot
+    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).
@@ -503,18 +738,20 @@ struct UnpaddedArenaSlot {
 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 size_t get_initial_auto_partitioner_divisor();
-    friend class tbb::task_scheduler_init;
+    friend class Governor;
+    friend struct WorkerDescriptor;
 
     //! Get reference to prefix portion
     ArenaPrefix& prefix() const {return ((ArenaPrefix*)(void*)this)[-1];}
 
-    friend class tbb::internal::affinity_partitioner_base_v3;
-
     //! Get reference to mailbox corresponding to given affinity_id.
     mail_outbox& mailbox( affinity_id id ) {
         __TBB_ASSERT( 0<id, "id must be positive integer" );
@@ -522,21 +759,64 @@ class Arena {
         return ((mail_outbox*)&prefix())[-(int)id];
     }
 
-    //! Allocate the arena
-    /** Allocates an instance of Arena and sets TheArena to point to it.
-        Creates the worker threads, but does not wait for them to start. */
+    //! Allocate an instance of Arena, and prepare everything to start workers.
     static Arena* allocate_arena( unsigned number_of_slots, unsigned number_of_workers, stack_size_type stack_size );
 
     void free_arena() {
-        NFS_Free( &mailbox(prefix().number_of_slots) );
+        // Drain mailboxes
+        // TODO: each scheduler should plug-and-drain its own mailbox when it terminates.
+        intptr drain_count = 0;
+        for( unsigned i=1; i<=prefix().number_of_slots; ++i )
+            drain_count += mailbox(i).drain();
+#if COUNT_TASK_NODES
+        prefix().task_node_count -= drain_count;
+#if !TEST_ASSEMBLY_ROUTINES
+        if( prefix().task_node_count ) {
+            fprintf(stderr,"warning: leaked %ld task objects\n", long(prefix().task_node_count));
+        }
+#endif /* !TEST_ASSEMBLY_ROUTINES */
+#endif /* COUNT_TASK_NODES */
+        void* storage  = &mailbox(prefix().number_of_slots);
+        delete[] prefix().worker_list;
+        prefix().~ArenaPrefix();
+        NFS_Free( storage );
     }
 
+    //! No tasks to steal since last snapshot was taken
+    static const Gate::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;
+
+#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 */
+
+    //! 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
@@ -568,51 +848,15 @@ struct IntelSchedulerTraits {
 };
 
 //------------------------------------------------------------------------
-// Begin shared data layout.
-//
-// The follow global data items are read-only after initialization.
-// The first item is aligned on a 128 byte boundary so that it starts a new cache line.
-//------------------------------------------------------------------------
-
-static internal::Arena * TheArena;
-static mutex TheArenaMutex;
-
-#if __TBB_SCHEDULER_OBSERVER
-typedef spin_rw_mutex::scoped_lock task_scheduler_observer_mutex_scoped_lock;
-/** aligned_space used here to shut up warnings when mutex destructor is called while threads are still using it. */
-static aligned_space<spin_rw_mutex,1> the_task_scheduler_observer_mutex;
-static observer_proxy* global_first_observer_proxy;
-static observer_proxy* global_last_observer_proxy;
-#endif /* __TBB_SCHEDULER_OBSERVER */
-
-//! Number of hardware threads
-/** One more than the default number of workers. */
-static int DefaultNumberOfThreads;
-
-//! T::id for the scheduler traits type T to use for the scheduler
-/** For example, the default value is DefaultSchedulerTraits::id. */
-static int SchedulerTraitsId;
-
-#if _WIN32||_WIN64
-    static CRITICAL_SECTION OneTimeInitializationLock;
-    //! Index for thread-local storage.
-    /** The original version of TBB used __declspec(thread) for thread-local storage.
-        Unfortunately, __declspec(thread) does not work on pre-Vista OSes for DLLs
-        called from plug-ins. */
-    static DWORD TLS_Index;
-#else /* !WIN */
-    static pthread_mutex_t OneTimeInitializationLock = PTHREAD_MUTEX_INITIALIZER;
-    static pthread_key_t TLS_Key;
-#endif /* !WIN */
-
-//------------------------------------------------------------------------
 // Class __TBB_InitOnce
 //------------------------------------------------------------------------
 
-//! Class handles acquisition and release of global resources during startup and shutdown. 
-/** Currently, its job is to deal with initializing/deleting OneTimeInitializationLock on Windows,
-    and allocating/freeing thread-local storage. */
+//! Class that supports TBB initialization. 
+/** It handles acquisition and release of global resources (e.g. TLS) during startup and shutdown,
+    as well as synchronization for DoOneTimeInitializations. */
 class __TBB_InitOnce {
+    friend void DoOneTimeInitializations();
+
     static atomic<int> count;
 
     //! Platform specific code to acquire resources.
@@ -620,24 +864,48 @@ class __TBB_InitOnce {
 
     //! Platform specific code to release resources.
     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;
 public:
+    static void lock()   { EnterCriticalSection( &InitializationLock ); }
+    static void unlock() { LeaveCriticalSection( &InitializationLock ); }
+#endif
+
+    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
         until this constructor has finished running. */
     __TBB_InitOnce() { add_ref(); }
 
-    //! Remove the initial reference to resources, and remove the extra reference from DoOneTimeInitializations if present.
-    /** This is not necessarily the last reference if other threads are still running . */
+    //! Remove the initial reference to resources.
+    /** This is not necessarily the last reference if other threads are still running.
+        If the extra reference from DoOneTimeInitializations is present, remove it as well.*/
     ~__TBB_InitOnce();
 
     //! Add reference to resources.  If first reference added, acquire the resources.
     static void add_ref() {
-        if( ++count==1 ) {
+        if( ++count==1 )
             acquire_resources();
-            ITT_SYNC_CREATE(&OneTimeInitializationLock, SyncType_GlobalLock, SyncObj_LibraryInitialization);
-        }
     }
-    //! Remove reference to resources.  If last reference added, release the resources.
+    //! Remove reference to resources.  If last reference removed, release the resources.
     static void remove_ref() {
         int k = --count;
         __TBB_ASSERT(k>=0,"removed __TBB_InitOnce ref that was not added?"); 
@@ -646,16 +914,184 @@ public:
     }
 }; // class __TBB_InitOnce
 
+//------------------------------------------------------------------------
+// Class Governor
+//------------------------------------------------------------------------
+
+//! The class handles access to the single instance of Arena, and to TLS to keep scheduler instances.
+/** It also supports automatic on-demand intialization of the TBB scheduler.
+    The class contains only static data members and methods.*/
+class Governor {
+    friend class __TBB_InitOnce;
+
+    static basic_tls<GenericScheduler*> theTLS;
+    static Arena* theArena;
+    static mutex  theArenaMutex;
+
+    //! Create key for thread-local storage.
+    static void create_tls() {
+#if __TBB_TASK_SCHEDULER_AUTO_INIT && USE_PTHREAD
+        int status = theTLS.create(auto_terminate);
+#else
+        int status = theTLS.create();
+#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
+        if( status )
+            handle_perror(status, "TBB failed to initialize TLS storage\n");
+    }
+
+    //! Destroy the thread-local storage key.
+    static void destroy_tls() {
+#if TBB_USE_ASSERT
+        if( __TBB_InitOnce::initialization_done() && local_scheduler() ) 
+            fprintf(stderr, "TBB is unloaded while tbb::task_scheduler_init object is alive?");
+#endif
+        int status = theTLS.destroy();
+        if( status )
+            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;
+        if( a ) {
+            a->prefix().number_of_masters += 1;
+        } else {
+            if( number_of_threads==task_scheduler_init::automatic )
+                number_of_threads = task_scheduler_init::default_num_threads();
+            a = Arena::allocate_arena( 2*number_of_threads, number_of_threads-1,
+                                       thread_stack_size?thread_stack_size:ThreadStackSize );
+            __TBB_ASSERT( a->prefix().number_of_masters==1, NULL );
+            // Publish the Arena.  
+            // A memory release fence is not required here, because workers have not started yet,
+            // 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;
+    }
+
+    //! 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 )
+            a->terminate_workers();
+#endif /* __TBB_RML */
+    }
+
+    static size_t number_of_workers_in_arena() {
+        __TBB_ASSERT( theArena, "thread did not activate a task_scheduler_init object?" );
+        // No fence required to read theArena, because it does not change after the thread starts.
+        return theArena->prefix().number_of_workers;
+    }
+
+    //! Register TBB scheduler instance in thread local storage.
+    inline static void sign_on(GenericScheduler* s);
+
+    //! 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();
+    }
+
+#if __TBB_TASK_SCHEDULER_AUTO_INIT
+    //! Create a thread local instance of TBB scheduler on demand.
+    static GenericScheduler* local_scheduler_with_auto_init();
+
+    //! Undo automatic initialization if necessary; call when a thread exits.
+    static void terminate_auto_initialized_scheduler() {
+        auto_terminate(theTLS.get());
+    }
+#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
+
+}; // class Governor
+
+//------------------------------------------------------------------------
+// Begin shared data layout.
+//
+// The following global data items are read-only after initialization.
+// The first item is aligned on a 128 byte boundary so that it starts a new cache line.
+//------------------------------------------------------------------------
+
+basic_tls<GenericScheduler*> Governor::theTLS;
+Arena * Governor::theArena;
+mutex   Governor::theArenaMutex;
+
+//! Number of hardware threads
+/** One more than the default number of workers. */
+static int DefaultNumberOfThreads;
+
+//! T::id for the scheduler traits type T to use for the scheduler
+/** For example, the default value is DefaultSchedulerTraits::id. */
+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
+
 //! Flag that is set to true after one-time initializations are done.
-static bool OneTimeInitializationsDone;
+bool __TBB_InitOnce::InitializationDone;
 
-#if DO_ITT_NOTIFY && __TBB_NAMING_API_SUPPORT
+#if DO_ITT_NOTIFY
     static bool ITT_Present;
     static bool ITT_InitializationDone;
 #endif
 
-//! Counter of references to TLS.
-atomic<int> __TBB_InitOnce::count;
+#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)
@@ -665,18 +1101,13 @@ atomic<int> __TBB_InitOnce::count;
     static __TBB_InitOnce __TBB_InitOnceHiddenInstance;
 #endif
 
-#if USE_PTHREAD
-    #define OneTimeMutexOp(op) { \
-        int status = pthread_mutex_##op( &OneTimeInitializationLock ); \
-        if( status )    \
-            handle_perror(status,"pthread_mutex_"#op); \
-    }
-    #define LockOneTimeMutex() OneTimeMutexOp(lock)
-    #define UnlockOneTimeMutex() OneTimeMutexOp(unlock)
-#else
-    #define LockOneTimeMutex() EnterCriticalSection( &OneTimeInitializationLock )
-    #define UnlockOneTimeMutex() LeaveCriticalSection( &OneTimeInitializationLock )
-#endif /* USE_PTHREAD */
+#if __TBB_SCHEDULER_OBSERVER
+typedef spin_rw_mutex::scoped_lock task_scheduler_observer_mutex_scoped_lock;
+/** aligned_space used here to shut up warnings when mutex destructor is called while threads are still using it. */
+static aligned_space<spin_rw_mutex,1> the_task_scheduler_observer_mutex;
+static observer_proxy* global_first_observer_proxy;
+static observer_proxy* global_last_observer_proxy;
+#endif /* __TBB_SCHEDULER_OBSERVER */
 
 //! Table of primes used by fast random-number generator.
 /** Also serves to keep anything else from being placed in the same
@@ -777,75 +1208,80 @@ static const long PauseTime = 80;
 // One-time Initializations
 //------------------------------------------------------------------------
 
-
 //! Defined in cache_aligned_allocator.cpp
 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.
     \return true if notification hooks were installed, false otherwise. **/
 bool InitializeITT();
 
-#if DO_ITT_NOTIFY && __TBB_NAMING_API_SUPPORT
 /** Calls tools interoperability mechanisms initialization routine in a protected 
-    manner ensuring that it is done once only.
+    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 that is called 
-    // first are invokes proxy ITT handler before our do-once mutex is initialized.
+    // 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.
-    LockOneTimeMutex();
+    __TBB_InitOnce::lock();
 #endif
     if ( !ITT_InitializationDone ) {
         ITT_Present = InitializeITT();
         ITT_InitializationDone = true;
     }
 #if !TBB_USE_DEBUG
-    UnlockOneTimeMutex();
+    __TBB_InitOnce::unlock();
 #endif
 }
-#endif /* DO_ITT_NOTIFY && __TBB_NAMING_API_SUPPORT */
+#endif /* DO_ITT_NOTIFY */
 
 //! Performs lazy one-time initializations.
 void DoOneTimeInitializations() {
-    LockOneTimeMutex();
-    // No fence required for load of OneTimeInitializationsDone, because we are inside a critical section.
-    if( !OneTimeInitializationsDone ) {
+    __TBB_InitOnce::lock();
+    // No fence required for load of InitializationDone, because we are inside a critical section.
+    if( !__TBB_InitOnce::InitializationDone ) {
         __TBB_InitOnce::add_ref();
         if( GetBoolEnvironmentVariable("TBB_VERSION") )
             PrintVersion();
         bool have_itt = false;
 #if DO_ITT_NOTIFY
-#if __TBB_NAMING_API_SUPPORT
         if ( !ITT_InitializationDone ) {
             ITT_Present = InitializeITT();
             ITT_InitializationDone = true;
         }
         have_itt = ITT_Present;
-#else
-        have_itt = InitializeITT();
-#endif /* __TBB_NAMING_API_SUPPORT */
 #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;
+            PrintExtraVersionInfo( "RML", "private" );
+        } else {
+            PrintExtraVersionInfo( "RML", "shared" );
+            rml_server_factory.call_with_server_info( PrintRMLVersionInfo, (void*)"" );
+        }
+#endif /* __TBB_RML */
         if( !have_itt )
             SchedulerTraitsId = IntelSchedulerTraits::id;
-        else {
-            ITT_SYNC_CREATE(&TheArenaMutex, SyncType_GlobalLock, SyncObj_SchedulerInitialization);
 #if __TBB_EXCEPTIONS
+        else {
             ITT_SYNC_CREATE(&the_scheduler_list_mutex, SyncType_GlobalLock, SyncObj_SchedulersList);
-#endif /* __TBB_EXCEPTIONS */
         }
+#endif /* __TBB_EXCEPTIONS */
         PrintExtraVersionInfo( "SCHEDULER",
                                SchedulerTraitsId==IntelSchedulerTraits::id ? "Intel" : "default" );
 #if __TBB_EXCEPTIONS
         the_scheduler_list_head.my_next = &the_scheduler_list_head;
         the_scheduler_list_head.my_prev = &the_scheduler_list_head;
 #endif /* __TBB_EXCEPTIONS */
-        OneTimeInitializationsDone = true;
+        __TBB_InitOnce::InitializationDone = true;
     }
-    UnlockOneTimeMutex();
+    __TBB_InitOnce::unlock();
 }
 
 //------------------------------------------------------------------------
@@ -854,40 +1290,34 @@ void DoOneTimeInitializations() {
 
 __TBB_InitOnce::~__TBB_InitOnce() { 
     remove_ref();
-    // It is assumed that OneTimeInitializationsDone is not set after file-scope destructors start running,
-    // and thus no race on OneTimeInitializationsDone is possible.
-    if( __TBB_load_with_acquire(OneTimeInitializationsDone) ) {
+    // It is assumed that InitializationDone is not set after file-scope destructors start running,
+    // and thus no race on InitializationDone is possible.
+    if( initialization_done() ) {
         // Remove reference that we added in DoOneTimeInitializations.
         remove_ref();  
     }
 } 
 
-#if _WIN32||_WIN64
 void __TBB_InitOnce::acquire_resources() {
-    TLS_Index = TlsAlloc();
-    if( TLS_Index!=TLS_OUT_OF_INDEXES ) {
-        InitializeCriticalSection(&OneTimeInitializationLock);
-    } else {
-#if TBB_USE_ASSERT
-        // Issue diagnostic here, not failing assertion, because client
-        // might want to test graceful recovery from this problem.
-        fprintf( stderr, "TBB failed to initialize: TLS is out of indices\n" );
-#endif /* TBB_USE_ASSERT */
-    }
+    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() {
-    DeleteCriticalSection(&OneTimeInitializationLock);
-#if TBB_USE_ASSERT
-    if( TlsGetValue(TLS_Index) ) {
-        fprintf( stderr, "TBB is unloaded while tbb::task_scheduler_init object is alive?" );
-    }
-#endif /* TBB_USE_ASSERT */
-    TlsFree(TLS_Index);
-    TLS_Index = 0;
-}
+#if __TBB_RML
+    rml_server_factory.close();
+#endif /* __TBB_RML */
+#if _WIN32||_WIN64
+    DeleteCriticalSection(&InitializationLock);
+#endif
+    Governor::destroy_tls();
+}
 
-#if !__TBB_TASK_CPP_DIRECTLY_INCLUDED
+#if (_WIN32||_WIN64) && !__TBB_TASK_CPP_DIRECTLY_INCLUDED
 //! Windows "DllMain" that handles startup and shutdown of dynamic library.
 extern "C" bool WINAPI DllMain( HANDLE /*hinstDLL*/, DWORD reason, LPVOID /*lpvReserved*/ ) {
     switch( reason ) {
@@ -896,67 +1326,22 @@ extern "C" bool WINAPI DllMain( HANDLE /*hinstDLL*/, DWORD reason, LPVOID /*lpvR
             break;
         case DLL_PROCESS_DETACH:
             __TBB_InitOnce::remove_ref();
-            // It is assumed that OneTimeInitializationsDone is not set after DLL_PROCESS_DETACH,
-            // and thus no race on OneTimeInitializationsDone is possible.
-            if( __TBB_load_with_acquire(OneTimeInitializationsDone) ) {
+            // It is assumed that InitializationDone is not set after DLL_PROCESS_DETACH,
+            // and thus no race on InitializationDone is possible.
+            if( __TBB_InitOnce::initialization_done() ) {
                 // Remove reference that we added in DoOneTimeInitializations.
                 __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;
 }
-#endif /* !__TBB_TASK_CPP_DIRECTLY_INCLUDED */
-
-#else /* not Windows */
-void __TBB_InitOnce::acquire_resources() {
-    // Create key for thread-local storage
-    int status = pthread_key_create( &TLS_Key, NULL );
-    if( status )
-        handle_perror(status, "pthread_key_create");
-}
-
-void __TBB_InitOnce::release_resources() {
-    // Delete thread-local storage key
-    int status = pthread_key_delete( TLS_Key );
-    if( status )
-        handle_perror(status, "pthread_key_delete");
-}
-
-#endif /* _WIN32||_WIN64 */
-
-//------------------------------------------------------------------------
-// Routines for thread-specific global data
-//------------------------------------------------------------------------
-
-static inline void SetThreadSpecific( GenericScheduler* s ) {
-#if USE_WINTHREAD
-    TlsSetValue( TLS_Index, s );
-#else
-    pthread_setspecific( TLS_Key, s );
-#endif /* USE_WINTHREAD */
-}
-
-//! Get scheduler belonging to the current thread.
-/** 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 inline GenericScheduler* GetThreadSpecific() {
-    GenericScheduler *result;
-    // The assertion on OneTimeInitializationsDone checks that we can safely
-    // use TLS_Key/TLS_Index; i.e., that TLS_Key/TLS_Index has been initialized.
-    // The assertion message is intended to help end users.  Even though
-    // OneTimeInitializationsDone might be set for other reasons, if it is
-    // *not* set when a thread reaches here, the reason is almost
-    // certainly that the thread failed to create a task_scheduler_init object.
-    __TBB_ASSERT( OneTimeInitializationsDone, "thread did not activate a task_scheduler_init object?" );
-#if USE_WINTHREAD
-    result = (GenericScheduler*)TlsGetValue( TLS_Index );
-#else
-    result = (GenericScheduler*)pthread_getspecific( TLS_Key );
-#endif /* USE_WINTHREAD */
-    return result;
-}
+#endif /* (_WIN32||_WIN64) && !__TBB_TASK_CPP_DIRECTLY_INCLUDED */
 
 //------------------------------------------------------------------------
 // FastRandom
@@ -988,6 +1373,11 @@ 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 */
+
 //! Cilk-style task scheduler.
 /** None of the fields here are every read or written by threads other than
     the thread that creates the instance.
@@ -995,13 +1385,24 @@ scheduler::~scheduler( ) {}
     Class GenericScheduler is an abstract base class that contains most of the 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 {
+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;
 #if __TBB_EXCEPTIONS
     friend class allocate_root_with_context_proxy;
     friend class tbb::task_group_context;
@@ -1024,15 +1425,40 @@ class GenericScheduler: public scheduler {
         //! Tag for TBB 3.0 task_proxy.
         es_task_proxy = 2,
         //! Set if ref_count might be changed by another thread.  Used for debugging.
-        es_ref_count_active = 0x40,
-        //! Set if ref_count might be changed by another thread.
-        es_pending_exception = 0x80
+        es_ref_count_active = 0x40
     };
     
     static bool is_version_3_task( task& t ) {
         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
+    //! Position in the RSE backup area specifying its maximal filling when stealing is still allowed
+    uintptr_t my_rsb_stealing_threshold;
+#endif
+
+    static const size_t null_arena_index = ~0u;
+
+    //! Index of the arena slot the scheduler occupies now, or occupied last time.
+    size_t arena_index;
+
+    //! Capacity of ready tasks deque (number of elements - pointers to task).
+    size_t task_pool_size;
+
+    //! Dummy slot used when scheduler is not in arena
+    /** Only its "head" and "tail" members are ever used. The scheduler uses 
+        the "task_pool" shortcut to access the task deque. **/
+    ArenaSlot dummy_slot;
+
+    //! Pointer to the slot in the arena we own at the moment.
+    /** 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;
@@ -1045,6 +1471,9 @@ class GenericScheduler: public scheduler {
 
     //! Pointer to my slot in the arena
     mutable UnpaddedArenaSlot* arena_slot;
+#endif /* !__TBB_TASK_DEQUE */
+
+    bool in_arena () const { return arena_slot != &dummy_slot; }
 
     //! The arena that I own (if master) or belong to (if worker)
     Arena* const arena;
@@ -1075,33 +1504,22 @@ class GenericScheduler: public scheduler {
     }
 
     //! The mailbox id assigned to this scheduler.
-    /** The id is assigned upon first entry into the arena. 
-        FIXME - how are id's being garbage collected? 
-        FIXME - master thread may enter arena and leave and then reenter.
+    /** The id is assigned upon first entry into the arena.
+        TODO: how are id's being garbage collected? 
+        TODO: master thread may enter arena and leave and then reenter.
                 We want to give it the same affinity_id upon reentry, if practical.
       */
     affinity_id my_affinity_id;
 
-    //! True if this is assigned to thread local storage.
-    /** Located here because space is otherwise just padding after my_affinity_id. */
-    bool occupy_tls;
+    /* A couple of bools can be located here because space is otherwise just padding after my_affinity_id. */
 
-    //! Register scheduler in thread local storage
-    void register_in_thread_local_storage() {
-        __TBB_ASSERT( !occupy_tls, NULL );  
-        occupy_tls = true;
-        __TBB_InitOnce::add_ref();
-        SetThreadSpecific(this);
-    }
+    //! True if this is assigned to thread local storage by registering with Governor.
+    bool is_registered;
 
-    //! Unregister scheduler from thread local storage
-    void unregister_from_thread_local_storage() {
-        if( occupy_tls ) {
-            SetThreadSpecific(NULL);
-            occupy_tls = false;
-            __TBB_InitOnce::remove_ref();
-        }
-    }
+#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
@@ -1139,12 +1557,49 @@ 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 ();
+
+    //! Returns true if stealing is allowed
+    bool can_steal () {
+        int anchor;
+#if __TBB_ipf
+        return my_stealing_threshold < (uintptr_t)&anchor && (uintptr_t)__TBB_get_bsp() < my_rsb_stealing_threshold;
+#else
+        return my_stealing_threshold < (uintptr_t)&anchor;
+#endif
+    }
+
+    //! Actions common to enter_arena and try_enter_arena
+    void do_enter_arena();
+
+    //! Used by workers to enter the arena 
+    /** Does not lock the task pool in case if arena slot has been successfully grabbed. **/
+    void enter_arena();
+
+    //! Used by masters to try to enter the arena
+    /** Does not lock the task pool in case if arena slot has been successfully grabbed. **/
+    void try_enter_arena();
+
+    //! Leave the arena
+    void leave_arena();
+
+    //! Locks victim's task pool, and returns pointer to it. The pointer can be NULL.
+    task** lock_task_pool( ArenaSlot* victim_arena_slot ) const;
+
+    //! 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;
@@ -1153,11 +1608,22 @@ 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 );
+
+    /** Called only by the pool owner.
+        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.
@@ -1176,50 +1642,85 @@ 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;
+
+    //! Allocate task pool containing at least n elements.
+    task** allocate_task_pool( size_t n );
 
+    //! Deallocate task pool that was allocated by means of allocate_task_pool.
+    static void free_task_pool( task** pool ) {
+        __TBB_ASSERT( pool, "attempt to free NULL TaskPool" );
+        NFS_Free( pool );
+    }
+
+    //! 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 */
 
-    //! Call destructor for a task and put it on the free list (or free it if it is big).
-    void destroy_task( task& t ) {
-        TBB_TRACE(("%p.destroy_task(%p)\n",this,&t));
-        __TBB_ASSERT( t.is_owned_by_current_thread(), "task owned by different thread" );
-        t.~task();
-        free_task<no_hint>( t );
-    }
+    //! Initialize a scheduler for a master thread.
     static GenericScheduler* create_master( Arena* a );
 
+    //! Perform necessary cleanup when a master thread stops using TBB.
+    void cleanup_master();
+
+    //! 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 in TheWorkerList
-        like a binary heap. */
-    static GenericScheduler* create_worker( WorkerDescriptor& w );
+        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*). */
-#if USE_WINTHREAD
-    static unsigned WINAPI worker_routine( void* arg );
-#else
-    static void* worker_routine( void* arg );
-#endif /* USE_WINTHREAD */
+    static thread_routine_return_type __TBB_THREAD_ROUTINE worker_routine( void* arg );
 
-    //! Called by slave threads to free memory and wait for other threads.
-    static void cleanup_worker_thread( void* arg );
+    //! Perform necessary cleanup when a worker thread finishes.
+    static void cleanup_worker( void* arg );
 
 protected:
     GenericScheduler( Arena* arena );
 
-#if TBB_USE_ASSERT || TEST_ASSEMBLY_ROUTINES
+#if TBB_USE_ASSERT
     //! Check that internal data structures are in consistent state.
     /** Raises __TBB_ASSERT failure if inconsistency is found. */
     bool assert_okay() const;
-#endif /* TBB_USE_ASSERT || TEST_ASSEMBLY_ROUTINES */
+#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 );
+
+    /*override*/ 
+    void spawn( task& first, task*& next ) {
+        Governor::local_scheduler()->local_spawn( first, next );
+    }
+    /*override*/ 
+    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 );
 
     //! Destroy and deallocate scheduler that was created with method allocate.
@@ -1227,11 +1728,8 @@ public:
 
     //! Allocate task object, either from the heap or a free list.
     /** Returns uninitialized task object with initialized prefix. */
-#if __TBB_EXCEPTIONS
-    task& allocate_task( size_t number_of_bytes, depth_type depth, task* parent, task_group_context* context );
-#else
-    task& allocate_task( size_t number_of_bytes, depth_type depth, task* parent );
-#endif
+    task& allocate_task( size_t number_of_bytes, 
+                       __TBB_ALLOC_TASK_ARGS(task* parent, depth_type depth, task_group_context* context) );
 
     //! Optimization hint to free_task that enables it omit unnecessary tests and code.
     enum hint {
@@ -1277,25 +1775,13 @@ 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 */
     }
 
-    //! No tasks to steal since last snapshot was taken
-    static const Gate::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;
-
-    //! Gate is permanently open
-    static const Gate::state_t SNAPSHOT_PERMANENTLY_OPEN = -2;
-
-    //! If necessary, inform gate that task was added to pool recently.
-    void mark_pool_full();
-
-    //! Wait while pool is empty
-    /** Return true if pool transitioned from empty to non-empty while thread was waiting. */
-    bool wait_while_pool_is_empty();
-                 
 #if TEST_ASSEMBLY_ROUTINES
     /** Defined in test_assembly.cpp */
     void test_assembly_routines();
@@ -1346,7 +1832,6 @@ public:
 #endif /* __TBB_EXCEPTIONS */
 }; // class GenericScheduler
 
-#if __TBB_EXCEPTIONS
 //------------------------------------------------------------------------
 // auto_empty_task
 //------------------------------------------------------------------------
@@ -1356,33 +1841,73 @@ class auto_empty_task {
     task* my_task;
     GenericScheduler* my_scheduler;
 public:
-#if __TBB_EXCEPTIONS
-    auto_empty_task ( GenericScheduler *s, int depth, task_group_context* context ) 
-        : my_task( new(&s->allocate_task(sizeof(empty_task), depth, NULL, context)) empty_task )
-#else
-    auto_empty_task ( GenericScheduler *s, int depth )
-        : my_task( new(&s->allocate_task(sizeof(empty_task), depth, NULL)) empty_task )
-#endif /* __TBB_EXCEPTIONS */
+    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 )
         , my_scheduler(s)
     {}
-    // empty_task has trivial destructor, so call free_task directly instead of going through destroy_task.
+    // empty_task has trivial destructor, so there's no need to call it.
     ~auto_empty_task () { my_scheduler->free_task<GenericScheduler::is_small_local>(*my_task); }
 
     operator task& () { return *my_task; }
     task* operator & () { return my_task; }
     task_prefix& prefix () { return my_task->prefix(); }
 }; // class auto_empty_task
-#endif /* __TBB_EXCEPTIONS */
 
 //------------------------------------------------------------------------
-// GenericScheduler implementation
+// Methods of class Governor that need full definition of GenericScheduler
 //------------------------------------------------------------------------
 
-#if __TBB_EXCEPTIONS
-inline task& GenericScheduler::allocate_task( size_t number_of_bytes, depth_type depth, task* parent, task_group_context* context ) {
+void Governor::sign_on(GenericScheduler* s) {
+    __TBB_ASSERT( !s->is_registered, NULL );  
+    s->is_registered = true;
+    __TBB_InitOnce::add_ref();
+    theTLS.set(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" );
 #else
-inline task& GenericScheduler::allocate_task( size_t number_of_bytes, depth_type depth, task* parent ) {
-#endif /* __TBB_EXCEPTIONS */
+        __TBB_ASSERT( theTLS.get()==s, "attempt to unregister a wrong scheduler instance" );
+#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT && 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* 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?");
+    return s;
+}
+
+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();
+    }
+}
+#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) ) {
     GATHER_STATISTIC(current_active+=1);
     task* t = free_list;
     if( number_of_bytes<=quick_task_size ) {
@@ -1419,7 +1944,12 @@ inline task& GenericScheduler::allocate_task( size_t number_of_bytes, depth_type
 #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.
@@ -1476,56 +2006,6 @@ void GenericScheduler::free_nonlocal_small_task( task& t ) {
     }
 }
 
-inline void GenericScheduler::mark_pool_full() {
-    // Double-check idiom that is deliberately sloppy about memory fences.
-    // Technically, to avoid missed wakeups, there should be a full memory fence between the point we 
-    // released the task pool (i.e. spawned task) and read the gate's state.  However, adding such a 
-    // 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 = arena->prefix().gate.get_state();
-    if( snapshot!=SNAPSHOT_FULL ) 
-        arena->prefix().gate.try_update( SNAPSHOT_FULL, SNAPSHOT_PERMANENTLY_OPEN, true );
-}
-
-bool GenericScheduler::wait_while_pool_is_empty() {
-    for(;;) {
-        Gate::state_t snapshot = arena->prefix().gate.get_state();
-        switch( snapshot ) {
-            case SNAPSHOT_EMPTY:
-                arena->prefix().gate.wait();
-                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);
-                // Request permission to take snapshot
-                arena->prefix().gate.try_update( busy, SNAPSHOT_FULL );
-                if( arena->prefix().gate.get_state()==busy ) {
-                    // Got permission.  Take the snapshot.
-                    size_t n = arena->prefix().limit;
-                    size_t k; 
-                    for( k=0; k<n; ++k ) 
-                        if( arena->slot[k].steal_end>=0 ) 
-                            break;
-                    // Test and test-and-set.
-                    if( arena->prefix().gate.get_state()==busy ) {
-                        if( k>=n ) {
-                            arena->prefix().gate.try_update( SNAPSHOT_EMPTY, busy );
-                            continue;
-                        } else {
-                            arena->prefix().gate.try_update( SNAPSHOT_FULL, busy );
-                        }
-                    }
-                } 
-                return false;
-            }
-            default:
-                // Another thread is taking a snapshot or gate is permanently open.
-                return false;
-        }
-    }
-}
-
 //------------------------------------------------------------------------
 // CustomScheduler
 //------------------------------------------------------------------------
@@ -1537,13 +2017,37 @@ 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;
 
     //! Construct a CustomScheduler
-    CustomScheduler( Arena* arena ) : GenericScheduler(arena) {
-        ITT_SYNC_CREATE(this, SyncType_Scheduler, SyncObj_TaskStealingLoop);
+    CustomScheduler( Arena* arena ) : GenericScheduler(arena) {}
+
+    static bool tally_completion_of_one_predecessor( task& s ) {
+        task_prefix& p = s.prefix();
+        if( SchedulerTraits::itt_possible )
+            ITT_NOTIFY(sync_releasing, &p.ref_count);
+        if( SchedulerTraits::has_slow_atomic && p.ref_count==1 ) {
+            p.ref_count=0;
+        } else {
+            reference_count k = __TBB_FetchAndDecrementWrelease(&p.ref_count);
+            __TBB_ASSERT( k>0, "completion of task caused parent's reference count to underflow" );
+            if( k!=1 ) 
+                return false;
+        }
+        if( SchedulerTraits::itt_possible )
+            ITT_NOTIFY(sync_acquired, &p.ref_count);
+        return true;
     }
 
 public:
@@ -1551,7 +2055,12 @@ 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;
     }
 };
@@ -1566,7 +2075,9 @@ 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 */
@@ -1593,38 +2104,130 @@ Arena* Arena::allocate_arena( unsigned number_of_slots, unsigned number_of_worke
 
 #if TBB_USE_ASSERT
     // Verify that earlier memset initialized the mailboxes.
-    for( unsigned j=1; j<=number_of_slots; ++j )
+    for( unsigned j=1; j<=number_of_slots; ++j ) {
         a->mailbox(j).assert_is_initialized();
+    }
 #endif /* TBB_USE_ASSERT */
 
+    a->prefix().stack_size = stack_size;
     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;
-        w[k].thread_stack_size = stack_size;
+#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);
     }
 
-    // Publish the Arena.  
-    // A memory release fence is not required here, because workers have not started yet,
-    // and concurrent masters inspect TheArena while holding TheArenaMutex.
-    __TBB_ASSERT( !TheArena, NULL );
-    TheArena = a;
+    return a;
+}
+
+inline void Arena::mark_pool_full() {
+    // Double-check idiom that is deliberately sloppy about memory fences.
+    // Technically, to avoid missed wakeups, there should be a full memory fence between the point we 
+    // released the task pool (i.e. spawned task) and read the gate's state.  However, adding such a 
+    // 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 */
+}
 
-    // Attach threads to workers
-    if( number_of_workers>0 ) {
-        a->prefix().worker_list[0].start_one_worker_thread();
+#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();
+        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);
+                // Request permission to take snapshot
+                prefix().gate.try_update( busy, SNAPSHOT_FULL );
+                if( prefix().gate.get_state()==busy ) {
+                    // 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( k>=n ) {
+#if __TBB_RML
+                            if( prefix().gate.try_update( SNAPSHOT_EMPTY, busy ) ) {
+                                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 );
+                        }
+                    }
+                } 
+                return false;
+            }
+            default:
+                // Another thread is taking a snapshot or gate is permanently open.
+                return false;
+        }
     }
-    return a;
 }
 
 void Arena::terminate_workers() {
+#if __TBB_RML
+    for(;;) {
+        Gate::state_t snapshot = prefix().gate.get_state();
+        if( snapshot==SNAPSHOT_SERVER_GOING_AWAY ) 
+            break;
+        if( prefix().gate.try_update( SNAPSHOT_SERVER_GOING_AWAY, 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; ) {
@@ -1641,54 +2244,19 @@ void Arena::terminate_workers() {
         }
     }
     // Permanently wake up sleeping workers
-    prefix().gate.try_update( GenericScheduler::SNAPSHOT_PERMANENTLY_OPEN, GenericScheduler::SNAPSHOT_PERMANENTLY_OPEN, true );
-    // Wait for all published workers to quit
-    for( int i=n; --i>=0; ) {
-        WorkerDescriptor& w = prefix().worker_list[i];
-        if( intptr(w.scheduler)!=-1 ) {
-            ITT_SYNC_CREATE(&w.thread_handle, SyncType_Scheduler, SyncObj_SchedulerTermination);
-            ITT_NOTIFY(sync_prepare, &w.thread_handle);
-#if USE_WINTHREAD
-            DWORD status = WaitForSingleObject( w.thread_handle, INFINITE );
-            if( status==WAIT_FAILED ) {
-                fprintf(stderr,"Arena::terminate_workers: WaitForSingleObject failed\n");
-                exit(1);
-            }
-            CloseHandle( w.thread_handle );
-            w.thread_handle = (HANDLE)0;
-#else
-            int status = pthread_join( w.thread_handle, NULL );
-            if( status )
-                handle_perror(status,"pthread_join");
-#endif /* USE_WINTHREAD */
-            ITT_NOTIFY(sync_acquired, &w.thread_handle);
-        }
-    }
-    // All workers have quit
-    // Drain mailboxes
-    // FIXME - each scheduler should plug-and-drain its own mailbox when it terminates.
-    intptr drain_count = 0;
-    for( unsigned i=1; i<=prefix().number_of_slots; ++i )
-        drain_count += mailbox(i).drain();
-#if COUNT_TASK_NODES
-    prefix().task_node_count -= drain_count;
-#if !TEST_ASSEMBLY_ROUTINES
-    if( prefix().task_node_count ) {
-        fprintf(stderr,"warning: leaked %ld task objects\n", long(prefix().task_node_count));
-    }
-#endif /* !TEST_ASSEMBLY_ROUTINES */
-#endif /* COUNT_TASK_NODES */
+    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 ) {
-        delete[] prefix().worker_list;
-        prefix().~ArenaPrefix();
         free_arena();
     }
 }
+#endif /* !__TBB_RML */
 
 #if COUNT_TASK_NODES
 intptr Arena::workers_task_node_count() {
@@ -1712,8 +2280,13 @@ 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) ),
@@ -1722,12 +2295,15 @@ GenericScheduler::GenericScheduler( Arena* arena_ ) :
     dummy_task(NULL),
     ref_count(1),
     my_affinity_id(0),
-    occupy_tls(false),
+    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 */
 #if COUNT_TASK_NODES
-   task_node_count(0),
+    task_node_count(0),
 #endif /* COUNT_TASK_NODES */
 #if STATISTICS
     current_active(0),
@@ -1743,6 +2319,10 @@ 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);
@@ -1750,15 +2330,16 @@ GenericScheduler::GenericScheduler( Arena* arena_ ) :
     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) );
 #if __TBB_EXCEPTIONS
     context_list_head.my_prev = &context_list_head;
     context_list_head.my_next = &context_list_head;
     ITT_SYNC_CREATE(&context_list_mutex, SyncType_Scheduler, SyncObj_ContextsList);
-    dummy_task = &allocate_task( sizeof(task), -1, NULL, NULL );
-#else
-    dummy_task = &allocate_task( sizeof(task), -1, NULL );
 #endif /* __TBB_EXCEPTIONS */
     dummy_task->prefix().ref_count = 2;
+    ITT_SYNC_CREATE(&dummy_task->prefix().ref_count, SyncType_Scheduler, SyncObj_WorkerLifeCycleMgmt);
+    ITT_SYNC_CREATE(&return_list, SyncType_Scheduler, SyncObj_TaskReturnList);
     __TBB_ASSERT( assert_okay(), "constructor error" );
 }
 
@@ -1766,11 +2347,21 @@ GenericScheduler::GenericScheduler( Arena* arena_ ) :
     #pragma warning(pop)
 #endif // warning 4355 is back
 
-#if TBB_USE_ASSERT||TEST_ASSEMBLY_ROUTINES
+#if TBB_USE_ASSERT
 bool GenericScheduler::assert_okay() const {
-    __TBB_ASSERT( array_size>=TaskPool::min_array_size, NULL );
 #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 );
+    for ( size_t i = arena_slot->head; i < arena_slot->tail; ++i ) {
+        __TBB_ASSERT( (uintptr_t)tp[i] + 1 > 1u, "nil or invalid task pointer in the deque" );
+        __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 ) {
@@ -1780,11 +2371,12 @@ bool GenericScheduler::assert_okay() const {
             __TBB_ASSERT( t->prefix().owner==this, NULL );
         }
     }
+#endif /* !__TBB_TASK_DEQUE */
     release_task_pool();
 #endif /* TBB_USE_ASSERT>=2||TEST_ASSEMBLY_ROUTINES */
     return true;
 }
-#endif /* TBB_USE_ASSERT||TEST_ASSEMBLY_ROUTINES */
+#endif /* TBB_USE_ASSERT */
 
 #if __TBB_EXCEPTIONS
 
@@ -1799,12 +2391,11 @@ void GenericScheduler::propagate_cancellation () {
             // The absence of acquire fence while reading my_cancellation_requested may result 
             // in repeated traversals of the same parents chain if another group (precedent or 
             // descendant) belonging to the tree being canceled sends cancellation request of 
-            // its own around the same time. I assume that such situations are less frequent 
-            // than uncontended cancellation, and cache coherency mechanisms are efficient enough 
-            // to deliver updated values most of the time.
+            // its own around the same time.
         if ( !ctx->my_cancellation_requested )
             ctx->propagate_cancellation_from_ancestors();
         node = node->my_next;
+        __TBB_ASSERT( ctx->is_alive(), "Walked into a destroyed context while propagating cancellation" );
     }
 }
 
@@ -1851,10 +2442,102 @@ void GenericScheduler::propagate_cancellation ( task_group_context* ctx ) {
 #endif /* __TBB_EXCEPTIONS */
 
 
-void GenericScheduler::grow( TaskPool::size_type minimum_size ) {
-    TBB_TRACE(("%p.grow(minimum_size=%lx)\n", this, minimum_size ));
+#if __TBB_TASK_DEQUE
+
+void GenericScheduler::init_stack_info () {
+    // Stacks are growing top-down. Highest address is called "stack base", 
+    // and the lowest is "stack limit".
+#if USE_WINTHREAD
+#if defined(_MSC_VER)&&_MSC_VER<1400 && !_WIN64
+    NT_TIB  *pteb = (NT_TIB*)__TBB_machine_get_current_teb();
+#else
+    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;
+#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 
+    // based on the common sense assumptions. The most important assumption 
+    // is that the main thread's stack size is not less than that of other threads.
+    size_t  stack_size = arena->prefix().stack_size;
+    void    *stack_base = &stack_size;
+#if __TBB_ipf
+    void    *rsb_base = __TBB_get_bsp();
+#endif
+#if __linux__
+    size_t  np_stack_size = 0;
+    void    *stack_limit = NULL;
+    pthread_attr_t  attr_stack, np_attr_stack;
+    if( 0 == pthread_getattr_np(pthread_self(), &np_attr_stack) ) {
+        if ( 0 == pthread_attr_getstack(&np_attr_stack, &stack_limit, &np_stack_size) ) {
+            if ( 0 == pthread_attr_init(&attr_stack) ) {
+                if ( 0 == pthread_attr_getstacksize(&attr_stack, &stack_size) )
+                {
+                    stack_base = (char*)stack_limit + np_stack_size;
+                    if ( np_stack_size < stack_size ) {
+                        // We are in a secondary thread. Use reliable data.
+#if __TBB_ipf
+                        // IA64 stack is split into RSE backup and memory parts
+                        rsb_base = stack_limit;
+                        stack_size = np_stack_size/2;
+#else
+                        stack_size = np_stack_size;
+#endif /* !__TBB_ipf */
+                    }
+                    // We are either in the main thread or this thread stack 
+                    // is bigger that that of the main one. As we cannot discern
+                    // these cases we fall back to the default (heuristic) values.
+                }
+                pthread_attr_destroy(&attr_stack);
+            }
+        }
+        pthread_attr_destroy(&np_attr_stack);
+    }
+#endif /* __linux__ */
+    __TBB_ASSERT( stack_size>0, "stack size must be positive" );
+    my_stealing_threshold = (uintptr_t)((char*)stack_base - stack_size/2);
+#if __TBB_ipf
+    my_rsb_stealing_threshold = (uintptr_t)((char*)rsb_base + stack_size/2);
+#endif
+#endif /* USE_PTHREAD */
+}
+
+task** GenericScheduler::allocate_task_pool( size_t n ) {
+    __TBB_ASSERT( n > task_pool_size, "Cannot shrink the task pool" );
+    size_t byte_size = ((n * sizeof(task*) + NFS_MaxLineSize - 1) / NFS_MaxLineSize) * NFS_MaxLineSize;
+    task_pool_size = byte_size / sizeof(task*);
+    task** new_pool = (task**)NFS_Allocate( byte_size, 1, NULL );
+    // No need to clear the fresh deque since valid items are designated by the head and tail members.
+#if TBB_USE_ASSERT>=2
+    // But clear it in the high vigilance debug mode
+    memset( new_pool, -1, n );
+#endif /* TBB_USE_ASSERT>=2 */
+    return new_pool;
+}
+
+void GenericScheduler::grow( size_t new_size ) {
+    __TBB_ASSERT( assert_okay(), NULL );
+    if ( new_size < 2 * task_pool_size )
+        new_size = 2 * task_pool_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
+    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*) );
+    arena_slot->head = 0;
+    arena_slot->tail = new_tail;
+    dummy_slot.task_pool = new_pool;
+    release_task_pool();    // updates the task pool pointer in our arena slot
+    free_task_pool( old_pool );
     __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 );
@@ -1868,6 +2551,7 @@ void GenericScheduler::grow( TaskPool::size_type minimum_size ) {
     old_pool->free_task_pool();
     __TBB_ASSERT( assert_okay(), NULL );
 }
+#endif /* !__TBB_TASK_DEQUE */
 
 GenericScheduler* GenericScheduler::allocate_scheduler( Arena* arena ) {
     switch( SchedulerTraitsId ) {
@@ -1882,10 +2566,14 @@ GenericScheduler* GenericScheduler::allocate_scheduler( Arena* arena ) {
 }
 
 void GenericScheduler::free_scheduler() {
-    if( arena_slot!=&dummy_slot ) {
+    if( in_arena() ) {
+#if __TBB_TASK_DEQUE
+        acquire_task_pool();
+        leave_arena();
+#else /* !__TBB_TASK_DEQUE */
         leave_arena(/*compress=*/false);
+#endif /* !__TBB_TASK_DEQUE */
     }
-    unregister_from_thread_local_storage();
 #if __TBB_EXCEPTIONS
     task_group_context* &context = dummy_task->prefix().context;
     // Only master thread's dummy task has a context
@@ -1922,25 +2610,133 @@ 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" );
+    Governor::sign_off(this);
     if( __TBB_FetchAndAddW( &small_task_count, -k )==k ) 
         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 
+    to our task pool).
+    Thus if either of them is changed, consider changing the counterpart as well. **/
+inline void GenericScheduler::acquire_task_pool() const {
+    if ( !in_arena() )
+        return; // we are not in arena - nothing to lock
+    atomic_backoff backoff;
+    bool sync_prepare_done = false;
+    for(;;) {
+#if TBB_USE_ASSERT
+        __TBB_ASSERT( arena_slot == arena->slot + arena_index, "invalid arena slot index" );
+        // Local copy of the arena slot task pool pointer is necessary for the next 
+        // assertion to work correctly to exclude asynchronous state transition effect.
+        task** tp = arena_slot->task_pool;
+        __TBB_ASSERT( tp == LockedTaskPool || tp == dummy_slot.task_pool, "slot ownership corrupt?" );
+#endif
+        if( arena_slot->task_pool != LockedTaskPool && 
+            __TBB_CompareAndSwapW( &arena_slot->task_pool, (intptr_t)LockedTaskPool, 
+                                   (intptr_t)dummy_slot.task_pool ) == (intptr_t)dummy_slot.task_pool )
+        {
+            // We acquired our own slot
+            ITT_NOTIFY(sync_acquired, arena_slot);
+            break;
+        } 
+        else if( !sync_prepare_done ) {
+            // Start waiting
+            ITT_NOTIFY(sync_prepare, arena_slot);
+            sync_prepare_done = true;
+        }
+        // Someone else acquired a lock, so pause and do exponential backoff.
+        backoff.pause();
+#if TEST_ASSEMBLY_ROUTINES
+        __TBB_ASSERT( arena_slot->task_pool == LockedTaskPool || 
+                      arena_slot->task_pool == dummy_slot.task_pool, NULL );
+#endif /* TEST_ASSEMBLY_ROUTINES */
+    }
+    __TBB_ASSERT( arena_slot->task_pool == LockedTaskPool, "not really acquired task pool" );
+} // GenericScheduler::acquire_task_pool
+
+inline void GenericScheduler::release_task_pool() const {
+    if ( !in_arena() )
+        return; // we are not in arena - nothing to unlock
+    __TBB_ASSERT( arena_slot, "we are not in arena" );
+    __TBB_ASSERT( arena_slot->task_pool == LockedTaskPool, "arena slot is not locked" );
+    ITT_NOTIFY(sync_releasing, arena_slot);
+    __TBB_store_with_release( arena_slot->task_pool, dummy_slot.task_pool );
+}
+
+/** ATTENTION: 
+    This method is mostly the same as GenericScheduler::acquire_task_pool(), 
+    with a little different logic of slot state checks (slot can be empty, locked 
+    or point to any task pool other than ours, and asynchronous transitions between 
+    all these states are possible).
+    Thus if any of them is changed, consider changing the counterpart as well **/
+inline task** GenericScheduler::lock_task_pool( ArenaSlot* victim_arena_slot ) const {
+    task** victim_task_pool;
+    atomic_backoff backoff;
+    bool sync_prepare_done = false;
+    for(;;) {
+        victim_task_pool = victim_arena_slot->task_pool;
+        // TODO: Investigate the effect of bailing out on the locked pool without trying to lock it.
+        //       When doing this update assertion in the end of the method.
+        if ( victim_task_pool == EmptyTaskPool ) {
+            // The victim thread emptied its task pool - nothing to lock
+            if( sync_prepare_done )
+                ITT_NOTIFY(sync_cancel, victim_arena_slot);
+            break;
+        }
+        if( victim_task_pool != LockedTaskPool && 
+            __TBB_CompareAndSwapW( &victim_arena_slot->task_pool, 
+                (intptr_t)LockedTaskPool, (intptr_t)victim_task_pool ) == (intptr_t)victim_task_pool )
+        {
+            // We've locked victim's task pool
+            ITT_NOTIFY(sync_acquired, victim_arena_slot);
+            break;
+        }
+        else if( !sync_prepare_done ) {
+            // Start waiting
+            ITT_NOTIFY(sync_prepare, victim_arena_slot);
+            sync_prepare_done = true;
+        }
+        // Someone else acquired a lock, so pause and do exponential backoff.
+        backoff.pause();
+    }
+    __TBB_ASSERT( victim_task_pool == EmptyTaskPool || 
+                  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
+
+inline void GenericScheduler::unlock_task_pool( ArenaSlot* victim_arena_slot, 
+                                                task** victim_task_pool ) const {
+    __TBB_ASSERT( victim_arena_slot, "empty victim arena slot pointer" );
+    __TBB_ASSERT( victim_arena_slot->task_pool == LockedTaskPool, "victim arena slot is not locked" );
+    ITT_NOTIFY(sync_releasing, 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?" );
-    ExponentialBackoff backoff;
+    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( arena_slot==&dummy_slot || arena_slot==&arena->slot[dummy_slot.task_pool->prefix().arena_index], "slot ownership corrupt?" );
+        __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 ) {
@@ -1977,12 +2773,124 @@ inline void GenericScheduler::release_task_pool() const {
     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;
+    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;
+        ITT_NOTIFY( sync_releasing, proxy.outbox );
+        // Mail the proxy - after this point t may be destroyed by another thread at any moment.
+        proxy.outbox->push(proxy);
+        return &proxy;
+    }
+    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( assert_okay(), NULL );
-    TBB_TRACE(("%p.internal_spawn enter\n", this ));
+#if __TBB_TASK_DEQUE
+    if ( &first.prefix().next == &next ) {
+        // Single task is being spawned
+        if ( arena_slot->tail == task_pool_size ) {
+            // 1 compensates for head possibly temporarily incremented by a thief
+            if ( arena_slot->head > 1 ) {
+                // Move the busy part of the deque to the beginning of the allocated space
+                acquire_task_pool();
+                arena_slot->tail -= arena_slot->head;
+                memmove( dummy_slot.task_pool, dummy_slot.task_pool + arena_slot->head, arena_slot->tail * sizeof(task*) );
+                arena_slot->head = 0;
+                release_task_pool();
+            }
+            else {
+                grow( task_pool_size + 1 );
+            }
+        }
+        dummy_slot.task_pool[arena_slot->tail] = prepare_for_spawning( &first );
+        ITT_NOTIFY(sync_releasing, arena_slot);
+        // The following store with release is required on ia64 only
+        size_t new_tail = arena_slot->tail + 1;
+        __TBB_store_with_release( arena_slot->tail, new_tail );
+        __TBB_ASSERT ( arena_slot->tail <= task_pool_size, "task deque end was overwritten" );
+    }
+    else {
+        // Task list is being spawned
+        const size_t initial_capacity = 64;
+        task *arr[initial_capacity];
+        fast_reverse_vector<task*> tasks(arr, initial_capacity);
+        task *t_next = NULL;
+        for( task* t = &first; ; t = t_next ) {
+            // After prepare_for_spawning returns t may already have been destroyed. 
+            // So milk it while it is alive.
+            bool end = &t->prefix().next == &next;
+            t_next = t->prefix().next;
+            tasks.push_back( prepare_for_spawning(t) );
+            if( end )
+                break;
+        }
+        size_t num_tasks = tasks.size();
+        __TBB_ASSERT ( arena_index != null_arena_index, "invalid arena slot index" );
+        if ( arena_slot->tail + num_tasks > task_pool_size ) {
+            // 1 compensates for head possibly temporarily incremented by a thief
+            size_t new_size = arena_slot->tail - arena_slot->head + num_tasks + 1;
+            if ( new_size <= task_pool_size ) {
+                // Move the busy part of the deque to the beginning of the allocated space
+                acquire_task_pool();
+                arena_slot->tail -= arena_slot->head;
+                memmove( dummy_slot.task_pool, dummy_slot.task_pool + arena_slot->head, arena_slot->tail * sizeof(task*) );
+                arena_slot->head = 0;
+                release_task_pool();
+            }
+            else {
+                grow( new_size );
+            }
+        }
+#if DO_ITT_NOTIFY
+        else {
+            // The preceding if-branch issues the same ittnotify inside release_task_pool() or grow() methods
+            ITT_NOTIFY(sync_releasing, arena_slot);
+        }
+#endif /* DO_ITT_NOTIFY */
+        tasks.copy_memory( dummy_slot.task_pool + arena_slot->tail );
+        // The following store with release is required on ia64 only
+        size_t new_tail = arena_slot->tail + num_tasks;
+        __TBB_store_with_release( arena_slot->tail, new_tail );
+        __TBB_ASSERT ( arena_slot->tail <= task_pool_size, "task deque end was overwritten" );
+    }
+    if ( !in_arena() ) {
+        if ( is_worker() )
+            enter_arena();
+        else
+            try_enter_arena();
+    }
+#else /* !__TBB_TASK_DEQUE */
     task* first_ptr = &first;
     task** link = &first_ptr;
     for( task* t = first_ptr; ; t=*link ) {
@@ -2001,11 +2909,8 @@ void GenericScheduler::spawn( task& first, task*& next ) {
         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 ) {
-#if __TBB_EXCEPTIONS
-            task_proxy& proxy = (task_proxy&)allocate_task( sizeof(task_proxy), t->depth(), NULL, NULL );
-#else
-            task_proxy& proxy = (task_proxy&)allocate_task( sizeof(task_proxy), t->depth(), NULL );
-#endif /* __TBB_EXCEPTIONS */
+            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);
@@ -2030,7 +2935,7 @@ void GenericScheduler::spawn( task& first, task*& next ) {
         grow( d+1 );
     }
     __TBB_ASSERT( assert_okay(), NULL );
-    if( arena_slot==&dummy_slot ) {
+    if( !in_arena() ) {
         try_enter_arena();
         __TBB_ASSERT( arena_slot->steal_end&1, NULL );
     } else {
@@ -2047,23 +2952,28 @@ void GenericScheduler::spawn( task& first, task*& next ) {
         tp->prefix().steal_begin = d;
 
     release_task_pool();
-    mark_pool_full();
+#endif /* !__TBB_TASK_DEQUE */
+
+    arena->mark_pool_full();
     __TBB_ASSERT( assert_okay(), NULL );
 
     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( &first, NULL );
-#if __TBB_EXCEPTIONS
-    auto_empty_task dummy(this, first.prefix().depth-1, first.prefix().context);
-#else
-    empty_task& dummy = *new(&allocate_task( sizeof(empty_task), first.prefix().depth-1, NULL )) empty_task;
-#endif /* __TBB_EXCEPTIONS */
+    auto_empty_task dummy( __TBB_ALLOC_TASK_ARGS(this, first.prefix().depth-1, 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;
@@ -2108,20 +3018,110 @@ inline task* GenericScheduler::strip_proxy( task_proxy* tp ) {
             // Successfully grabbed the task, and left the mailbox with the job of freeing the proxy.
             return (task*)(tat&~3);
         }
-        __TBB_ASSERT( tp->task_and_tag==task_proxy::pool_bit, NULL );
-    } else {
-        // We have exclusive access to the proxy
-        __TBB_ASSERT( (tat&3)==task_proxy::pool_bit, "task did not come from pool?" );
-        __TBB_ASSERT ( !(tat&~3), "Empty proxy in the pool contains non-zero task pointer" );
+        __TBB_ASSERT( tp->task_and_tag==task_proxy::pool_bit, NULL );
+    } else {
+        // We have exclusive access to the proxy
+        __TBB_ASSERT( (tat&3)==task_proxy::pool_bit, "task did not come from pool?" );
+        __TBB_ASSERT ( !(tat&~3), "Empty proxy in the pool contains non-zero task pointer" );
+    }
+#if TBB_USE_ASSERT
+    tp->prefix().state = task::allocated;
+#endif
+    free_task_proxy( *tp );
+    // Another thread grabbed the underlying task via their mailbox
+    return NULL;
+}
+
+#if __TBB_TASK_DEQUE
+inline task* GenericScheduler::get_task() {
+    task* result = NULL;
+retry:
+    --arena_slot->tail;
+    __TBB_rel_acq_fence();
+    if ( (intptr_t)arena_slot->head > (intptr_t)arena_slot->tail ) {
+        acquire_task_pool();
+        if ( (intptr_t)arena_slot->head <= (intptr_t)arena_slot->tail ) {
+            // The thief backed off - grab the task
+            __TBB_ASSERT_VALID_TASK_PTR( dummy_slot.task_pool[arena_slot->tail] );
+            result = dummy_slot.task_pool[arena_slot->tail];
+            __TBB_POISON_TASK_PTR( dummy_slot.task_pool[arena_slot->tail] );
+        }
+        else {
+            __TBB_ASSERT ( arena_slot->head == arena_slot->tail + 1, "victim/thief arbitration algorithm failure" );
+        }
+        if ( (intptr_t)arena_slot->head < (intptr_t)arena_slot->tail ) {
+            release_task_pool();
+        }
+        else {
+            // In any case the deque is empty now, so compact it
+            arena_slot->head = arena_slot->tail = 0;
+            if ( in_arena() )
+                leave_arena();
+        }
+    }
+    else {
+        __TBB_ASSERT_VALID_TASK_PTR( dummy_slot.task_pool[arena_slot->tail] );
+        result = dummy_slot.task_pool[arena_slot->tail];
+        __TBB_POISON_TASK_PTR( dummy_slot.task_pool[arena_slot->tail] );
+    }
+    if( result && 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( ArenaSlot& victim_slot ) {
+    task** victim_pool = lock_task_pool( &victim_slot );
+    if ( !victim_pool )
+        return NULL;
+    const size_t none = ~0u;
+    size_t first_skipped_proxy = none;
+    task* result = NULL;
+retry:
+    ++victim_slot.head;
+    __TBB_rel_acq_fence();
+    if ( (intptr_t)victim_slot.head > (intptr_t)victim_slot.tail ) {
+        --victim_slot.head;
+    }
+    else {
+        __TBB_ASSERT_VALID_TASK_PTR( victim_pool[victim_slot.head - 1]);
+        result = victim_pool[victim_slot.head - 1];
+        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() ) {
+                if ( first_skipped_proxy == none )
+                    first_skipped_proxy = victim_slot.head - 1;
+                result = NULL;
+                goto retry;
+            }
+        }
+        __TBB_POISON_TASK_PTR(victim_pool[victim_slot.head - 1]);
     }
-#if TBB_USE_ASSERT
-    tp->prefix().state = task::allocated;
-#endif
-    free_task_proxy( *tp );
-    // Another thread grabbed the underlying task via their mailbox
-    return NULL;
+    if ( first_skipped_proxy != none ) {
+        if ( result ) {
+            victim_pool[victim_slot.head - 1] = victim_pool[first_skipped_proxy];
+            __TBB_POISON_TASK_PTR( victim_pool[first_skipped_proxy] );
+            __TBB_store_with_release( victim_slot.head, first_skipped_proxy + 1 );
+        }
+        else
+            __TBB_store_with_release( victim_slot.head, first_skipped_proxy );
+    }
+    unlock_task_pool( &victim_slot, victim_pool );
+    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
@@ -2164,7 +3164,7 @@ retry:
 
 task* GenericScheduler::steal_task( UnpaddedArenaSlot& arena_slot, depth_type d ) {
     task* result = NULL;
-    ExponentialBackoff backoff;
+    atomic_backoff backoff;
     bool sync_prepare_done = false;
     depth_type steal_end = arena_slot.steal_end;
     for(;;) {
@@ -2235,22 +3235,50 @@ found:
 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
+#else
+    #define TbbCurrentException(context, TbbCapturedException) \
+        context->my_version_and_traits & task_group_context::exact_exception    \
+            ? tbb_exception_ptr::allocate()    \
+            : tbb_exception_ptr::allocate( *(TbbCapturedException) );
+#endif /* !TBB_USE_CAPTURED_EXCEPTION */
+
+#define TbbRegisterCurrentException(context, TbbCapturedException) \
+    if ( context->cancel_group_execution() ) {  \
+        /* We are the first to signal cancellation, so store the exception that caused it. */  \
+        context->my_exception = TbbCurrentException( context, TbbCapturedException ); \
+    }
 
-#define CANCELLATION_INFO_PRESENT(t) __TBB_load_with_acquire(t->prefix().context->my_cancellation_requested)
+#define TbbCatchAll(context)  \
+    catch ( tbb_exception& exc ) {  \
+        TbbRegisterCurrentException( context, exc.move() );   \
+    } 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>::wait_for_all( task& parent, task* child ) {
-    TBB_TRACE(("%p.wait_for_all(parent=%p,child=%p) enter\n", this, &parent, child));
-#if TBB_USE_ASSERT
-    __TBB_ASSERT( assert_okay(), NULL );
+void CustomScheduler<SchedulerTraits>::local_wait_for_all( task& parent, task* child ) {
+    __TBB_ASSERT( Governor::local_scheduler() == this, NULL );
     if( child ) {
-        __TBB_ASSERT( child->prefix().owner==this, NULL );
-        __TBB_ASSERT( parent.ref_count()>=2, "ref_count must be at least 2" );
-    } else {
-        __TBB_ASSERT( parent.ref_count()>=1, "ref_count must be at least 1" );
+        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 );
-#endif /* TBB_USE_ASSERT */
     // Using parent's refcount in sync_prepare (in the stealing loop below) is 
     // a workaround for TP. We need to name it here to display correctly in Ampl.
     if( SchedulerTraits::itt_possible )
@@ -2259,15 +3287,37 @@ 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 
+    // by the reference_count type.
+    static const reference_count 
+        // For nested dispatch loops in masters and any dispatch loops in workers
+        parents_work_done = 1,
+        // For outermost dispatch loops in masters
+        all_work_done = (reference_count)3 << (sizeof(reference_count) * 8 - 2),
+        // For termination dispatch loops in masters
+        all_local_work_done = all_work_done + 1;
+    reference_count quit_point;
+    if( innermost_running_task == dummy_task ) {
+        // We are in the outermost task dispatch loop of a master thread,
+        __TBB_ASSERT( !is_worker(), NULL );
+        quit_point = &parent == dummy_task ? all_local_work_done : all_work_done;
+    } else {
+        quit_point = parents_work_done;
+    }
+#else /* !__TBB_TASK_DEQUE */
     depth_type d;
     if( innermost_running_task==dummy_task ) {
-        // We are in the innermost task dispatch loop of a master thread.
+        // 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:
@@ -2319,23 +3369,26 @@ exception_was_caught:
                         // when making changes, check it too
                         task* s = t->parent();
                         __TBB_ASSERT( innermost_running_task==t, NULL );
+                        __TBB_ASSERT( t->prefix().ref_count==0, "Task still has children after it has been executed" );
                         t->~task();
                         if( s ) {
-                            if( SchedulerTraits::itt_possible )
-                                ITT_NOTIFY(sync_releasing, &s->prefix().ref_count);
-                            if( SchedulerTraits::has_slow_atomic && s->prefix().ref_count==1 ? (s->prefix().ref_count=0, true) : __TBB_FetchAndDecrementWrelease(&s->prefix().ref_count)==1 ) {
-                                if( SchedulerTraits::itt_possible )
-                                    ITT_NOTIFY(sync_acquired, &s->prefix().ref_count);
+                            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 );
@@ -2353,17 +3406,17 @@ exception_was_caught:
                         // the block was copied from above case task::executing, and changed.
                         // Use "s" here as name for t, so that code resembles case task::executing more closely.
                         task* const& s = t;
-                        if( SchedulerTraits::itt_possible )
-                            ITT_NOTIFY(sync_releasing, &s->prefix().ref_count);
-                        if( SchedulerTraits::has_slow_atomic && s->prefix().ref_count==1 ? (s->prefix().ref_count=0, true) : __TBB_FetchAndDecrementWrelease(&s->prefix().ref_count)==1 ) {
-                            if( SchedulerTraits::itt_possible )
-                                ITT_NOTIFY(sync_acquired, &s->prefix().ref_count);
+                        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;
@@ -2395,12 +3448,28 @@ 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
+            // wait_for_all nesting. 
+            // Note that we cannot return from master's outermost dispatch loop 
+            // until we process all the tasks in the local pool, since in case 
+            // of multiple masters this could have left some of them forever 
+            // waiting for their stolen children to be processed.
+            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);
@@ -2411,6 +3480,13 @@ 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,
@@ -2432,11 +3508,26 @@ 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 
+                    // place only in case of significant oversubscription, keeping
+                    // the checks simple seems to be preferable to complicating the code.
+                    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);
@@ -2459,7 +3550,9 @@ 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
@@ -2488,10 +3581,26 @@ fail:
             if( failure_count>=yield_threshold ) {
                 __TBB_Yield();
                 if( failure_count>=yield_threshold+100 ) {
-                    if( d==0 && is_worker() && wait_while_pool_is_empty() )
+#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 );
+                        // 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 */
                 }
             }
         }
@@ -2500,62 +3609,149 @@ fail:
         t->prefix().owner = this;
     } // end of stealing loop
 #if __TBB_EXCEPTIONS
-    } catch ( tbb_exception& exc ) {
-        if ( t->prefix().context->cancel_group_execution() ) {
-            // We are the first to signal cancellation, so store the exception that caused it.
-            t->prefix().context->my_exception = exc.move();
-        }
-    } catch ( std::exception& exc ) {
-        if ( t->prefix().context->cancel_group_execution() ) {
-            // We are the first to signal cancellation, so store the exception that caused it.
-            t->prefix().context->my_exception = captured_exception::allocate(typeid(exc).name(), exc.what());
-        }
-    } catch ( ... ) {
-        if ( t->prefix().context->cancel_group_execution() ) {
-            // We are the first to signal cancellation, so store the exception that caused it.
-            t->prefix().context->my_exception = captured_exception::allocate("...", "Unidentified exception");
+    } TbbCatchAll( t->prefix().context );
+
+    if( task::state_type(t->prefix().state) == task::recycle ) { // state set by recycle_as_safe_continuation()
+        t->prefix().state = task::allocated;
+        // for safe continuation, need to atomically decrement ref_count;
+        if( SchedulerTraits::itt_possible )
+            ITT_NOTIFY(sync_releasing, &t->prefix().ref_count);
+        if( __TBB_FetchAndDecrementWrelease(&t->prefix().ref_count)==1 ) {
+            if( SchedulerTraits::itt_possible )
+                ITT_NOTIFY(sync_acquired, &t->prefix().ref_count);
+        }else{
+            t = NULL;
         }
     }
     goto exception_was_caught;
 #endif /* __TBB_EXCEPTIONS */
 done:
-    parent.prefix().ref_count = 0;
+    if ( !ConcurrentWaitsEnabled(parent) )
+        parent.prefix().ref_count = 0;
 #if TBB_USE_ASSERT
     parent.prefix().extra_state &= ~es_ref_count_active;
 #endif /* TBB_USE_ASSERT */
     innermost_running_task = old_innermost_running_task;
-    if( deepest<0 && innermost_running_task==dummy_task && arena_slot!=&dummy_slot ) {
+#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, "");
+    __TBB_ASSERT(parent.prefix().context && dummy_task->prefix().context, NULL);
     task_group_context* parent_ctx = parent.prefix().context;
-    if ( __TBB_load_with_acquire(parent_ctx->my_cancellation_requested) ) {
-        tbb_exception *e = __TBB_load_with_acquire(parent_ctx->my_exception);
+    if ( parent_ctx->my_cancellation_requested ) {
+        task_group_context::exception_container_type *pe = parent_ctx->my_exception;
         if ( innermost_running_task == dummy_task && parent_ctx == dummy_task->prefix().context ) {
-            // We are in the innermost task dispatch loop of a master thread, and 
+            // We are in the outermost task dispatch loop of a master thread, and 
             // the whole task tree has been collapsed. So we may clear cancellation data.
-            __TBB_store_with_release(parent_ctx->my_cancellation_requested, 0);
-            __TBB_ASSERT(dummy_task->prefix().context == parent_ctx || !CANCELLATION_INFO_PRESENT(dummy_task), 
+            parent_ctx->my_cancellation_requested = 0;
+            __TBB_ASSERT(dummy_task->prefix().context == parent_ctx || !CancellationInfoPresent(dummy_task), 
                          "Unexpected exception or cancellation data in the dummy task");
-            //! \todo Add assertion that master's dummy task context does not have children
+            // If possible, add assertion that master's dummy task context does not have children
         }
-        if ( e )
-            e->throw_self();
+        if ( pe )
+            pe->throw_self();
     }
-    __TBB_ASSERT(!is_worker() || !CANCELLATION_INFO_PRESENT(dummy_task), 
+    __TBB_ASSERT(!is_worker() || !CancellationInfoPresent(dummy_task), 
                  "Worker's dummy task context modified");
-    __TBB_ASSERT(innermost_running_task != dummy_task || !CANCELLATION_INFO_PRESENT(dummy_task), 
+    __TBB_ASSERT(innermost_running_task != dummy_task || !CancellationInfoPresent(dummy_task), 
                  "Unexpected exception or cancellation data in the master's dummy task");
 #endif /* __TBB_EXCEPTIONS */
     __TBB_ASSERT( assert_okay(), NULL );
-    TBB_TRACE(("%p.wait_for_all(parent=%p): return\n",this,&parent));
 }
 
+#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" );
+    arena_slot->head = dummy_slot.head;
+    arena_slot->tail = dummy_slot.tail;
+    // Release signal on behalf of previously spawned tasks (when this thread was not in arena yet)
+    ITT_NOTIFY(sync_releasing, arena_slot);
+    __TBB_store_with_release( arena_slot->task_pool, dummy_slot.task_pool );
+    // We'll leave arena only when it's empty, so clean up local instances of indices.
+    dummy_slot.head = dummy_slot.tail = 0;
+}
+
+void GenericScheduler::enter_arena() {
+    __TBB_ASSERT ( is_worker(), "only workers should use enter_arena()" );
+    __TBB_ASSERT ( arena, "no arena: initialization not completed?" );
+    __TBB_ASSERT ( !in_arena(), "worker already in arena?" );
+    __TBB_ASSERT ( arena_index < arena->prefix().number_of_workers, "invalid worker arena slot index" );
+    __TBB_ASSERT ( arena->slot[arena_index].task_pool == EmptyTaskPool, "someone else grabbed my arena slot?" );
+    do_enter_arena();
+}
+
+void GenericScheduler::try_enter_arena() {
+    __TBB_ASSERT ( !is_worker(), "only masters should use try_enter_arena()" );
+    __TBB_ASSERT ( arena, "no arena: initialization not completed?" );
+    __TBB_ASSERT ( !in_arena(), "master already in arena?" );
+    __TBB_ASSERT ( arena_index >= arena->prefix().number_of_workers && 
+                   arena_index < arena->prefix().number_of_slots, "invalid arena slot hint value" );
+
+
+    size_t h = arena_index;
+    // We do not lock task pool upon successful entering arena
+    if( arena->slot[h].task_pool != EmptyTaskPool || 
+        __TBB_CompareAndSwapW( &arena->slot[h].task_pool, (intptr_t)LockedTaskPool, 
+                                                          (intptr_t)EmptyTaskPool ) != (intptr_t)EmptyTaskPool )
+    {
+        // Hinted arena slot is already busy, try some of the others at random
+        unsigned first = arena->prefix().number_of_workers,
+                 last = arena->prefix().number_of_slots;
+        unsigned n = last - first - 1;
+        /// \todo Is this limit reasonable?
+        size_t max_attempts = last - first;
+        for (;;) {
+            size_t k = first + random.get() % n;
+            if( k >= h )
+                ++k;    // Adjusts random distribution to exclude previously tried slot
+            h = k;
+            if( arena->slot[h].task_pool == EmptyTaskPool && 
+                __TBB_CompareAndSwapW( &arena->slot[h].task_pool, (intptr_t)LockedTaskPool, 
+                                                                  (intptr_t)EmptyTaskPool ) == (intptr_t)EmptyTaskPool )
+            {
+                break;
+            }
+            if ( --max_attempts == 0 ) {
+                // After so many attempts we are still unable to find a vacant arena slot.
+                // Cease the vain effort and work outside of arena for a while.
+                return;
+            }
+        }
+    }
+    // Successfully claimed a slot in the arena.
+    ITT_NOTIFY(sync_acquired, &arena->slot[h]);
+    __TBB_ASSERT ( arena->slot[h].task_pool == LockedTaskPool, "Arena slot is not actually acquired" );
+    arena_index = h;
+    do_enter_arena();
+    attach_mailbox( affinity_id(h+1) );
+}
+
+void GenericScheduler::leave_arena() {
+    __TBB_ASSERT( in_arena(), "Not in arena" );
+    // Do not reset arena_index. It will be used to (attempt to) re-acquire the slot next time
+    __TBB_ASSERT( &arena->slot[arena_index] == arena_slot, "Arena slot and slot index mismatch" );
+    __TBB_ASSERT ( arena_slot->task_pool == LockedTaskPool, "Task pool must be locked when leaving arena" );
+    __TBB_ASSERT ( arena_slot->head == arena_slot->tail, "Cannot leave arena when the task pool is not empty" );
+    if ( !is_worker() ) {
+        my_affinity_id = 0;
+        inbox.detach();
+    }
+    ITT_NOTIFY(sync_releasing, &arena->slot[arena_index]);
+    __TBB_store_with_release( arena_slot->task_pool, EmptyTaskPool );
+    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( arena_slot==&dummy_slot, "already in arena?" );
+    __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 ) {
@@ -2578,7 +3774,7 @@ void GenericScheduler::try_enter_arena() {
 }
 
 void GenericScheduler::leave_arena( bool compress ) {
-    __TBB_ASSERT( arena_slot!=&dummy_slot, "not in arena" );
+    __TBB_ASSERT( in_arena(), "not in arena" );
     // Remove myself from the arena.
     acquire_task_pool();
 #if TBB_USE_ASSERT
@@ -2615,8 +3811,43 @@ void GenericScheduler::leave_arena( bool compress ) {
         __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;
+}
 
-GenericScheduler* GenericScheduler::create_worker( WorkerDescriptor& w ) {
+#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;
@@ -2634,64 +3865,31 @@ GenericScheduler* GenericScheduler::create_worker( WorkerDescriptor& w ) {
         }
     }
 
-    GenericScheduler* s = GenericScheduler::allocate_scheduler(w.arena);
-
-    // Put myself into the arena
-    ArenaSlot& slot = w.arena->slot[i];
-    __TBB_ASSERT( slot.steal_end==-3, "slot not allocated as locked worker?" );
-    s->arena_slot = &slot;
-#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( i+1 );
-    TaskPool* t = s->dummy_slot.task_pool;
-    t->prefix().arena_index = i;
-    ITT_NOTIFY(sync_releasing, &slot);
-    slot.task_pool = t;
-    slot.steal_end = -2;
-    slot.owner_waits = false;
+    GenericScheduler* s = GenericScheduler::create_worker(*w.arena,i);
 
-#if USE_WINTHREAD
-    HANDLE cur_process = GetCurrentProcess();
-    BOOL bRes = DuplicateHandle(cur_process, GetCurrentThread(), cur_process, &w.thread_handle, 0, FALSE, DUPLICATE_SAME_ACCESS);
-    if( !bRes ) {
-        fprintf(stderr, "ERROR: DuplicateHandle failed with status 0x%08X", GetLastError());
-        w.thread_handle = INVALID_HANDLE_VALUE;
-    }
-#else /* USE_PTHREAD */
-    w.thread_handle = pthread_self();
-#endif /* USE_PTHREAD */
     // 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 = 1;
-#if USE_WINTHREAD
-        CloseHandle( w.thread_handle );
-        w.thread_handle = (HANDLE)0;
-#else /* USE_PTHREAD */
-        int status = pthread_detach( w.thread_handle );
-        if( status )
-            handle_perror(status,"pthread_detach");
-#endif /* USE_PTHREAD */
+        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 );
-        s->register_in_thread_local_storage();
+        Governor::sign_on(s);
     }
     return s;
 }
+#endif /* !__TBB_RML */
 
 GenericScheduler* GenericScheduler::create_master( Arena* arena ) {
     GenericScheduler* s = GenericScheduler::allocate_scheduler( arena );
     task& t = *s->dummy_task;
     s->innermost_running_task = &t;
     t.prefix().ref_count = 1;
-    s->register_in_thread_local_storage();
+    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 
@@ -2704,10 +3902,38 @@ GenericScheduler* GenericScheduler::create_master( Arena* arena ) {
         node.my_prev = &the_scheduler_list_head;
         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 ...
+        if ( cur_limit < last ) {
+            // ... to prevent competition between the first few masters.
+            s->arena_index = cur_limit++;
+            // In the absence of exception handling this code is a subject to data 
+            // race in case of multiple masters concurrently entering empty arena.
+            // But it does not affect correctness, and can only result in a few 
+            // masters competing for the same arena slot during the first acquisition.
+            // The cost of competition is low in comparison to that of oversubscription.
+            arena->prefix().limit = cur_limit;
+        }
+        else {
+            // ... to minimize the probability of competition between multiple masters.
+            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 /* __TBB_EXCEPTIONS */
+#endif
+#endif /* __TBB_EXCEPTIONS | __TBB_TASK_DEQUE */
     __TBB_ASSERT( &task::self()==&t, NULL );
 #if __TBB_SCHEDULER_OBSERVER
     // Process any existing observers.
@@ -2716,103 +3942,172 @@ GenericScheduler* GenericScheduler::create_master( Arena* arena ) {
     return s;
 }
 
-#if _MSC_VER && !defined(__INTEL_COMPILER)
-    // Suppress warning about volatile variable sink_for_alloca being defined but not used.
-    #pragma warning (push)
-    #pragma warning (disable: 4189)
-#endif
-
-#if USE_WINTHREAD
-unsigned WINAPI GenericScheduler::worker_routine( void* arg )
-#else
-void* GenericScheduler::worker_routine( void* arg )
-#endif /* USE_WINTHREAD */
+#if !__TBB_RML
+thread_routine_return_type __TBB_THREAD_ROUTINE GenericScheduler::worker_routine( void* arg )
 {
-    GenericScheduler& scheduler = *create_worker(*(WorkerDescriptor*)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 */
 
-#if USE_PTHREAD
-    pthread_cleanup_push( cleanup_worker_thread, &scheduler );
-#elif USE_WINTHREAD
-    class raii_finalizer : internal::no_copy {
-        GenericScheduler& scheduler;
-    public:
-        explicit raii_finalizer(GenericScheduler& sch) : scheduler(sch) {}
-        ~raii_finalizer() { cleanup_worker_thread(&scheduler); }
-    } finalizer(scheduler);
-#else
-    #error Must define USE_PTHREAD or USE_WINTHREAD
-#endif
-
     scheduler.wait_for_all(*scheduler.dummy_task,NULL);
 
-#if USE_WINTHREAD
-    return 0;
-#elif USE_PTHREAD
+#if USE_PTHREAD
     pthread_cleanup_pop( true );
-    return NULL;
 #endif
+    return thread_routine_return_type(0);
 }
+#endif /* __TBB_RML */
 
-#if _MSC_VER && !defined(__INTEL_COMPILER)
-    #pragma warning (pop)
-#endif // warning 4189 is back
-
-void GenericScheduler::cleanup_worker_thread( void* arg ) {
-    TBB_TRACE(("%p.cleanup_worker_thread enter\n",arg));
+void GenericScheduler::cleanup_worker( void* arg ) {
+    TBB_TRACE(("%p.cleanup_worker entered\n",arg));
     GenericScheduler& s = *(GenericScheduler*)arg;
-    __TBB_ASSERT( s.dummy_slot.task_pool, "cleaning up worker with missing TaskPool" );
+    __TBB_ASSERT( s.dummy_slot.task_pool, "cleaning up worker with missing task pool" );
 #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() {
+    TBB_TRACE(("%p.cleanup_master entered\n",this));
+    GenericScheduler& s = *this; // for similarity with cleanup_worker
+    __TBB_ASSERT( s.dummy_slot.task_pool, "cleaning up master with missing task pool" );
+#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 )
+        s.wait_for_all( *dummy_task, NULL );
+#endif /* __TBB_TASK_DEQUE */
+    s.free_scheduler();
+    Governor::finish_with_arena();
+}
+
+#if __TBB_RML
+//------------------------------------------------------------------------
+// UnpaddedArenaPrefix
+//------------------------------------------------------------------------
+inline Arena& UnpaddedArenaPrefix::arena() {
+    return *static_cast<Arena*>(static_cast<void*>( static_cast<ArenaPrefix*>(this)+1 ));
+}
+
+void UnpaddedArenaPrefix::process( job& j ) {
+    GenericScheduler& s = static_cast<GenericScheduler&>(j);
+    __TBB_ASSERT( &s==Governor::local_scheduler(), NULL );
+    __TBB_ASSERT( !s.innermost_running_task, NULL );
+    s.wait_for_all(*s.dummy_task,NULL);
+    __TBB_ASSERT( !s.innermost_running_task, NULL );
+}
+
+void UnpaddedArenaPrefix::cleanup( job& j ) {
+    GenericScheduler& s = static_cast<GenericScheduler&>(j);
+    GenericScheduler::cleanup_worker( &s );
+}
+
+void UnpaddedArenaPrefix::open_connection_to_rml() {
+    __TBB_ASSERT( !server, NULL );
+    __TBB_ASSERT( stack_size>0, NULL );
+    if( !use_private_rml ) {
+        ::rml::factory::status_type status = rml_server_factory.make_server( server, *this );
+        if( status==::rml::factory::st_success ) {
+            __TBB_ASSERT( server, NULL );
+            return;
+        }
+        use_private_rml = true;
+        fprintf(stderr,"warning from TBB: make_server failed with status %x, falling back on private rml",status);
+    }
+    server = rml::make_private_server( *this );
+}
+
+void UnpaddedArenaPrefix::acknowledge_close_connection() {
+    arena().free_arena();
 }
 
+::rml::job* UnpaddedArenaPrefix::create_one_job() {
+    GenericScheduler* s = GenericScheduler::create_worker( arena(), next_job_index++ );
+    Governor::sign_on(s);
+    return s;
+}
+#else
 //------------------------------------------------------------------------
-// WorkerDescsriptor
+// 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 local_thread_stack_size=(unsigned)thread_stack_size;
-    __TBB_ASSERT( ((size_t)local_thread_stack_size==thread_stack_size), "thread_stack_size is too large for windows" );
+    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, local_thread_stack_size, GenericScheduler::worker_routine, this, 0, &thread_id );
+    uintptr status = _beginthreadex( NULL, stack_size, GenericScheduler::worker_routine, this, 0, &thread_id );
     if( status==0 )
         handle_perror(errno,"__beginthreadex");
-    else
-        CloseHandle((HANDLE)status);
-#else
+    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" );
-    if( thread_stack_size>0 ) {
-        status = pthread_attr_setstacksize( &stack_size, thread_stack_size );
-        if( status )
-            handle_perror( status, "pthread_attr_setstacksize" );
-    }
-    // this->thread_handle will be set from the thread function to avoid possible
-    // race with subsequent pthread_detach or pthread_join calls.
+    __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
@@ -2824,26 +4119,32 @@ void WorkerDescriptor::start_one_worker_thread() {
 #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 ) {
-    internal::GenericScheduler* v = GetThreadSpecific();
+#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();
-    // New root task becomes part of the currently running task's cancellation context
-    return v->allocate_task( size, p.depth+1, NULL, p.context );
-#else
-    return v->allocate_task( size, v->innermost_running_task->prefix().depth+1, NULL );
 #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) );
 }
 
 void allocate_root_proxy::free( task& task ) {
-    internal::GenericScheduler* v = GetThreadSpecific();
+    internal::GenericScheduler* v = Governor::local_scheduler();
     __TBB_ASSERT( v, "thread does not have initialized task_scheduler_init object?" );
 #if __TBB_EXCEPTIONS
     // No need to do anything here as long as there is no context -> task connection
@@ -2856,16 +4157,16 @@ void allocate_root_proxy::free( task& task ) {
 // Methods of allocate_root_with_context_proxy
 //------------------------------------------------------------------------
 task& allocate_root_with_context_proxy::allocate( size_t size ) const {
-    internal::GenericScheduler* v = GetThreadSpecific();
+    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, p.depth+1, NULL, &my_context );
+    task& t = v->allocate_task( size, __TBB_ALLOC_TASK_ARGS(NULL, p.depth+1, &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 ) {
         __TBB_ASSERT ( my_context.my_owner, "Context without owner" );
         __TBB_ASSERT ( !my_context.my_parent, "Parent context set before initial binding" );
-        // If we are in the innermost task dispatch loop of a master thread, then
+        // If we are in the outermost task dispatch loop of a master thread, then
         // there is nothing to bind this context to, and we skip the binding part.
         if ( v->innermost_running_task != v->dummy_task ) {
             // By not using the fence here we get faster code in case of normal execution 
@@ -2898,7 +4199,7 @@ task& allocate_root_with_context_proxy::allocate( size_t size ) const {
 }
 
 void allocate_root_with_context_proxy::free( task& task ) const {
-    internal::GenericScheduler* v = GetThreadSpecific();
+    internal::GenericScheduler* v = Governor::local_scheduler();
     __TBB_ASSERT( v, "thread does not have initialized task_scheduler_init object?" );
     // No need to do anything here as long as unbinding is performed by context destructor only.
     v->free_task<GenericScheduler::is_local>( task );
@@ -2911,22 +4212,21 @@ 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 );
-    GenericScheduler* v = static_cast<GenericScheduler*>(t.prefix().owner);
-    __TBB_ASSERT( GetThreadSpecific()==v, "thread does not own this" );
+#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;
-#if __TBB_EXCEPTIONS
-    return v->allocate_task( size, t.prefix().depth, parent, t.prefix().context );
-#else
-    return v->allocate_task( size, t.prefix().depth, parent );
-#endif /* __TBB_EXCEPTIONS */
+    return s->allocate_task( size, __TBB_ALLOC_TASK_ARGS(parent, t.prefix().depth, t.prefix().context) );
 }
 
 void allocate_continuation_proxy::free( task& mytask ) const {
-    task& t = *((task*)this);
     // Restore the parent as it was before the corresponding allocate was called.
-    t.prefix().parent = mytask.parent();
-    static_cast<GenericScheduler*>(t.prefix().owner)->free_task<GenericScheduler::is_local>(mytask);
+    ((task*)this)->prefix().parent = mytask.parent();
+    Governor::local_scheduler()->free_task<GenericScheduler::is_local>(mytask);
 }
 
 //------------------------------------------------------------------------
@@ -2935,19 +4235,17 @@ 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 );
-    GenericScheduler* v = static_cast<GenericScheduler*>(t.prefix().owner);
-    __TBB_ASSERT( GetThreadSpecific()==v, "thread does not own parent" );
-#if __TBB_EXCEPTIONS
-    return v->allocate_task( size, t.prefix().depth+1, &t, t.prefix().context );
-#else
-    return v->allocate_task( size, t.prefix().depth+1, &t );
-#endif /* __TBB_EXCEPTIONS */
+#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) );
 }
 
 void allocate_child_proxy::free( task& mytask ) const {
-    task& t = *((task*)this);
-    GenericScheduler* v = static_cast<GenericScheduler*>(t.prefix().owner);
-    v->free_task<GenericScheduler::is_local>(mytask);
+    Governor::local_scheduler()->free_task<GenericScheduler::is_local>(mytask);
 }
 
 //------------------------------------------------------------------------
@@ -2955,13 +4253,13 @@ void allocate_child_proxy::free( task& mytask ) const {
 //------------------------------------------------------------------------
 task& allocate_additional_child_of_proxy::allocate( size_t size ) const {
     __TBB_ASSERT( AssertOkay(self), NULL );
-    __TBB_FetchAndIncrementWacquire( &parent.prefix().ref_count );
-    GenericScheduler* v = static_cast<GenericScheduler*>(self.prefix().owner);
-#if __TBB_EXCEPTIONS
-    return v->allocate_task( size, parent.prefix().depth+1, &parent, parent.prefix().context );
-#else
-    return v->allocate_task( size, parent.prefix().depth+1, &parent );
-#endif /* __TBB_EXCEPTIONS */
+    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) );
 }
 
 void allocate_additional_child_of_proxy::free( task& task ) const {
@@ -2972,29 +4270,24 @@ void allocate_additional_child_of_proxy::free( task& task ) const {
     // race condition (that we warn about in Reference manual), because the
     // reference count might have become zero before the corresponding call to
     // allocate_additional_child_of_proxy::allocate.
-    __TBB_FetchAndDecrementWrelease( &parent.prefix().ref_count );
-    GenericScheduler* v = static_cast<GenericScheduler*>(self.prefix().owner);
-
-    v->free_task<GenericScheduler::is_local>(task);
+    parent.internal_decrement_ref_count();
+    Governor::local_scheduler()->free_task<GenericScheduler::is_local>(task);
 }
 
 //------------------------------------------------------------------------
 // Support for auto_partitioner
 //------------------------------------------------------------------------
 size_t get_initial_auto_partitioner_divisor() {
-    // No fence required here, because TheArena does not change after the thread starts.
-    Arena* arena = TheArena;
-    __TBB_ASSERT( arena, "thread did not activate a task_scheduler_init object?" );
     const size_t X_FACTOR = 4;
-    return X_FACTOR * (arena->prefix().number_of_workers+1);
+    return X_FACTOR * (Governor::number_of_workers_in_arena()+1);
 }
 
 //------------------------------------------------------------------------
 // Methods of affinity_partitioner_base_v3
 //------------------------------------------------------------------------
 void affinity_partitioner_base_v3::resize( unsigned factor ) {
-    Arena* arena = TheArena;
-    size_t new_size = arena ? factor*(arena->prefix().number_of_workers+1) : 0;
+    // Check factor to avoid asking for number of workers while there might be no arena.
+    size_t new_size = factor ? factor*(Governor::number_of_workers_in_arena()+1) : 0;
     if( new_size!=my_size ) {
         if( my_array ) {
             NFS_Free( my_array );
@@ -3062,9 +4355,8 @@ 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));
+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);
         e->my_dynamic = true;
@@ -3080,23 +4372,57 @@ const char* captured_exception::what() const throw() {
     return my_exception_info;
 }
 
+
+//------------------------------------------------------------------------
+// tbb_exception_ptr
+//------------------------------------------------------------------------
+
+#if !TBB_USE_CAPTURED_EXCEPTION
+
+namespace internal {
+
+template<typename T>
+tbb_exception_ptr* AllocateExceptionContainer( const T& src ) {
+    tbb_exception_ptr *eptr = (tbb_exception_ptr*)allocate_via_handler_v3( sizeof(tbb_exception_ptr) );
+    if ( eptr )
+        new (eptr) tbb_exception_ptr(src);
+    return eptr;
+}
+
+tbb_exception_ptr* tbb_exception_ptr::allocate () {
+    return AllocateExceptionContainer( std::current_exception() );
+}
+
+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 );
+}
+
+void tbb_exception_ptr::destroy () throw() {
+    this->tbb_exception_ptr::~tbb_exception_ptr();
+    deallocate_via_handler_v3 (this);
+}
+
+} // namespace internal
+#endif /* !TBB_USE_CAPTURED_EXCEPTION */
+
+
 //------------------------------------------------------------------------
 // task_group_context
 //------------------------------------------------------------------------
 
 task_group_context::~task_group_context () {
     if ( my_kind != isolated ) {
-        __TBB_ASSERT ( my_owner == GetThreadSpecific(), "Task group context is destructed by the wrong thread" );
+        __TBB_ASSERT ( Governor::local_scheduler() == my_owner, "Task group context is destructed by wrong thread" );
         GenericScheduler *s = (GenericScheduler*)my_owner;
         my_node.my_next->my_prev = my_node.my_prev;
-        // By not using the fence here we get faster code in case of normal execution 
-        // flow in exchange for a bit higher probability that in cases when cancellation 
-        // is in flight we will take the branch containing the lock. Normally cache 
-        // coherency mechanisms are efficient enough to deliver updated value most 
-        // of the time.
         uintptr_t local_count_snapshot = s->local_cancel_count;
-        __TBB_store_with_release( my_node.my_prev->my_next, my_node.my_next );
-        if ( local_count_snapshot != __TBB_load_with_acquire(global_cancel_count) ) {
+        my_node.my_prev->my_next = my_node.my_next;
+        __TBB_rel_acq_fence();
+        if ( local_count_snapshot != global_cancel_count ) {
             // Another thread was propagating cancellation request when we removed
             // ourselves from the list. We must ensure that it does not access us 
             // when this destructor finishes. We'll be able to acquire the lock 
@@ -3104,11 +4430,15 @@ task_group_context::~task_group_context () {
             spin_mutex::scoped_lock lock(s->context_list_mutex);
         }
     }
+#if TBB_USE_DEBUG
+    my_version_and_traits = 0xDeadBeef;
+#endif /* TBB_USE_DEBUG */
     if ( my_exception )
         my_exception->destroy();
 }
 
 void task_group_context::init () {
+    __TBB_ASSERT ( sizeof(uintptr_t) < 32, "Layout of my_version_and_traits must be reconsidered on this platform" );
     __TBB_ASSERT ( sizeof(task_group_context) == 2 * NFS_MaxLineSize, "Context class has wrong size - check padding and members alignment" );
     __TBB_ASSERT ( (uintptr_t(this) & (sizeof(my_cancellation_requested) - 1)) == 0, "Context is improperly aligned" );
     __TBB_ASSERT ( my_kind == isolated || my_kind == bound, "Context can be created only as isolated or bound" );
@@ -3116,7 +4446,11 @@ void task_group_context::init () {
     my_cancellation_requested = 0;
     my_exception = NULL;
     if ( my_kind == bound ) {
-        GenericScheduler *s = GetThreadSpecific();
+#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
@@ -3138,12 +4472,12 @@ bool task_group_context::cancel_group_execution () {
         // This task group has already been canceled
         return false;
     }
-    GetThreadSpecific()->propagate_cancellation(this);
+    Governor::local_scheduler()->propagate_cancellation(this);
     return true;
 }
 
 bool task_group_context::is_group_execution_cancelled () const {
-    return __TBB_load_with_acquire(my_cancellation_requested) != 0;
+    return my_cancellation_requested != 0;
 }
 
 // IMPORTANT: It is assumed that this method is not used concurrently!
@@ -3172,6 +4506,14 @@ void task_group_context::propagate_cancellation_from_ancestors () {
     }
 }
 
+void task_group_context::register_pending_exception () {
+    if ( my_cancellation_requested )
+        return;
+    try {
+        throw;
+    } TbbCatchAll( this );
+}
+
 #endif /* __TBB_EXCEPTIONS */
 
 //------------------------------------------------------------------------
@@ -3179,47 +4521,67 @@ void task_group_context::propagate_cancellation_from_ancestors () {
 //------------------------------------------------------------------------
 
 void task::internal_set_ref_count( int count ) {
-    __TBB_ASSERT( count>0, "count must be positive" );
+    __TBB_ASSERT( count>=0, "count must not be negative" );
     __TBB_ASSERT( !(prefix().extra_state&GenericScheduler::es_ref_count_active), "ref_count race detected" );
     ITT_NOTIFY(sync_releasing, &prefix().ref_count);
     prefix().ref_count = count;
 }
 
+internal::reference_count task::internal_decrement_ref_count() {
+    ITT_NOTIFY( sync_releasing, &prefix().ref_count );
+    internal::reference_count k = __TBB_FetchAndDecrementWrelease( &prefix().ref_count );
+    __TBB_ASSERT( k>=1, "task's reference count underflowed" );
+    if( k==1 )
+        ITT_NOTIFY( sync_acquired, &prefix().ref_count );
+    return k-1;
+}
+
 task& task::self() {
-    GenericScheduler* v = GetThreadSpecific();
+#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 {
-    return GetThreadSpecific()==prefix().owner;
+#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 ) {
-    __TBB_ASSERT( victim.prefix().ref_count==0, "victim must have reference count of zero" );
+#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" );
-    if( task* parent = victim.parent() ) {
+    task* parent = victim.parent();
+    victim.~task();
+    if( parent ) {
         __TBB_ASSERT( parent->state()==task::allocated, "attempt to destroy child of running or corrupted parent?" );
-        ITT_NOTIFY(sync_releasing, &parent->prefix().ref_count);
-        __TBB_FetchAndDecrementWrelease(&parent->prefix().ref_count);
-        ITT_NOTIFY(sync_acquired, &parent->prefix().ref_count);
+        parent->internal_decrement_ref_count();
     }
-    internal::GenericScheduler* v = static_cast<internal::GenericScheduler*>(prefix().owner);
-    // Victim is allowed to be owned by another thread.
-    victim.prefix().owner = v;
-    v->destroy_task(victim);
+    Governor::local_scheduler()->free_task<GenericScheduler::no_hint>( 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 ) {
         if( &t->prefix().next!=list.next_ptr )
-            prefix().owner->spawn( *t->prefix().next, *list.next_ptr );
+            s->spawn( *t->prefix().next, *list.next_ptr );
         list.clear();
     }
-    prefix().owner->wait_for_all( *this, t );
+    s->wait_for_all( *this, t );
 }
 
 /** Defined out of line so that compiler does not replicate task's vtable. 
@@ -3232,15 +4594,6 @@ void task::note_affinity( affinity_id ) {
 // task_scheduler_init
 //------------------------------------------------------------------------
 
-const stack_size_type MByte = 1<<20;
-#if !defined(__TBB_WORDSIZE)
-const stack_size_type ThreadStackSize = 1*MByte;
-#elif __TBB_WORDSIZE<=4
-const stack_size_type ThreadStackSize = 2*MByte;
-#else
-const stack_size_type ThreadStackSize = 4*MByte;
-#endif
-
 void task_scheduler_init::initialize( int number_of_threads ) {
     initialize( number_of_threads, 0 );
 }
@@ -3251,29 +4604,14 @@ void task_scheduler_init::initialize( int number_of_threads, stack_size_type thr
         __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_load_with_acquire(OneTimeInitializationsDone) ) {
+        if( !__TBB_InitOnce::initialization_done() ) {
             DoOneTimeInitializations();
         }
-        GenericScheduler* s = GetThreadSpecific();
+        GenericScheduler* s = Governor::local_scheduler();
         if( s ) {
             s->ref_count += 1;
         } else {
-            Arena* a;
-            {
-                mutex::scoped_lock lock( TheArenaMutex );
-                a = TheArena;
-                if( a ) {
-                    a->prefix().number_of_masters += 1;
-                } else {
-                    if( number_of_threads==-1 )
-                        number_of_threads = default_num_threads();
-                    // Put cold path in separate routine.
-                    a = Arena::allocate_arena( 2*number_of_threads, number_of_threads-1,
-                                               thread_stack_size?thread_stack_size:ThreadStackSize );
-                    __TBB_ASSERT( a->prefix().number_of_masters==1, NULL );
-                    __TBB_ASSERT( TheArena==a, NULL );
-                }
-            }
+            Arena* a = Governor::obtain_arena(number_of_threads,thread_stack_size);
             s = GenericScheduler::create_master( a );
         }
         my_scheduler = s;
@@ -3283,30 +4621,12 @@ void task_scheduler_init::initialize( int number_of_threads, stack_size_type thr
 }
 
 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) ) {
-        __TBB_ASSERT( s->dummy_slot.task_pool, "cleaning up master with missing TaskPool" );
-#if __TBB_SCHEDULER_OBSERVER
-        s->notify_exit_observers(false);
-#endif /* __TBB_SCHEDULER_OBSERVER */
-        s->free_scheduler();
-        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( a ) {
-            a->terminate_workers();
-        }
-    }
+    if( !--(s->ref_count) )
+        s->cleanup_master();
 }
 
 int task_scheduler_init::default_num_threads() {
@@ -3480,12 +4800,11 @@ done:
 void task_scheduler_observer_v3::observe( bool state ) {
     if( state ) {
         if( !my_proxy ) {
-            if( !__TBB_load_with_acquire(OneTimeInitializationsDone) ) {
+            if( !__TBB_InitOnce::initialization_done() )
                 DoOneTimeInitializations();
-            }
             my_busy_count = 0;
             my_proxy = new observer_proxy(*this);
-            if( GenericScheduler* s = GetThreadSpecific() ) {
+            if( GenericScheduler* s = Governor::local_scheduler() ) {
                 // Notify newly created observer of its own thread.
                 // Any other pending observers are notified too.
                 s->notify_entry_observers();
@@ -3507,7 +4826,7 @@ void task_scheduler_observer_v3::observe( bool state ) {
     }
 }
 
-} // namespace internal */
+} // namespace internal
 #endif /* __TBB_SCHEDULER_OBSERVER */
 
 } // namespace tbb
diff --git a/src/tbb/tbb_assert_impl.h b/src/tbb/tbb_assert_impl.h
index abf0dfd..2a381f9 100644
--- a/src/tbb/tbb_assert_impl.h
+++ b/src/tbb/tbb_assert_impl.h
@@ -36,8 +36,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>
-#if _WIN32||_WIN64
+#if _MSC_VER
 #include <crtdbg.h>
+#define __TBB_USE_DBGBREAK_DLG TBB_USE_DEBUG
 #endif
 
 #if _MSC_VER >= 1400
@@ -71,10 +72,11 @@ namespace tbb {
                          expression, line, filename );
                 if( comment )
                     fprintf( stderr, "Detailed description: %s\n", comment );
-#if (_WIN32||_WIN64) && defined(_DEBUG)
+#if __TBB_USE_DBGBREAK_DLG
                 if(1 == _CrtDbgReport(_CRT_ASSERT, filename, line, "tbb_debug.dll", "%s\r\n%s", expression, comment?comment:""))
                         _CrtDbgBreak();
 #else
+                fflush(stderr);
                 abort();
 #endif
             }
@@ -91,8 +93,8 @@ namespace tbb {
         {
             char str[1024]; memset(str, 0, 1024);
             va_list args; va_start(args, format);
-            vsnprintf(str, 1024-1, format, args);
-            fprintf(stderr, "TBB Warning: %s\n", str);
+            vsnprintf( str, 1024-1, format, args);
+            fprintf( stderr, "TBB Warning: %s\n", str);
         }
     } // namespace internal
 
diff --git a/src/tbb/tbb_misc.cpp b/src/tbb/tbb_misc.cpp
index bba6944..75ba5d5 100644
--- a/src/tbb/tbb_misc.cpp
+++ b/src/tbb/tbb_misc.cpp
@@ -38,24 +38,15 @@
 #include <cstdlib>
 #include <cstring>
 #if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)
+    #include "tbb/tbb_exception.h"
     #include <string> // std::string is used to construct runtime_error
     #include <stdexcept>
 #endif
-#if __sun
-    #include <alloca.h>     /* alloca */
-#endif
-#if _WIN32||_WIN64
-    #include <malloc.h>     /* alloca */
-#else
-    #include <dlfcn.h>
-#endif 
 
 using namespace std;
 
 #include "tbb/tbb_machine.h"
 
-#include <iterator>
-
 namespace tbb {
 
 namespace internal {
@@ -74,6 +65,11 @@ void handle_perror( int error_code, const char* what ) {
     buf[sizeof(buf)-1] = 0; 
     throw runtime_error(buf);
 }
+
+void throw_bad_last_alloc_exception_v4() 
+{
+    throw bad_last_alloc();
+}
 #endif //__EXCEPTIONS || _CPPUNWIND
 
 bool GetBoolEnvironmentVariable( const char * name ) {
@@ -82,72 +78,6 @@ bool GetBoolEnvironmentVariable( const char * name ) {
     return false;
 }
 
-#if __TBB_WEAK_SYMBOLS
-
-bool FillDynamicLinks( const char* /*library*/, const DynamicLinkDescriptor descriptors[], size_t n, size_t required )
-{
-    if ( required == ~(size_t)0 )
-        required = n;
-    __TBB_ASSERT( required<=n, "Number of required entry points exceeds their total number" );
-    size_t k = 0;
-    // Check if the first required entries are present in what was loaded into our process
-    while ( k < required && descriptors[k].ptr )
-        ++k;
-    if ( k < required )
-        return false;
-    // Commit all the entry points.
-    for ( k = 0; k < n; ++k )
-        *descriptors[k].handler = (PointerToHandler) descriptors[k].ptr;
-    return true;
-}
-
-#else /* !__TBB_WEAK_SYMBOLS */
-
-bool FillDynamicLinks( void* module, const DynamicLinkDescriptor descriptors[], size_t n, size_t required )
-{
-    PointerToHandler *h = (PointerToHandler*)alloca(n * sizeof(PointerToHandler));
-    if ( required == ~(size_t)0 )
-        required = n;
-    __TBB_ASSERT( required<=n, "Number of required entry points exceeds their total number" );
-    size_t k = 0;
-    for ( ; k < n; ++k ) {
-#if _WIN32||_WIN64
-        h[k] = (PointerToHandler) GetProcAddress( (HMODULE)module, descriptors[k].name );
-#else
-        h[k] = (PointerToHandler) dlsym( module, descriptors[k].name );
-#endif /* _WIN32||_WIN64 */
-        if ( !h[k] && k < required )
-            return false;
-    }
-    __TBB_ASSERT( k == n, "if required entries are initialized, all entries are expected to be walked");
-    // Commit the entry points.
-    // Cannot use memset here, because the writes must be atomic.
-    for( k = 0; k < n; ++k )
-        *descriptors[k].handler = h[k];
-    return true;
-}
-
-bool FillDynamicLinks( const char* library, const DynamicLinkDescriptor descriptors[], size_t n, size_t required )
-{
-#if _WIN32||_WIN64
-    if ( FillDynamicLinks( GetModuleHandle(NULL), descriptors, n, required ) )
-        // Target library was statically linked into this executable
-        return true;
-    // Prevent Windows from displaying silly message boxes if it fails to load library
-    // (e.g. because of MS runtime problems - one of those crazy manifest related ones)
-    UINT prev_mode = SetErrorMode (SEM_FAILCRITICALERRORS);
-    void* module = LoadLibrary (library);
-    SetErrorMode (prev_mode);
-#else
-    void* module = dlopen( library, RTLD_LAZY ); 
-#endif /* _WIN32||_WIN64 */
-    // Return true if the library is there and it contains all the expected entry points.
-    return module != NULL  &&  FillDynamicLinks( module, descriptors, n, required );
-}
-
-#endif /* !__TBB_WEAK_SYMBOLS */
-
-
 #include "tbb_version.h"
 
 /** The leading "\0" is here so that applying "strings" to the binary delivers a clean result. */
@@ -165,6 +95,11 @@ void PrintExtraVersionInfo( const char* category, const char* description ) {
         fprintf(stderr, "%s: %s\t%s\n", "TBB", category, description );
 }
 
+void PrintRMLVersionInfo( void* arg, const char* server_info )
+{
+    PrintExtraVersionInfo( server_info, (const char *)arg );
+}
+
 } // namespace internal
  
 extern "C" int TBB_runtime_interface_version() {
@@ -173,12 +108,13 @@ extern "C" int TBB_runtime_interface_version() {
 
 } // namespace tbb
 
+#if !__TBB_RML_STATIC
 #if __TBB_x86_32
 
 #include "tbb/atomic.h"
 
-//on Windows, int64_t defined in tbb::internal namespace only
-#if _WIN32||_WIN64 
+// in MSVC environment, int64_t defined in tbb::internal namespace only (see tbb_stddef.h)
+#if _MSC_VER
 using tbb::internal::int64_t;
 #endif
 
@@ -198,7 +134,7 @@ done:;
 
 //! Handle 8-byte store that crosses a cache line.
 extern "C" void __TBB_machine_store8_slow( volatile void *ptr, int64_t value ) {
-    for( tbb::internal::AtomicBackoff b;; b.pause() ) {
+    for( tbb::internal::atomic_backoff b;; b.pause() ) {
         int64_t tmp = *(int64_t*)ptr;
         if( __TBB_machine_cmpswp8(ptr,value,tmp)==tmp ) 
             break;
@@ -206,11 +142,12 @@ extern "C" void __TBB_machine_store8_slow( volatile void *ptr, int64_t value ) {
 }
 
 #endif /* __TBB_x86_32 */
+#endif /* !__TBB_RML_STATIC */
 
 #if __TBB_ipf
 extern "C" intptr_t __TBB_machine_lockbyte( volatile unsigned char& flag ) {
     if ( !__TBB_TryLockByte(flag) ) {
-        tbb::internal::AtomicBackoff b;
+        tbb::internal::atomic_backoff b;
         do {
             b.pause();
         } while ( !__TBB_TryLockByte(flag) );
diff --git a/src/tbb/tbb_misc.h b/src/tbb/tbb_misc.h
index a3fa567..7481899 100644
--- a/src/tbb/tbb_misc.h
+++ b/src/tbb/tbb_misc.h
@@ -122,92 +122,8 @@ void PrintVersion();
 //! Print extra TBB version information on stderr
 void PrintExtraVersionInfo( const char* category, const char* description );
 
-//! Type definition for a pointer to a void somefunc(void)
-typedef void (*PointerToHandler)();
-
-// Double cast through the void* from func_ptr in DLD macro is necessary to 
-// prevent warnings from some compilers (g++ 4.1)
-#if __TBB_WEAK_SYMBOLS
-
-#define DLD(s,h) {(PointerToHandler)&s, (PointerToHandler*)(void*)(&h)}
-//! Association between a handler name and location of pointer to it.
-struct DynamicLinkDescriptor {
-    //! pointer to the handler
-    PointerToHandler ptr;
-    //! Pointer to the handler
-    PointerToHandler* handler;
-};
-
-#else /* !__TBB_WEAK_SYMBOLS */
-
-#define DLD(s,h) {#s, (PointerToHandler*)(void*)(&h)}
-//! Association between a handler name and location of pointer to it.
-struct DynamicLinkDescriptor {
-    //! Name of the handler
-    const char* name;
-    //! Pointer to the handler
-    PointerToHandler* handler;
-};
-
-#endif /* !__TBB_WEAK_SYMBOLS */
-
-//! Fill in dynamically linked handlers.
-/** 'n' is the length of the array descriptors[].
-    'required' is the number of the initial entries in the array descriptors[] 
-    that have to be found in order for the call to succeed. If the library and 
-    all the required handlers are found, then the corresponding handler pointers 
-    are set. Otherwise the original array of descriptors is left untouched. **/
-bool FillDynamicLinks( const char* libraryname, 
-                       const DynamicLinkDescriptor descriptors[], 
-                       size_t n, 
-                       size_t required = ~(size_t)0 );
-
-//! Class that implements exponential backoff.
-/** See implementation of SpinwaitWhileEq for an example. */
-class ExponentialBackoff {
-    //! Time delay, in units of "pause" instructions. 
-    /** Should be equal to approximately the number of "pause" instructions
-        that take the same time as an context switch. */
-    static const int LOOPS_BEFORE_YIELD = 0x10;
-    int count;
-public:
-    ExponentialBackoff() : count(1) {}
-
-    //! Pause for a while.
-    void pause() {
-        if( count<=LOOPS_BEFORE_YIELD ) {
-            __TBB_Pause(count);
-            // Pause twice as long the next time.
-            count*=2;
-        } else {
-            // Pause is so long that we might as well yield CPU to scheduler.
-            __TBB_Yield();
-        }
-    }
-    void reset() {
-        count = 1;
-    }
-};
-
-//! Spin WHILE the value of the variable is equal to a given value
-/** T and U should be comparable types. */
-template<typename T, typename U>
-static inline void SpinwaitWhileEq( const volatile T& location, U value ) {
-    ExponentialBackoff backoff;
-    while( location==value ) {
-        backoff.pause();
-    }
-}
-
-//! Spin UNTIL the value of the variable is equal to a given value
-/** T and U should be comparable types. */
-template<typename T, typename U>
-static inline void SpinwaitUntilEq( const volatile T& location, const U value ) {
-    ExponentialBackoff backoff;
-    while( location!=value ) {
-        backoff.pause();
-    }
-}
+//! A callback routine to print RML version information on stderr
+void PrintRMLVersionInfo( void* arg, const char* server_info );
 
 } // namespace internal
 
diff --git a/src/tbb/tls.h b/src/tbb/tls.h
new file mode 100644
index 0000000..2e4768c
--- /dev/null
+++ b/src/tbb/tls.h
@@ -0,0 +1,119 @@
+/*
+    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_tls_H
+#define _TBB_tls_H
+
+#if USE_PTHREAD
+#include <pthread.h>
+#else /* assume USE_WINTHREAD */
+#include <windows.h>
+#endif
+
+namespace tbb {
+
+namespace internal {
+
+typedef void (*tls_dtor_t)(void*);
+
+//! Basic cross-platform wrapper class for TLS operations.
+template <typename T>
+class basic_tls {
+#if USE_PTHREAD
+    typedef pthread_key_t tls_key_t;
+public:
+    int  create( tls_dtor_t dtor = NULL ) {
+        return pthread_key_create(&my_key, dtor);
+    }
+    int  destroy()      { return pthread_key_delete(my_key); }
+    void set( T value ) { pthread_setspecific(my_key, (void*)value); }
+    T    get()          { return (T)pthread_getspecific(my_key); }
+#else /* USE_WINTHREAD */
+    typedef DWORD tls_key_t;
+public:
+    int create() {
+        tls_key_t tmp = TlsAlloc();
+        if( tmp==TLS_OUT_OF_INDEXES )
+            return TLS_OUT_OF_INDEXES;
+        my_key = tmp;
+        return 0;
+    }
+    int  destroy()      { TlsFree(my_key); my_key=0; return 0; }
+    void set( T value ) { TlsSetValue(my_key, (LPVOID)value); }
+    T    get()          { return (T)TlsGetValue(my_key); }
+#endif
+private:
+    tls_key_t my_key;
+};
+
+//! More advanced TLS support template class.
+/** It supports RAII and to some extent mimic __declspec(thread) variables. */
+template <typename T>
+class tls : public basic_tls<T> {
+    typedef basic_tls<T> base;
+public:
+    tls()  { base::create();  }
+    ~tls() { base::destroy(); }
+    T operator=(T value) { base::set(value); return value; }
+    operator T() { return base::get(); }
+};
+
+template <typename T>
+class tls<T*> : basic_tls<T*> {
+    typedef basic_tls<T*> base;
+    static void internal_dtor(void* ptr) {
+        if (ptr) delete (T*)ptr;
+    }
+    T* internal_get() {
+        T* result = base::get();
+        if (!result) {
+            result = new T;
+            base::set(result);
+        }
+        return result;
+    }
+public:
+    tls()  {
+#if USE_PTHREAD
+        base::create( internal_dtor );
+#else
+        base::create();
+#endif
+    }
+    ~tls() { base::destroy(); }
+    T* operator=(T* value) { base::set(value); return value; }
+    operator T*()   { return  internal_get(); }
+    T* operator->() { return  internal_get(); }
+    T& operator*()  { return *internal_get(); }
+};
+
+} // namespace internal
+
+} // namespace tbb
+
+#endif /* _TBB_tls_H */
diff --git a/src/tbbmalloc/proxy.h b/src/tbb/tools_api/_config.h
similarity index 50%
copy from src/tbbmalloc/proxy.h
copy to src/tbb/tools_api/_config.h
index 15c25a9..17c97e5 100644
--- a/src/tbbmalloc/proxy.h
+++ b/src/tbb/tools_api/_config.h
@@ -26,31 +26,69 @@
     the GNU General Public License.
 */
 
-#ifndef _TBB_malloc_proxy_H_
-#define _TBB_malloc_proxy_H_
+#ifndef __CONFIG_H_
+#define __CONFIG_H_
 
-#if __linux__
-#define MALLOC_LD_PRELOAD 1
+#ifndef ITT_OS_WIN
+#  define ITT_OS_WIN   1
+#endif /* ITT_OS_WIN */
+
+#ifndef ITT_OS_LINUX
+#  define ITT_OS_LINUX 2
+#endif /* ITT_OS_LINUX */
+
+#ifndef ITT_OS_MAC
+#  define ITT_OS_MAC   3
+#endif /* ITT_OS_MAC */
+
+#ifndef ITT_OS
+#  if defined WIN32 || defined _WIN32
+#    define ITT_OS ITT_OS_WIN
+#  elif defined( __APPLE__ ) && defined( __MACH__ )
+#    define ITT_OS ITT_OS_MAC
+#  else
+#    define ITT_OS ITT_OS_LINUX
+#  endif
+#endif /* ITT_OS */
+
+#ifndef ITT_ARCH_IA32
+#  define ITT_ARCH_IA32  1
+#endif /* ITT_ARCH_IA32 */
+
+#ifndef ITT_ARCH_IA32E
+#  define ITT_ARCH_IA32E 2
+#endif /* ITT_ARCH_IA32E */
+
+#ifndef ITT_ARCH_IA64
+#  define ITT_ARCH_IA64  3
+#endif /* ITT_ARCH_IA64 */
+
+
+#ifndef ITT_ARCH
+#  if defined _M_X64 || defined _M_AMD64 || defined __x86_64__
+#    define ITT_ARCH ITT_ARCH_IA32E
+#  elif defined _M_IA64 || defined __ia64
+#    define ITT_ARCH ITT_ARCH_IA64
+#  else
+#    define ITT_ARCH ITT_ARCH_IA32
+#  endif
 #endif
 
-#include <stddef.h>
-
-extern "C" {
-    void * scalable_malloc(size_t size);
-    void * scalable_calloc(size_t nobj, size_t size);
-    void   scalable_free(void *object);
-    void * scalable_realloc(void* ptr, size_t size);
-    void * scalable_aligned_malloc(size_t size, size_t alignment);
-    void * scalable_aligned_realloc(void* ptr, size_t size, size_t alignment);
-    int    scalable_posix_memalign(void **memptr, size_t alignment, size_t size);
-
-    void * __TBB_internal_malloc(size_t size);
-    void * __TBB_internal_calloc(size_t num, size_t size);
-    void   __TBB_internal_free(void *object);
-    void * __TBB_internal_realloc(void* ptr, size_t sz);
-    int    __TBB_internal_posix_memalign(void **memptr, size_t alignment, size_t size);
-    
-    bool   __TBB_internal_find_original_malloc(int num, const char *names[], void *table[]);
-} // extern "C"
-
-#endif /* _TBB_malloc_proxy_H_ */
+#ifndef ITT_PLATFORM_WIN
+#  define ITT_PLATFORM_WIN 1
+#endif /* ITT_PLATFORM_WIN */ 
+
+#ifndef ITT_PLATFORM_POSIX
+#  define ITT_PLATFORM_POSIX 2
+#endif /* ITT_PLATFORM_POSIX */
+
+#ifndef ITT_PLATFORM
+#  if ITT_OS==ITT_OS_WIN
+#    define ITT_PLATFORM ITT_PLATFORM_WIN
+#  else
+#    define ITT_PLATFORM ITT_PLATFORM_POSIX
+#  endif /* _WIN32 */
+#endif /* ITT_PLATFORM */
+
+#endif /* __CONFIG_H_ */
+
diff --git a/src/tbb/concurrent_hash_map.cpp b/src/tbb/tools_api/_disable_warnings.h
similarity index 69%
copy from src/tbb/concurrent_hash_map.cpp
copy to src/tbb/tools_api/_disable_warnings.h
index 4d476c6..e32f24f 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/src/tbb/tools_api/_disable_warnings.h
@@ -26,20 +26,17 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#include "_config.h"
 
-namespace tbb {
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
 
-namespace internal {
+#pragma warning (disable: 593)  /* parameter "XXXX" was set but never used                 */
+#pragma warning (disable: 344)  /* typedef name has already been declared (with same type) */
+#pragma warning (disable: 174)  /* expression has no effect                                */
 
-bool hash_map_segment_base::internal_grow_predicate() const {
-    // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the 
-    // library so that Intel(R) Thread Checker will ignore them.  The reads are used in a double-check
-    // context, so the program is nonetheless correct despite the race.
-    return my_logical_size >= my_physical_size && my_physical_size < internal::hash_map_base::max_physical_size;
-}
+#elif defined __INTEL_COMPILER
 
-} // namespace internal
-
-} // namespace tbb
+#pragma warning (disable: 869)  /* parameter "XXXXX" was never referenced                  */
+#pragma warning (disable: 1418) /* external function definition with no prior declaration  */
 
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
diff --git a/src/tbb/tools_api/_ittnotify_static.h b/src/tbb/tools_api/_ittnotify_static.h
new file mode 100644
index 0000000..9604b4c
--- /dev/null
+++ b/src/tbb/tools_api/_ittnotify_static.h
@@ -0,0 +1,166 @@
+/*
+    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 "_config.h"
+
+#ifndef ITT_STUB
+#define ITT_STUB ITT_STUBV
+#endif /* ITT_STUB */
+
+#ifndef ITTAPI_CALL
+#define ITTAPI_CALL CDECL
+#endif /* ITTAPI_CALL */
+
+/* parameters for macro:
+   type, func_name, arguments, params, func_name_in_dll, group
+   */
+
+ITT_STUBV(void, pause,(void),(), pause, __itt_control_group)
+
+ITT_STUBV(void, resume,(void),(), resume, __itt_control_group)
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+
+ITT_STUB(int, markA,(__itt_mark_type mt, const char *parameter),(mt,parameter), markA, __itt_mark_group)
+
+ITT_STUB(int, markW,(__itt_mark_type mt, const wchar_t *parameter),(mt,parameter), markW, __itt_mark_group)
+
+ITT_STUB(int, mark_globalA,(__itt_mark_type mt, const char *parameter),(mt,parameter), mark_globalA, __itt_mark_group)
+
+ITT_STUB(int, mark_globalW,(__itt_mark_type mt, const wchar_t *parameter),(mt,parameter), mark_globalW, __itt_mark_group)
+
+ITT_STUBV(void, thread_set_nameA,( const char *name),(name), thread_set_nameA, __itt_thread_group)
+
+ITT_STUBV(void, thread_set_nameW,( const wchar_t *name),(name), thread_set_nameW, __itt_thread_group)
+
+ITT_STUBV(void, sync_createA,(void *addr, const char *objtype, const char *objname, int attribute), (addr, objtype, objname, attribute), sync_createA, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, sync_createW,(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute), (addr, objtype, objname, attribute), sync_createW, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, sync_renameA, (void *addr, const char *name), (addr, name), sync_renameA, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, sync_renameW, (void *addr, const wchar_t *name), (addr, name), sync_renameW, __itt_sync_group | __itt_fsync_group)
+#else /* WIN32 */
+
+ITT_STUB(int, mark,(__itt_mark_type mt, const char *parameter),(mt,parameter), mark, __itt_mark_group)
+ITT_STUB(int, mark_global,(__itt_mark_type mt, const char *parameter),(mt,parameter), mark_global, __itt_mark_group)
+
+ITT_STUBV(void, sync_set_name,(void *addr, const char *objtype, const char *objname, int attribute),(addr,objtype,objname,attribute), sync_set_name, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, thread_set_name,( const char *name),(name), thread_set_name, __itt_thread_group)
+
+ITT_STUBV(void, sync_create,(void *addr, const char *objtype, const char *objname, int attribute), (addr, objtype, objname, attribute), sync_create, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, sync_rename, (void *addr, const char *name), (addr, name), sync_rename, __itt_sync_group | __itt_fsync_group)
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+ITT_STUBV(void, sync_destroy,(void *addr), (addr), sync_destroy, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUB(int, mark_off,(__itt_mark_type mt),(mt), mark_off, __itt_mark_group)
+ITT_STUB(int, mark_global_off,(__itt_mark_type mt),(mt), mark_global_off, __itt_mark_group)
+
+ITT_STUBV(void, thread_ignore,(void),(), thread_ignore, __itt_thread_group)
+
+ITT_STUBV(void, sync_prepare,(void* addr),(addr), sync_prepare, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, sync_cancel,(void *addr),(addr), sync_cancel, __itt_sync_group)
+
+ITT_STUBV(void, sync_acquired,(void *addr),(addr), sync_acquired, __itt_sync_group)
+
+ITT_STUBV(void, sync_releasing,(void* addr),(addr), sync_releasing, __itt_sync_group)
+
+ITT_STUBV(void, sync_released,(void* addr),(addr), sync_released, __itt_sync_group)
+
+ITT_STUBV(void, memory_read,( void *address, size_t size ), (address, size), memory_read, __itt_all_group)
+ITT_STUBV(void, memory_write,( void *address, size_t size ), (address, size), memory_write, __itt_all_group)
+ITT_STUBV(void, memory_update,( void *address, size_t size ), (address, size), memory_update, __itt_all_group)
+
+ITT_STUB(int, jit_notify_event,(__itt_jit_jvm_event event_type, void* event_data),(event_type, event_data), jit_notify_event, __itt_jit_group)
+
+#ifndef NO_ITT_LEGACY
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+ITT_STUB(__itt_mark_type, mark_createA,(const char *name),(name), mark_createA, __itt_mark_group)
+ITT_STUB(__itt_mark_type, mark_createW,(const wchar_t *name),(name), mark_createW, __itt_mark_group)
+#else /* WIN32 */
+ITT_STUB(__itt_mark_type, mark_create,(const char *name),(name), mark_create, __itt_mark_group)
+#endif
+ITT_STUBV(void, fsync_prepare,(void* addr),(addr), sync_prepare, __itt_fsync_group)
+
+ITT_STUBV(void, fsync_cancel,(void *addr),(addr), sync_cancel, __itt_fsync_group)
+
+ITT_STUBV(void, fsync_acquired,(void *addr),(addr), sync_acquired, __itt_fsync_group)
+
+ITT_STUBV(void, fsync_releasing,(void* addr),(addr), sync_releasing, __itt_fsync_group)
+
+ITT_STUBV(void, fsync_released,(void* addr),(addr), sync_released, __itt_fsync_group)
+
+ITT_STUBV(void, notify_sync_prepare,(void *p),(p), notify_sync_prepare, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, notify_sync_cancel,(void *p),(p), notify_sync_cancel, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, notify_sync_acquired,(void *p),(p), notify_sync_acquired, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, notify_sync_releasing,(void *p),(p), notify_sync_releasing, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, notify_cpath_target,(void),(), notify_cpath_target, __itt_all_group)
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+ITT_STUBV(void, sync_set_nameA,(void *addr, const char *objtype, const char *objname, int attribute),(addr,objtype,objname,attribute), sync_set_nameA, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUBV(void, sync_set_nameW,(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute),(addr,objtype,objname,attribute), sync_set_nameW, __itt_sync_group | __itt_fsync_group)
+
+ITT_STUB (int, thr_name_setA,( char *name, int namelen ),(name,namelen), thr_name_setA, __itt_thread_group)
+
+ITT_STUB (int, thr_name_setW,( wchar_t *name, int namelen ),(name,namelen), thr_name_setW, __itt_thread_group)
+
+ITT_STUB (__itt_event, event_createA,( char *name, int namelen ),(name,namelen), event_createA, __itt_mark_group)
+
+ITT_STUB (__itt_event, event_createW,( wchar_t *name, int namelen ),(name,namelen), event_createW, __itt_mark_group)
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+ITT_STUB (int, thr_name_set,( char *name, int namelen ),(name,namelen), thr_name_set, __itt_thread_group)
+
+ITT_STUB (__itt_event, event_create,( char *name, int namelen ),(name,namelen), event_create, __itt_mark_group)
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+ITT_STUBV(void, thr_ignore,(void),(), thr_ignore, __itt_thread_group)
+
+ITT_STUB (int, event_start,( __itt_event event ),(event), event_start, __itt_mark_group)
+
+ITT_STUB (int, event_end,( __itt_event event ),(event), event_end, __itt_mark_group)
+
+ITT_STUB (__itt_state_t, state_get, (void), (), state_get, __itt_all_group)
+ITT_STUB (__itt_state_t, state_set,( __itt_state_t state), (state), state_set, __itt_all_group)
+ITT_STUB (__itt_obj_state_t, obj_mode_set, ( __itt_obj_prop_t prop, __itt_obj_state_t state), (prop, state), obj_mode_set, __itt_all_group)
+ITT_STUB (__itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t prop, __itt_thr_state_t state), (prop, state), thr_mode_set, __itt_all_group)
+
+ITT_STUB (const char*, api_version,(void),(), api_version, __itt_all_group)
+ITT_STUB (unsigned int, jit_get_new_method_id, (void), (), jit_get_new_method_id, __itt_jit_group)
+
+#endif /* NO_ITT_LEGACY */
+
diff --git a/src/tbb/tools_api/ittnotify.h b/src/tbb/tools_api/ittnotify.h
new file mode 100644
index 0000000..e9ebb0f
--- /dev/null
+++ b/src/tbb/tools_api/ittnotify.h
@@ -0,0 +1,1234 @@
+/*
+    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.
+*/
+
+/** @mainpage
+ * Ability to control the collection during runtime. User API can be inserted into the user application.
+ * Commands include:
+	- Pause/resume analysis
+	- Stop analysis and application, view results
+	- Cancel analysis and application without generating results
+	- Mark current time in results
+ * The User API provides ability to control the collection, set marks at the execution of specific user code and
+ * specify custom synchronization primitives implemented without standard system APIs. 
+ * 
+ * Use case: User inserts API calls to the desired places in her code. The code is then compiled and
+ * linked with static part of User API library. User can recompile the code with specific macro defined 
+ * to enable API calls.  If this macro is not defined there is no run-time overhead and no need to  link 
+ * with static part of User API library. During  runtime the static library loads and initializes the dynamic part.
+ * In case of instrumentation-based collection, only a stub library is loaded; otherwise a proxy library is loaded,
+ * which calls the collector.
+ * 
+ * User API set is native (C/C++) only (no MRTE support). As amitigation can use JNI or C/C++ function 
+ * call from managed code where needed. If the collector causes significant overhead or data storage, then 
+ * pausing analysis should reduce the overhead to minimal levels.
+*/
+/** @example example.cpp
+ * @brief The following example program shows the usage of User API
+ */
+
+#ifndef _ITTNOTIFY_H_
+#define _ITTNOTIFY_H_
+/** @file ittnotify.h
+ *  @brief Header file which contains declaration of user API functions and types
+ */
+
+/** @cond exclude_from_documentation */
+#ifndef ITT_OS_WIN
+#  define ITT_OS_WIN   1
+#endif /* ITT_OS_WIN */
+
+#ifndef ITT_OS_LINUX
+#  define ITT_OS_LINUX 2
+#endif /* ITT_OS_LINUX */
+
+#ifndef ITT_OS_MAC
+#  define ITT_OS_MAC   3
+#endif /* ITT_OS_MAC */
+
+#ifndef ITT_OS
+#  if defined WIN32 || defined _WIN32
+#    define ITT_OS ITT_OS_WIN
+#  elif defined( __APPLE__ ) && defined( __MACH__ )
+#    define ITT_OS ITT_OS_MAC
+#  else
+#    define ITT_OS ITT_OS_LINUX
+#  endif
+#endif /* ITT_OS */
+
+#ifndef ITT_PLATFORM_WIN
+#  define ITT_PLATFORM_WIN 1
+#endif /* ITT_PLATFORM_WIN */ 
+
+#ifndef ITT_PLATFORM_POSIX
+#  define ITT_PLATFORM_POSIX 2
+#endif /* ITT_PLATFORM_POSIX */
+
+#ifndef ITT_PLATFORM
+#  if ITT_OS==ITT_OS_WIN
+#    define ITT_PLATFORM ITT_PLATFORM_WIN
+#  else
+#    define ITT_PLATFORM ITT_PLATFORM_POSIX
+#  endif /* _WIN32 */
+#endif /* ITT_PLATFORM */
+
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#include <tchar.h>
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define ITTAPI_CALL CDECL
+
+#ifndef CDECL
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#    define CDECL __cdecl
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#    define CDECL
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#endif /* CDECL */
+
+/** @endcond */
+
+/** @brief user event type */
+typedef int __itt_mark_type;
+typedef int __itt_event;
+typedef int __itt_state_t;
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#  ifdef UNICODE
+     typedef wchar_t __itt_char;
+#  else /* UNICODE */
+     typedef char __itt_char;
+#  endif /* UNICODE */
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @brief Typedef for char or wchar_t (if Unicode symbol is allowed) on Windows.
+  * And typedef for char on Linux. 
+  */
+     typedef char __itt_char;
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @cond exclude_from_documentation */
+typedef enum __itt_obj_state {
+    __itt_obj_state_err = 0,
+    __itt_obj_state_clr = 1,
+    __itt_obj_state_set = 2,
+    __itt_obj_state_use = 3
+} __itt_obj_state_t;
+
+typedef enum __itt_thr_state {
+    __itt_thr_state_err = 0,
+    __itt_thr_state_clr = 1,
+    __itt_thr_state_set = 2
+} __itt_thr_state_t;
+
+typedef enum __itt_obj_prop {
+    __itt_obj_prop_watch    = 1,
+    __itt_obj_prop_ignore   = 2,
+    __itt_obj_prop_sharable = 3
+} __itt_obj_prop_t;
+
+typedef enum __itt_thr_prop {
+    __itt_thr_prop_quiet = 1
+} __itt_thr_prop_t;
+/** @endcond */
+typedef enum __itt_error_code {
+    __itt_error_success       = 0, /*!< no error                */
+    __itt_error_no_module     = 1, /*!< module can't be loaded  */
+    __itt_error_no_symbol     = 2, /*!< symbol not found        */
+    __itt_error_unknown_group = 3, /*!< unknown group specified */
+    __itt_error_cant_read_env = 4  /*!< variable value too long */
+} __itt_error_code;
+
+typedef void (__itt_error_notification_t)(__itt_error_code code, const char* msg);
+
+/*******************************************
+ * Various constants used by JIT functions *
+ *******************************************/
+
+ /*! @enum ___itt_jit_jvm_event
+  * event notification 
+  */
+ typedef enum ___itt_jit_jvm_event
+ {
+
+   __itt_JVM_EVENT_TYPE_SHUTDOWN = 2,           /*!< Shutdown. Program exiting. EventSpecificData NA*/      
+   __itt_JVM_EVENT_TYPE_METHOD_LOAD_FINISHED=13,/*!< JIT profiling. Issued after method code jitted into memory but before code is executed
+												 *  event_data is an __itt_JIT_Method_Load */
+   __itt_JVM_EVENT_TYPE_METHOD_UNLOAD_START     /*!< JIT profiling. Issued before unload. Method code will no longer be executed, but code and info are still in memory.
+    											 *	The VTune profiler may capture method code only at this point. event_data is __itt_JIT_Method_Id */
+
+ } __itt_jit_jvm_event;
+
+/*! @enum ___itt_jit_environment_type
+ * @brief Enumerator for the environment of methods 
+ */
+typedef enum ___itt_jit_environment_type
+{
+    __itt_JIT_JITTINGAPI = 2
+} __itt_jit_environment_type;
+
+/**********************************
+ * Data structures for the events *
+ **********************************/
+
+ /*! @struct ___itt_jit_method_id
+  * @brief structure for the events: __itt_iJVM_EVENT_TYPE_METHOD_UNLOAD_START    
+  */
+typedef struct ___itt_jit_method_id 
+{
+	/** @brief Id of the method (same as the one passed in the __itt_JIT_Method_Load struct */
+    unsigned int       method_id;  
+
+} *__itt_pjit_method_id, __itt_jit_method_id;
+
+/*! @struct ___itt_jit_line_number_info
+ *  @brief structure for the events: __itt_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED 
+ */
+typedef struct ___itt_jit_line_number_info 
+{
+	/** @brief x86 Offset from the begining of the method */
+    unsigned int        offset;    
+	/** @brief source line number from the begining of the source file. */
+    unsigned int        line_number;     
+
+} *__itt_pjit_line_number_info, __itt_jit_line_number_info;
+/*! @struct ___itt_jit_method_load
+ *  @brief structure for the events: __itt_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED 
+ */
+typedef struct ___itt_jit_method_load 
+{
+	/** @brief unique method ID - can be any unique value, (except 0 - 999) */
+    unsigned int        method_id;
+    /** @brief method name (can be with or without the class and signature, in any case the class name will be added to it) */
+    char*               method_name;
+    /** @brief virtual address of that method  - This determines the method range for the iJVM_EVENT_TYPE_ENTER/LEAVE_METHOD_ADDR events */
+	void*               method_load_address;
+    /** @brief Size in memory - Must be exact */
+	unsigned int        method_size;
+    /** @brief Line Table size in number of entries - Zero if none */
+	unsigned int        line_number_size;
+    /** @brief Pointer to the begining of the line numbers info array */
+	__itt_pjit_line_number_info line_number_table;
+    /** @brief unique class ID */
+	unsigned int        class_id;
+    /** @brief class file name */
+	char*               class_file_name;
+    /** @brief source file name */
+	char*               source_file_name;
+    /** @brief bits supplied by the user for saving in the JIT file... */
+	void*               user_data;
+    /** @brief the size of the user data buffer */
+	unsigned int        user_data_size;
+    /** @note no need to fill this field, it's filled by VTune */
+	__itt_jit_environment_type env;
+} *__itt_pjit_method_load, __itt_jit_method_load;
+
+/** 
+ * @brief General behavior: application continues to run, but no profiling information is being collected
+
+ * - Pausing occurs not only for the current thread but for all process as well as spawned processes
+ * - Intel(R) Parallel Inspector: does not analyze or report errors that involve memory access.
+ * - Intel(R) Parallel Inspector: Other errors are reported as usual. Pausing data collection in
+     Intel(R) Parallel Inspector only pauses tracing and analyzing memory access. It does not pause
+     tracing or analyzing threading APIs.
+ * - Intel(R) Parallel Amplifier: does continue to record when new threads are started
+ * - Other effects: possible reduction of runtime overhead
+ */
+void ITTAPI_CALL __itt_pause(void);
+
+/** 
+ * @brief General behavior: application continues to run, collector resumes profiling information 
+ * collection for all threads and processes of profiled application
+ */
+void ITTAPI_CALL __itt_resume(void);
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+__itt_mark_type ITTAPI_CALL __itt_mark_createA(const char *name);
+__itt_mark_type ITTAPI_CALL __itt_mark_createW(const wchar_t *name);
+#ifdef UNICODE
+#  define __itt_mark_create __itt_mark_createW
+#  define __itt_mark_create_ptr __itt_mark_createW_ptr
+#else /* UNICODE */
+#  define __itt_mark_create __itt_mark_createA
+#  define __itt_mark_create_ptr __itt_mark_createA_ptr
+#endif /* UNICODE */
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @brief Creates a user event type (mark) with the specified name using char or Unicode string.
+ * @param[in] name - name of mark to create
+ * @return Returns a handle to the mark type
+ */
+__itt_mark_type ITTAPI_CALL __itt_mark_create(const __itt_char* name);
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+int ITTAPI_CALL __itt_markA(__itt_mark_type mt, const char *parameter);
+int ITTAPI_CALL __itt_markW(__itt_mark_type mt, const wchar_t *parameter);
+
+int ITTAPI_CALL __itt_mark_globalA(__itt_mark_type mt, const char *parameter);
+int ITTAPI_CALL __itt_mark_globalW(__itt_mark_type mt, const wchar_t *parameter);
+
+#ifdef UNICODE
+#  define __itt_mark __itt_markW
+#  define __itt_mark_ptr __itt_markW_ptr
+
+#  define __itt_mark_global __itt_mark_globalW
+#  define __itt_mark_global_ptr __itt_mark_globalW_ptr
+#else /* UNICODE  */
+#  define __itt_mark __itt_markA
+#  define __itt_mark_ptr __itt_markA_ptr
+
+#  define __itt_mark_global __itt_mark_globalA
+#  define __itt_mark_global_ptr __itt_mark_globalA_ptr
+#endif /* UNICODE */
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @brief Creates a "discrete" user event type (mark) of the specified type and an optional parameter using char or Unicode string.
+
+ * - The mark of "discrete" type is placed to collection results in case of success. It appears in overtime view(s) as a special tick sign. 
+ * - The call is "synchronous" - function returns after mark is actually added to results.
+ * - This function is useful, for example, to mark different phases of application (beginning of the next mark automatically meand end of current region).
+ * - Can be used together with "continuous" marks (see below) at the same collection session
+ * @param[in] mt - mark, created by __itt_mark_create(const __itt_char* name) function
+ * @param[in] parameter - string parameter of mark
+ * @return Returns zero value in case of success, non-zero value otherwise.
+ */
+int ITTAPI_CALL __itt_mark(__itt_mark_type mt, const __itt_char* parameter);
+/** @brief Use this if necessary to create a "discrete" user event type (mark) for process
+ * rather then for one thread
+ * @see int ITTAPI_CALL __itt_mark(__itt_mark_type mt, const __itt_char* parameter);
+ */
+int ITTAPI_CALL __itt_mark_global(__itt_mark_type mt, const __itt_char* parameter);
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** 
+ * @brief Creates an "end" point for "continuous" mark with specified name.
+
+ * - Returns zero value in case of success, non-zero value otherwise. Also returns non-zero value when preceding "begin" point for the mark with the same name failed to be created or not created. (*)
+ * - The mark of "continuous" type is placed to collection results in case of success. It appears in overtime view(s) as a special tick sign (different from "discrete" mark) together with line from corresponding "begin" mark to "end" mark. (*) * - Continuous marks can overlap (*) and be nested inside each other. Discrete mark can be nested inside marked region
+ * 
+ * @param[in] mt - mark, created by __itt_mark_create(const __itt_char* name) function
+ * 
+ * @return Returns zero value in case of success, non-zero value otherwise.
+ */
+int ITTAPI_CALL __itt_mark_off(__itt_mark_type mt);
+/** @brief Use this if necessary to create an "end" point for mark of process
+ * @see int ITTAPI_CALL __itt_mark_off(__itt_mark_type mt);
+ */
+int ITTAPI_CALL __itt_mark_global_off(__itt_mark_type mt);
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+void ITTAPI_CALL __itt_thread_set_nameA(const char *name);
+void ITTAPI_CALL __itt_thread_set_nameW(const wchar_t *name);
+#ifdef UNICODE
+#  define __itt_thread_set_name __itt_thread_set_nameW
+#  define __itt_thread_set_name_ptr __itt_thread_set_nameW_ptr
+#else /* UNICODE */
+#  define __itt_thread_set_name __itt_thread_set_nameA
+#  define __itt_thread_set_name_ptr __itt_thread_set_nameA_ptr
+#endif /* UNICODE */
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @brief Sets thread name using char or Unicode string
+ * @param[in] name - name of thread
+ */
+void ITTAPI_CALL __itt_thread_set_name(const __itt_char* name);
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+/** @brief Mark current thread as ignored from this point on, for the duration of its existence. */
+void ITTAPI_CALL __itt_thread_ignore(void);
+/** @brief Is called when sync object is destroyed (needed to track lifetime of objects) */
+void ITTAPI_CALL __itt_sync_destroy(void *addr);
+/** @brief Enter spin loop on user-defined sync object */
+void ITTAPI_CALL __itt_sync_prepare(void* addr);
+/** @brief Quit spin loop without acquiring spin object */
+void ITTAPI_CALL __itt_sync_cancel(void *addr);
+/** @brief Successful spin loop completion (sync object acquired) */
+void ITTAPI_CALL __itt_sync_acquired(void *addr);
+/** @brief Start sync object releasing code. Is called before the lock release call. */
+void ITTAPI_CALL __itt_sync_releasing(void* addr);
+/** @brief Sync object released. Is called after the release call */
+void ITTAPI_CALL __itt_sync_released(void* addr);
+
+/** @brief Fast synchronization which does no require spinning.
+
+  * - This special function is to be used by TBB and OpenMP libraries only when they know 
+  *   there is no spin but they need to suppress TC warnings about shared variable modifications.
+  * - It only has corresponding pointers in static library and does not have corresponding function
+  *   in dynamic library.
+  * @see void ITTAPI_CALL __itt_sync_prepare(void* addr);
+*/
+void ITTAPI_CALL __itt_fsync_prepare(void* addr);
+/** @brief Fast synchronization which does no require spinning.
+
+  * - This special function is to be used by TBB and OpenMP libraries only when they know 
+  *   there is no spin but they need to suppress TC warnings about shared variable modifications.
+  * - It only has corresponding pointers in static library and does not have corresponding function
+  *   in dynamic library.
+  * @see void ITTAPI_CALL __itt_sync_cancel(void *addr);
+*/
+void ITTAPI_CALL __itt_fsync_cancel(void *addr);
+/** @brief Fast synchronization which does no require spinning.
+
+  * - This special function is to be used by TBB and OpenMP libraries only when they know 
+  *   there is no spin but they need to suppress TC warnings about shared variable modifications.
+  * - It only has corresponding pointers in static library and does not have corresponding function
+  *   in dynamic library.
+  * @see void ITTAPI_CALL __itt_sync_acquired(void *addr);
+*/
+void ITTAPI_CALL __itt_fsync_acquired(void *addr);
+/** @brief Fast synchronization which does no require spinning.
+
+  * - This special function is to be used by TBB and OpenMP libraries only when they know 
+  *   there is no spin but they need to suppress TC warnings about shared variable modifications.
+  * - It only has corresponding pointers in static library and does not have corresponding function
+  *   in dynamic library.
+  * @see void ITTAPI_CALL __itt_sync_releasing(void* addr);
+*/
+void ITTAPI_CALL __itt_fsync_releasing(void* addr);
+/** @brief Fast synchronization which does no require spinning.
+
+  * - This special function is to be used by TBB and OpenMP libraries only when they know 
+  *   there is no spin but they need to suppress TC warnings about shared variable modifications.
+  * - It only has corresponding pointers in static library and does not have corresponding function
+  *   in dynamic library.
+  * @see void ITTAPI_CALL __itt_sync_released(void* addr);
+*/
+void ITTAPI_CALL __itt_fsync_released(void* addr);
+
+/** @hideinitializer
+ * @brief possible value of attribute argument for sync object type
+ */
+#define __itt_attr_barrier 1
+/** @hideinitializer 
+ * @brief possible value of attribute argument for sync object type
+ */
+#define __itt_attr_mutex   2
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+void ITTAPI_CALL __itt_sync_set_nameA(void *addr, const char *objtype, const char *objname, int attribute);
+void ITTAPI_CALL __itt_sync_set_nameW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute);
+#ifdef UNICODE
+#  define __itt_sync_set_name __itt_sync_set_nameW
+#  define __itt_sync_set_name_ptr __itt_sync_set_nameW_ptr
+#else /* UNICODE */
+#  define __itt_sync_set_name __itt_sync_set_nameA
+#  define __itt_sync_set_name_ptr __itt_sync_set_nameA_ptr
+#endif /* UNICODE */
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @deprecated Legacy API 
+ * @brief Assign a name to a sync object using char or Unicode string
+ *  @param[in] addr -    pointer to the sync object. You should use a real pointer to your object
+ *                       to make sure that the values don't clash with other object addresses
+ *  @param[in] objtype - null-terminated object type string. If NULL is passed, the object will
+ *                       be assumed to be of generic "User Synchronization" type
+ *  @param[in] objname - null-terminated object name string. If NULL, no name will be assigned
+ *                       to the object -- you can use the __itt_sync_rename call later to assign
+ *                       the name
+ *  @param[in] attribute - one of [ #__itt_attr_barrier , #__itt_attr_mutex] values which defines the
+ *                       exact semantics of how prepare/acquired/releasing calls work.
+ */
+void ITTAPI_CALL __itt_sync_set_name(void *addr, const __itt_char* objtype, const __itt_char* objname, int attribute);
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+void ITTAPI_CALL __itt_sync_createA(void *addr, const char *objtype, const char *objname, int attribute);
+void ITTAPI_CALL __itt_sync_createW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute);
+#ifdef UNICODE
+#define __itt_sync_create __itt_sync_createW
+#  define __itt_sync_create_ptr __itt_sync_createW_ptr
+#else /* UNICODE */
+#define __itt_sync_create __itt_sync_createA
+#  define __itt_sync_create_ptr __itt_sync_createA_ptr
+#endif /* UNICODE */
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @brief Register the creation of a sync object using char or Unicode string
+ *  @param[in] addr -    pointer to the sync object. You should use a real pointer to your object
+ *                       to make sure that the values don't clash with other object addresses
+ *  @param[in] objtype - null-terminated object type string. If NULL is passed, the object will
+ *                       be assumed to be of generic "User Synchronization" type
+ *  @param[in] objname - null-terminated object name string. If NULL, no name will be assigned
+ *                       to the object -- you can use the __itt_sync_rename call later to assign
+ *                       the name
+ *  @param[in] attribute - one of [ #__itt_attr_barrier, #__itt_attr_mutex] values which defines the
+ *                       exact semantics of how prepare/acquired/releasing calls work.
+**/
+void ITTAPI_CALL __itt_sync_create(void *addr, const __itt_char* objtype, const __itt_char* objname, int attribute);
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @brief Assign a name to a sync object using char or Unicode string.
+
+ * Sometimes you cannot assign the name to a sync object in the __itt_sync_set_name call because it
+ * is not yet known there. In this case you should use the rename call which allows to assign the
+ * name after the creation has been registered. The renaming can be done multiple times. All waits
+ * after a new name has been assigned will be attributed to the sync object with this name.
+ * @param[in] addr -    pointer to the sync object
+ * @param[in] name - null-terminated object name string
+**/
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+void ITTAPI_CALL __itt_sync_renameA(void *addr, const char *name);
+void ITTAPI_CALL __itt_sync_renameW(void *addr, const wchar_t *name);
+#ifdef UNICODE
+#define __itt_sync_rename __itt_sync_renameW
+#  define __itt_sync_rename_ptr __itt_sync_renameW_ptr
+#else /* UNICODE */
+#define __itt_sync_rename __itt_sync_renameA
+#  define __itt_sync_rename_ptr __itt_sync_renameA_ptr
+#endif /* UNICODE */
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+void ITTAPI_CALL __itt_sync_rename(void *addr, const __itt_char* name);
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+/** @cond exclude_from_documentaion */
+int __itt_jit_notify_event(__itt_jit_jvm_event event_type, void* event_data);
+unsigned int __itt_jit_get_new_method_id(void);
+const char* ITTAPI_CALL __itt_api_version(void);
+__itt_error_notification_t* __itt_set_error_handler(__itt_error_notification_t*);
+
+#if ITT_OS == ITT_OS_WIN
+#define LIBITTNOTIFY_CC __cdecl
+#define LIBITTNOTIFY_EXPORT __declspec(dllexport) 
+#define LIBITTNOTIFY_IMPORT __declspec(dllimport) 
+#elif ITT_OS == ITT_OS_MAC || ITT_OS == ITT_OS_LINUX
+#define LIBITTNOTIFY_CC /* nothing */
+#define LIBITTNOTIFY_EXPORT /* nothing */
+#define LIBITTNOTIFY_IMPORT /* nothing */
+#else /* ITT_OS == ITT_OS_WIN */
+#error "Unsupported OS"
+#endif /* ITT_OS == ITT_OS_WIN */
+
+#define LIBITTNOTIFY_API
+/** @endcond */
+
+/** @deprecated Legacy API
+ * @brief Hand instrumentation of user synchronization 
+ */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_notify_sync_prepare(void *p);
+/** @deprecated Legacy API
+ * @brief Hand instrumentation of user synchronization 
+ */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_notify_sync_cancel(void *p);
+/** @deprecated Legacy API
+ * @brief Hand instrumentation of user synchronization 
+ */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_notify_sync_acquired(void *p);
+/** @deprecated Legacy API
+ * @brief Hand instrumentation of user synchronization 
+ */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_notify_sync_releasing(void *p);
+/** @deprecated Legacy API
+ * @brief itt_notify_cpath_target is handled by Thread Profiler only.
+ *  Inform Thread Profiler that the current thread has recahed a critical path target. 
+ */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_notify_cpath_target(void);
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+LIBITTNOTIFY_API int LIBITTNOTIFY_CC __itt_thr_name_setA( char *name, int namelen );
+LIBITTNOTIFY_API int LIBITTNOTIFY_CC __itt_thr_name_setW( wchar_t *name, int namelen );
+# ifdef UNICODE
+#  define __itt_thr_name_set __itt_thr_name_setW
+#  define __itt_thr_name_set_ptr __itt_thr_name_setW_ptr
+# else
+#  define __itt_thr_name_set __itt_thr_name_setA
+#  define __itt_thr_name_set_ptr __itt_thr_name_setA_ptr
+# endif /* UNICODE */
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @deprecated Legacy API
+ * @brief Set name to be associated with thread in analysis GUI.
+ *  Return __itt_err upon failure (name or namelen being null,name and namelen mismatched)
+ */
+LIBITTNOTIFY_API int LIBITTNOTIFY_CC __itt_thr_name_set( __itt_char *name, int namelen );
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+/** @brief Mark current thread as ignored from this point on, for the duration of its existence. */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC  __itt_thr_ignore(void);
+
+/* User event notification                                                                    */
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+/** @deprecated Legacy API 
+ * @brief User event notification.
+ * Event create APIs return non-zero event identifier upon success and __itt_err otherwise
+ * (name or namelen being null/name and namelen not matching, user event feature not enabled)
+ */
+LIBITTNOTIFY_API __itt_event LIBITTNOTIFY_CC __itt_event_createA( char *name, int namelen );
+LIBITTNOTIFY_API __itt_event LIBITTNOTIFY_CC __itt_event_createW( wchar_t *name, int namelen );
+# ifdef UNICODE
+#  define __itt_event_create __itt_event_createW
+#  define __itt_event_create_ptr __itt_event_createW_ptr
+# else
+#  define __itt_event_create __itt_event_createA
+#  define __itt_event_create_ptr __itt_event_createA_ptr
+# endif /* UNICODE */
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+/** @deprecated Legacy API 
+ * @brief User event notification.
+ * Event create APIs return non-zero event identifier upon success and __itt_err otherwise
+ * (name or namelen being null/name and namelen not matching, user event feature not enabled)
+ */
+LIBITTNOTIFY_API __itt_event LIBITTNOTIFY_CC __itt_event_create( __itt_char *name, int namelen );
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+/** @deprecated Legacy API 
+ * @brief Record an event occurance. 
+ * These APIs return __itt_err upon failure (invalid event id/user event feature not enabled) 
+ */
+LIBITTNOTIFY_API int LIBITTNOTIFY_CC __itt_event_start( __itt_event event );
+/** @deprecated Legacy API 
+ * @brief Record an event occurance.  event_end is optional if events do not have durations. 
+ * These APIs return __itt_err upon failure (invalid event id/user event feature not enabled) 
+ */
+LIBITTNOTIFY_API int LIBITTNOTIFY_CC __itt_event_end( __itt_event event ); /** optional */
+
+
+/** @deprecated Legacy API 
+ * @brief managing thread and object states
+ */
+LIBITTNOTIFY_API __itt_state_t LIBITTNOTIFY_CC __itt_state_get(void);
+/** @deprecated Legacy API 
+ * @brief managing thread and object states
+ */
+LIBITTNOTIFY_API __itt_state_t LIBITTNOTIFY_CC __itt_state_set( __itt_state_t );
+
+/** @deprecated Legacy API 
+ * @brief managing thread and object modes
+ */
+LIBITTNOTIFY_API __itt_thr_state_t LIBITTNOTIFY_CC __itt_thr_mode_set( __itt_thr_prop_t, __itt_thr_state_t );
+/** @deprecated Legacy API 
+ * @brief managing thread and object modes
+ */
+LIBITTNOTIFY_API __itt_obj_state_t LIBITTNOTIFY_CC __itt_obj_mode_set( __itt_obj_prop_t, __itt_obj_state_t );
+
+/** @deprecated Non-supported Legacy API
+ * @brief Inform the tool of memory accesses on reading
+ */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_memory_read( void *address, size_t size );
+/** @deprecated Non-supported Legacy API
+ * @brief Inform the tool of memory accesses on writing
+ */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_memory_write( void *address, size_t size );
+/** @deprecated Non-supported Legacy API
+ * @brief Inform the tool of memory accesses on updating
+ */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_memory_update( void *address, size_t size );
+
+/** @cond exclude_from_documentation */
+/* The following 3 are currently for INTERNAL use only */
+/** @internal */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_test_delay( int );
+/** @internal */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_test_seq_init( void *, int );
+/** @internal */
+LIBITTNOTIFY_API void LIBITTNOTIFY_CC __itt_test_seq_wait( void *, int );
+/** @endcond */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+/* *********************************************************************************
+   *********************************************************************************
+   ********************************************************************************* */
+/** @cond exclude_from_documentation */
+#define ITT_JOIN_AUX(p,n) p##n
+#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n)
+
+#ifndef INTEL_ITTNOTIFY_PREFIX
+#define INTEL_ITTNOTIFY_PREFIX __itt_
+#endif /* INTEL_ITTNOTIFY_PREFIX */
+#ifndef INTEL_ITTNOTIFY_POSTFIX
+#  define INTEL_ITTNOTIFY_POSTFIX _ptr_
+#endif /* INTEL_ITTNOTIFY_POSTFIX */
+
+#ifndef _ITTNOTIFY_H_MACRO_BODY_
+
+#define ____ITTNOTIFY_NAME_(p,n) p##n
+#define ___ITTNOTIFY_NAME_(p,n) ____ITTNOTIFY_NAME_(p,n)
+#define __ITTNOTIFY_NAME_(n) ___ITTNOTIFY_NAME_(INTEL_ITTNOTIFY_PREFIX,n)
+#define _ITTNOTIFY_NAME_(n) __ITTNOTIFY_NAME_(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))
+
+#ifdef ITT_STUBV
+#undef ITT_STUBV
+#endif
+#define ITT_STUBV(type,name,args,params)                     \
+    typedef type (ITTAPI_CALL* ITT_JOIN(_ITTNOTIFY_NAME_(name),_t)) args; \
+    extern ITT_JOIN(_ITTNOTIFY_NAME_(name),_t) _ITTNOTIFY_NAME_(name);
+#undef ITT_STUB
+#define ITT_STUB ITT_STUBV
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define __itt_error_handler ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, error_handler)
+void __itt_error_handler(__itt_jit_jvm_event event_type, void* event_data);
+
+extern const __itt_state_t _ITTNOTIFY_NAME_(state_err);
+extern const __itt_event   _ITTNOTIFY_NAME_(event_err);
+extern const int           _ITTNOTIFY_NAME_(err);
+
+#define __itt_state_err _ITTNOTIFY_NAME_(state_err)
+#define __itt_event_err _ITTNOTIFY_NAME_(event_err)
+#define __itt_err       _ITTNOTIFY_NAME_(err)
+
+ITT_STUBV(void, pause,(void),())
+ITT_STUBV(void, resume,(void),())
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+
+ITT_STUB(__itt_mark_type, mark_createA,(const char *name),(name))
+
+ITT_STUB(__itt_mark_type, mark_createW,(const wchar_t *name),(name))
+
+ITT_STUB(int, markA,(__itt_mark_type mt, const char *parameter),(mt,parameter))
+
+ITT_STUB(int, markW,(__itt_mark_type mt, const wchar_t *parameter),(mt,parameter))
+
+ITT_STUB(int, mark_globalA,(__itt_mark_type mt, const char *parameter),(mt,parameter))
+
+ITT_STUB(int, mark_globalW,(__itt_mark_type mt, const wchar_t *parameter),(mt,parameter))
+
+ITT_STUBV(void, thread_set_nameA,( const char *name),(name))
+
+ITT_STUBV(void, thread_set_nameW,( const wchar_t *name),(name))
+
+ITT_STUBV(void, sync_createA,(void *addr, const char *objtype, const char *objname, int attribute), (addr, objtype, objname, attribute))
+
+ITT_STUBV(void, sync_createW,(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute), (addr, objtype, objname, attribute))
+
+ITT_STUBV(void, sync_renameA, (void *addr, const char *name), (addr, name))
+
+ITT_STUBV(void, sync_renameW, (void *addr, const wchar_t *name), (addr, name))
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+ITT_STUB(__itt_mark_type, mark_create,(const char *name),(name))
+
+ITT_STUB(int, mark,(__itt_mark_type mt, const char *parameter),(mt,parameter))
+
+ITT_STUB(int, mark_global,(__itt_mark_type mt, const char *parameter),(mt,parameter))
+
+ITT_STUBV(void, sync_set_name,(void *addr, const char *objtype, const char *objname, int attribute),(addr,objtype,objname,attribute))
+
+ITT_STUBV(void, thread_set_name,( const char *name),(name))
+
+ITT_STUBV(void, sync_create,(void *addr, const char *objtype, const char *objname, int attribute), (addr, objtype, objname, attribute))
+
+ITT_STUBV(void, sync_rename, (void *addr, const char *name), (addr, name))
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+ITT_STUB(int, mark_off,(__itt_mark_type mt),(mt))
+
+ITT_STUB(int, mark_global_off,(__itt_mark_type mt),(mt))
+
+ITT_STUBV(void, thread_ignore,(void),())
+
+ITT_STUBV(void, sync_prepare,(void* addr),(addr))
+
+ITT_STUBV(void, sync_cancel,(void *addr),(addr))
+
+ITT_STUBV(void, sync_acquired,(void *addr),(addr))
+
+ITT_STUBV(void, sync_releasing,(void* addr),(addr))
+
+ITT_STUBV(void, sync_released,(void* addr),(addr))
+
+ITT_STUBV(void, fsync_prepare,(void* addr),(addr))
+
+ITT_STUBV(void, fsync_cancel,(void *addr),(addr))
+
+ITT_STUBV(void, fsync_acquired,(void *addr),(addr))
+
+ITT_STUBV(void, fsync_releasing,(void* addr),(addr))
+
+ITT_STUBV(void, fsync_released,(void* addr),(addr))
+
+ITT_STUBV(void, sync_destroy,(void *addr), (addr))
+
+ITT_STUBV(void, notify_sync_prepare,(void *p),(p))
+
+ITT_STUBV(void, notify_sync_cancel,(void *p),(p))
+
+ITT_STUBV(void, notify_sync_acquired,(void *p),(p))
+
+ITT_STUBV(void, notify_sync_releasing,(void *p),(p))
+
+ITT_STUBV(void, notify_cpath_target,(),())
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+ITT_STUBV(void, sync_set_nameA,(void *addr, const char *objtype, const char *objname, int attribute),(addr,objtype,objname,attribute))
+
+ITT_STUBV(void, sync_set_nameW,(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute),(addr,objtype,objname,attribute))
+
+ITT_STUB (int, thr_name_setA,( char *name, int namelen ),(name,namelen))
+
+ITT_STUB (int, thr_name_setW,( wchar_t *name, int namelen ),(name,namelen))
+
+ITT_STUB (__itt_event, event_createA,( char *name, int namelen ),(name,namelen))
+
+ITT_STUB (__itt_event, event_createW,( wchar_t *name, int namelen ),(name,namelen))
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+ITT_STUB (int, thr_name_set,( char *name, int namelen ),(name,namelen))
+
+ITT_STUB (__itt_event, event_create,( char *name, int namelen ),(name,namelen))
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+ITT_STUBV(void, thr_ignore,(void),())
+
+ITT_STUB (int, event_start,( __itt_event event ),(event))
+
+ITT_STUB (int, event_end,( __itt_event event ),(event))
+
+ITT_STUB (__itt_state_t, state_get, (), ())
+ITT_STUB (__itt_state_t, state_set,( __itt_state_t state), (state))
+ITT_STUB (__itt_obj_state_t, obj_mode_set, ( __itt_obj_prop_t prop, __itt_obj_state_t state), (prop, state))
+ITT_STUB (__itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t prop, __itt_thr_state_t state), (prop, state))
+
+ITT_STUB(const char*, api_version,(void),())
+
+ITT_STUB(int, jit_notify_event, (__itt_jit_jvm_event event_type, void* event_data), (event_type, event_data))
+ITT_STUB(unsigned int, jit_get_new_method_id, (void), ())
+
+ITT_STUBV(void, memory_read,( void *address, size_t size ), (address, size))
+ITT_STUBV(void, memory_write,( void *address, size_t size ), (address, size))
+ITT_STUBV(void, memory_update,( void *address, size_t size ), (address, size))
+
+ITT_STUBV(void, test_delay, (int p1), (p1))
+ITT_STUBV(void, test_seq_init, ( void* p1, int p2), (p1, p2))
+ITT_STUBV(void, test_seq_wait, ( void* p1, int p2), (p1, p2))
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
+
+
+#ifndef INTEL_NO_ITTNOTIFY_API
+
+#define __ITTNOTIFY_VOID_CALL__(n) (!_ITTNOTIFY_NAME_(n)) ? (void)0 : _ITTNOTIFY_NAME_(n)
+#define __ITTNOTIFY_DATA_CALL__(n) (!_ITTNOTIFY_NAME_(n)) ? 0 : _ITTNOTIFY_NAME_(n)
+
+#define __itt_pause __ITTNOTIFY_VOID_CALL__(pause)
+#define __itt_pause_ptr _ITTNOTIFY_NAME_(pause)
+
+#define __itt_resume __ITTNOTIFY_VOID_CALL__(resume)
+#define __itt_resume_ptr _ITTNOTIFY_NAME_(resume)
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+
+#define __itt_mark_createA __ITTNOTIFY_DATA_CALL__(mark_createA)
+#define __itt_mark_createA_ptr _ITTNOTIFY_NAME_(mark_createA)
+
+#define __itt_mark_createW __ITTNOTIFY_DATA_CALL__(mark_createW)
+#define __itt_mark_createW_ptr _ITTNOTIFY_NAME_(mark_createW)
+
+#define __itt_markA __ITTNOTIFY_DATA_CALL__(markA)
+#define __itt_markA_ptr _ITTNOTIFY_NAME_(markA)
+
+#define __itt_markW __ITTNOTIFY_DATA_CALL__(markW)
+#define __itt_markW_ptr _ITTNOTIFY_NAME_(markW)
+
+#define __itt_mark_globalA __ITTNOTIFY_DATA_CALL__(mark_globalA)
+#define __itt_mark_globalA_ptr _ITTNOTIFY_NAME_(mark_globalA)
+
+#define __itt_mark_globalW __ITTNOTIFY_DATA_CALL__(mark_globalW)
+#define __itt_mark_globalW_ptr _ITTNOTIFY_NAME_(mark_globalW)
+
+#define __itt_thread_set_nameA __ITTNOTIFY_VOID_CALL__(thread_set_nameA)
+#define __itt_thread_set_nameA_ptr _ITTNOTIFY_NAME_(thread_set_nameA)
+
+#define __itt_thread_set_nameW __ITTNOTIFY_VOID_CALL__(thread_set_nameW)
+#define __itt_thread_set_nameW_ptr _ITTNOTIFY_NAME_(thread_set_nameW)
+
+#define __itt_sync_createA __ITTNOTIFY_VOID_CALL__(sync_createA)
+#define __itt_sync_createA_ptr _ITTNOTIFY_NAME_(sync_createA)
+
+#define __itt_sync_createW __ITTNOTIFY_VOID_CALL__(sync_createW)
+#define __itt_sync_createW_ptr _ITTNOTIFY_NAME_(sync_createW)
+
+#define __itt_sync_renameA __ITTNOTIFY_VOID_CALL__(sync_renameA)
+#define __itt_sync_renameA_ptr _ITTNOTIFY_NAME_(sync_renameA)
+
+#define __itt_sync_renameW __ITTNOTIFY_VOID_CALL__(sync_renameW)
+#define __itt_sync_renameW_ptr _ITTNOTIFY_NAME_(sync_renameW)
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+#define __itt_mark_create __ITTNOTIFY_DATA_CALL__(mark_create)
+#define __itt_mark_create_ptr _ITTNOTIFY_NAME_(mark_create)
+
+#define __itt_mark __ITTNOTIFY_DATA_CALL__(mark)
+#define __itt_mark_ptr _ITTNOTIFY_NAME_(mark)
+
+#define __itt_mark_global __ITTNOTIFY_DATA_CALL__(mark_global)
+#define __itt_mark_global_ptr _ITTNOTIFY_NAME_(mark_global)
+
+#define __itt_sync_set_name __ITTNOTIFY_VOID_CALL__(sync_set_name)
+#define __itt_sync_set_name_ptr _ITTNOTIFY_NAME_(sync_set_name)
+
+#define __itt_thread_set_name __ITTNOTIFY_VOID_CALL__(thread_set_name)
+#define __itt_thread_set_name_ptr _ITTNOTIFY_NAME_(thread_set_name)
+
+#define __itt_sync_create __ITTNOTIFY_VOID_CALL__(sync_create)
+#define __itt_sync_create_ptr _ITTNOTIFY_NAME_(sync_create)
+
+#define __itt_sync_rename __ITTNOTIFY_VOID_CALL__(sync_rename)
+#define __itt_sync_rename_ptr _ITTNOTIFY_NAME_(sync_rename)
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+#define __itt_mark_off __ITTNOTIFY_DATA_CALL__(mark_off)
+#define __itt_mark_off_ptr _ITTNOTIFY_NAME_(mark_off)
+
+#define __itt_thread_ignore __ITTNOTIFY_VOID_CALL__(thread_ignore)
+#define __itt_thread_ignore_ptr _ITTNOTIFY_NAME_(thread_ignore)
+
+#define __itt_sync_prepare __ITTNOTIFY_VOID_CALL__(sync_prepare)
+#define __itt_sync_prepare_ptr _ITTNOTIFY_NAME_(sync_prepare)
+
+#define __itt_sync_cancel __ITTNOTIFY_VOID_CALL__(sync_cancel)
+#define __itt_sync_cancel_ptr _ITTNOTIFY_NAME_(sync_cancel)
+
+#define __itt_sync_acquired __ITTNOTIFY_VOID_CALL__(sync_acquired)
+#define __itt_sync_acquired_ptr _ITTNOTIFY_NAME_(sync_acquired)
+
+#define __itt_sync_releasing __ITTNOTIFY_VOID_CALL__(sync_releasing)
+#define __itt_sync_releasing_ptr _ITTNOTIFY_NAME_(sync_releasing)
+
+#define __itt_sync_released __ITTNOTIFY_VOID_CALL__(sync_released)
+#define __itt_sync_released_ptr _ITTNOTIFY_NAME_(sync_released)
+
+#define __itt_fsync_prepare __ITTNOTIFY_VOID_CALL__(fsync_prepare)
+#define __itt_fsync_prepare_ptr _ITTNOTIFY_NAME_(fsync_prepare)
+
+#define __itt_fsync_cancel __ITTNOTIFY_VOID_CALL__(fsync_cancel)
+#define __itt_fsync_cancel_ptr _ITTNOTIFY_NAME_(fsync_cancel)
+
+#define __itt_fsync_acquired __ITTNOTIFY_VOID_CALL__(fsync_acquired)
+#define __itt_fsync_acquired_ptr _ITTNOTIFY_NAME_(fsync_acquired)
+
+#define __itt_fsync_releasing __ITTNOTIFY_VOID_CALL__(fsync_releasing)
+#define __itt_fsync_releasing_ptr _ITTNOTIFY_NAME_(fsync_releasing)
+
+#define __itt_fsync_released __ITTNOTIFY_VOID_CALL__(fsync_released)
+#define __itt_fsync_released_ptr _ITTNOTIFY_NAME_(fsync_released)
+
+#define __itt_sync_destroy __ITTNOTIFY_VOID_CALL__(sync_destroy)
+#define __itt_sync_destroy_ptr _ITTNOTIFY_NAME_(sync_destroy)
+
+#define __itt_notify_sync_prepare __ITTNOTIFY_VOID_CALL__(notify_sync_prepare)
+#define __itt_notify_sync_prepare_ptr _ITTNOTIFY_NAME_(notify_sync_prepare)
+
+#define __itt_notify_sync_cancel __ITTNOTIFY_VOID_CALL__(notify_sync_cancel)
+#define __itt_notify_sync_cancel_ptr _ITTNOTIFY_NAME_(notify_sync_cancel)
+
+#define __itt_notify_sync_acquired __ITTNOTIFY_VOID_CALL__(notify_sync_acquired)
+#define __itt_notify_sync_acquired_ptr _ITTNOTIFY_NAME_(notify_sync_acquired)
+
+#define __itt_notify_sync_releasing __ITTNOTIFY_VOID_CALL__(notify_sync_releasing)
+#define __itt_notify_sync_releasing_ptr _ITTNOTIFY_NAME_(notify_sync_releasing)
+
+#define __itt_notify_cpath_target __ITTNOTIFY_VOID_CALL__(notify_cpath_target)
+#define __itt_notify_cpath_target_ptr _ITTNOTIFY_NAME_(notify_cpath_target)
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#define __itt_sync_set_nameA __ITTNOTIFY_VOID_CALL__(sync_set_nameA)
+#define __itt_sync_set_nameA_ptr _ITTNOTIFY_NAME_(sync_set_nameA)
+
+#define __itt_sync_set_nameW __ITTNOTIFY_VOID_CALL__(sync_set_nameW)
+#define __itt_sync_set_nameW_ptr _ITTNOTIFY_NAME_(sync_set_nameW)
+
+#define __itt_thr_name_setA __ITTNOTIFY_DATA_CALL__(thr_name_setA)
+#define __itt_thr_name_setA_ptr _ITTNOTIFY_NAME_(thr_name_setA)
+
+#define __itt_thr_name_setW __ITTNOTIFY_DATA_CALL__(thr_name_setW)
+#define __itt_thr_name_setW_ptr _ITTNOTIFY_NAME_(thr_name_setW)
+
+#define __itt_event_createA __ITTNOTIFY_DATA_CALL__(event_createA)
+#define __itt_event_createA_ptr _ITTNOTIFY_NAME_(event_createA)
+
+#define __itt_event_createW __ITTNOTIFY_DATA_CALL__(event_createW)
+#define __itt_event_createW_ptr _ITTNOTIFY_NAME_(event_createW)
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#define __itt_thr_name_set __ITTNOTIFY_DATA_CALL__(thr_name_set)
+#define __itt_thr_name_set_ptr _ITTNOTIFY_NAME_(thr_name_set)
+
+#define __itt_event_create __ITTNOTIFY_DATA_CALL__(event_create)
+#define __itt_event_create_ptr _ITTNOTIFY_NAME_(event_create)
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+#define __itt_thr_ignore __ITTNOTIFY_VOID_CALL__(thr_ignore)
+#define __itt_thr_ignore_ptr _ITTNOTIFY_NAME_(thr_ignore)
+
+#define __itt_event_start __ITTNOTIFY_DATA_CALL__(event_start)
+#define __itt_event_start_ptr _ITTNOTIFY_NAME_(event_start)
+
+#define __itt_event_end __ITTNOTIFY_DATA_CALL__(event_end)
+#define __itt_event_end_ptr _ITTNOTIFY_NAME_(event_end)
+
+#define __itt_state_get __ITTNOTIFY_DATA_CALL__(state_get)
+#define __itt_state_get_ptr _ITTNOTIFY_NAME_(state_get)
+
+#define __itt_state_set __ITTNOTIFY_DATA_CALL__(state_set)
+#define __itt_state_set_ptr _ITTNOTIFY_NAME_(state_set)
+
+#define __itt_obj_mode_set __ITTNOTIFY_DATA_CALL__(obj_mode_set)
+#define __itt_obj_mode_set_ptr _ITTNOTIFY_NAME_(obj_mode_set)
+
+#define __itt_thr_mode_set __ITTNOTIFY_DATA_CALL__(thr_mode_set)
+#define __itt_thr_mode_set_ptr _ITTNOTIFY_NAME_(thr_mode_set)
+
+#define __itt_api_version __ITTNOTIFY_DATA_CALL__(api_version)
+#define __itt_api_version_ptr _ITTNOTIFY_NAME_(api_version)
+
+#define __itt_jit_notify_event __ITTNOTIFY_DATA_CALL__(jit_notify_event)
+#define __itt_jit_notify_event_ptr _ITTNOTIFY_NAME_(jit_notify_event)
+
+#define __itt_jit_get_new_method_id __ITTNOTIFY_DATA_CALL__(jit_get_new_method_id)
+#define __itt_jit_get_new_method_id_ptr _ITTNOTIFY_NAME_(jit_get_new_method_id)
+
+#define __itt_memory_read __ITTNOTIFY_VOID_CALL__(memory_read)
+#define __itt_memory_read_ptr _ITTNOTIFY_NAME_(memory_read)
+
+#define __itt_memory_write __ITTNOTIFY_VOID_CALL__(memory_write)
+#define __itt_memory_write_ptr _ITTNOTIFY_NAME_(memory_write)
+
+#define __itt_memory_update __ITTNOTIFY_VOID_CALL__(memory_update)
+#define __itt_memory_update_ptr _ITTNOTIFY_NAME_(memory_update)
+
+
+#define __itt_test_delay __ITTNOTIFY_VOID_CALL__(test_delay)
+#define __itt_test_delay_ptr _ITTNOTIFY_NAME_(test_delay)
+
+#define __itt_test_seq_init __ITTNOTIFY_VOID_CALL__(test_seq_init)
+#define __itt_test_seq_init_ptr _ITTNOTIFY_NAME_(test_seq_init)
+
+#define __itt_test_seq_wait __ITTNOTIFY_VOID_CALL__(test_seq_wait)
+#define __itt_test_seq_wait_ptr _ITTNOTIFY_NAME_(test_seq_wait)
+
+#define __itt_set_error_handler ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, set_error_handler)
+
+#else /* INTEL_NO_ITTNOTIFY_API */
+
+#define __itt_pause()
+#define __itt_pause_ptr 0
+
+#define __itt_resume()
+#define __itt_resume_ptr 0
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+
+#define __itt_mark_createA(name) (__itt_mark_type)0
+#define __itt_mark_createA_ptr 0
+
+#define __itt_mark_createW(name) (__itt_mark_type)0
+#define __itt_mark_createW_ptr 0
+
+#define __itt_markA(mt,parameter) (int)0
+#define __itt_markA_ptr 0
+
+#define __itt_markW(mt,parameter) (int)0
+#define __itt_markW_ptr 0
+
+#define __itt_mark_globalA(mt,parameter) (int)0
+#define __itt_mark_globalA_ptr 0
+
+#define __itt_mark_globalW(mt,parameter) (int)0
+#define __itt_mark_globalW_ptr 0
+
+#define __itt_thread_set_nameA(name)
+#define __itt_thread_set_nameA_ptr 0
+
+#define __itt_thread_set_nameW(name)
+#define __itt_thread_set_nameW_ptr 0
+
+#define __itt_sync_createA(addr, objtype, objname, attribute)
+#define __itt_sync_createA_ptr 0
+
+#define __itt_sync_createW(addr, objtype, objname, attribute)
+#define __itt_sync_createW_ptr 0
+
+#define __itt_sync_renameA(addr, name)
+#define __itt_sync_renameA_ptr 0
+
+#define __itt_sync_renameW(addr, name)
+#define __itt_sync_renameW_ptr 0
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+#define __itt_mark_create(name) (__itt_mark_type)0
+#define __itt_mark_create_ptr 0
+
+#define __itt_mark(mt,parameter) (int)0
+#define __itt_mark_ptr 0
+
+#define __itt_mark_global(mt,parameter) (int)0
+#define __itt_mark_global_ptr 0
+
+#define __itt_sync_set_name(addr,objtype,objname,attribute)
+#define __itt_sync_set_name_ptr 0
+
+#define __itt_thread_set_name(name)
+#define __itt_thread_set_name_ptr 0
+
+#define __itt_sync_create(addr, objtype, objname, attribute)
+#define __itt_sync_create_ptr 0
+
+#define __itt_sync_rename(addr, name)
+#define __itt_sync_rename_ptr 0
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+#define __itt_mark_off(mt) (int)0
+#define __itt_mark_off_ptr 0
+
+#define __itt_thread_ignore()
+#define __itt_thread_ignore_ptr 0
+
+#define __itt_sync_prepare(addr)
+#define __itt_sync_prepare_ptr 0
+
+#define __itt_sync_cancel(addr)
+#define __itt_sync_cancel_ptr 0
+
+#define __itt_sync_acquired(addr)
+#define __itt_sync_acquired_ptr 0
+
+#define __itt_sync_releasing(addr)
+#define __itt_sync_releasing_ptr 0
+
+#define __itt_sync_released(addr)
+#define __itt_sync_released_ptr 0
+
+#define __itt_fsync_prepare(addr)
+#define __itt_fsync_prepare_ptr 0
+
+#define __itt_fsync_cancel(addr)
+#define __itt_fsync_cancel_ptr 0
+
+#define __itt_fsync_acquired(addr)
+#define __itt_fsync_acquired_ptr 0
+
+#define __itt_fsync_releasing(addr)
+#define __itt_fsync_releasing_ptr 0
+
+#define __itt_fsync_released(addr)
+#define __itt_fsync_released_ptr 0
+
+#define __itt_sync_destroy(addr)
+#define __itt_sync_destroy_ptr 0
+
+#define __itt_notify_sync_prepare(p)
+#define __itt_notify_sync_prepare_ptr 0
+
+#define __itt_notify_sync_cancel(p)
+#define __itt_notify_sync_cancel_ptr 0
+
+#define __itt_notify_sync_acquired(p)
+#define __itt_notify_sync_acquired_ptr 0
+
+#define __itt_notify_sync_releasing(p)
+#define __itt_notify_sync_releasing_ptr 0
+
+#define __itt_notify_cpath_target()
+#define __itt_notify_cpath_target_ptr 0
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#define __itt_sync_set_nameA(addr,objtype,objname,attribute)
+#define __itt_sync_set_nameA_ptr 0
+
+#define __itt_sync_set_nameW(addr,objtype,objname,attribute)
+#define __itt_sync_set_nameW_ptr 0
+
+#define __itt_thr_name_setA(name,namelen) (int)0
+#define __itt_thr_name_setA_ptr 0
+
+#define __itt_thr_name_setW(name,namelen) (int)0
+#define __itt_thr_name_setW_ptr 0
+
+#define __itt_event_createA(name,namelen) (__itt_event)0
+#define __itt_event_createA_ptr 0
+
+#define __itt_event_createW(name,namelen) (__itt_event)0
+#define __itt_event_createW_ptr 0
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#define __itt_thr_name_set(name,namelen) (int)0
+#define __itt_thr_name_set_ptr 0
+
+#define __itt_event_create(name,namelen) (__itt_event)0
+#define __itt_event_create_ptr 0
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+#define __itt_thr_ignore()
+#define __itt_thr_ignore_ptr 0
+
+#define __itt_event_start(event) (int)0
+#define __itt_event_start_ptr 0
+
+#define __itt_event_end(event) (int)0
+#define __itt_event_end_ptr 0
+
+#define __itt_state_get() (__itt_state_t)0
+#define __itt_state_get_ptr 0
+
+#define __itt_state_set(state) (__itt_state_t)0
+#define __itt_state_set_ptr 0
+
+#define __itt_obj_mode_set(prop, state) (__itt_obj_state_t)0
+#define __itt_obj_mode_set_ptr 0
+
+#define __itt_thr_mode_set(prop, state) (__itt_thr_state_t)0
+#define __itt_thr_mode_set_ptr 0
+
+#define __itt_api_version() (const char*)0
+#define __itt_api_version_ptr 0
+
+#define __itt_jit_notify_event(event_type,event_data) (int)0
+#define __itt_jit_notify_event_ptr 0
+
+#define __itt_jit_get_new_method_id() (unsigned int)0
+#define __itt_jit_get_new_method_id_ptr 0
+
+#define __itt_memory_read(address, size)
+#define __itt_memory_read_ptr 0
+
+#define __itt_memory_write(address, size)
+#define __itt_memory_write_ptr 0
+
+#define __itt_memory_update(address, size)
+#define __itt_memory_update_ptr 0
+
+#define __itt_test_delay(p1)
+#define __itt_test_delay_ptr 0
+
+#define __itt_test_seq_init(p1,p2)
+#define __itt_test_seq_init_ptr 0
+
+#define __itt_test_seq_wait(p1,p2)
+#define __itt_test_seq_wait_ptr 0
+
+#define __itt_set_error_handler(x)
+
+#endif /* INTEL_NO_ITTNOTIFY_API */
+
+#endif /* _ITTNOTIFY_H_MACRO_BODY_ */
+
+#endif /* _ITTNOTIFY_H_ */
+/** @endcond */
+
diff --git a/src/tbb/tools_api/ittnotify_static.c b/src/tbb/tools_api/ittnotify_static.c
new file mode 100644
index 0000000..d03758b
--- /dev/null
+++ b/src/tbb/tools_api/ittnotify_static.c
@@ -0,0 +1,577 @@
+/*
+    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 "_config.h"
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#include <windows.h>
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#include <pthread.h>
+#include <dlfcn.h>
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#define __ITT_INTERNAL_INCLUDE
+
+#define _ITTNOTIFY_H_MACRO_BODY_
+
+#include "_disable_warnings.h"
+
+#include "ittnotify.h"
+
+#ifdef __cplusplus
+#  define ITT_EXTERN_C extern "C"
+#else
+#  define ITT_EXTERN_C /* nothing */
+#endif /* __cplusplus */
+
+#ifndef __itt_init_lib_name
+#  define __itt_init_lib_name __itt_init_lib
+#endif /* __itt_init_lib_name */
+
+static int __itt_init_lib(void);
+
+#ifndef INTEL_ITTNOTIFY_PREFIX
+#define INTEL_ITTNOTIFY_PREFIX __itt_
+#endif /* INTEL_ITTNOTIFY_PREFIX */
+#ifndef INTEL_ITTNOTIFY_POSTFIX
+#  define INTEL_ITTNOTIFY_POSTFIX _ptr_
+#endif /* INTEL_ITTNOTIFY_POSTFIX */
+
+#define ___N_(p,n) p##n
+#define __N_(p,n) ___N_(p,n)
+#define _N_(n) __N_(INTEL_ITTNOTIFY_PREFIX,n)
+
+/* building pointers to imported funcs */
+#undef ITT_STUBV
+#undef ITT_STUB
+#define ITT_STUB(type,name,args,params,ptr,group)                       \
+    static type ITTAPI_CALL ITT_JOIN(_N_(name),_init) args;             \
+    typedef type ITTAPI_CALL name##_t args;                             \
+    ITT_EXTERN_C name##_t* ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX) = ITT_JOIN(_N_(name),_init); \
+    static type ITTAPI_CALL ITT_JOIN(_N_(name),_init) args              \
+    {                                                                   \
+        __itt_init_lib_name();                                          \
+        if(ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX))                                             \
+            return ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX) params;                              \
+        else                                                            \
+            return (type)0;                                             \
+    }
+
+#define ITT_STUBV(type,name,args,params,ptr,group)                      \
+    static type ITTAPI_CALL ITT_JOIN(_N_(name),_init) args;             \
+    typedef type ITTAPI_CALL name##_t args;                             \
+    ITT_EXTERN_C name##_t* ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX) = ITT_JOIN(_N_(name),_init); \
+    static type ITTAPI_CALL ITT_JOIN(_N_(name),_init) args              \
+    {                                                                   \
+        __itt_init_lib_name();                                          \
+        if(ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX))                                             \
+            ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX) params;                                     \
+        else                                                            \
+            return;                                                     \
+    }
+
+const __itt_state_t _N_(state_err) = 0;
+const __itt_event _N_(event_err) = 0;
+const int _N_(err) = 0;
+
+#include "_ittnotify_static.h"
+
+typedef enum ___itt_group_id
+{
+    __itt_none_group    = 0,
+    __itt_control_group = 1,
+    __itt_thread_group  = 2,
+    __itt_mark_group    = 4,
+    __itt_sync_group    = 8,
+    __itt_fsync_group   = 16,
+    __itt_jit_group     = 32,
+    __itt_all_group     = -1
+} __itt_group_id;
+
+
+#ifndef CDECL
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#    define CDECL __cdecl
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#    define CDECL
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#endif /* CDECL */
+
+#ifndef STDCALL
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#    define STDCALL __stdcall
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#    define STDCALL
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#endif /* STDCALL */
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+    typedef FARPROC FPTR;
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+    typedef void* FPTR;
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+
+/* OS communication functions */
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+typedef HMODULE lib_t;
+typedef CRITICAL_SECTION mutex_t;
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+typedef void* lib_t;
+typedef pthread_mutex_t mutex_t;
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+static lib_t ittnotify_lib;
+
+static __itt_error_notification_t* error_handler = 0;
+
+#if ITT_OS==ITT_OS_WIN
+static const char* ittnotify_lib_name = "libittnotify.dll";
+#elif ITT_OS==ITT_OS_LINUX
+static const char* ittnotify_lib_name = "libittnotify.so";
+#elif ITT_OS==ITT_OS_MAC
+static const char* ittnotify_lib_name = "libittnotify.dylib";
+#else
+#error Unsupported or unknown OS.
+#endif
+
+#ifndef LIB_VAR_NAME
+#if ITT_ARCH==ITT_ARCH_IA32
+#define LIB_VAR_NAME INTEL_LIBITTNOTIFY32
+#else
+#define LIB_VAR_NAME INTEL_LIBITTNOTIFY64
+#endif
+#endif /* LIB_VAR_NAME */
+
+#define __TO_STR(x) #x
+#define _TO_STR(x) __TO_STR(x)
+
+static int __itt_fstrcmp(const char* s1, const char* s2)
+{
+    int i;
+
+    if(!s1 && !s2)
+        return 0;
+    else if(!s1 && s2)
+        return -1;
+    else if(s1 && !s2)
+        return 1;
+
+    for(i = 0; s1[i] || s2[i]; i++)
+        if(s1[i] > s2[i])
+            return 1;
+        else if(s1[i] < s2[i])
+            return -1;
+    return 0;
+}
+
+static const char* __itt_fsplit(const char* s, const char* sep, const char** out, int* len)
+{
+    int i;
+    int j;
+
+    if(!s || !sep || !out || !len)
+        return 0;
+
+    for(i = 0; s[i]; i++)
+    {
+        int b = 0;
+        for(j = 0; sep[j]; j++)
+            if(s[i] == sep[j])
+            {
+                b = 1;
+                break;
+            }
+        if(!b)
+            break;
+    }
+
+    if(!s[i])
+        return 0;
+
+    *len = 0;
+    *out = s + i;
+
+    for(; s[i]; i++, (*len)++)
+    {
+        int b = 0;
+        for(j = 0; sep[j]; j++)
+            if(s[i] == sep[j])
+            {
+                b = 1;
+                break;
+            }
+        if(b)
+            break;
+    }
+
+    for(; s[i]; i++)
+    {
+        int b = 0;
+        for(j = 0; sep[j]; j++)
+            if(s[i] == sep[j])
+            {
+                b = 1;
+                break;
+            }
+        if(!b)
+            break;
+    }
+
+    return s + i;
+}
+
+static char* __itt_fstrcpyn(char* dst, const char* src, int len)
+{
+    int i;
+
+    if(!src || !dst)
+        return 0;
+
+    for(i = 0; i < len; i++)
+        dst[i] = src[i];
+    dst[len] = 0;
+    return dst;
+}
+
+#ifdef ITT_NOTIFY_EXT_REPORT
+#  define ERROR_HANDLER ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, error_handler)
+ITT_EXTERN_C void ERROR_HANDLER(__itt_error_code, const char* msg);
+#endif /* ITT_NOTIFY_EXT_REPORT */
+
+static void __itt_report_error(__itt_error_code code, const char* msg)
+{
+    if(error_handler)
+        error_handler(code, msg);
+#ifdef ITT_NOTIFY_EXT_REPORT
+    ERROR_HANDLER(code, msg);
+#endif /* ITT_NOTIFY_EXT_REPORT */
+}
+
+static const char* __itt_get_env_var(const char* name)
+{
+    static char env_value[4096];
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+    int i;
+    DWORD rc;
+    for(i = 0; i < sizeof(env_value); i++)
+        env_value[i] = 0;
+    rc = GetEnvironmentVariableA(name, env_value, sizeof(env_value) - 1);
+    if(rc >= sizeof(env_value))
+        __itt_report_error(__itt_error_cant_read_env, name);
+    else if(!rc)
+        return 0;
+    else
+        return env_value;
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+    char* env = getenv(name);
+    int i;
+    for(i = 0; i < sizeof(env_value); i++)
+        env_value[i] = 0;
+    if(env)
+    {
+        if(strlen(env) >= sizeof(env_value))
+        {
+            __itt_report_error(__itt_error_cant_read_env, name);
+            return 0;
+        }
+        strncpy(env_value, env, sizeof(env_value) - 1);
+        return env_value;
+    }
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+    return 0;
+}
+
+static const char* __itt_get_lib_name()
+{
+    const char* lib_name = __itt_get_env_var(_TO_STR(LIB_VAR_NAME));
+    if(!lib_name)
+        lib_name = ittnotify_lib_name;
+
+    return lib_name;
+}
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#  define __itt_get_proc(lib, name) GetProcAddress(lib, name)
+#  define __itt_init_mutex(mutex)   InitializeCriticalSection(mutex)
+#  define __itt_mutex_lock(mutex)   EnterCriticalSection(mutex)
+#  define __itt_mutex_unlock(mutex) LeaveCriticalSection(mutex)
+#  define __itt_load_lib(name)      LoadLibraryA(name)
+#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+#  define __itt_get_proc(lib, name) dlsym(lib, name)
+#  define __itt_init_mutex(mutex)   pthread_mutex_init(mutex, 0)
+#  define __itt_mutex_lock(mutex)   pthread_mutex_lock(mutex)
+#  define __itt_mutex_unlock(mutex) pthread_mutex_unlock(mutex)
+#  define __itt_load_lib(name)      dlopen(name, RTLD_LAZY)
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+#ifndef ITT_SIMPLE_INIT
+/* function stubs */
+
+#undef ITT_STUBV
+#undef ITT_STUB
+
+#define ITT_STUBV(type,name,args,params,ptr,group) \
+ITT_EXTERN_C type ITTAPI_CALL _N_(name) args                \
+{                                                  \
+    __itt_init_lib_name();                         \
+    if(ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX))         \
+        ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX) params; \
+    else                                           \
+        return;                                    \
+}
+
+#define ITT_STUB(type,name,args,params,ptr,group) \
+ITT_EXTERN_C type ITTAPI_CALL _N_(name) args                        \
+{                                                 \
+    __itt_init_lib_name();                        \
+    if(ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX))                 \
+        return ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX) params;  \
+    else                                          \
+        return (type)0;                           \
+}
+
+#include "_ittnotify_static.h"
+
+#endif /* ITT_SIMPLE_INIT */
+
+typedef struct ___itt_group_list
+{
+    __itt_group_id id;
+    const char*    name;
+} __itt_group_list;
+
+static __itt_group_list group_list[] = {
+    {__itt_control_group, "control"},
+    {__itt_thread_group,  "thread"},
+    {__itt_mark_group,    "mark"},
+    {__itt_sync_group,    "sync"},
+    {__itt_fsync_group,   "fsync"},
+    {__itt_jit_group,     "jit"},
+    {__itt_all_group,     "all"},
+    {__itt_none_group,    0}
+};
+
+typedef struct ___itt_group_alias
+{
+    const char*    env_var;
+    __itt_group_id groups;
+} __itt_group_alias;
+
+static __itt_group_alias group_alias[] = {
+    {"KMP_FOR_TPROFILE", (__itt_group_id)(__itt_control_group | __itt_thread_group | __itt_sync_group | __itt_mark_group)},
+    {"KMP_FOR_TCHECK", (__itt_group_id)(__itt_control_group | __itt_thread_group | __itt_fsync_group | __itt_mark_group)},
+    {0, __itt_none_group}
+};
+
+typedef struct ___itt_func_map
+{
+    const char*    name;
+    void**         func_ptr;
+    __itt_group_id group;
+} __itt_func_map;
+
+
+#define _P_(name) ITT_JOIN(_N_(name),INTEL_ITTNOTIFY_POSTFIX)
+
+#define ITT_STRINGIZE_AUX(p) #p
+#define ITT_STRINGIZE(p) ITT_STRINGIZE_AUX(p)
+
+#define __ptr_(pname,name,group) {ITT_STRINGIZE(ITT_JOIN(__itt_,pname)), (void**)(void*)&_P_(name), (__itt_group_id)(group)},
+
+#undef ITT_STUB
+#undef ITT_STUBV
+
+#define ITT_STUB(type,name,args,params,ptr,group) __ptr_(ptr,name,group)
+#define ITT_STUBV ITT_STUB
+
+static __itt_func_map func_map[] = {
+#include "_ittnotify_static.h"
+    {0, 0, __itt_none_group}
+};
+
+static __itt_group_id __itt_get_groups()
+{
+    __itt_group_id res = __itt_none_group;
+
+    const char* group_str = __itt_get_env_var("INTEL_ITTNOTIFY_GROUPS");
+    if(group_str)
+    {
+        char gr[255];
+        const char* chunk;
+        int len;
+        while((group_str = __itt_fsplit(group_str, ",; ", &chunk, &len)) != 0)
+        {
+            int j;
+            int group_detected = 0;
+            __itt_fstrcpyn(gr, chunk, len);
+            for(j = 0; group_list[j].name; j++)
+            {
+                if(!__itt_fstrcmp(gr, group_list[j].name))
+                {
+                    res = (__itt_group_id)(res | group_list[j].id);
+                    group_detected = 1;
+                    break;
+                }
+            }
+
+            if(!group_detected)
+                __itt_report_error(__itt_error_unknown_group, gr);
+        }
+        return res;
+    }
+    else
+    {
+        int i;
+        for(i = 0; group_alias[i].env_var; i++)
+            if(__itt_get_env_var(group_alias[i].env_var))
+                return group_alias[i].groups;
+    }
+
+    return res;
+}
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#pragma warning(push)
+#pragma warning(disable: 4054)
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
+
+static int __itt_init_lib()
+{
+    static volatile int init = 0;
+    static int result = 0;
+
+#ifndef ITT_SIMPLE_INIT
+
+#if ITT_PLATFORM==ITT_PLATFORM_POSIX
+    static mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+#else
+    static volatile int mutex_initialized = 0;
+    static mutex_t mutex;
+    static LONG inter_counter = 0;
+#endif
+
+    if(!init)
+    {
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+        if(!mutex_initialized)
+        {
+            if(InterlockedIncrement(&inter_counter) == 1)
+            {
+                __itt_init_mutex(&mutex);
+                mutex_initialized = 1;
+            }
+            else
+                while(!mutex_initialized)
+                    SwitchToThread();
+        }
+#endif
+
+        __itt_mutex_lock(&mutex);
+#endif /* ITT_SIMPLE_INIT */
+        if(!init)
+        {
+            int i;
+
+            __itt_group_id groups = __itt_get_groups();
+
+            for(i = 0; func_map[i].name; i++)
+                *func_map[i].func_ptr = 0;
+
+            if(groups != __itt_none_group)
+            {
+#ifdef ITT_COMPLETE_GROUP
+                __itt_group_id zero_group = __itt_none_group;
+#endif /* ITT_COMPLETE_GROUP */
+
+                ittnotify_lib = __itt_load_lib(__itt_get_lib_name());
+                if(ittnotify_lib)
+                {
+                    for(i = 0; func_map[i].name; i++)
+                    {
+                        if(func_map[i].name && func_map[i].func_ptr && (func_map[i].group & groups))
+                        {
+                            *func_map[i].func_ptr = (void*)__itt_get_proc(ittnotify_lib, func_map[i].name);
+                            if(!(*func_map[i].func_ptr) && func_map[i].name)
+                            {
+                                __itt_report_error(__itt_error_no_symbol, func_map[i].name);
+#ifdef ITT_COMPLETE_GROUP
+                                zero_group = (__itt_group_id)(zero_group | func_map[i].group);
+#endif /* ITT_COMPLETE_GROUP */
+                            }
+                            else
+                                result = 1;
+                        }
+                    }
+                }
+                else
+                {
+                    __itt_report_error(__itt_error_no_module, __itt_get_lib_name());
+                }
+
+#ifdef ITT_COMPLETE_GROUP
+                for(i = 0; func_map[i].name; i++)
+                    if(func_map[i].group & zero_group)
+                        *func_map[i].func_ptr = 0;
+
+                result = 0;
+
+                for(i = 0; func_map[i].name; i++) /* evaluating if any function ptr is non empty */
+                    if(*func_map[i].func_ptr)
+                    {
+                        result = 1;
+                        break;
+                    }
+#endif /* ITT_COMPLETE_GROUP */
+            }
+
+            init = 1; /* first checking of 'init' flag happened out of mutex, that is why setting flag to 1 */
+                      /* must be after call table is filled (to avoid condition races) */
+        }
+#ifndef ITT_SIMPLE_INIT
+        __itt_mutex_unlock(&mutex);
+    }
+#endif /* ITT_SIMPLE_INIT */
+    return result;
+}
+
+#define SET_ERROR_HANDLER ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, set_error_handler)
+
+ITT_EXTERN_C __itt_error_notification_t* SET_ERROR_HANDLER(__itt_error_notification_t* handler)
+{
+    __itt_error_notification_t* prev = error_handler;
+    error_handler = handler;
+    return prev;
+}
+
+#if ITT_PLATFORM==ITT_PLATFORM_WIN
+#pragma warning(pop)
+#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
diff --git a/src/tbb/win32-tbb-export.def b/src/tbb/win32-tbb-export.def
index 97eaca2..ff7ac01 100644
--- a/src/tbb/win32-tbb-export.def
+++ b/src/tbb/win32-tbb-export.def
@@ -24,6 +24,8 @@
 ; invalidate any other reasons why the executable file might be covered by
 ; the GNU General Public License.
 
+#include "tbb/tbb_config.h"
+
 EXPORTS
 
 ; Assembly-language support that is called directly by clients
@@ -62,6 +64,7 @@ __TBB_machine_trylockbyte
 ?free at allocate_continuation_proxy@internal at tbb@@QBEXAAVtask at 3@@Z
 ?free at allocate_root_proxy@internal at tbb@@SAXAAVtask at 3@@Z
 ?internal_set_ref_count at task@tbb@@AAEXH at Z
+?internal_decrement_ref_count at task@tbb@@AAEHXZ
 ?is_owned_by_current_thread at task@tbb@@QBE_NXZ
 ?note_affinity at task@tbb@@UAEXG at Z
 ?resize at affinity_partitioner_base_v3@internal at tbb@@AAEXI at Z
@@ -74,16 +77,19 @@ __TBB_machine_trylockbyte
 ?observe at task_scheduler_observer_v3@internal at tbb@@QAEX_N at Z
 
 ; exception handling support
+#if __TBB_EXCEPTIONS
 ?allocate at allocate_root_with_context_proxy@internal at tbb@@QBEAAVtask at 3@I at Z
 ?free at allocate_root_with_context_proxy@internal at tbb@@QBEXAAVtask at 3@@Z
 ?is_group_execution_cancelled at task_group_context@tbb@@QBE_NXZ
 ?cancel_group_execution at task_group_context@tbb@@QAE_NXZ
 ?reset at task_group_context@tbb@@QAEXXZ
 ?init at task_group_context@tbb@@IAEXXZ
+?register_pending_exception at task_group_context@tbb@@QAEXXZ
 ??1task_group_context at tbb@@QAE at XZ
 ?name at captured_exception@tbb@@UBEPBDXZ
 ?what at captured_exception@tbb@@UBEPBDXZ
 ??1captured_exception at tbb@@UAE at XZ
+#endif /* __TBB_EXCEPTIONS */
 
 ; tbb_misc.cpp
 ?assertion_failure at tbb@@YAXPBDH00 at Z
@@ -92,6 +98,7 @@ __TBB_machine_trylockbyte
 ?set_assertion_handler at tbb@@YAP6AXPBDH00 at ZP6AX0H00@Z at Z
 ?runtime_warning at internal@tbb@@YAXPBDZZ
 TBB_runtime_interface_version
+?throw_bad_last_alloc_exception_v4 at internal@tbb@@YAXXZ
 
 ; itt_notify.cpp
 ?itt_load_pointer_with_acquire_v3 at internal@tbb@@YAPAXPBX at Z
@@ -108,7 +115,11 @@ TBB_runtime_interface_version
 ?clear at pipeline@tbb@@QAEXXZ
 ?inject_token at pipeline@tbb@@AAEXAAVtask at 2@@Z
 ?run at pipeline@tbb@@QAEXI at Z
+#if __TBB_EXCEPTIONS
 ?run at pipeline@tbb@@QAEXIAAVtask_group_context at 2@@Z
+#endif
+?process_item at thread_bound_filter@tbb@@QAE?AW4result_type at 12@XZ
+?try_process_item at thread_bound_filter@tbb@@QAE?AW4result_type at 12@XZ
 
 ; queuing_rw_mutex.cpp
 ?internal_construct at queuing_rw_mutex@tbb@@QAEXXZ
@@ -168,10 +179,10 @@ TBB_runtime_interface_version
 ?release at scoped_lock@queuing_mutex at tbb@@QAEXXZ
 ?try_acquire at scoped_lock@queuing_mutex at tbb@@QAE_NAAV23@@Z
 
+#if !TBB_NO_LEGACY
 ; concurrent_hash_map.cpp
 ?internal_grow_predicate at hash_map_segment_base@internal at tbb@@QBE_NXZ
 
-#if !TBB_NO_LEGACY
 ; concurrent_queue.cpp v2
 ?advance at concurrent_queue_iterator_base@internal at tbb@@IAEXXZ
 ?assign at concurrent_queue_iterator_base@internal at tbb@@IAEXABV123@@Z
@@ -199,6 +210,7 @@ TBB_runtime_interface_version
 ?internal_push at concurrent_queue_base_v3@internal at tbb@@IAEXPBX at Z
 ?internal_push_if_not_full at concurrent_queue_base_v3@internal at tbb@@IAE_NPBX at Z
 ?internal_size at concurrent_queue_base_v3@internal at tbb@@IBEHXZ
+?internal_empty at concurrent_queue_base_v3@internal at tbb@@IBE_NXZ
 ?internal_set_capacity at concurrent_queue_base_v3@internal at tbb@@IAEXHI at Z
 ?internal_finish_clear at concurrent_queue_base_v3@internal at tbb@@IAEXXZ
 ?internal_throw_exception at concurrent_queue_base_v3@internal at tbb@@IBEXXZ
@@ -229,6 +241,8 @@ TBB_runtime_interface_version
 ?internal_compact at concurrent_vector_base_v3@internal at tbb@@IAEPAXIPAXP6AX0I at ZP6AX0PBXI@Z at Z
 ?internal_swap at concurrent_vector_base_v3@internal at tbb@@IAEXAAV123@@Z
 ?internal_throw_exception at concurrent_vector_base_v3@internal at tbb@@IBEXI at Z
+?internal_resize at concurrent_vector_base_v3@internal at tbb@@IAEXIIIPBXP6AXPAXI at ZP6AX10I@Z at Z
+?internal_grow_to_at_least_with_result at concurrent_vector_base_v3@internal at tbb@@IAEIIIP6AXPAXPBXI at Z1@Z
 
 ; tbb_thread
 ?join at tbb_thread_v3@internal at tbb@@QAEXXZ
diff --git a/src/tbb/win64-tbb-export.def b/src/tbb/win64-tbb-export.def
index 7bf5a42..5c18884 100644
--- a/src/tbb/win64-tbb-export.def
+++ b/src/tbb/win64-tbb-export.def
@@ -27,6 +27,8 @@
 ; This file is organized with a section for each .cpp file.
 ; Each of these sections is in alphabetical order.
 
+#include "tbb/tbb_config.h"
+
 EXPORTS
 
 ; Assembly-language support that is called directly by clients
@@ -59,6 +61,7 @@ __TBB_machine_pause
 ?free at allocate_continuation_proxy@internal at tbb@@QEBAXAEAVtask at 3@@Z
 ?free at allocate_root_proxy@internal at tbb@@SAXAEAVtask at 3@@Z
 ?internal_set_ref_count at task@tbb@@AEAAXH at Z
+?internal_decrement_ref_count at task@tbb@@AEAA_JXZ
 ?is_owned_by_current_thread at task@tbb@@QEBA_NXZ
 ?note_affinity at task@tbb@@UEAAXG at Z
 ?self at task@tbb@@SAAEAV12 at XZ
@@ -70,16 +73,19 @@ __TBB_machine_pause
 ?observe at task_scheduler_observer_v3@internal at tbb@@QEAAX_N at Z
 
 ; exception handling support
+#if __TBB_EXCEPTIONS
 ?allocate at allocate_root_with_context_proxy@internal at tbb@@QEBAAEAVtask at 3@_K at Z
 ?free at allocate_root_with_context_proxy@internal at tbb@@QEBAXAEAVtask at 3@@Z
 ?is_group_execution_cancelled at task_group_context@tbb@@QEBA_NXZ
 ?cancel_group_execution at task_group_context@tbb@@QEAA_NXZ
 ?reset at task_group_context@tbb@@QEAAXXZ
 ?init at task_group_context@tbb@@IEAAXXZ
+?register_pending_exception at task_group_context@tbb@@QEAAXXZ
 ??1task_group_context at tbb@@QEAA at XZ
 ?name at captured_exception@tbb@@UEBAPEBDXZ
 ?what at captured_exception@tbb@@UEBAPEBDXZ
 ??1captured_exception at tbb@@UEAA at XZ
+#endif /* __TBB_EXCEPTIONS */
 
 ; tbb_misc.cpp
 ?assertion_failure at tbb@@YAXPEBDH00 at Z
@@ -88,6 +94,7 @@ __TBB_machine_pause
 ?set_assertion_handler at tbb@@YAP6AXPEBDH00 at ZP6AX0H00@Z at Z
 ?runtime_warning at internal@tbb@@YAXPEBDZZ
 TBB_runtime_interface_version
+?throw_bad_last_alloc_exception_v4 at internal@tbb@@YAXXZ
 
 ; itt_notify.cpp
 ?itt_load_pointer_with_acquire_v3 at internal@tbb@@YAPEAXPEBX at Z
@@ -104,7 +111,11 @@ TBB_runtime_interface_version
 ?clear at pipeline@tbb@@QEAAXXZ
 ?inject_token at pipeline@tbb@@AEAAXAEAVtask at 2@@Z
 ?run at pipeline@tbb@@QEAAX_K at Z
+#if __TBB_EXCEPTIONS
 ?run at pipeline@tbb@@QEAAX_KAEAVtask_group_context at 2@@Z
+#endif
+?process_item at thread_bound_filter@tbb@@QEAA?AW4result_type at 12@XZ
+?try_process_item at thread_bound_filter@tbb@@QEAA?AW4result_type at 12@XZ
 
 ; queuing_rw_mutex.cpp
 ?internal_construct at queuing_rw_mutex@tbb@@QEAAXXZ
@@ -164,10 +175,10 @@ TBB_runtime_interface_version
 ?release at scoped_lock@queuing_mutex at tbb@@QEAAXXZ
 ?try_acquire at scoped_lock@queuing_mutex at tbb@@QEAA_NAEAV23@@Z
 
+#if !TBB_NO_LEGACY
 ; concurrent_hash_map.cpp
 ?internal_grow_predicate at hash_map_segment_base@internal at tbb@@QEBA_NXZ
 
-#if !TBB_NO_LEGACY
 ; concurrent_queue.cpp v2
 ??0concurrent_queue_base at internal@tbb@@IEAA at _K@Z
 ??0concurrent_queue_iterator_base at internal@tbb@@IEAA at AEBVconcurrent_queue_base@12@@Z
@@ -195,6 +206,7 @@ TBB_runtime_interface_version
 ?internal_pop at concurrent_queue_base_v3@internal at tbb@@IEAAXPEAX at Z
 ?internal_pop_if_present at concurrent_queue_base_v3@internal at tbb@@IEAA_NPEAX at Z
 ?internal_size at concurrent_queue_base_v3@internal at tbb@@IEBA_JXZ
+?internal_empty at concurrent_queue_base_v3@internal at tbb@@IEBA_NXZ
 ?internal_finish_clear at concurrent_queue_base_v3@internal at tbb@@IEAAXXZ
 ?internal_set_capacity at concurrent_queue_base_v3@internal at tbb@@IEAAX_J_K at Z
 ?internal_throw_exception at concurrent_queue_base_v3@internal at tbb@@IEBAXXZ
@@ -225,6 +237,8 @@ TBB_runtime_interface_version
 ?internal_compact at concurrent_vector_base_v3@internal at tbb@@IEAAPEAX_KPEAXP6AX10 at ZP6AX1PEBX0@Z at Z
 ?internal_swap at concurrent_vector_base_v3@internal at tbb@@IEAAXAEAV123@@Z
 ?internal_throw_exception at concurrent_vector_base_v3@internal at tbb@@IEBAX_K at Z
+?internal_resize at concurrent_vector_base_v3@internal at tbb@@IEAAX_K00PEBXP6AXPEAX0 at ZP6AX210@Z at Z
+?internal_grow_to_at_least_with_result at concurrent_vector_base_v3@internal at tbb@@IEAA_K_K0P6AXPEAXPEBX0 at Z2@Z
 
 ; tbb_thread
 ?allocate_closure_v3 at internal@tbb@@YAPEAX_K at Z
diff --git a/src/tbbmalloc/Customize.h b/src/tbbmalloc/Customize.h
index e9cb824..0723018 100644
--- a/src/tbbmalloc/Customize.h
+++ b/src/tbbmalloc/Customize.h
@@ -90,18 +90,26 @@ 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 );
+}
+
 inline intptr_t AtomicCompareExchange( volatile intptr_t& location, intptr_t new_value, intptr_t comparand) {
     return __TBB_CompareAndSwapW( &location, new_value, comparand );
 }
 
 #define USE_DEFAULT_MEMORY_MAPPING 1
 
-namespace tbb {
+namespace rml {
 namespace internal {
     void init_tbbmalloc();
 } } // namespaces
 
-#define MALLOC_EXTRA_INITIALIZATION tbb::internal::init_tbbmalloc()
+#define MALLOC_EXTRA_INITIALIZATION rml::internal::init_tbbmalloc()
 
 // To support malloc replacement with LD_PRELOAD
 #include "proxy.h"
diff --git a/src/tbbmalloc/LifoQueue.h b/src/tbbmalloc/LifoQueue.h
index 95cfd2b..9a81dd9 100644
--- a/src/tbbmalloc/LifoQueue.h
+++ b/src/tbbmalloc/LifoQueue.h
@@ -38,9 +38,9 @@
 #define FINE_GRAIN_LOCKS
 #endif
 
-namespace ThreadingSubstrate {
+namespace rml {
 
-namespace Internal {
+namespace internal {
 
 class LifoQueue {
 public:
@@ -90,8 +90,8 @@ done:
 
 #endif /* FINE_GRAIN_LOCKS     */
 
-} // namespace Internal
-} // namespace ThreadingSubstrate
+} // namespace internal
+} // namespace rml
 
 #endif /* _itt_common_malloc_LifoQueue_H_ */
 
diff --git a/src/tbbmalloc/MemoryAllocator.cpp b/src/tbbmalloc/MemoryAllocator.cpp
index 535c4f7..8e8fddc 100644
--- a/src/tbbmalloc/MemoryAllocator.cpp
+++ b/src/tbbmalloc/MemoryAllocator.cpp
@@ -26,7 +26,8 @@
     the GNU General Public License.
 */
 
-#include "TypeDefinitions.h"
+
+#include "TypeDefinitions.h" /* Also includes customization layer Customize.h */
 
 #if USE_PTHREAD
     // Some pthreads documentation says that <pthreads.h> must be first header.
@@ -54,6 +55,14 @@
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
+#if MALLOC_LD_PRELOAD 
+#include <new>        /* for placement new */
+#endif
+
+extern "C" {
+    void * scalable_malloc(size_t size);
+    void   scalable_free(void *object);
+}
 
 /********* Various compile-time options        **************/
 
@@ -72,7 +81,7 @@
 #define FINE_GRAIN_LOCKS
 #include "LifoQueue.h"
 
-#define COLLECT_STATISTICS 0
+#define COLLECT_STATISTICS MALLOC_DEBUG && defined(MALLOCENV_COLLECT_STATISTICS)
 #include "Statistics.h"
 
 #define FREELIST_NONBLOCKING 1
@@ -80,22 +89,15 @@
 // If USE_MALLOC_FOR_LARGE_OBJECT is nonzero, then large allocations are done via malloc.
 // Otherwise large allocations are done using the scalable allocator's block allocator.
 // As of 06.Jun.17, using malloc is about 10x faster on Linux.
+#if !_WIN32
 #define USE_MALLOC_FOR_LARGE_OBJECT 1
-
-extern "C" {
-    void * scalable_malloc(size_t size);
-    void   scalable_free(void *object);
-}
+#endif
 
 /********* End compile-time options        **************/
 
-#if MALLOC_LD_PRELOAD 
-#include <new> /* for placement new */
-#endif
-
-namespace ThreadingSubstrate {
+namespace rml {
 
-namespace Internal {
+namespace internal {
 
 /******* A helper class to support overriding malloc with scalable_malloc *******/
 #if MALLOC_LD_PRELOAD 
@@ -108,12 +110,12 @@ public:
     recursive_malloc_call_protector(bool condition) : lock_acquired(NULL) {
         if (condition) {
             lock_acquired = new (scoped_lock_space) MallocMutex::scoped_lock( rmc_mutex );
-            lockRecursiveMallocFlag();
+            rml::internal::lockRecursiveMallocFlag();
         }
     }
     ~recursive_malloc_call_protector() {
         if (lock_acquired) {
-            unlockRecursiveMallocFlag();
+            rml::internal::unlockRecursiveMallocFlag();
             lock_acquired->~scoped_lock();
         }
     }
@@ -171,15 +173,20 @@ static inline void  setThreadMallocTLS( void * newvalue ) {
 /*********** End code to provide thread ID and a TLS pointer **********/
 
 /*
- * This number of bins in the TLS that leads to blocks that we can allocate in.
+ * The identifier to make sure that memory is allocated by scalable_malloc.
  */
-const uint32_t numBlockBinLimit = 32;
+const uint64_t theMallocUniqueID=0xE3C7AF89A1E2D8C1ULL; 
 
 /*
- * The identifier to make sure that memory is allocated by scalable_malloc.
+ * This number of bins in the TLS that leads to blocks that we can allocate in.
  */
-const uint64_t theMallocUniqueID=0xE3C7AF89A1E2D8C1ULL; 
+const uint32_t numBlockBinLimit = 32;
 
+ /*
+  * The number of bins to cache large objects.
+  */
+const uint32_t numLargeObjectBins = 1024; // for 1024 max cached size is near 8MB
+ 
 /********* The data structures and global objects        **************/
 
 struct FreeObject {
@@ -236,13 +243,6 @@ struct Bin {
 };
 
 /*
- * The size of the TLS should be enough to hold twice as many as numBlockBinLimit pointers
- * the first sequence of pointers is for lists of blocks to allocate from
- * the second sequence is for lists of blocks that have non-empty publicFreeList
- */
-const uint32_t tlsSize = numBlockBinLimit * sizeof(Bin);
-
-/*
  * This is a LIFO linked list that one can init, push or pop from
  */
 static LifoQueue freeBlockList;
@@ -251,16 +251,64 @@ static LifoQueue freeBlockList;
  * When a block that is not completely free is returned for reuse by other threads
  * this is where the block goes.
  *
+ * LifoQueue assumes zero initialization; so below its constructors are omitted,
+ * to avoid linking with C++ libraries on Linux.
  */
-
 static char globalBinSpace[sizeof(LifoQueue)*numBlockBinLimit];
 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;
+    };
+
+    CachedObject *first,
+                 *last;
+    /* age of an oldest object in the list; equal to last->age, if last defined,
+       used for quick cheching it without acquiring the lock. */
+    uintptr_t     oldest;
+    /* currAge when something was excluded out of list because of the age,
+       not because of cache hit */
+    uintptr_t     lastCleanedAge;
+    /* Current threshold value for the objects of a particular size. 
+       Set on cache miss. */
+    uintptr_t     ageThreshold;
+
+    MallocMutex   lock;
+    /* CachedObjectsList should be placed in zero-initialized memory,
+       ctor not needed. */
+    CachedObjectsList();
+public:
+    inline void push(void *buf, uintptr_t currAge);
+    inline CachedObject* pop(uintptr_t currAge);
+    bool releaseLastIfOld(uintptr_t currAge, size_t size);
+};
+
+/*
+ * Array of bins with lists of recently freed objects cached for re-use.
+ */
+static char globalCachedObjectBinsSpace[sizeof(CachedObjectsList)*numLargeObjectBins];
+static CachedObjectsList* globalCachedObjectBins = (CachedObjectsList*)globalCachedObjectBinsSpace;
+
 /********* End of the data structures                    **************/
 
 /********** Various numeric parameters controlling allocations ********/
 
 /*
+ * The size of the TLS should be enough to hold numBlockBinLimit bins.
+ */
+const uint32_t tlsSize = numBlockBinLimit * sizeof(Bin);
+
+/*
  * blockSize - the size of a block, it must be larger than maxSegregatedObjectSize.
  *
  */
@@ -300,11 +348,35 @@ const uint32_t fittingSize5 = SET_FITTING_SIZE(2);
 #undef SET_FITTING_SIZE
 
 /*
+ * The total number of thread-specific Block-based bins
+ */
+const uint32_t numBlockBins = minFittingIndex+numFittingBins;
+
+/*
  * Objects of this size and larger are considered large objects.
  */
 const uint32_t minLargeObjectSize = fittingSize5 + 1;
 
-const uint32_t numBlockBins = minFittingIndex+numFittingBins;
+/*
+ * Difference between object sizes in large object bins
+ */
+const uint32_t largeObjectCacheStep = 8*1024;
+
+/*
+ * Object cache cleanup frequency.
+ * It should be power of 2 for the fast checking.
+ */
+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
@@ -358,6 +430,42 @@ static void* getMemory (size_t bytes)
     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)
+{
+    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 */
+        object = malloc(size);
+    return object;
+}
+
+static inline void freeRawMemory (void *object, size_t /*size*/)
+{
+#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 */
+        free(object);
+}
+
+#else /* USE_MALLOC_FOR_LARGE_OBJECT */
+
 static void returnMemory(void *area, size_t bytes)
 {
     int retcode = UnmapMemory(area, bytes);
@@ -369,6 +477,14 @@ static void returnMemory(void *area, size_t bytes)
     return;
 }
 
+static inline void* getRawMemory (size_t size) { return getMemory(size); }
+
+static inline void freeRawMemory (void *object, size_t size) {
+    returnMemory(object, size);
+}
+
+#endif /* USE_MALLOC_FOR_LARGE_OBJECT */
+
 /********* End memory acquisition code ********************************/
 
 /********* Now some rough utility code to deal with indexing the size bins. **************/
@@ -387,7 +503,7 @@ static inline unsigned int highestBitPos(unsigned int n)
     unsigned int pos;
 #if __ARCH_x86_32||__ARCH_x86_64
 
-# if __linux__||__APPLE__||__FreeBSD__ || __sun
+# if __linux__||__APPLE__||__FreeBSD__||__sun||__MINGW32__
     __asm__ ("bsr %1,%0" : "=r"(pos) : "r"(n));
 # elif (_WIN32 && (!_WIN64 || __INTEL_COMPILER))
     __asm
@@ -1103,7 +1219,7 @@ static void initMemoryManager()
     MALLOC_ASSERT( 2*blockHeaderAlignment == sizeof(Block), ASSERT_TEXT );
 
 // Create keys for thread-local storage and for thread id
-// TODO: add error handling
+// TODO: add error handling, and on error do something better than exit(1)
 #if USE_WINTHREAD
     TLS_pointer_key = TlsAlloc();
     Tid_key = TlsAlloc();
@@ -1111,10 +1227,14 @@ static void initMemoryManager()
     int status1 = pthread_key_create( &TLS_pointer_key, mallocThreadShutdownNotification );
     int status2 = pthread_key_create( &Tid_key, NULL );
     if ( status1 || status2 ) {
-        fprintf (stderr, "The memory manager cannot create tls key during initialisation; exiting \n");
+        fprintf (stderr, "The memory manager cannot create tls key during initialization; exiting \n");
         exit(1);
     }
 #endif /* USE_WINTHREAD */
+#if COLLECT_STATISTICS
+    initStatisticsCollection();
+#endif
+
     TRACEF(( "[ScalableMalloc trace] Asking for a mallocBigBlock\n" ));
     if (!mallocBigBlock()) {
         fprintf (stderr, "The memory manager cannot access sufficient memory to initialize; exiting \n");
@@ -1145,7 +1265,10 @@ static inline void checkInitialization()
 
 /********* End library initialization *************/
 
-/********* The malloc show          *************/
+/********* The malloc show begins     *************/
+
+
+/********* Allocation of large objects ************/
 
 /*
  * The program wants a large object that we are not prepared to deal with.
@@ -1162,73 +1285,195 @@ struct LargeObjectHeader {
     size_t       objectSize;        /* The size originally requested by a client */
 };
 
+void CachedObjectsList::push(void *buf, uintptr_t currAge)
+{   
+    CachedObject *ptr = (CachedObject*)buf;
+    ptr->prev = NULL;
+    ptr->age  = currAge;
+
+    MallocMutex::scoped_lock scoped_cs(lock);
+    ptr->next = first;
+    first = ptr;
+    if (ptr->next) ptr->next->prev = ptr;
+    if (!last) {
+        oldest = currAge;
+        last = ptr;
+    }
+}
+
+CachedObjectsList::CachedObject *CachedObjectsList::pop(uintptr_t currAge)
+{   
+    CachedObject *result=NULL;
+    {
+        MallocMutex::scoped_lock scoped_cs(lock);
+        if (first) {
+            result = first;
+            first = result->next;
+            if (first)  
+                first->prev = NULL;
+            else
+                last = NULL;
+        } else {
+            /* If cache miss occured, set ageThreshold to twice the difference 
+               between current time and last time cache was cleaned. */
+            ageThreshold = 2*(currAge - lastCleanedAge);
+        }
+    }
+    return result;
+}
+
+bool CachedObjectsList::releaseLastIfOld(uintptr_t currAge, size_t size)
+{
+    CachedObject *curr = 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);
+
+        if (last && (intptr_t)(currAge - last->age) > ageThreshold) {
+            curr = last;
+            lastCleanedAge = curr->age;
+            last = last->prev;
+            if (last) {
+                oldest = last->age;
+                last->next = NULL;
+            } else
+                first = NULL;
+        }
+    }
+    if (curr)
+        freeRawMemory(curr, size);
+    return curr;
+}
+
 /* A predicate checks whether an object starts on blockSize boundary */
 static inline unsigned int isLargeObject(void *object)
 {
     return isAligned(object, blockSize);
 }
 
-static inline void *mallocLargeObject (size_t size, size_t alignment)
+static uintptr_t cleanupCacheIfNeed ()
 {
-    void *alignedArea;
-    void *unalignedArea;
-    LargeObjectHeader *header;
+    /* loCacheStat.age overflow is OK, as we only want difference between 
+       its current value and some recent. */
+    uintptr_t currAge = AtomicIncrement(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; 
+             i--, objSize-=largeObjectCacheStep) {
+            /* cached object size on iteration is
+             * 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);
+            }
+        }
+    }
+    return currAge;
+}
 
-    // TODO: can the requestedSize be optimized somehow?
-    size_t requestedSize = size + sizeof(LargeObjectHeader) + alignment;
-#if USE_MALLOC_FOR_LARGE_OBJECT
-#if MALLOC_LD_PRELOAD
-    if (malloc_proxy) {
-        if ( original_malloc_found ){
-            unalignedArea = (*original_malloc_ptr)(requestedSize);
-        }else{
-            MALLOC_ASSERT( 0, ASSERT_TEXT );
-            return NULL;
+static void* allocateCachedLargeObject (size_t size)
+{
+    MALLOC_ASSERT( size%largeObjectCacheStep==0, ASSERT_TEXT );
+    void *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);
         }
-    } else
-#endif /* MALLOC_LD_PRELOAD */
-        unalignedArea = malloc(requestedSize);
-#else
-    unalignedArea = getMemory(requestedSize);
-#endif /* USE_MALLOC_FOR_LARGE_OBJECT */
+    }
+    return block;
+}
+
+static inline void* mallocLargeObject (size_t size, size_t alignment)
+{
+    size_t allocationSize = alignUp(size+sizeof(LargeObjectHeader)+alignment, 
+                                    largeObjectCacheStep);
+
+    void * unalignedArea  = allocateCachedLargeObject(allocationSize);
     if (!unalignedArea) {
-        /* We can't get any more memory from the OS or executive so return 0 */
-        return 0;
+        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);
     }
-    alignedArea = (void*) alignUp((uintptr_t)unalignedArea+sizeof(LargeObjectHeader),
-                                   alignment);
-    header = (LargeObjectHeader*) ((uintptr_t)alignedArea-sizeof(LargeObjectHeader));
+    void *alignedArea = (void*)alignUp((uintptr_t)unalignedArea+sizeof(LargeObjectHeader), alignment);
+    LargeObjectHeader *header = (LargeObjectHeader*)((uintptr_t)alignedArea-sizeof(LargeObjectHeader));
     header->unalignedResult = unalignedArea;
     header->mallocUniqueID=theMallocUniqueID;
-    header->unalignedSize = requestedSize;
+    header->unalignedSize = allocationSize;
     header->objectSize = size;
     MALLOC_ASSERT( isLargeObject(alignedArea), ASSERT_TEXT );
-    STAT_increment(getThreadId(), ThreadCommonCounters, allocLargeSize);
     return alignedArea;
 }
 
-static inline void freeLargeObject(void *object)
+/* 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;
+    size_t idx = (size-blockSize)/largeObjectCacheStep;
+    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);
+        }
+    }
+    return false;
+}
+
+static inline void freeLargeObject (void *object)
 {
     LargeObjectHeader *header;
-    STAT_increment(getThreadId(), ThreadCommonCounters, freeLargeSize);
     header = (LargeObjectHeader *)((uintptr_t)object - sizeof(LargeObjectHeader));
     header->mallocUniqueID = 0;
-#if USE_MALLOC_FOR_LARGE_OBJECT
-#if MALLOC_LD_PRELOAD
-    if (malloc_proxy) {
-        if ( original_malloc_found ){
-            original_free_ptr(header->unalignedResult);
-        }else{
-            MALLOC_ASSERT( 0, ASSERT_TEXT );
-        }
-    } else
-#endif /* MALLOC_LD_PRELOAD */
-        free(header->unalignedResult);
-#else
-    returnMemory(header->unalignedResult, header->unalignedSize);
-#endif /* USE_MALLOC_FOR_LARGE_OBJECT */
+    if (!freeLargeObjectToCache(header)) {
+        AtomicAdd(loCacheStat.memSize, -header->unalignedSize);
+        freeRawMemory(header->unalignedResult, header->unalignedSize);
+        STAT_increment(getThreadId(), ThreadCommonCounters, freeLargeObj);
+    }
 }
 
+/*********** End allocation of large objects **********/
+
+
 static FreeObject *allocateFromFreeList(Block *mallocBlock)
 {
     FreeObject *result;
@@ -1358,8 +1603,8 @@ static void *reallocAligned(void *ptr, size_t size, size_t alignment = 0)
             loh->objectSize = size;
             return ptr;
         } else {
-           copySize = loh->objectSize;
-           result = alignment ? allocateAligned(size, alignment) : scalable_malloc(size);
+            copySize = loh->objectSize;
+            result = alignment ? allocateAligned(size, alignment) : scalable_malloc(size);
         }
     } else {
         Block* block = (Block *)alignDown(ptr, blockSize);
@@ -1396,11 +1641,10 @@ static inline FreeObject *findAllocatedObject(const void *address, const Block *
     return (FreeObject*)((uintptr_t)address - (offset? block->objectSize-offset: 0));
 }
 
-} // namespace Internal
-} // namespace ThreadingSubstrate
+} // namespace internal
+} // namespace rml
 
-using namespace ThreadingSubstrate;
-using namespace ThreadingSubstrate::Internal;
+using namespace rml::internal;
 
 /*
  * When a thread is shutting down this routine should be called to remove all the thread ids
@@ -1645,6 +1889,27 @@ 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.
@@ -1655,9 +1920,11 @@ extern "C" void safer_scalable_free (void *object, void (*original_free)(void*))
         return;
 
     // Check if the memory was allocated by scalable_malloc
-    uint64_t id = isLargeObject(object)?
-                    ((LargeObjectHeader*)((uintptr_t)object-sizeof(LargeObjectHeader)))->mallocUniqueID:
-                    ((Block *)alignDown(object, blockSize))->mallocUniqueID;
+    uint64_t id =
+        safer_dereference( isLargeObject(object)?
+                           &((LargeObjectHeader*)((uintptr_t)object-sizeof(LargeObjectHeader)))->mallocUniqueID :
+                           &((Block *)alignDown(object, blockSize))->mallocUniqueID );
+
     if (id==theMallocUniqueID)
         scalable_free(object);
     else if (original_free)
@@ -1701,9 +1968,11 @@ extern "C" void* safer_scalable_realloc (void* ptr, size_t sz, void* (*original_
         return scalable_malloc(sz);
     }
     // 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;
+    uint64_t id =
+        safer_dereference( isLargeObject(ptr)?
+                           &((LargeObjectHeader*)((uintptr_t)ptr-sizeof(LargeObjectHeader)))->mallocUniqueID :
+                           &((Block *)alignDown(ptr, blockSize))->mallocUniqueID );
+
     if (id==theMallocUniqueID) {
         if (!sz) {
             scalable_free(ptr);
@@ -1762,7 +2031,8 @@ extern "C" void * scalable_aligned_malloc(size_t size, size_t alignment)
         return NULL;
     }
     void* tmp = allocateAligned(size, alignment);
-    if (!tmp) errno = ENOMEM;
+    if (!tmp) 
+        errno = ENOMEM;
     return tmp;
 }
 
@@ -1780,21 +2050,50 @@ extern "C" void * scalable_aligned_realloc(void *ptr, size_t size, size_t alignm
     uint64_t id = isLargeObject(ptr)?
                     ((LargeObjectHeader*)((uintptr_t)ptr-sizeof(LargeObjectHeader)))->mallocUniqueID:
                     ((Block *)alignDown(ptr, blockSize))->mallocUniqueID;
-    if (id!=theMallocUniqueID)
-        return NULL;
-
     if (!size) {
-        scalable_free(ptr);
+        if (id==theMallocUniqueID)
+            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 scalable_aligned_free(void *ptr)
 {
     scalable_free(ptr);
 }
 
 /********* end code for aligned allocation API **********/
+
+/********* Code for scalable_msize       ***********/
+
+/*
+ * Returns the size of a memory block allocated in the heap.
+ */
+extern "C" size_t scalable_msize(void* ptr)
+{
+    if (ptr) {
+        if (isLargeObject(ptr)) {
+            LargeObjectHeader* loh = (LargeObjectHeader*)((uintptr_t)ptr - sizeof(LargeObjectHeader));
+            if (loh->mallocUniqueID==theMallocUniqueID)
+                return loh->unalignedSize-((uintptr_t)ptr-(uintptr_t)loh->unalignedResult);
+        } else {
+            Block* block = (Block *)alignDown(ptr, blockSize);
+            if (block->mallocUniqueID==theMallocUniqueID)
+                return block->objectSize;
+        }
+    }
+    errno = EINVAL;
+    // Unlike _msize, return 0 in case of parameter error.
+    // Returning size_t(-1) looks more like the way to troubles.
+    return 0;
+}
+
+/********* End code for scalable_msize   ***********/
diff --git a/src/tbbmalloc/Statistics.h b/src/tbbmalloc/Statistics.h
index b18dd4d..6eeff1a 100644
--- a/src/tbbmalloc/Statistics.h
+++ b/src/tbbmalloc/Statistics.h
@@ -47,17 +47,21 @@ enum counter_type {
     MaxCounters
 };
 enum common_counter_type {
-    allocLargeSize = 0,
-    freeLargeSize,
+    allocNewLargeObj = 0,
+    allocCachedLargeObj,
+    cacheLargeObj,
+    freeLargeObj,
     lockPublicFreeList,
     freeToOtherThread
 };
 
 #if COLLECT_STATISTICS
-/* Statistics reporting callback registred via a static object dtor
+/* Statistics reporting callback registred via a static object dtor 
    on Posix or DLL_PROCESS_DETACH on Windows.
  */
 
+static bool reportAllocationStatistics;
+
 struct bin_counters {
     int counter[MaxCounters];
 };
@@ -66,17 +70,32 @@ static bin_counters statistic[MAX_THREADS][NUM_OF_BINS+1]; //zero-initialized;
 
 static inline int STAT_increment(int thread, int bin, int ctr)
 {
-    return thread < MAX_THREADS ? ++(statistic[thread][bin].counter[ctr]) : 0;
+    return reportAllocationStatistics && thread < MAX_THREADS ? ++(statistic[thread][bin].counter[ctr]) : 0;
 }
-#else
-#define STAT_increment(a,b,c) ((int)a)
+
+static inline void initStatisticsCollection() {
+#if defined(MALLOCENV_COLLECT_STATISTICS)
+    if (NULL != getenv(MALLOCENV_COLLECT_STATISTICS))
+        reportAllocationStatistics = true;
 #endif
+}
+
+#else
+#define STAT_increment(a,b,c) ((void)0)
+#endif /* COLLECT_STATISTICS */
 
 static inline void STAT_print(int thread)
 {
 #if COLLECT_STATISTICS
+    if (!reportAllocationStatistics)
+        return;
+
     char filename[100];
+#if USE_PTHREAD
+    sprintf(filename, "stat_ScalableMalloc_proc%04d_thr%04d.log", getpid(), thread);
+#else
     sprintf(filename, "stat_ScalableMalloc_thr%04d.log", thread);
+#endif
     FILE* outfile = fopen(filename, "w");
     for(int i=0; i<NUM_OF_BINS; ++i)
     {
@@ -105,12 +124,14 @@ static inline void STAT_print(int thread)
     }
     bin_counters& ctrs = statistic[thread][ThreadCommonCounters];
     fprintf(outfile, "Thr%04d common counters", thread);
-    fprintf(outfile, ": allocLargeObjects %5d", ctrs.counter[allocLargeSize]);
-    fprintf(outfile, ", freeLargeObjects %5d", ctrs.counter[freeLargeSize]);
+    fprintf(outfile, ": allocNewLargeObject %5d", ctrs.counter[allocNewLargeObj]);
+    fprintf(outfile, ": allocCachedLargeObject %5d", ctrs.counter[allocCachedLargeObj]);
+    fprintf(outfile, ", cacheLargeObject %5d", ctrs.counter[cacheLargeObj]);
+    fprintf(outfile, ", freeLargeObject %5d", ctrs.counter[freeLargeObj]);
     fprintf(outfile, ", lockPublicFreeList %5d", ctrs.counter[lockPublicFreeList]);
     fprintf(outfile, ", freeToOtherThread %10d", ctrs.counter[freeToOtherThread]);
     fprintf(outfile, "\n");
-    
+
     fclose(outfile);
 #endif
 }
diff --git a/src/tbbmalloc/TypeDefinitions.h b/src/tbbmalloc/TypeDefinitions.h
index 074f658..0fa9580 100644
--- a/src/tbbmalloc/TypeDefinitions.h
+++ b/src/tbbmalloc/TypeDefinitions.h
@@ -35,7 +35,7 @@
 #       define __ARCH_x86_64 1
 #   elif defined(_M_IA64)
 #       define __ARCH_ipf 1
-#   elif defined(_M_IX86)
+#   elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support
 #       define __ARCH_x86_32 1
 #   else
 #       error Unknown processor architecture for Windows
@@ -55,7 +55,7 @@
 #endif
 
 // Include files containing declarations of intptr_t and uintptr_t
-#if _WIN32
+#if _MSC_VER
 #include <stddef.h>
 typedef unsigned __int32 uint32_t;
 typedef unsigned __int64 uint64_t;
@@ -92,6 +92,9 @@ static inline bool isPowerOfTwoMultiple(uintptr_t arg, uintptr_t divisor) {
     return arg && (0==(arg & (arg-divisor)));
 }
 
+namespace rml {
+namespace internal {
+
 void lockRecursiveMallocFlag();
 void unlockRecursiveMallocFlag();
 
@@ -99,4 +102,6 @@ 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 66db63d..8613438 100644
--- a/src/tbbmalloc/lin-tbbmalloc-export.def
+++ b/src/tbbmalloc/lin-tbbmalloc-export.def
@@ -28,6 +28,7 @@
 
 {
 global:
+
 scalable_calloc;
 scalable_free;
 scalable_malloc;
@@ -41,5 +42,28 @@ __TBB_internal_free;
 __TBB_internal_malloc;
 __TBB_internal_realloc;
 __TBB_internal_posix_memalign;
-local:*;
+
+local:
+
+/* TBB symbols */
+*3rml8internal*;
+*3tbb*;
+*__TBB*;
+__itt_*;
+ITT_DoOneTimeInitialization;
+TBB_runtime_interface_version;
+
+/* Intel Compiler (libirc) symbols */
+__intel_*;
+_intel_*;
+get_memcpy_largest_cachelinesize;
+get_memcpy_largest_cache_size;
+get_mem_ops_method;
+init_mem_ops_method;
+irc__get_msg;
+irc__print;
+override_mem_ops_method;
+set_memcpy_largest_cachelinesize;
+set_memcpy_largest_cache_size;
+
 };
diff --git a/src/tbbmalloc/lin32-proxy-export.def b/src/tbbmalloc/lin32-proxy-export.def
index 39799c7..16411ce 100644
--- a/src/tbbmalloc/lin32-proxy-export.def
+++ b/src/tbbmalloc/lin32-proxy-export.def
@@ -48,5 +48,12 @@ _Znaj;
 _ZnajRKSt9nothrow_t;
 _Znwj;
 _ZnwjRKSt9nothrow_t;
-local:*;
+
+local:
+
+/* TBB symbols */
+*3rml8internal*;
+*3tbb*;
+*__TBB*;
+
 };
diff --git a/src/tbbmalloc/lin64-proxy-export.def b/src/tbbmalloc/lin64-proxy-export.def
index dc9ceb4..21a0f08 100644
--- a/src/tbbmalloc/lin64-proxy-export.def
+++ b/src/tbbmalloc/lin64-proxy-export.def
@@ -48,5 +48,12 @@ _Znam;
 _ZnamRKSt9nothrow_t;
 _Znwm;
 _ZnwmRKSt9nothrow_t;
-local:*;
+
+local:
+
+/* TBB symbols */
+*3rml8internal*;
+*3tbb*;
+*__TBB*;
+
 };
diff --git a/src/tbbmalloc/lin64ipf-proxy-export.def b/src/tbbmalloc/lin64ipf-proxy-export.def
index dc9ceb4..21a0f08 100644
--- a/src/tbbmalloc/lin64ipf-proxy-export.def
+++ b/src/tbbmalloc/lin64ipf-proxy-export.def
@@ -48,5 +48,12 @@ _Znam;
 _ZnamRKSt9nothrow_t;
 _Znwm;
 _ZnwmRKSt9nothrow_t;
-local:*;
+
+local:
+
+/* TBB symbols */
+*3rml8internal*;
+*3tbb*;
+*__TBB*;
+
 };
diff --git a/src/tbbmalloc/proxy.cpp b/src/tbbmalloc/proxy.cpp
index 4264fe4..455fb4e 100644
--- a/src/tbbmalloc/proxy.cpp
+++ b/src/tbbmalloc/proxy.cpp
@@ -177,3 +177,208 @@ void operator delete[](void* ptr, const std::nothrow_t&) throw() {
 }
 
 #endif /* MALLOC_LD_PRELOAD */
+
+
+#ifdef _WIN32
+#include <windows.h>
+
+#include <stdio.h>
+#include "tbb_function_replacement.h"
+
+#define HEAP_INIT_SIZE 0x100000
+#define HEAP_MAX_SIZE 0x1000000
+
+// Replace the CRT malloc with heap allocation, using my private heap
+HANDLE myHeap = 0;
+
+typedef struct PAGE_DB_t {
+    CRITICAL_SECTION cs;
+    DWORD alloc;
+    DWORD last;
+    LPVOID *db;
+} PAGE_DB;
+
+static PAGE_DB pageDB;
+
+extern "C" void safer_scalable_free( void *ptr, void*);
+extern "C" void* safer_scalable_realloc( void *ptr, size_t, void* );
+
+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 ***/
+
+#include <new>
+
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+#pragma warning( push )
+#pragma warning( disable : 4290 )
+#endif
+
+void * operator_new(size_t sz) throw (std::bad_alloc) {
+    void *res = scalable_malloc(sz);
+    if (NULL == res) throw std::bad_alloc();
+    return res;
+}
+void* operator_new_arr(size_t sz) throw (std::bad_alloc) {
+    void *res = scalable_malloc(sz);
+    if (NULL == res) throw std::bad_alloc();
+    return res;
+}
+void operator_delete(void* ptr) throw() {
+    safer_scalable_free2(ptr);
+}
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+#pragma warning( pop )
+#endif
+
+void operator_delete_arr(void* ptr) throw() {
+    safer_scalable_free2(ptr);
+}
+void* operator_new_t(size_t sz, const std::nothrow_t&) throw() {
+    return scalable_malloc(sz);
+}
+void* operator_new_arr_t(std::size_t sz, const std::nothrow_t&) throw() {
+    return scalable_malloc(sz);
+}
+void operator_delete_t(void* ptr, const std::nothrow_t&) throw() {
+    safer_scalable_free2(ptr);
+}
+void operator_delete_arr_t(void* ptr, const std::nothrow_t&) throw() {
+    safer_scalable_free2(ptr);
+}
+
+const char* modules_to_replace[] = {
+    "msvcr80d.dll",
+    "msvcr80.dll",
+    "msvcr90d.dll",
+    "msvcr90.dll",
+    "msvcr70d.dll",
+    "msvcr70.dll",
+    "msvcr71d.dll",
+    "msvcr71.dll",
+    };
+
+/*
+We need to replace following functions:
+malloc
+calloc
+realloc
+free
+_msize
+_aligned_malloc
+_aligned_realloc
+_aligned_free
+??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)  
+??_V at YAXPAX@Z     operator delete[]                    (ia32)
+??2 at YAPEAX_K@Z    void * operator new(unsigned __int64)   (intel64)
+??_V at YAXPEAX@Z    void * operator new[](unsigned __int64) (intel64)
+??3 at YAXPEAX@Z     operator delete                         (intel64)  
+??_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)
+*/
+
+typedef struct FRData_t {
+    //char *_module;
+    const char *_func;
+    FUNCPTR _fptr;
+    FRR_ON_ERROR _on_error;
+} FRDATA;
+
+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 },
+#if _WIN64
+    { "??2 at YAPEAX_K@Z", (FUNCPTR)operator_new, FRR_FAIL },
+    { "??_U at YAPEAX_K@Z", (FUNCPTR)operator_new_arr, FRR_FAIL },
+    { "??3 at YAXPEAX@Z", (FUNCPTR)operator_delete, FRR_FAIL },
+    { "??_V at YAXPEAX@Z", (FUNCPTR)operator_delete_arr, FRR_FAIL },
+#else 
+    { "??2 at YAPAXI@Z", (FUNCPTR)operator_new, FRR_FAIL },
+    { "??_U at YAPAXI@Z", (FUNCPTR)operator_new_arr, FRR_FAIL },
+    { "??3 at YAXPAX@Z", (FUNCPTR)operator_delete, FRR_FAIL },
+    { "??_V at YAXPAX@Z", (FUNCPTR)operator_delete_arr, FRR_FAIL },
+#endif
+    { "??2 at YAPAXIABUnothrow_t@std@@@Z", (FUNCPTR)operator_new_t, FRR_IGNORE },
+    { "??_U at YAPAXIABUnothrow_t@std@@@Z", (FUNCPTR)operator_new_arr_t, FRR_IGNORE }
+};
+
+// Initialize the malloc replacement data structures
+void initializeMallocReplacement()
+{
+    int i,j;
+    myHeap = HeapCreate(HEAP_NO_SERIALIZE, HEAP_INIT_SIZE, HEAP_MAX_SIZE);
+    if (myHeap == 0)
+    {
+        fprintf(stderr, "Can't create private heap\n");
+        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
+    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 );
+            if (type == FRR_NODLL) break;
+            if (type != FRR_OK && routines_to_replace[i]._on_error==FRR_FAIL)
+            {
+                fprintf(stderr, "Failed to replace function %s in module %s\n",
+                        routines_to_replace[i]._func, modules_to_replace[j]);
+                exit(1);
+            }
+        }
+
+}
+
+extern "C" BOOL WINAPI DllMain( HINSTANCE hInst, DWORD callReason, LPVOID reserved )
+{
+
+    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();
+        }
+#else
+    initializeMallocReplacement();
+#endif
+    }
+
+    return TRUE;
+}
+
+// Just to make the linker happy and link the DLL to the application
+extern "C" __declspec(dllexport) void __TBB_malloc_proxy()
+{
+
+}
+
+#endif //_WIN32
diff --git a/src/tbbmalloc/proxy.h b/src/tbbmalloc/proxy.h
index 15c25a9..67bd1bb 100644
--- a/src/tbbmalloc/proxy.h
+++ b/src/tbbmalloc/proxy.h
@@ -38,15 +38,16 @@
 extern "C" {
     void * scalable_malloc(size_t size);
     void * scalable_calloc(size_t nobj, size_t size);
-    void   scalable_free(void *object);
+    void   scalable_free(void *ptr);
     void * scalable_realloc(void* ptr, size_t size);
     void * scalable_aligned_malloc(size_t size, size_t alignment);
     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 * __TBB_internal_malloc(size_t size);
     void * __TBB_internal_calloc(size_t num, size_t size);
-    void   __TBB_internal_free(void *object);
+    void   __TBB_internal_free(void *ptr);
     void * __TBB_internal_realloc(void* ptr, size_t sz);
     int    __TBB_internal_posix_memalign(void **memptr, size_t alignment, size_t size);
     
diff --git a/src/tbbmalloc/tbb_function_replacement.cpp b/src/tbbmalloc/tbb_function_replacement.cpp
new file mode 100644
index 0000000..8b08d45
--- /dev/null
+++ b/src/tbbmalloc/tbb_function_replacement.cpp
@@ -0,0 +1,370 @@
+/*
+    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.
+*/
+
+//We works on windows only
+#ifdef _WIN32
+#define _CRT_SECURE_NO_DEPRECATE 1
+
+#include <windows.h>
+#include <new>
+#include "tbb_function_replacement.h"
+
+inline UINT_PTR Ptr2Addrint(LPVOID ptr)
+{
+    Int2Ptr i2p;
+    i2p.lpv = ptr;
+    return i2p.uip;
+}
+
+inline LPVOID Addrint2Ptr(UINT_PTR ptr)
+{
+    Int2Ptr i2p;
+    i2p.uip = 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)
+{
+    __int64 diff = addr1 - addr2;
+    if (diff < 0) diff = -diff;
+    return (diff < dist);
+}
+
+/*
+ * When inserting a probe in 64 bits process the distance between the insertion
+ * point and the target may be bigger than 2^32. In this case we are using 
+ * indirect jump through memory where the offset to this memory location
+ * is smaller than 2^32 and it contains the absolute address (8 bytes).
+ *
+ * This class is used to hold the pages used for the above trampolines.
+ * Since this utility will be used to replace malloc functions this implementation
+ * doesn't allocate memory dynamically.
+ *
+ * The struct MemoryBuffer holds the data about a page in the memory used for
+ * replacing functions in Intel64 where the target is too far to be replaced
+ * with a short jump. All the calculations of m_base and m_next are in a multiple
+ * of SIZE_OF_ADDRESS (which is 8 in Win64).
+ */
+class MemoryProvider {
+private:
+    struct MemoryBuffer {
+        UINT_PTR m_base;    // base address of the buffer
+        UINT_PTR m_next;    // next free location in the buffer
+        DWORD    m_size;    // size of buffer
+
+        // Default constructor
+        MemoryBuffer() : m_base(0), m_next(0), m_size(0) {}
+
+        // Constructor
+        MemoryBuffer(void *base, DWORD size)
+        {
+            m_base = Ptr2Addrint(base);
+            m_next = m_base;
+            m_size = size;
+        }
+    };
+
+MemoryBuffer *CreateBuffer(UINT_PTR addr)
+    {
+        // No more room in the pages database
+        if (m_lastBuffer - m_pages == MAX_NUM_BUFFERS)
+            return 0;
+
+        void *newAddr = Addrint2Ptr(addr);
+        // Get information for the region which the given address belongs to
+        MEMORY_BASIC_INFORMATION memInfo;
+        if (VirtualQuery(newAddr, &memInfo, sizeof(memInfo)) != sizeof(memInfo))
+            return 0;
+
+        for(;;) {
+            // The new address to check is beyond the current region and aligned to allocation size
+            newAddr = Addrint2Ptr( (Ptr2Addrint(memInfo.BaseAddress) + memInfo.RegionSize + m_allocSize) & ~(UINT_PTR)(m_allocSize-1) );
+
+            // Check that the address is in the right distance.
+            // VirtualAlloc can only round the address down; so it will remain in the right distance
+            if (!IsInDistance(addr, Ptr2Addrint(newAddr), MAX_DISTANCE))
+                break;
+
+            if (VirtualQuery(newAddr, &memInfo, sizeof(memInfo)) != sizeof(memInfo))
+                break;
+
+            if (memInfo.State == MEM_FREE && memInfo.RegionSize >= m_allocSize)
+            {
+                // Found a free region, try to allocate a page in this region
+                void *newPage = VirtualAlloc(newAddr, m_allocSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
+                if (!newPage)
+                    break;
+
+                // Add the new page to the pages database
+                MemoryBuffer *pBuff = new (m_lastBuffer) MemoryBuffer(newPage, m_allocSize);
+                ++m_lastBuffer;
+                return pBuff;
+            }
+        }
+
+        // Failed to find a buffer in the distance
+        return 0;
+    }
+
+public:
+    MemoryProvider() 
+    { 
+        SYSTEM_INFO sysInfo;
+        GetSystemInfo(&sysInfo);
+        m_allocSize = sysInfo.dwAllocationGranularity; 
+        m_lastBuffer = &m_pages[0];
+    }
+
+    // We can't free the pages in the destructor because the trampolines
+    // are using these memory locations and a replaced function might be called
+    // after the destructor was called.
+    ~MemoryProvider() 
+    {
+    }
+
+    // Return a memory location in distance less than 2^31 from input address 
+    UINT_PTR GetLocation(UINT_PTR addr)
+    {
+        MemoryBuffer *pBuff = m_pages;
+        for (; pBuff<m_lastBuffer && IsInDistance(pBuff->m_base, 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;
+                return loc;
+            }
+        }
+
+        pBuff = CreateBuffer(addr);
+        if(!pBuff)
+            return 0;
+
+        UINT_PTR loc = pBuff->m_next;
+        pBuff->m_next += SIZE_OF_ADDRESS;
+        return loc;
+    }
+
+private:
+    MemoryBuffer m_pages[MAX_NUM_BUFFERS];
+    MemoryBuffer *m_lastBuffer;
+    DWORD m_allocSize;
+};
+
+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)
+{
+    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));
+    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)
+{
+    UINT_PTR srcAddr = Ptr2Addrint(inpAddr);
+    UINT_PTR tgtAddr = Ptr2Addrint(targetAddr);
+
+    // Get a location close to the source address
+    UINT_PTR location = memProvider.GetLocation(srcAddr);
+    if (!location)
+        return 0;
+
+    UINT_PTR offset = location - srcAddr - SIZE_OF_INDJUMP;
+    UINT offset32 = (INT)(offset & 0xFFFFFFFF);
+
+    // Fill the location
+    UINT_PTR *locPtr = (UINT_PTR *)Addrint2Ptr(location);
+    *locPtr = tgtAddr;
+
+    // Fill the buffer
+    UCHAR *codePtr = (UCHAR *)inpAddr;
+    *codePtr++ = 0xFF;
+    *codePtr++ = 0x25;
+    memcpy(codePtr, &offset32, sizeof(offset32));
+    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)
+{
+    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);
+    if (!probeSize)
+        probeSize = InsertTrampoline64(inpAddr, targetAddr);
+
+    // Restore original protection
+    VirtualProtect(inpAddr, MAX_PROBE_SIZE, origProt, &origProt);
+
+    if (!probeSize)
+        return FALSE;
+
+    FlushInstructionCache(GetCurrentProcess(), inpAddr, probeSize);
+    return TRUE;
+}
+
+FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc)
+{
+    // Cache the results of the last search for the module
+    // Assume that there was no DLL unload between 
+    static char cachedName[MAX_PATH+1];
+    static HMODULE cachedHM = 0;
+
+    if (!dllName || !*dllName)
+        return FRR_NODLL;
+
+    if (!cachedHM || strncmp(dllName, cachedName, MAX_PATH) != 0)
+    {
+        // Find the module handle for the input dll
+        HMODULE hModule = GetModuleHandleA(dllName);
+        if (hModule == 0)
+        {
+            // Couldn't find the module with the input name
+            cachedHM = 0;
+            return FRR_NODLL;
+        }
+
+        cachedHM = hModule;
+        strncpy(cachedName, dllName, MAX_PATH);
+    }
+
+    FARPROC inpFunc = GetProcAddress(cachedHM, funcName);
+    if (inpFunc == 0)
+    {
+        // Function was not found
+        return FRR_NOFUNC;
+    }
+
+    if (!InsertTrampoline((void*)inpFunc, (void*)newFunc))
+    {
+        // Failed to insert the trampoline to the target address
+        return FRR_FAILED;
+    }
+
+    return FRR_OK;
+}
+
+FRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc)
+{
+    // Cache the results of the last search for the module
+    // Assume that there was no DLL unload between 
+    static wchar_t cachedName[MAX_PATH+1];
+    static HMODULE cachedHM = 0;
+
+    if (!dllName || !*dllName)
+        return FRR_NODLL;
+
+    if (!cachedHM || wcsncmp(dllName, cachedName, MAX_PATH) != 0)
+    {
+        // Find the module handle for the input dll
+        HMODULE hModule = GetModuleHandleW(dllName);
+        if (hModule == 0)
+        {
+            // Couldn't find the module with the input name
+            cachedHM = 0;
+            return FRR_NODLL;
+        }
+
+        cachedHM = hModule;
+        wcsncpy(cachedName, dllName, MAX_PATH);
+    }
+
+    FARPROC inpFunc = GetProcAddress(cachedHM, funcName);
+    if (inpFunc == 0)
+    {
+        // Function was not found
+        return FRR_NOFUNC;
+    }
+
+    if (!InsertTrampoline((void*)inpFunc, (void*)newFunc))
+    {
+        // Failed to insert the trampoline to the target address
+        return FRR_FAILED;
+    }
+
+    return FRR_OK;
+}
+
+#endif //_WIN32
diff --git a/src/tbb/concurrent_hash_map.cpp b/src/tbbmalloc/tbb_function_replacement.h
similarity index 58%
copy from src/tbb/concurrent_hash_map.cpp
copy to src/tbbmalloc/tbb_function_replacement.h
index 4d476c6..90d1eef 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/src/tbbmalloc/tbb_function_replacement.h
@@ -26,20 +26,39 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#ifndef __TBB_function_replacement_H
+#define __TBB_function_replacement_H
 
-namespace tbb {
+typedef enum {
+    FRR_OK,     /* Succeeded in replacing the function */
+    FRR_NODLL,  /* The requested DLL was not found */
+    FRR_NOFUNC, /* The requested function was not found */
+    FRR_FAILED, /* The function replacement request failed */
+} FRR_TYPE;
 
-namespace internal {
+typedef enum {
+    FRR_FAIL,     /* Required function */
+    FRR_IGNORE,   /* optional function */
+} FRR_ON_ERROR;
 
-bool hash_map_segment_base::internal_grow_predicate() const {
-    // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the 
-    // library so that Intel(R) Thread Checker will ignore them.  The reads are used in a double-check
-    // context, so the program is nonetheless correct despite the race.
-    return my_logical_size >= my_physical_size && my_physical_size < internal::hash_map_base::max_physical_size;
-}
+typedef void (*FUNCPTR)();
 
-} // namespace internal
+#ifndef UNICODE
+#define ReplaceFunction ReplaceFunctionA
+#else
+#define ReplaceFunction ReplaceFunctionW
+#endif //UNICODE
 
-} // namespace tbb
+FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc);
+FRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc);
 
+// Utilities to convert between ADDRESS and LPVOID
+union Int2Ptr {
+    UINT_PTR uip;
+    LPVOID lpv;
+};
+
+inline UINT_PTR Ptr2Addrint(LPVOID ptr);
+inline LPVOID Addrint2Ptr(UINT_PTR ptr);
+
+#endif //__TBB_function_replacement_H
diff --git a/src/tbbmalloc/tbbmalloc.cpp b/src/tbbmalloc/tbbmalloc.cpp
index 02a9a11..d742e48 100644
--- a/src/tbbmalloc/tbbmalloc.cpp
+++ b/src/tbbmalloc/tbbmalloc.cpp
@@ -26,10 +26,8 @@
     the GNU General Public License.
 */
 
-#define INSTANTIATE_ITT_NOTIFY 1
 #include "TypeDefinitions.h" // Customize.h and proxy.h get included
 
-#define ITT_DoOneTimeInitialization __TBB_malloc_ITT_DoOneTimeInitialization_stub
 #include "tbb/itt_notify.cpp"
 
 #if MALLOC_LD_PRELOAD
@@ -53,6 +51,13 @@ bool __TBB_internal_find_original_malloc(int num, const char *names[], void *tab
 
 #define malloc_proxy __TBB_malloc_proxy
 
+#endif /* MALLOC_LD_PRELOAD */
+
+namespace rml {
+namespace internal {
+
+#if MALLOC_LD_PRELOAD
+
 void* (*original_malloc_ptr)(size_t) = 0;
 void  (*original_free_ptr)(void*) = 0;
 static void* (*original_calloc_ptr)(size_t,size_t) = 0;
@@ -60,24 +65,28 @@ static void* (*original_realloc_ptr)(void*,size_t) = 0;
 
 #endif /* MALLOC_LD_PRELOAD */
 
-namespace tbb {
-namespace internal {
-
+#if __TBB_NEW_ITT_NOTIFY
+extern "C" 
+#endif
 void ITT_DoOneTimeInitialization() {} // required for itt_notify.cpp to work
 
 #if DO_ITT_NOTIFY
 /** Caller is responsible for ensuring this routine is called exactly once. */
 void MallocInitializeITT() {
+#if __TBB_NEW_ITT_NOTIFY
+    tbb::internal::__TBB_load_ittnotify();
+#else
     bool success = false;
     // Check if we are running under control of VTune.
     if( GetBoolEnvironmentVariable("KMP_FOR_TCHECK") || GetBoolEnvironmentVariable("KMP_FOR_TPROFILE") ) {
         // Yes, we are under control of VTune.  Check for libittnotify library.
-        success = FillDynamicLinks( LIBITTNOTIFY_NAME, ITT_HandlerTable, 5 );
+        success = dynamic_link( LIBITTNOTIFY_NAME, ITT_HandlerTable, 5 );
     }
     if (!success){
         for (int i = 0; i < 5; i++)
             *ITT_HandlerTable[i].handler = NULL;
     }
+#endif /* !__TBB_NEW_ITT_NOTIFY */
 }
 #endif /* DO_ITT_NOTIFY */
 
@@ -102,6 +111,7 @@ void init_tbbmalloc() {
         }
     }
 #endif /* MALLOC_LD_PRELOAD */
+
 #if DO_ITT_NOTIFY
     MallocInitializeITT();
 #endif
@@ -117,27 +127,6 @@ struct RegisterProcessShutdownNotification {
 static RegisterProcessShutdownNotification reg;
 #endif
 
-} } // namespaces
-
-#ifdef _WIN32
-#include <windows.h>
-
-BOOL WINAPI DllMain( HINSTANCE hInst, DWORD callReason, LPVOID )
-{
-
-    if (callReason==DLL_THREAD_DETACH)
-    {
-        mallocThreadShutdownNotification(NULL);
-    }
-    else if (callReason==DLL_PROCESS_DETACH)
-    {
-        mallocProcessShutdownNotification();
-    }
-    return TRUE;
-}
-
-#endif //_WIN32
-
 #if MALLOC_LD_PRELOAD
 
 bool  original_malloc_found;
@@ -217,3 +206,25 @@ void __TBB_internal_free(void *object)
 } /* extern "C" */
 
 #endif /* MALLOC_LD_PRELOAD */
+
+} } // namespaces
+
+#ifdef _WIN32
+#include <windows.h>
+
+extern "C" BOOL WINAPI DllMain( HINSTANCE hInst, DWORD callReason, LPVOID )
+{
+
+    if (callReason==DLL_THREAD_DETACH)
+    {
+        mallocThreadShutdownNotification(NULL);
+    }
+    else if (callReason==DLL_PROCESS_DETACH)
+    {
+        mallocProcessShutdownNotification();
+    }
+    return TRUE;
+}
+
+#endif //_WIN32
+
diff --git a/src/tbbmalloc/tbbmalloc.rc b/src/tbbmalloc/tbbmalloc.rc
index 0bce7f2..389ac7c 100644
--- a/src/tbbmalloc/tbbmalloc.rc
+++ b/src/tbbmalloc/tbbmalloc.rc
@@ -45,7 +45,7 @@
 #define ENDL "\r\n"
 #include "tbb/tbb_version.h"
 
-#define TBBMALLOC_VERNUMBERS 1, 0, __TBB_VERSION_YMD
+#define TBBMALLOC_VERNUMBERS TBB_VERSION_MAJOR, TBB_VERSION_MINOR, __TBB_VERSION_YMD
 #define TBBMALLOC_VERSION __TBB_STRING(TBBMALLOC_VERNUMBERS)
 
 /////////////////////////////////////////////////////////////////////////////
diff --git a/src/tbbmalloc/win-gcc-tbbmalloc-export.def b/src/tbbmalloc/win-gcc-tbbmalloc-export.def
new file mode 100644
index 0000000..afefd89
--- /dev/null
+++ b/src/tbbmalloc/win-gcc-tbbmalloc-export.def
@@ -0,0 +1,34 @@
+/*
+    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
+
+    The source code contained or described herein and all documents related
+    to the source code ("Material") are owned by Intel Corporation or its
+    suppliers or licensors.  Title to the Material remains with Intel
+    Corporation or its suppliers and licensors.  The Material is protected
+    by worldwide copyright laws and treaty provisions.  No part of the
+    Material may be used, copied, reproduced, modified, published, uploaded,
+    posted, transmitted, distributed, or disclosed in any way without
+    Intel's prior express written permission.
+
+    No license under any patent, copyright, trade secret or other
+    intellectual property right is granted to or conferred upon you by
+    disclosure or delivery of the Materials, either expressly, by
+    implication, inducement, estoppel or otherwise.  Any license under such
+    intellectual property rights must be express and approved by Intel in
+    writing.
+*/
+
+{
+global:
+scalable_calloc;
+scalable_free;
+scalable_malloc;
+scalable_realloc;
+scalable_posix_memalign;
+scalable_aligned_malloc;
+scalable_aligned_realloc;
+scalable_aligned_free;
+safer_scalable_free;
+safer_scalable_realloc;
+local:*;
+};
diff --git a/src/tbbmalloc/win32-tbbmalloc-export.def b/src/tbbmalloc/win32-tbbmalloc-export.def
index 3697e52..a048103 100644
--- a/src/tbbmalloc/win32-tbbmalloc-export.def
+++ b/src/tbbmalloc/win32-tbbmalloc-export.def
@@ -35,3 +35,6 @@ scalable_posix_memalign
 scalable_aligned_malloc
 scalable_aligned_realloc
 scalable_aligned_free
+safer_scalable_free
+safer_scalable_realloc
+scalable_msize
diff --git a/src/tbbmalloc/win64-tbbmalloc-export.def b/src/tbbmalloc/win64-tbbmalloc-export.def
index 3697e52..a048103 100644
--- a/src/tbbmalloc/win64-tbbmalloc-export.def
+++ b/src/tbbmalloc/win64-tbbmalloc-export.def
@@ -35,3 +35,6 @@ scalable_posix_memalign
 scalable_aligned_malloc
 scalable_aligned_realloc
 scalable_aligned_free
+safer_scalable_free
+safer_scalable_realloc
+scalable_msize
diff --git a/src/test/harness.h b/src/test/harness.h
index 603eca9..00dcc5f 100644
--- a/src/test/harness.h
+++ b/src/test/harness.h
@@ -31,6 +31,11 @@
 // Every test is presumed to have a command line of the form "foo [-v] [nthread]"
 // The default for nthread is 2.
 
+#ifndef tbb_tests_harness_H
+#define tbb_tests_harness_H
+
+#define __TBB_LAMBDAS_PRESENT  ( _MSC_VER >= 1600 && !__INTEL_COMPILER || __INTEL_COMPILER >= 1100 && _TBB_CPP0X )
+
 #if __SUNPRO_CC
 #include <stdio.h>
 #include <stdlib.h>
@@ -56,20 +61,31 @@
 #if !HARNESS_NO_ASSERT
 #include "harness_assert.h"
 
-static void ReportError( int line, const char* expression, const char * message, bool is_error ) {
-    if ( is_error ) {
-        printf("Line %d, assertion %s: %s\n", line, expression, message ? message : "failed" );
+typedef void (*test_error_extra_t)(void);
+static test_error_extra_t ErrorExtraCall; 
+//! Set additional handler to process failed assertions
+void SetHarnessErrorProcessing( test_error_extra_t extra_call ) {
+    ErrorExtraCall = extra_call;
+    // TODO: add tbb::set_assertion_handler(ReportError);
+}
+//! Reports errors issued by failed assertions
+void ReportError( const char* filename, int line, const char* expression, const char * message ) {
+    printf("%s:%d, assertion %s: %s\n", filename, line, expression, message ? message : "failed" );
+    if( ErrorExtraCall )
+        (*ErrorExtraCall)();
 #if TBB_EXIT_ON_ASSERT
-        exit(1);
+    exit(1);
 #else
-        abort();
+    abort();
 #endif /* TBB_EXIT_ON_ASSERT */
-    }
-    else
-        printf("Warning: at line %d, assertion %s: %s\n", line, expression, message ? message : "failed" );
+}
+//! 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" );
 }
 #else
-#define ASSERT(x,y) ((void)0)
+#define ASSERT(p,msg) ((void)0)
+#define ASSERT_WARNING(p,msg) ((void)0)
 #endif /* HARNESS_NO_ASSERT */
 
 #if !HARNESS_NO_PARSE_COMMAND_LINE
@@ -165,8 +181,26 @@ public:
     #pragma warning (push)
     #pragma warning (disable: 2193)
 #endif /* __ICC==1100 */
-        int status = pthread_create(&thread_id, NULL, thread_function, this);
+        // Some machines may have very large hard stack limit. When the test is 
+        // launched by make, the default stack size is set to the hard limit, and 
+        // calls to pthread_create fail with out-of-memory error. 
+        // Therefore we set the stack size explicitly (as for TBB worker threads).
+        const size_t MByte = 1<<20;
+#if __i386__||__i386
+        const size_t stack_size = 1*MByte;
+#elif __x86_64__
+        const size_t stack_size = 2*MByte;
+#else
+        const size_t stack_size = 4*MByte;
+#endif
+        pthread_attr_t attr_stack;
+        int status = pthread_attr_init(&attr_stack);
+        ASSERT(0==status, "NativeParallelFor: pthread_attr_init failed");
+        status = pthread_attr_setstacksize( &attr_stack, stack_size );
+        ASSERT(0==status, "NativeParallelFor: pthread_attr_setstacksize failed");
+        status = pthread_create(&thread_id, &attr_stack, thread_function, this);
         ASSERT(0==status, "NativeParallelFor: pthread_create failed");
+        pthread_attr_destroy(&attr_stack);
 #if __ICC==1100
     #pragma warning (pop)
 #endif
@@ -205,13 +239,21 @@ private:
 #endif
     {
         NativeParallelForTask& self = *static_cast<NativeParallelForTask*>(object);
+#if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)
+        try {
+            (self.body)(self.index);
+        } catch(...) {
+            ASSERT( false, "uncaught exception" );
+        }
+#else
         (self.body)(self.index);
+#endif// exceptions are enabled
         return 0;
     }
 };
 
 //! Execute body(i) in parallel for i in the interval [0,n).
-/** Each iteartion is performed by a separate thread. */
+/** Each iteration is performed by a separate thread. */
 template<typename Index, typename Body>
 void NativeParallelFor( Index n, const Body& body ) {
     typedef NativeParallelForTask<Index,Body> task;
@@ -251,7 +293,7 @@ void zero_fill(void* array, size_t N) {
         In case operands cause signed/unsigned or size mismatch warnings it is caller's
         responsibility to do the appropriate cast before calling the function. **/
     template<typename T1, typename T2>
-    const T1& min ( const T1& val1, const T2& val2 ) {
+    T1 min ( const T1& val1, const T2& val2 ) {
         return val1 < val2 ? val1 : val2;
     }
 #endif /* !min */
@@ -262,7 +304,7 @@ void zero_fill(void* array, size_t N) {
         In case operands cause signed/unsigned or size mismatch warnings it is caller's
         responsibility to do the appropriate cast before calling the function. **/
     template<typename T1, typename T2>
-    const T1& max ( const T1& val1, const T2& val2 ) {
+    T1 max ( const T1& val1, const T2& val2 ) {
         return val1 < val2 ? val2 : val1;
     }
 #endif /* !max */
@@ -272,7 +314,7 @@ inline unsigned LinuxKernelVersion()
 {
     unsigned a, b, c;
     struct utsname utsnameBuf;
-
+    
     if (-1 == uname(&utsnameBuf)) {
         printf("Can't call uname: errno %d\n", errno);
         exit(1);
@@ -284,3 +326,51 @@ inline unsigned LinuxKernelVersion()
     return 1000000*a+1000*b+c;
 }
 #endif
+
+namespace Harness {
+
+#if !HARNESS_NO_ASSERT
+//! Base class that asserts that no operations are made with the object after its destruction.
+class NoAfterlife {
+protected:
+    enum state_t {
+        LIVE=0x56781234,
+        DEAD=0xDEADBEEF
+    } m_state;
+
+public:
+    NoAfterlife() : m_state(LIVE) {}
+    NoAfterlife( const NoAfterlife& src ) : m_state(LIVE) {
+        ASSERT( src.IsLive(), "Constructing from the dead source" );
+    }
+    ~NoAfterlife() {
+        ASSERT( IsLive(), "Repeated destructor call" );
+        m_state = DEAD;
+    }
+    const NoAfterlife& operator=( const NoAfterlife& src ) {
+        ASSERT( IsLive(), NULL );
+        ASSERT( src.IsLive(), NULL );
+        return *this;
+    }
+    void AssertLive() const {
+        ASSERT( IsLive(), "Already dead" );
+    }
+    bool IsLive() const {
+        return m_state == LIVE;
+    }
+}; // NoAfterlife
+#endif /* !HARNESS_NO_ASSERT */
+
+#if _WIN32 || _WIN64
+    void Sleep ( int ms ) { ::Sleep(ms); }
+#else /* !WIN */
+    void Sleep ( int ms ) {
+        timespec  requested = { ms / 1000, (ms % 1000)*1000000 };
+        timespec  remaining = {0};
+        nanosleep(&requested, &remaining);
+    }
+#endif /* !WIN */
+
+} // namespace Harness
+
+#endif /* tbb_tests_harness_H */
diff --git a/src/test/harness_assert.h b/src/test/harness_assert.h
index 1605330..bc21edb 100644
--- a/src/test/harness_assert.h
+++ b/src/test/harness_assert.h
@@ -35,10 +35,11 @@
 #ifndef harness_assert_H
 #define harness_assert_H
 
-static void ReportError( int line, const char* expression, const char* message, bool is_error = true ); 
+void ReportError( const char* filename, int line, const char* expression, const char* message); 
+void ReportWarning( const char* filename, int line, const char* expression, const char* message); 
 
-#define ASSERT(p,message) ((p)?(void)0:ReportError(__LINE__,#p,message))
-#define ASSERT_WARNING(p,message) ((p)?(void)0:ReportError(__LINE__,#p,message, false))
+#define ASSERT(p,message) ((p)?(void)0:ReportError(__FILE__,__LINE__,#p,message))
+#define ASSERT_WARNING(p,message) ((p)?(void)0:ReportWarning(__FILE__,__LINE__,#p,message))
 
 //! Compile-time error if x and y have different types
 template<typename T>
diff --git a/src/test/harness_barrier.h b/src/test/harness_barrier.h
new file mode 100644
index 0000000..cbb6dd1
--- /dev/null
+++ b/src/test/harness_barrier.h
@@ -0,0 +1,84 @@
+/*
+    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 "tbb/atomic.h"
+
+#ifndef harness_barrier_H
+#define harness_barrier_H
+
+namespace Harness {
+
+class SpinBarrier
+{
+    unsigned numThreads;
+    tbb::atomic<unsigned> numThreadsFinished; /* threads reached barrier in this epoch */
+    tbb::atomic<unsigned> epoch;   /* how many times this barrier used - XXX move to a separate cache line */
+
+    struct DummyCallback {
+        void operator() () const {}
+    };
+
+    SpinBarrier( const SpinBarrier& );    // no copy ctor
+    void operator=( const SpinBarrier& ); // no assignment 
+public:
+    SpinBarrier( unsigned nthreads = 0 ) { initialize(nthreads); };
+
+    void initialize( unsigned nthreads ) {
+        numThreads = nthreads;
+        numThreadsFinished = 0;
+        epoch = 0;
+    };
+
+    // onOpenBarrierCallback is called by last thread arrived on a barrier
+    template<typename Callback>
+    bool wait(const Callback &onOpenBarrierCallback)
+    { // return true if last thread
+        unsigned myEpoch = epoch;
+        int threadsLeft = numThreads - numThreadsFinished.fetch_and_increment() - 1;
+        ASSERT(threadsLeft>=0, "Broken barrier");
+        if (threadsLeft > 0) {
+            /* not the last threading reaching barrier, wait until epoch changes & return 0 */
+            tbb::internal::spin_wait_while_eq(epoch, myEpoch);
+            return false;
+        }
+        /* No more threads left to enter, so I'm the last one reaching this epoch;
+           reset the barrier, increment epoch, and return non-zero */
+        onOpenBarrierCallback();
+        numThreadsFinished = 0;
+        epoch = myEpoch+1; /* wakes up threads waiting to exit this epoch */
+        return true;
+    }
+    bool wait()
+    {
+        return wait(DummyCallback());
+    }
+};
+
+}
+
+#endif //harness_barrier_H
diff --git a/src/test/harness_concurrency_tracker.h b/src/test/harness_concurrency_tracker.h
new file mode 100644
index 0000000..61caede
--- /dev/null
+++ b/src/test/harness_concurrency_tracker.h
@@ -0,0 +1,85 @@
+/*
+    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_tests_harness_concurrency_tracker_H
+#define tbb_tests_harness_concurrency_tracker_H
+
+#include "harness.h"
+#include "tbb/atomic.h"
+#include "../tbb/tls.h"
+
+namespace Harness {
+
+static tbb::atomic<unsigned> ctInstantParallelism;
+static tbb::atomic<unsigned> ctPeakParallelism;
+static tbb::internal::tls<uintptr_t>  ctNested;
+
+class ConcurrencyTracker {
+    bool    m_Outer;
+
+    static void Started () {
+        unsigned p = ++ctInstantParallelism;
+        unsigned q = ctPeakParallelism;
+        while( q<p ) {
+            q = ctPeakParallelism.compare_and_swap(p,q);
+        }
+    }
+
+    static void Stopped () {
+        ASSERT ( ctInstantParallelism > 0, "Mismatched call to ConcurrencyTracker::Stopped()" );
+        --ctInstantParallelism;
+    }
+public:
+    ConcurrencyTracker() : m_Outer(false) {
+        uintptr_t nested = ctNested;
+        ASSERT (nested == 0 || nested == 1, NULL);
+        if ( !ctNested ) {
+            Started();
+            m_Outer = true;
+            ctNested = 1;
+        }
+    }
+    ~ConcurrencyTracker() {
+        if ( m_Outer ) {
+            Stopped();
+            ctNested = 0;
+        }
+    }
+
+    static unsigned PeakParallelism() { return ctPeakParallelism; }
+    static unsigned InstantParallelism() { return ctInstantParallelism; }
+
+    static void Reset() {
+        ASSERT (ctInstantParallelism == 0, "Reset cannot be called when concurrency tracking is underway");
+        ctInstantParallelism = ctPeakParallelism = 0;
+    }
+}; // ConcurrencyTracker
+
+} // namespace Harness
+
+#endif /* tbb_tests_harness_concurrency_tracker_H */
diff --git a/src/test/harness_eh.h b/src/test/harness_eh.h
new file mode 100644
index 0000000..9eece9b
--- /dev/null
+++ b/src/test/harness_eh.h
@@ -0,0 +1,210 @@
+/*
+    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 <typeinfo>
+#include "tbb/atomic.h"
+#include "harness.h"
+#include "harness_trace.h"
+#include "harness_concurrency_tracker.h"
+
+namespace Harness {
+#if _WIN32 || _WIN64
+    typedef DWORD tid_t;
+    tid_t CurrentTid () { return GetCurrentThreadId(); }
+#else /* !WIN */
+    typedef pthread_t tid_t;
+    tid_t CurrentTid () { return pthread_self(); }
+#endif /* !WIN */
+} // namespace util
+
+int g_NumThreads = 0;
+Harness::tid_t  g_Master = 0;
+
+class test_exception : public std::exception {
+    const char* my_description;
+public:
+    test_exception ( const char* description ) : my_description(description) {}
+
+    const char* what() const throw() { return my_description; }
+};
+
+class solitary_test_exception : public test_exception {
+public:
+    solitary_test_exception ( const char* description ) : test_exception(description) {}
+};
+
+#if TBB_USE_CAPTURED_EXCEPTION
+    typedef tbb::captured_exception PropagatedException;
+    #define EXCEPTION_NAME(e) e.name()
+#else
+    typedef test_exception PropagatedException;
+    #define EXCEPTION_NAME(e) typeid(e).name()
+#endif
+
+#define EXCEPTION_DESCR "Test exception"
+
+tbb::atomic<intptr_t> g_CurExecuted,
+                      g_ExecutedAtCatch;
+volatile intptr_t g_ExceptionThrown = 0;
+volatile bool g_ExceptionCaught = false,
+              g_UnknownException = false;
+
+volatile bool g_ThrowException = true,
+              g_Flog = false;
+
+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)
+
+inline void ResetEhGlobals ( bool throwException = true, bool flog = false ) {
+    Harness::ConcurrencyTracker::Reset();
+    g_CurExecuted = g_ExecutedAtCatch = 0;
+    g_ExceptionCaught = false;
+    g_UnknownException = false;
+    g_ThrowException = throwException;
+    g_Flog = flog;
+    g_ExceptionThrown = 0;
+    g_Exceptions = 0;
+}
+
+#if HARNESS_EH_SIMPLE_MODE
+
+static void ThrowTestException () { 
+    g_ExceptionThrown = 1;
+    throw test_exception(EXCEPTION_DESCR);
+}
+
+#else /* !HARNESS_EH_SIMPLE_MODE */
+
+static void ThrowTestException ( intptr_t threshold ) {
+    if ( !g_ThrowException || (!g_Flog && (g_ExceptionInMaster ^ (Harness::CurrentTid() == g_Master))) )
+        return; 
+    while ( Existed() < threshold )
+        __TBB_Yield();
+    if ( !g_SolitaryException ) {
+        g_ExceptionThrown = 1;
+        REMARK ("About to throw one of multiple test_exceptions (thread %08x):", Harness::CurrentTid());
+        throw test_exception(EXCEPTION_DESCR);
+    }
+    if ( __TBB_CompareAndSwapW(&g_ExceptionThrown, 1, 0) == 0 ) {
+        REMARK ("About to throw solitary test_exception... :");
+        throw solitary_test_exception(EXCEPTION_DESCR);
+    }
+}
+#endif /* !HARNESS_EH_SIMPLE_MODE */
+
+#define TRY()   \
+    bool exceptionCaught = false, unknownException = false;    \
+    try {
+
+#define CATCH()     \
+    } catch ( PropagatedException& e ) { \
+        g_ExecutedAtCatch = g_CurExecuted; \
+        ASSERT (strcmp(EXCEPTION_NAME(e), (g_SolitaryException ? typeid(solitary_test_exception) : typeid(test_exception)).name() ) == 0, "Unexpected original exception name"); \
+        ASSERT (strcmp(e.what(), EXCEPTION_DESCR) == 0, "Unexpected original exception info"); \
+        g_ExceptionCaught = exceptionCaught = true; \
+        ++g_Exceptions; \
+    } catch ( ... ) { \
+        g_ExceptionCaught = exceptionCaught = true; \
+        g_UnknownException = unknownException = true; \
+    }
+
+#define ASSERT_EXCEPTION() \
+    ASSERT (g_ExceptionThrown ? g_ExceptionCaught : !g_ExceptionCaught, "throw without catch or catch without throw"); \
+    ASSERT (g_ExceptionCaught, "no exception occurred"); \
+    ASSERT (!g_UnknownException, "unknown exception was caught")
+
+#define CATCH_AND_ASSERT() \
+    CATCH() \
+    ASSERT_EXCEPTION()
+
+const int c_Timeout = 10000;
+
+void WaitUntilConcurrencyPeaks () {
+    if ( g_Flog )
+        return;
+    int n = 0;
+    while ( ++n < c_Timeout && (int)Harness::ConcurrencyTracker::InstantParallelism() < g_NumThreads )
+        __TBB_Yield();
+}
+
+inline bool IsMaster() {
+    return Harness::CurrentTid() == g_Master;
+}
+
+inline bool IsThrowingThread() {
+    return g_ExceptionInMaster ^ IsMaster() ? true : false;
+}
+
+class CancellatorTask : public tbb::task {
+    static volatile bool s_Ready;
+    tbb::task_group_context &m_groupToCancel;
+    intptr_t m_cancellationThreshold;
+
+    tbb::task* execute () {
+        s_Ready = true;
+        while ( g_CurExecuted < m_cancellationThreshold )
+            __TBB_Yield();
+        m_groupToCancel.cancel_group_execution();
+        g_ExecutedAtCatch = g_CurExecuted;
+        return NULL;
+    }
+public:
+    CancellatorTask ( tbb::task_group_context& ctx, intptr_t threshold )
+        : m_groupToCancel(ctx), m_cancellationThreshold(threshold)
+    {
+        s_Ready = false;
+    }
+
+    static void Reset () { s_Ready = false; }
+
+    static void WaitUntilReady () {
+        do {
+            __TBB_Yield();
+        } while( !s_Ready );
+    }
+};
+
+volatile bool CancellatorTask::s_Ready = false;
+
+template<class LauncherTaskT, class CancellatorTaskT>
+void RunCancellationTest ( intptr_t threshold = 1 )
+{
+    tbb::task_group_context  ctx;
+    tbb::empty_task &r = *new( tbb::task::allocate_root(ctx) ) tbb::empty_task;
+    r.set_ref_count(3);
+    r.spawn( *new( r.allocate_child() ) CancellatorTaskT(ctx, threshold) );
+    __TBB_Yield();
+    r.spawn( *new( r.allocate_child() ) LauncherTaskT(ctx) );
+    TRY();
+        r.wait_for_all();
+    CATCH();
+    r.destroy(r);
+    ASSERT (!g_ExceptionCaught && !exceptionCaught, "Cancelling tasks should not cause any exceptions");
+}
diff --git a/src/test/harness_iterator.h b/src/test/harness_iterator.h
new file mode 100644
index 0000000..226db98
--- /dev/null
+++ b/src/test/harness_iterator.h
@@ -0,0 +1,98 @@
+/*
+    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 harness_iterator_H
+#define harness_iterator_H
+
+#include <iterator>
+#include <memory>
+
+namespace Harness {
+
+template <class T>
+class InputIterator {
+    T * my_ptr;
+public:
+    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;
+   
+    explicit InputIterator( T * ptr): my_ptr(ptr){}
+    
+    T& operator* () { return *my_ptr; }
+    
+    InputIterator& operator++ () { ++my_ptr; return *this; }
+
+    bool operator== ( const InputIterator& r ) { return my_ptr == r.my_ptr; }
+};
+
+template <class T>
+class ForwardIterator {
+    T * my_ptr;
+public:
+    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;
+   
+    explicit ForwardIterator ( T * ptr ) : my_ptr(ptr){}
+    
+    ForwardIterator ( const ForwardIterator& r ) : my_ptr(r.my_ptr){}
+    
+    T& operator* () { return *my_ptr; }
+    
+    ForwardIterator& operator++ () { ++my_ptr; return *this; }
+
+    bool operator== ( const ForwardIterator& r ) { return my_ptr == r.my_ptr; }
+};
+
+template <class T>
+class RandomIterator {
+    T * my_ptr;
+public:
+    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;
+
+    explicit RandomIterator ( T * ptr ) : my_ptr(ptr){}
+    RandomIterator ( const RandomIterator& r ) : my_ptr(r.my_ptr){}
+    T& operator* () { return *my_ptr; }
+    RandomIterator& operator++ () { ++my_ptr; return *this; }
+    bool operator== ( const RandomIterator& r ) { return my_ptr == r.my_ptr; }
+    difference_type operator- (const RandomIterator &r) {return my_ptr - r.my_ptr;}
+    RandomIterator operator+ (difference_type n) {return RandomIterator(my_ptr + n);}
+};
+
+}
+
+#endif //harness_iterator_H
diff --git a/src/test/harness_memory.h b/src/test/harness_memory.h
index 7cfc23f..0b02999 100644
--- a/src/test/harness_memory.h
+++ b/src/test/harness_memory.h
@@ -48,12 +48,15 @@ const size_t shared_size = 0;
 #elif _WIN32
 #include <windows.h>
 #include <psapi.h>
+#if _MSC_VER
 #pragma comment(lib, "psapi")
 #endif
 
+#endif /* OS selection */
+
 //! Return estimate of number of bytes of memory that this program is currently using.
 /* Returns 0 if not implemented on platform. */
-static size_t GetMemoryUsage() { 
+size_t GetMemoryUsage() { 
 #if __linux__
     FILE* statsfile = fopen("/proc/self/statm","r");
     size_t pagesize = getpagesize();
@@ -83,3 +86,14 @@ static size_t GetMemoryUsage() {
 #endif
 }
 
+//! Use approximately a specified amount of stack space.
+/** Recursion is used here instead of alloca because some implementations of alloca do not use the stack. */
+void UseStackSpace( size_t amount, char* top=0 ) {
+    char x[1000];
+    memset( x, -1, sizeof(x) );
+    if( !top ) 
+        top = x;
+    ASSERT( x<=top, "test assumes that stacks grow downwards" );
+    if( size_t(top-x)<amount )
+        UseStackSpace( amount, top );
+}
diff --git a/src/test/harness_trace.h b/src/test/harness_trace.h
index 95a6af9..61141b2 100644
--- a/src/test/harness_trace.h
+++ b/src/test/harness_trace.h
@@ -49,12 +49,12 @@
 
 #include <cstdarg>
 
-#if _WIN32||_WIN64
+#if _MSC_VER
     #define snprintf _snprintf
-#endif
-#if defined(_MSC_VER) && (_MSC_VER<=1400)
+#if _MSC_VER<=1400
     #define vsnprintf _vsnprintf
 #endif
+#endif
 
 namespace harness_internal {
 
@@ -81,8 +81,6 @@ namespace harness_internal {
 
         void  trace ( const char* fmt, ... )
         {
-            if ( !Verbose )
-                return;
             char    msg[MAX_TRACE_SIZE];
             char    msg_fmt_buf[MAX_TRACE_SIZE];
             const char  *msg_fmt = fmt;
@@ -101,6 +99,7 @@ namespace harness_internal {
                 msg[len + 1] = 0;
             }
             printf ("%s",msg);
+            fflush(stdout);
 #if _WIN32 || _WIN64
             OutputDebugStringA(msg);
 #endif
@@ -109,12 +108,20 @@ namespace harness_internal {
 
     static tracer_t tracer;
 
+    template<int>
+    bool not_the_first_call () {
+        static bool first_call = false;
+        bool res = first_call;
+        first_call = true;
+        return res;
+    }
 } // namespace harness_internal
 
 #if defined(_MSC_VER)  &&  _MSC_VER >= 1300  ||  defined(__GNUC__)  ||  defined(__GNUG__)
 	#define HARNESS_TRACE_ORIG_INFO __FILE__, __LINE__, __FUNCTION__
 #else
 	#define HARNESS_TRACE_ORIG_INFO __FILE__, __LINE__, ""
+    #define __FUNCTION__ ""
 #endif
 
 
@@ -125,8 +132,17 @@ namespace harness_internal {
 //! printf style tracing macro without automatic new line character adding
 #define TRACENL harness_internal::tracer.set_trace_info(0, HARNESS_TRACE_ORIG_INFO)->trace
 
-//! printf style tracing macro automatically prepending additional information
+//! 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
 
+//! printf style remark macro
+/** Produces output only when the test is run with the -v (verbose) option. **/
+#define REMARK  !Verbose ? (void)0 : TRACE
+
+//! 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
+
 #endif /* tbb_tests_harness_trace_H */
diff --git a/src/test/test_ScalableAllocator_STL.cpp b/src/test/test_ScalableAllocator_STL.cpp
index 4b1397f..87d892e 100644
--- a/src/test/test_ScalableAllocator_STL.cpp
+++ b/src/test/test_ScalableAllocator_STL.cpp
@@ -35,7 +35,7 @@
 #include "test_allocator_STL.h"
 
 int main() {
-    TestAllocatorWithSTL<tbb::scalable_allocator>();
+    TestAllocatorWithSTL<tbb::scalable_allocator<void> >();
     printf("done\n");
     return 0;
 }
diff --git a/src/test/test_allocator.h b/src/test/test_allocator.h
index 87d6de3..948d1b5 100644
--- a/src/test/test_allocator.h
+++ b/src/test/test_allocator.h
@@ -37,6 +37,11 @@
 
 #include "harness.h"
 
+template<typename A>
+struct is_zero_filling {
+    static const bool value = false;
+};
+
 int NumberOfFoo;
 
 template<typename T, size_t N>
@@ -143,6 +148,11 @@ void TestBasic( A& a ) {
 
 #include "tbb/blocked_range.h"
 
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    // Workaround for erroneous "conditional expression is constant" warning in method check_allocate.
+    #pragma warning (disable: 4127)
+#endif
+
 // A is an allocator for some type
 template<typename A>
 struct Body: NoAssign {
@@ -155,8 +165,11 @@ struct Body: NoAssign {
         size_t size = i * (i&3);
         array[i] = i&1 ? a.allocate(size, array[i>>3]) : a.allocate(size);
         char* s = reinterpret_cast<char*>(reinterpret_cast<void*>(array[i]));
-        for( size_t j=0; j<size*sizeof(A); ++j )
+        for( size_t j=0; j<size*sizeof(A); ++j ) {
+            if(is_zero_filling<typename A::template rebind<void>::other>::value)
+                ASSERT( !s[j], NULL);
             s[j] = PseudoRandomValue(i, t);
+        }
     }
 
     void check_deallocate( typename A::pointer array[], size_t i, size_t t ) const
diff --git a/src/test/test_allocator_STL.h b/src/test/test_allocator_STL.h
index caa81f5..a879119 100644
--- a/src/test/test_allocator_STL.h
+++ b/src/test/test_allocator_STL.h
@@ -69,32 +69,36 @@ void TestMap() {
 #include <set>
 #include <vector>
 
-template<template<typename T> class Allocator>
+template<typename Allocator>
 void TestAllocatorWithSTL() {
+    typedef typename Allocator::template rebind<int>::other Ai;
+    typedef typename Allocator::template rebind<const int>::other Aci;
+    typedef typename Allocator::template rebind<std::pair<const int, int> >::other Acii;
+    typedef typename Allocator::template rebind<std::pair<int, int> >::other Aii;
+
     // Sequenced containers
-    TestSequence<std::deque <int,Allocator<int> > >();
-    TestSequence<std::list  <int,Allocator<int> > >();
-    TestSequence<std::vector<int,Allocator<int> > >();
+    TestSequence<std::deque <int,Ai> >();
+    TestSequence<std::list  <int,Ai> >();
+    TestSequence<std::vector<int,Ai> >();
 
     // Associative containers
-    TestSet<std::set     <int, std::less<int>, Allocator<int> > >();
-    TestSet<std::multiset<int, std::less<int>, Allocator<int> > >();
-    TestMap<std::map     <int, int, std::less<int>, Allocator<std::pair<const int,int> > > >();
-    TestMap<std::multimap<int, int, std::less<int>, Allocator<std::pair<const int,int> > > >();
+    TestSet<std::set     <int, std::less<int>, Ai> >();
+    TestSet<std::multiset<int, std::less<int>, Ai> >();
+    TestMap<std::map     <int, int, std::less<int>, Acii> >();
+    TestMap<std::multimap<int, int, std::less<int>, Acii> >();
 
-#if _WIN32||_WIN64
+#if _MSC_VER
     // Test compatibility with Microsoft's implementation of std::allocator for some cases that
     // are undefined according to the ISO standard but permitted by Microsoft.
-    TestSequence<std::deque <const int,Allocator<const int> > >();
+    TestSequence<std::deque <const int,Aci> >();
 #if _CPPLIB_VER>=500
-    TestSequence<std::list  <const int,Allocator<const int> > >();
-#endif /* _CPPLIB_VER>=500 */
-    TestSequence<std::vector<const int,Allocator<const int> > >();
-    TestSet<std::set<const int, std::less<int>, Allocator<const int> > >();
-    TestMap<std::map<int, int, std::less<int>, Allocator<std::pair<int,int> > > >();
-    TestMap<std::map<const int, int, std::less<int>, Allocator<std::pair<const int,int> > > >();
-    TestMap<std::multimap<int, int, std::less<int>, Allocator<std::pair<int,int> > > >();
-    TestMap<std::multimap<const int, int, std::less<int>, Allocator<std::pair<const int,int> > > >();
-#endif /* _WIN32||_WIN64 */
+    TestSequence<std::list  <const int,Aci> >();
+#endif
+    TestSequence<std::vector<const int,Aci> >();
+    TestSet<std::set<const int, std::less<int>, Aci> >();
+    TestMap<std::map<int, int, std::less<int>, Aii> >();
+    TestMap<std::map<const int, int, std::less<int>, Acii> >();
+    TestMap<std::multimap<int, int, std::less<int>, Aii> >();
+    TestMap<std::multimap<const int, int, std::less<int>, Acii> >();
+#endif /* _MSC_VER */
 }
-
diff --git a/src/test/test_assembly.cpp b/src/test/test_assembly.cpp
index db7e6e3..c952733 100644
--- a/src/test/test_assembly.cpp
+++ b/src/test/test_assembly.cpp
@@ -53,10 +53,19 @@ public:
 };
 
 void GenericScheduler::test_assembly_routines() {
+    __TBB_ASSERT( assert_okay(), NULL );
+#if __TBB_TASK_DEQUE
     try_enter_arena();
-    mark_pool_full();
+    ASSERT( arena_slot->task_pool == dummy_slot.task_pool, "entering arena must not lock the task pool" );
+    arena->mark_pool_full();
+    acquire_task_pool();
+    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();
-    ASSERT( assert_okay(), NULL );
     long steal_count = 0;
     long get_count = 0;
     const depth_type n = 5;
@@ -75,15 +84,15 @@ void GenericScheduler::test_assembly_routines() {
                     for( int insert=0; insert<2; ++insert ) 
                         // Loop over whether to steal or get
                         for( int steal=0; steal<2; ++steal ) {
-                            ASSERT( assert_okay(), NULL );
+                            __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;
-                            ASSERT( assert_okay(), NULL );
+                            __TBB_ASSERT( assert_okay(), NULL );
 
                             TestTask& w = *new( task::allocate_root() ) TestTask("w");
-                            ASSERT( assert_okay(), NULL );
+                            __TBB_ASSERT( assert_okay(), NULL );
                             if( d>=0 ) {
                                 w.prefix().depth = int(d);
                                 w.prefix().next = NULL;
@@ -93,22 +102,22 @@ void GenericScheduler::test_assembly_routines() {
                             deepest = d;
                             arena_slot->steal_end = 2*d;
 
-                            ASSERT( assert_okay(), NULL );
+                            __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");
-                            ASSERT( assert_okay(), NULL );
+                            __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);
-                            ASSERT( assert_okay(), NULL );
+                            __TBB_ASSERT( assert_okay(), NULL );
                             z.prefix().next = (task*)(void*)-1;
                             if( insert ) {
                                 spawn( x, z.prefix().next );
-                                ASSERT( assert_okay(), NULL );
+                                __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;
@@ -128,10 +137,10 @@ void GenericScheduler::test_assembly_routines() {
                                         break;
                                     }
                                 }
-                                ASSERT( assert_okay(), NULL );
+                                __TBB_ASSERT( assert_okay(), NULL );
                                 task* t = steal_task( *arena_slot, limit );
                                 ASSERT( (arena_slot->steal_end&1)==0, "forgot to release lock?" );
-                                ASSERT( assert_okay(), NULL );
+                                __TBB_ASSERT( assert_okay(), NULL );
                                 ASSERT( t==expected_task, NULL );       
                                 shallowest = dummy_slot.task_pool->prefix().steal_begin;
                                 ASSERT( shallowest==expected_shallowest, NULL );        
@@ -145,10 +154,10 @@ void GenericScheduler::test_assembly_routines() {
                                         break;
                                     }
                                 }
-                                ASSERT( assert_okay(), NULL );
+                                __TBB_ASSERT( assert_okay(), NULL );
                                 task* t = get_task( limit );
                                 ASSERT( (arena_slot->steal_end&1)==0, "forgot to release lock?" );
-                                ASSERT( assert_okay(), NULL );
+                                __TBB_ASSERT( assert_okay(), NULL );
                                 ASSERT( t==expected_task, NULL );       
                                 ++get_count;
                             }
@@ -156,6 +165,7 @@ void GenericScheduler::test_assembly_routines() {
     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
@@ -269,7 +279,7 @@ int main( int argc, char* argv[] ) {
 
         if( Verbose ) 
             printf("testing __TBB_(scheduler assists)\n");
-        GenericScheduler* scheduler = GetThreadSpecific();
+        GenericScheduler* scheduler = internal::Governor::local_scheduler();
         scheduler->test_assembly_routines();
 
     } catch(...) {
diff --git a/src/test/test_atomic.cpp b/src/test/test_atomic.cpp
index f511e4d..dbf31a9 100644
--- a/src/test/test_atomic.cpp
+++ b/src/test/test_atomic.cpp
@@ -31,6 +31,7 @@
 
 #include "tbb/atomic.h"
 #include "harness_assert.h"
+#include <string.h> // memcmp
 
 #if _MSC_VER && !defined(__INTEL_COMPILER)
     // unary minus operator applied to unsigned type, result still unsigned
@@ -219,7 +220,7 @@ template<typename T>
 void TestConst( T i ) { 
     // Try const 
     const TestStruct<T> x(i);
-    ASSERT( reinterpret_cast<const T&>(x.counter)==i, "write to atomic<T> broken?" );
+    ASSERT( memcmp( &i, &x.counter, sizeof(T) )==0, "write to atomic<T> broken?" );;
     ASSERT( x.counter==i, "read of atomic<T> broken?" );
 }
 
@@ -228,7 +229,6 @@ void TestOperations( T i, T j, T k ) {
     TestConst(i);
     TestCompareAndSwap(i,j,k);
     TestFetchAndStore(i,k);    // Pass i,k instead of i,j, because callee requires two distinct values.
-    TestFetchAndAdd(i);
 }
 
 template<typename T>
@@ -269,6 +269,7 @@ void TestAtomicInteger( const char* name ) {
     for( int k=0; k<int(sizeof(long))*8-1; ++k ) {
         TestOperations<T>(T(1L<<k),T(~(1L<<k)),T(1-(1L<<k)));
         TestOperations<T>(T(-1L<<k),T(~(-1L<<k)),T(1-(-1L<<k)));
+        TestFetchAndAdd<T>(T(-1L<<k));
     }
     TestParallel<T>( name );
 }
@@ -312,6 +313,7 @@ void TestAtomicPointer() {
         printf("testing atomic pointer (%d)\n",int(sizeof(T)));
     T array[1000];
     TestOperations<T*>(&array[500],&array[250],&array[750]);
+    TestFetchAndAdd<T*>(&array[500]);
     TestIndirection<T>();
     TestParallel<T*>( "pointer" );
 }
@@ -334,6 +336,25 @@ void TestAtomicBool() {
     TestParallel<bool>( "bool" );
 }
 
+enum Color {Red=0,Green=1,Blue=-1};
+
+void TestAtomicEnum() {
+    if( Verbose )
+        printf("testing atomic<Color>\n");
+    TestOperations<Color>(Red,Green,Blue);
+    TestParallel<Color>( "Color" );
+}
+
+#if !__TBB_FLOATING_POINT_BROKEN 
+template<typename T>
+void TestAtomicFloat( const char* name ) {
+    if( Verbose )
+        printf("testing atomic<%s>\n", name );
+    TestOperations<T>(0.5,3.25,10.75);
+    TestParallel<T>( name );
+}
+#endif /* !__TBB_FLOATING_POINT_BROKEN */
+
 const int numMaskedOperations = 100000;
 const int testSpaceSize = 8;
 int prime[testSpaceSize] = {3,5,7,11,13,17,19,23};
@@ -479,6 +500,11 @@ int main( int argc, char* argv[] ) {
     TestAtomicPointerToTypeOfUnknownSize<IncompleteType*>( "IncompleteType*" );
     TestAtomicPointerToTypeOfUnknownSize<void*>( "void*" );
     TestAtomicBool();
+    TestAtomicEnum();
+#if !__TBB_FLOATING_POINT_BROKEN 
+    TestAtomicFloat<float>("float");
+    TestAtomicFloat<double>("double");
+#endif /* !__TBB_FLOATING_POINT_BROKEN  */
     ASSERT( !ParallelError, NULL );
     TestMaskedCAS<unsigned char>();
     TestMaskedCAS<unsigned short>();
@@ -568,8 +594,8 @@ public:
                         printf("ERROR: message!=(T)-1 k=%d i=%d trial=%x type=%s (memory fence problem?)\n", k, i, trial, name );
                         ParallelError = true;
                     }
-                    s->message = 0; 
-                    s->flag = 0;
+                    s->message = T(0); 
+                    s->flag = T(0);
                     // Set message and then the flag
                     if( trial&2 ) {
                         // COMPLICATED_ZERO here tempts compiler to sink store below setting of flag
@@ -624,9 +650,9 @@ public:
         // 1. It has at least one 1 in most of its bytes.
         // 2. The bytes are typically different.
         // 3. When multiplied by any value <=127, the product does not overflow.
-        factor = 0;
+        factor = T(0);
         for( unsigned i=0; i<sizeof(T)*8-7; i+=7 ) 
-            factor |= (T)1<<i;
+            factor = T(factor | T(1)<<i);
      }
      //! Get ith member of set
      T get( int i ) const {
@@ -659,6 +685,56 @@ public:
     bool contains( bool ) const {return true;}
 };
 
+#if !__TBB_FLOATING_POINT_BROKEN
+
+#if _MSC_VER==1500 && !defined(__INTEL_COMPILER)
+    // VS2008/VC9 seems to have an issue; limits pull in math.h
+    #pragma warning( push )
+    #pragma warning( disable: 4985 )
+#endif
+#include <limits> /* Need std::numeric_limits */
+#if _MSC_VER==1500 && !defined(__INTEL_COMPILER)
+    #pragma warning( pop )
+#endif
+
+//! Commonality inherited by specializations for floating-point types.
+template<typename T>
+class SparseFloatSet: NoAssign {
+    const T epsilon;
+public:
+    SparseFloatSet() : epsilon(std::numeric_limits<T>::epsilon()) {}
+    T get( int i ) const {
+        return i==0 ? T(0) : 1/T((i&0x7F)+1);
+    }
+    bool contains( T x ) const {
+        if( x==T(0) ) {
+            return true;
+        } else {
+            int j = int(1/x+T(0.5));
+            if( 0<j && j<=128 ) {
+                T error = x*T(j)-T(1);
+                // In the calculation above, if x was indeed generated by method get, the error should be 
+                // at most epsilon, because x is off by at most 1/2 ulp from its infinitely precise value, 
+                // j is exact, and the multiplication incurs at most another 1/2 ulp of round-off error.
+                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);
+                }
+            }
+            return false;
+        }
+    };
+};
+
+template<> 
+class SparseValueSet<float>: public SparseFloatSet<float> {};
+
+template<> 
+class SparseValueSet<double>: public SparseFloatSet<double> {};
+
+#endif /* !__TBB_FLOATING_POINT_BROKEN */
+
 template<typename T>
 class HammerAssignment: NoAssign {
     tbb::atomic<T>& x;
@@ -706,7 +782,7 @@ template<typename T>
 void TestAssignment( const char* name ) {
     TestAssignmentSignature( &tbb::atomic<T>::operator= );
     tbb::atomic<T> x;
-    x = 0;
+    x = T(0);
     NativeParallelFor( 2, HammerAssignment<T>( x, name ) );
 #if __TBB_x86_32 && (__linux__ || __FreeBSD__ || _WIN32)
     if( sizeof(T)==8 ) {
@@ -726,7 +802,7 @@ void TestAssignment( const char* name ) {
         // Assertion checks that y really did end up somewhere inside "raw_space".
         ASSERT( raw_space<=reinterpret_cast<char*>(&y), "y starts before raw_space" );
         ASSERT( reinterpret_cast<char*>(&y+1) <= raw_space+sizeof(raw_space), "y starts after raw_space" );
-        y = 0;
+        y = T(0);
         NativeParallelFor( 2, HammerAssignment<T>( y, name ) );
     }
 #endif /* __TBB_x86_32 && (__linux__ || __FreeBSD__ || _WIN32) */
diff --git a/src/test/test_cache_aligned_allocator.cpp b/src/test/test_cache_aligned_allocator.cpp
index b5930a2..7d46d2b 100644
--- a/src/test/test_cache_aligned_allocator.cpp
+++ b/src/test/test_cache_aligned_allocator.cpp
@@ -35,10 +35,16 @@
 // the real body of the test is there:
 #include "test_allocator.h"
 
+template<>
+struct is_zero_filling<tbb::zero_allocator<void> > {
+    static const bool value = true;
+};
+
 int main(void)
 {
     int result = TestMain<tbb::cache_aligned_allocator<void> >();
-    result += TestMain<tbb::tbb_allocator<void> >();   
+    result += TestMain<tbb::tbb_allocator<void> >();
+    result += TestMain<tbb::zero_allocator<void> >();
 
     printf("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 abf33db..20565e8 100644
--- a/src/test/test_cache_aligned_allocator_STL.cpp
+++ b/src/test/test_cache_aligned_allocator_STL.cpp
@@ -35,8 +35,9 @@
 #include "test_allocator_STL.h"
 
 int main() {
-    TestAllocatorWithSTL<tbb::cache_aligned_allocator>();
-    TestAllocatorWithSTL<tbb::tbb_allocator>();
+    TestAllocatorWithSTL<tbb::cache_aligned_allocator<void> >();
+    TestAllocatorWithSTL<tbb::tbb_allocator<void> >();
+    TestAllocatorWithSTL<tbb::zero_allocator<void> >();
     printf("done\n");
     return 0;
 }
diff --git a/src/test/test_combinable.cpp b/src/test/test_combinable.cpp
new file mode 100644
index 0000000..d6dbb64
--- /dev/null
+++ b/src/test/test_combinable.cpp
@@ -0,0 +1,478 @@
+/*
+    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 "tbb/combinable.h"
+#include "tbb/task_scheduler_init.h"
+#include "tbb/parallel_for.h"
+#include "tbb/parallel_reduce.h"
+#include "tbb/blocked_range.h"
+#include "tbb/tick_count.h"
+#include "tbb/tbb_allocator.h"
+#include "tbb/tbb_thread.h"
+
+#include <cstring>
+#include <vector>
+#include <deque>
+#include <list>
+#include <map>
+#include <utility>
+
+#include "harness_assert.h"
+#include "harness.h"
+#include <iostream>
+
+static tbb::atomic<int> construction_counter;
+static tbb::atomic<int> destruction_counter;
+
+const int REPETITIONS = 10;
+const int N = 100000;
+const int VALID_NUMBER_OF_KEYS = 100;
+const double EXPECTED_SUM = (REPETITIONS + 1) * N;
+
+//
+// A minimal class
+// Define: default and copy constructor, and allow implicit operator&
+// Hide: operator=
+//
+
+class minimal: NoAssign {
+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() { ++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
+template <typename T>
+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 {
+        return left + right;
+    }
+};
+
+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 {
+        return left + right;
+    }
+};
+
+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; }
+
+template <typename T>
+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 combine_each_helper {
+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)); 
+        return *this; 
+    }
+private:
+    T& my_result;
+};
+
+template <typename T>
+class combine_each_vector_helper: NoAssign {
+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);
+        }
+    }
+private:
+    T& my_result;
+};
+
+
+
+//// end functors
+
+template< typename T >
+void run_serial_scalar_tests(const char *test_name) {
+    tbb::tick_count t0;
+    T sum;
+    test_helper<T>::init(sum);
+
+    if (Verbose) printf("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); 
+        }
+    }
+ 
+    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());
+}
+
+
+template <typename T>
+class parallel_scalar_body: NoAssign {
+    
+    tbb::combinable<T> &sums;
+ 
+public:
+
+    parallel_scalar_body ( 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 );
+        }
+    }
+   
+};
+
+// parallel body with no test for first access.
+template <typename T>
+class parallel_scalar_body_noinit: NoAssign {
+    
+    tbb::combinable<T> &sums;
+ 
+public:
+
+    parallel_scalar_body_noinit ( 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 );
+        }
+    }
+   
+};
+
+template< typename T >
+void run_parallel_scalar_tests(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); 
+        init.initialize(p);
+
+        tbb::tick_count t0;
+
+        T assign_sum;
+        test_helper<T>::init(assign_sum);
+
+        T combine_sum;
+        test_helper<T>::init(combine_sum);
+
+        T combine_ref_sum;
+        test_helper<T>::init(combine_ref_sum);
+
+        T combine_each_sum;
+        test_helper<T>::init(combine_each_sum);
+
+        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);
+                                    
+
+            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 ) );
+
+            // 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_each_helper<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>));
+        }
+
+        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);
+
+        if (Verbose)
+            printf("done\nparallel %s, %d, %g, %g\n", test_name, p, test_helper<T>::get(combine_sum), 
+                                                      ( tbb::tick_count::now() - t0).seconds());
+        init.terminate();
+    }
+}
+
+
+template <typename T>
+class parallel_vector_for_body: 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) { }
+
+    void operator()( const tbb::blocked_range<int> &r ) const {
+        T one;
+        test_helper<T>::set(one, 1);
+
+        for (int i = r.begin(); i < r.end(); ++i) {
+            locals.local().push_back( one );
+        }
+    }
+   
+};
+
+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) {
+    tbb::tick_count t0;
+    tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred);
+    typedef std::vector<T, tbb::tbb_allocator<T> > container_type;
+
+    for (int p = MinThread; p <= MaxThread; ++p) { 
+
+        if (p == 0) continue;
+        if (Verbose) printf("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);
+
+        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;
+
+            tbb::parallel_for ( tbb::blocked_range<int> (0, N, 10000), parallel_vector_for_body<T>( vs ) );
+
+            // copy construct
+            combinable_type vs2(vs); // this causes an assertion failure, related to allocators...
+
+            // assign
+            combinable_type vs3;
+            vs3 = vs;
+
+            combine_each_vector_helper<T> my_combine_each(sum);
+            vs.combine_each(my_combine_each);
+
+            combine_each_vector_helper<T> my_combine_each2(sum2);
+            vs2.combine_each(my_combine_each2);
+
+            combine_each_vector_helper<T> my_combine_each3(sum3);
+            vs2.combine_each(my_combine_each3);
+            // 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());
+        init.terminate();
+    }
+}
+
+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> >");
+}
+
+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);
+
+    // 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);
+
+    // test copy construction with function initializer
+    tbb::combinable<T> copy2(create2);
+    ASSERT(7 == test_helper<T>::get(copy2.combine(my_combine<T>)), NULL);
+
+    // test copy assignment with function initializer
+    FunctorAddFinit<T> my_finit;
+    tbb::combinable<T> assign2(my_finit);
+    assign2 = create2;
+    ASSERT(7 == test_helper<T>::get(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");
+}
+
+int main(int argc, char *argv[]) {
+   ParseCommandLine(argc, argv);
+
+   if (MaxThread > 0) {
+      run_parallel_tests();
+   }
+
+    run_assignment_and_copy_constructor_tests();
+
+   printf("done\n");
+   return 0;
+}
+
diff --git a/src/test/test_concurrent_hash_map.cpp b/src/test/test_concurrent_hash_map.cpp
index c6097e6..9f24220 100644
--- a/src/test/test_concurrent_hash_map.cpp
+++ b/src/test/test_concurrent_hash_map.cpp
@@ -203,7 +203,7 @@ inline void CheckAllocator(MyTable &table, size_t expected_allocs, size_t expect
         ASSERT( allocations == expected_allocs, NULL); ASSERT( frees == expected_frees, NULL);
     } else {
         ASSERT( allocations >= expected_allocs, NULL); ASSERT( frees >= expected_frees, NULL);
-        ASSERT( allocations == frees, NULL );
+        ASSERT( allocations - frees == expected_allocs - expected_frees, NULL );
     }
 }
 
@@ -627,7 +627,7 @@ void TestRangeAssignment( Range2 r2 ) {
 //------------------------------------------------------------------------
 
 template<typename MyTable>
-void FillTable( MyTable& x, int n ) {
+static void FillTable( MyTable& x, int n ) {
     for( int i=1; i<=n; ++i ) {
         MyKey key( MyKey::make(i) );
         typename MyTable::accessor a;
@@ -638,7 +638,7 @@ void FillTable( MyTable& x, int n ) {
 }
 
 template<typename MyTable>
-void CheckTable( const MyTable& x, int n ) {
+static void CheckTable( const MyTable& x, int n ) {
     ASSERT( x.size()==size_t(n), "table is different size than expected" );
     ASSERT( x.empty()==(n==0), NULL );
     ASSERT( x.size()<=x.max_size(), NULL );
@@ -659,7 +659,7 @@ void CheckTable( const MyTable& x, int n ) {
     ASSERT( key_sum==n*(n+1)/2, NULL );
 }
 
-void TestCopy() {
+static void TestCopy() {
     if( Verbose )
         printf("testing copy\n");
     MyTable t1;
diff --git a/src/test/test_concurrent_queue.cpp b/src/test/test_concurrent_queue.cpp
index 2fb713d..a5351ef 100644
--- a/src/test/test_concurrent_queue.cpp
+++ b/src/test/test_concurrent_queue.cpp
@@ -44,7 +44,7 @@ class Foo {
 public:
     int thread_id;
     int serial;
-    Foo() : state(LIVE) {
+    Foo() : state(LIVE), thread_id(0), serial(0) {
         ++FooConstructed;
     }
     Foo( const Foo& item ) : state(LIVE) {
@@ -132,6 +132,16 @@ static tbb::atomic<long> PopKind[3];
 
 const int M = 10000;
 
+#if TBB_DEPRECATED
+#define CALL_BLOCKING_POP(q,v) (q)->pop(v)
+#define CALL_TRY_POP(q,v,i) (((i)&0x2)?q->try_pop(v):q->pop_if_present(v))
+#define SIZE() size()
+#else
+#define CALL_BLOCKING_POP(q,v) while( !(q)->try_pop(v) ) __TBB_Yield()
+#define CALL_TRY_POP(q,v,i) q->try_pop(v)
+#define SIZE() unsafe_size()
+#endif
+
 struct Body: NoAssign {
     tbb::concurrent_queue<Foo>* queue;
     const int nthread;
@@ -149,7 +159,7 @@ struct Body: NoAssign {
             f.serial = 0xDEAD;
             bool prepopped = false;
             if( j&1 ) {
-                prepopped = queue->pop_if_present(f);
+                prepopped = CALL_TRY_POP(queue,f,j);
                 ++pop_kind[prepopped];
             }
             Foo g;
@@ -157,7 +167,7 @@ struct Body: NoAssign {
             g.serial = j+1;
             queue->push( g );
             if( !prepopped ) {
-                queue->pop(f);
+                CALL_BLOCKING_POP(queue,f);
                 ++pop_kind[2];
             }
             ASSERT( f.thread_id<=nthread, NULL );
@@ -171,10 +181,13 @@ struct Body: NoAssign {
     }
 };
 
-void TestPushPop( int prefill, ptrdiff_t capacity, int nthread ) {
+void TestPushPop( size_t prefill, ptrdiff_t capacity, int nthread ) {
     ASSERT( nthread>0, "nthread must be positive" );
-    if( prefill+1>=capacity )
+#if TBB_DEPRECATED
+    ptrdiff_t signed_prefill = ptrdiff_t(prefill);
+    if( signed_prefill+1>=capacity )
         return;
+#endif
     bool success = false;
     for( int k=0; k<3; ++k )
         PopKind[k] = 0;
@@ -183,35 +196,40 @@ void TestPushPop( int prefill, ptrdiff_t capacity, int nthread ) {
         FooDestroyed = 0;
         Body body(nthread);
         tbb::concurrent_queue<Foo> queue;
+#if TBB_DEPRECATED
         queue.set_capacity( capacity );
+#endif
         body.queue = &queue;
-        for( int i=0; i<prefill; ++i ) {
+        for( size_t i=0; i<prefill; ++i ) {
             Foo f;
             f.thread_id = nthread;
-            f.serial = 1+i;
+            f.serial = 1+int(i);
             queue.push(f);
-            ASSERT( queue.size()==i+1, NULL );
+            ASSERT( unsigned(queue.SIZE())==i+1, NULL );
             ASSERT( !queue.empty(), NULL );
         }
         tbb::tick_count t0 = tbb::tick_count::now();
         NativeParallelFor( nthread, body );
         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", prefill, int(capacity), timing, timing/(2*M*nthread)*1.E9);
+            printf("prefill=%d capacity=%d time = %g = %g nsec/operation\n", int(prefill), int(capacity), timing, timing/(2*M*nthread)*1.E9);
+#endif /* !__TBB_FLOATING_POINT_BROKEN */
         int sum = 0;
         for( int k=0; k<nthread; ++k )
             sum += Sum[k];
-        int expected = nthread*((M-1)*M/2) + ((prefill-1)*prefill)/2;
-        for( int i=prefill; --i>=0; ) {
+        int expected = int(nthread*((M-1)*M/2) + ((prefill-1)*prefill)/2);
+        for( int i=int(prefill); --i>=0; ) {
             ASSERT( !queue.empty(), NULL );
             Foo f;
-            queue.pop(f);
-            ASSERT( queue.size()==i, NULL );
+            bool result = queue.try_pop(f);
+            ASSERT( result, NULL );
+            ASSERT( int(queue.SIZE())==i, NULL );
             sum += f.serial-1;
         }
         ASSERT( queue.empty(), NULL );
-        ASSERT( queue.size()==0, NULL );
+        ASSERT( queue.SIZE()==0, NULL );
         if( sum!=expected )
             printf("sum=%d expected=%d\n",sum,expected);
         ASSERT( FooConstructed==FooDestroyed, NULL );
@@ -378,6 +396,14 @@ bool operator==(const BarEx& bar1, const BarEx& bar2) {
     return bar1.my_id==bar2.my_id && bar1.my_tilda_id==bar2.my_tilda_id;
 }
 
+#if TBB_DEPRECATED
+#define CALL_BEGIN(q,i) (((i)&0x1)?q.begin():q.unsafe_begin())
+#define CALL_END(q,i)   (((i)&0x1)?q.end():q.unsafe_end())
+#else
+#define CALL_BEGIN(q,i) q.unsafe_begin()
+#define CALL_END(q,i)   q.unsafe_end()
+#endif
+
 void TestConstructors ()
 {
     tbb::concurrent_queue<Bar> src_queue;
@@ -388,12 +414,12 @@ void TestConstructors ()
     for( size_t size=0; size<1001; ++size ) {
         for( size_t i=0; i<size; ++i )
             src_queue.push(Bar(i+(i^size)));
-        tbb::concurrent_queue<Bar>::const_iterator sqb(src_queue.begin());
-        tbb::concurrent_queue<Bar>::const_iterator sqe(src_queue.end());
+        tbb::concurrent_queue<Bar>::const_iterator sqb( CALL_BEGIN(src_queue,size) );
+        tbb::concurrent_queue<Bar>::const_iterator sqe( CALL_END(src_queue,size));
 
         tbb::concurrent_queue<Bar> dst_queue(sqb, sqe);
 
-        ASSERT(src_queue.size()==dst_queue.size(), "different size");
+        ASSERT(src_queue.SIZE()==dst_queue.SIZE(), "different size");
 
         src_queue.clear();
     }
@@ -408,12 +434,12 @@ void TestConstructors ()
 
         tbb::concurrent_queue<Bar> dst_queue2(sab, sae);
 
-        ASSERT( int(size)==dst_queue2.size(), NULL );
+        ASSERT( size==unsigned(dst_queue2.SIZE()), NULL );
         ASSERT( sab==BarIterator(bar_array+0), NULL );
         ASSERT( sae==BarIterator(bar_array+size), NULL );
 
-        dqb = dst_queue2.begin();
-        dqe = dst_queue2.end();
+        dqb = CALL_BEGIN(dst_queue2,size);
+        dqe = CALL_END(dst_queue2,size);
         BarIterator v_iter(sab);
         for( ; dqb != dqe; ++dqb, ++v_iter )
             ASSERT( *dqb == *v_iter, "unexpected element" );
@@ -423,36 +449,36 @@ void TestConstructors ()
     src_queue.clear();
 
     tbb::concurrent_queue<Bar> dst_queue3( src_queue );
-    ASSERT( src_queue.size()==dst_queue3.size(), NULL );
-    ASSERT( 0==dst_queue3.size(), NULL );
+    ASSERT( src_queue.SIZE()==dst_queue3.SIZE(), NULL );
+    ASSERT( 0==dst_queue3.SIZE(), NULL );
 
     int k=0;
     for( size_t i=0; i<1001; ++i ) {
         Bar tmp_bar;
         src_queue.push(Bar(++k));
         src_queue.push(Bar(++k));
-        src_queue.pop(tmp_bar);
+        src_queue.try_pop(tmp_bar);
 
         tbb::concurrent_queue<Bar> dst_queue4( src_queue );
 
-        ASSERT( src_queue.size()==dst_queue4.size(), NULL );
+        ASSERT( src_queue.SIZE()==dst_queue4.SIZE(), NULL );
 
-        dqb = dst_queue4.begin();
-        dqe = dst_queue4.end();
-        iter = src_queue.begin();
+        dqb = CALL_BEGIN(dst_queue4,i);
+        dqe = CALL_END(dst_queue4,i);
+        iter = CALL_BEGIN(src_queue,i);
 
         for( ; dqb != dqe; ++dqb, ++iter )
             ASSERT( *dqb == *iter, "unexpected element" );
 
-        ASSERT( iter==src_queue.end(), "different size?" );
+        ASSERT( iter==CALL_END(src_queue,i), "different size?" );
     }
 
     tbb::concurrent_queue<Bar> dst_queue5( src_queue );
 
-    ASSERT( src_queue.size()==dst_queue5.size(), NULL );
-    dqb = dst_queue5.begin();
-    dqe = dst_queue5.end();
-    iter = src_queue.begin();
+    ASSERT( src_queue.SIZE()==dst_queue5.SIZE(), NULL );
+    dqb = dst_queue5.unsafe_begin();
+    dqe = dst_queue5.unsafe_end();
+    iter = src_queue.unsafe_begin();
     for( ; dqb != dqe; ++dqb, ++iter )
         ASSERT( *dqb == *iter, "unexpected element" );
 
@@ -460,25 +486,28 @@ void TestConstructors ()
         Bar tmp_bar;
         src_queue.push(Bar(i+1000));
         src_queue.push(Bar(i+1000));
-        src_queue.pop(tmp_bar);
+        src_queue.try_pop(tmp_bar);
 
         dst_queue5.push(Bar(i+1000));
         dst_queue5.push(Bar(i+1000));
-        dst_queue5.pop(tmp_bar);
+        dst_queue5.try_pop(tmp_bar);
     }
 
-    ASSERT( src_queue.size()==dst_queue5.size(), NULL );
-    dqb = dst_queue5.begin();
-    dqe = dst_queue5.end();
-    iter = src_queue.begin();
+    ASSERT( src_queue.SIZE()==dst_queue5.SIZE(), NULL );
+    dqb = dst_queue5.unsafe_begin();
+    dqe = dst_queue5.unsafe_end();
+    iter = src_queue.unsafe_begin();
     for( ; dqb != dqe; ++dqb, ++iter )
         ASSERT( *dqb == *iter, "unexpected element" );
-    ASSERT( iter==src_queue.end(), "different size?" );
+    ASSERT( iter==src_queue.unsafe_end(), "different size?" );
 
-#if __GLIBC__==2&&__GLIBC_MINOR__==3
-    printf("Warning: Part of the construcor test is skipped due to a known issue.\n");
+#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");
 #else
     k = 0;
+#if TBB_DEPRECATED==0
+    unsigned
+#endif
     int n_elements=0;
     tbb::concurrent_queue<BarEx> src_queue_ex;
     for( size_t size=0; size<1001; ++size ) {
@@ -497,22 +526,22 @@ void TestConstructors ()
         } catch (...) {
         }
         ++k;
-        src_queue_ex.pop(tmp_bar_ex);
+        src_queue_ex.try_pop(tmp_bar_ex);
         n_elements += (n_successful_pushes - 1);
-        ASSERT( src_queue_ex.size()==n_elements, NULL);
+        ASSERT( src_queue_ex.SIZE()==n_elements, NULL);
 
         BarEx::set_mode( BarEx::COPY_CONSTRUCT );
         tbb::concurrent_queue<BarEx> dst_queue_ex( src_queue_ex );
 
-        ASSERT( src_queue_ex.size()==dst_queue_ex.size(), NULL );
+        ASSERT( src_queue_ex.SIZE()==dst_queue_ex.SIZE(), NULL );
 
-        tbb::concurrent_queue<BarEx>::const_iterator dqb_ex  = dst_queue_ex.begin();
-        tbb::concurrent_queue<BarEx>::const_iterator dqe_ex  = dst_queue_ex.end();
-        tbb::concurrent_queue<BarEx>::const_iterator iter_ex = src_queue_ex.begin();
+        tbb::concurrent_queue<BarEx>::const_iterator dqb_ex  = CALL_BEGIN(dst_queue_ex, size);
+        tbb::concurrent_queue<BarEx>::const_iterator dqe_ex  = CALL_END(dst_queue_ex, size);
+        tbb::concurrent_queue<BarEx>::const_iterator iter_ex = CALL_BEGIN(src_queue_ex, size);
 
         for( ; dqb_ex != dqe_ex; ++dqb_ex, ++iter_ex )
             ASSERT( *dqb_ex == *iter_ex, "unexpected element" );
-        ASSERT( iter_ex==src_queue_ex.end(), "different size?" );
+        ASSERT( iter_ex==CALL_END(src_queue_ex,size), "different size?" );
     }
 #endif
 }
@@ -574,17 +603,17 @@ void TestIterator() {
     tbb::concurrent_queue<Foo> queue;
     tbb::concurrent_queue<Foo>& const_queue = queue;
     for( int j=0; j<500; ++j ) {
-        TestIteratorAux( queue.begin(), queue.end(), j );
-        TestIteratorAux( const_queue.begin(), const_queue.end(), j );
-        TestIteratorAux( const_queue.begin(), queue.end(), j );
-        TestIteratorAux( queue.begin(), const_queue.end(), j );
+        TestIteratorAux( CALL_BEGIN(queue,j)      , CALL_END(queue,j)      , j );
+        TestIteratorAux( CALL_BEGIN(const_queue,j), CALL_END(const_queue,j), j );
+        TestIteratorAux( CALL_BEGIN(const_queue,j), CALL_END(queue,j)      , j );
+        TestIteratorAux( CALL_BEGIN(queue,j)      , CALL_END(const_queue,j), j );
         Foo f;
         f.serial = j+1;
         queue.push(f);
     }
-    TestIteratorAssignment<tbb::concurrent_queue<Foo>::const_iterator>( const_queue.begin() );
-    TestIteratorAssignment<tbb::concurrent_queue<Foo>::const_iterator>( queue.begin() );
-    TestIteratorAssignment<tbb::concurrent_queue<Foo>::iterator>( queue.begin() );
+    TestIteratorAssignment<tbb::concurrent_queue<Foo>::const_iterator>( const_queue.unsafe_begin() );
+    TestIteratorAssignment<tbb::concurrent_queue<Foo>::const_iterator>( queue.unsafe_begin() );
+    TestIteratorAssignment<tbb::concurrent_queue<Foo>::iterator>( queue.unsafe_begin() );
     TestIteratorTraits<tbb::concurrent_queue<Foo>::const_iterator, const Foo>();
     TestIteratorTraits<tbb::concurrent_queue<Foo>::iterator, Foo>();
 }
@@ -604,11 +633,15 @@ void TestConcurrentQueueType() {
 template<typename T>
 void TestEmptyQueue() {
     const tbb::concurrent_queue<T> queue;
-    ASSERT( queue.size()==0, NULL );
+    ASSERT( queue.SIZE()==0, NULL );
+#if TBB_DEPRECATED
     ASSERT( queue.capacity()>0, NULL );
     ASSERT( size_t(queue.capacity())>=size_t(-1)/(sizeof(void*)+sizeof(T)), NULL );
+#endif
 }
 
+#if TBB_DEPRECATED
+#define CALL_TRY_PUSH(q,f,i) (((i)&0x1)?(q).push_if_not_full(f):(q).try_push(f))
 void TestFullQueue() {
     for( int n=0; n<10; ++n ) {
         FooConstructed = 0;
@@ -618,7 +651,7 @@ void TestFullQueue() {
         for( int i=0; i<=n; ++i ) {
             Foo f;
             f.serial = i;
-            bool result = queue.push_if_not_full( f );
+            bool result = CALL_TRY_PUSH(queue, f, i );
             ASSERT( result==(i<n), NULL );
         }
         for( int i=0; i<=n; ++i ) {
@@ -630,42 +663,52 @@ void TestFullQueue() {
         ASSERT( FooConstructed==FooDestroyed, NULL );
     }
 }
+#endif /* if TBB_DEPRECATED */
+
+#if TBB_DEPRECATED
+#define CALL_PUSH_IF_NOT_FULL(q,v,i) (((i)&0x1)?q.push_if_not_full(v):(q.push(v), true))
+#else
+#define CALL_PUSH_IF_NOT_FULL(q,v,i) (q.push(v), true)
+#endif
 
 void TestClear() {
     FooConstructed = 0;
     FooDestroyed = 0;
-    const int n=5;
-    const int q_capacity=10;
+    const unsigned int n=5;
         
     tbb::concurrent_queue<Foo> queue;
+#if TBB_DEPRECATED
+    const int q_capacity=10;
     queue.set_capacity(q_capacity);
-    for( int i=0; i<n; ++i ) {
+#endif
+    for( size_t i=0; i<n; ++i ) {
         Foo f;
-        f.serial = i;
-        bool result = queue.push_if_not_full( f );
+        f.serial = int(i);
+        bool result = CALL_PUSH_IF_NOT_FULL(queue, f, i);
         ASSERT( result, NULL );
     }
-    ASSERT( queue.size()==n, NULL );
+    ASSERT( unsigned(queue.SIZE())==n, NULL );
     queue.clear();
-    ASSERT( queue.size()==0, NULL );
-    for( int i=0; i<n; ++i ) {
+    ASSERT( queue.SIZE()==0, NULL );
+    for( size_t i=0; i<n; ++i ) {
         Foo f;
-        f.serial = i;
-        bool result = queue.push_if_not_full( f );
+        f.serial = int(i);
+        bool result = CALL_PUSH_IF_NOT_FULL(queue, f, i);
         ASSERT( result, NULL );
     }
-    ASSERT( queue.size()==n, NULL );
+    ASSERT( unsigned(queue.SIZE())==n, NULL );
     queue.clear();
-    ASSERT( queue.size()==0, NULL );
-    for( int i=0; i<n; ++i ) {
+    ASSERT( queue.SIZE()==0, NULL );
+    for( size_t i=0; i<n; ++i ) {
         Foo f;
-        f.serial = i;
-        bool result = queue.push_if_not_full( f );
+        f.serial = int(i);
+        bool result = CALL_PUSH_IF_NOT_FULL(queue, f, i);
         ASSERT( result, NULL );
     }
-    ASSERT( queue.size()==n, NULL );
+    ASSERT( unsigned(queue.SIZE())==n, NULL );
 }
 
+#if TBB_DEPRECATED
 template<typename T>
 struct TestNegativeQueueBody: NoAssign {
     tbb::concurrent_queue<T>& queue;
@@ -699,6 +742,7 @@ void TestNegativeQueue( int nthread ) {
     tbb::concurrent_queue<T> queue;
     NativeParallelFor( nthread, TestNegativeQueueBody<T>(queue,nthread) );
 }
+#endif /* if TBB_DEPRECATED */
 
 void TestExceptions() {
     typedef static_counting_allocator<std::allocator<FooEx>, size_t> allocator_t;
@@ -751,7 +795,7 @@ void TestExceptions() {
                             n_popped=0;
                             for( int k=0; k<n_pushed; k++ ) {
                                 FooEx elt;
-                                queue_test.pop( elt );
+                                queue_test.try_pop( elt );
                                 n_popped++;
                             }
                             n_pushed = 0;
@@ -762,7 +806,7 @@ void TestExceptions() {
                 } catch ( Foo_exception & ) {
                     switch(m) {
                     case m_push: {
-                                ASSERT( queue_test.size()==n_pushed, "incorrect queue size" );
+                                ASSERT( ptrdiff_t(queue_test.SIZE())==n_pushed, "incorrect queue size" );
                                 long tc = MaxFooCount;
                                 MaxFooCount = 0;
                                 for( int k=0; k<(int)tc; k++ ) {
@@ -775,23 +819,24 @@ void TestExceptions() {
                     case m_pop:
                             MaxFooCount = 0; // disable exception
                             n_pushed -= (n_popped+1); // including one that threw an exception
+                            ASSERT( n_pushed>=0, "n_pushed cannot be less than 0" );
                             for( int k=0; k<1000; k++ ) {
                                 queue_test.push( FooEx() );
                                 n_pushed++;
                             }
                             ASSERT( !queue_test.empty(), "queue must not be empty" );
-                            ASSERT( queue_test.size()==n_pushed, "queue size must be equal to n pushed" );
+                            ASSERT( ptrdiff_t(queue_test.SIZE())==n_pushed, "queue size must be equal to n pushed" );
                             for( int k=0; k<n_pushed; k++ ) {
                                 FooEx elt;
-                                queue_test.pop( elt );
+                                queue_test.try_pop( elt );
                             }
                             ASSERT( queue_test.empty(), "queue must be empty" );
-                            ASSERT( queue_test.size()==0, "queue must be empty" );
+                            ASSERT( queue_test.SIZE()==0, "queue must be empty" );
                             break;
                     }
                 } catch ( std::bad_alloc & ) {
                     allocator_char_t::set_limits(); // disable exception from allocator
-                    size_t size = queue_test.size();
+                    size_t size = queue_test.SIZE();
                     switch(m) {
                     case m_push:
                             ASSERT( size>0, "incorrect queue size");
@@ -817,7 +862,9 @@ int main( int argc, char* argv[] ) {
 
     TestEmptyQueue<char>();
     TestEmptyQueue<Foo>();
+#if TBB_DEPRECATED
     TestFullQueue();
+#endif
     TestClear();
     TestConcurrentQueueType();
     TestIterator();
@@ -825,8 +872,10 @@ int main( int argc, char* argv[] ) {
 
     // Test concurrent operations
     for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) {
+#if TBB_DEPRECATED
         TestNegativeQueue<Foo>(nthread);
-        for( int prefill=0; prefill<64; prefill+=(1+prefill/3) ) {
+#endif
+        for( size_t prefill=0; prefill<64; prefill+=(1+prefill/3) ) {
             TestPushPop(prefill,ptrdiff_t(-1),nthread);
             TestPushPop(prefill,ptrdiff_t(1),nthread);
             TestPushPop(prefill,ptrdiff_t(2),nthread);
@@ -834,7 +883,7 @@ int main( int argc, char* argv[] ) {
             TestPushPop(prefill,ptrdiff_t(100),nthread);
         }
     }
-#if __GLIBC__==2&&__GLIBC_MINOR__==3
+#if __TBB_EXCEPTION_HANDLING_BROKEN
     printf("Warning: Exception safety test is skipped due to a known issue.\n");
 #else
     TestExceptions();
diff --git a/src/test/test_concurrent_vector.cpp b/src/test/test_concurrent_vector.cpp
index a68aa36..f620301 100644
--- a/src/test/test_concurrent_vector.cpp
+++ b/src/test/test_concurrent_vector.cpp
@@ -27,6 +27,7 @@
 */
 
 #include "tbb/concurrent_vector.h"
+#include "tbb/tbb_allocator.h"
 #include "tbb/cache_aligned_allocator.h"
 #include "tbb/tbb_exception.h"
 #include <cstdio>
@@ -73,12 +74,12 @@ public:
         return my_bar;
     }
     static const int initial_value_of_bar = 42;
-    Foo() {
+    Foo( int bar = initial_value_of_bar ) {
         state = DefaultInitialized;
         if(MaxFooCount && FooCount >= MaxFooCount)
             throw Foo_exception();
         ++FooCount;
-        my_bar = initial_value_of_bar;
+        my_bar = bar;
     }
     Foo( const Foo& foo ) {
         state = CopyInitialized;
@@ -134,6 +135,7 @@ inline void NextSize( int& s ) {
 //! Check vector have expected size and filling
 template<typename vector_t>
 static void CheckVector( const vector_t& cv, size_t expected_size, size_t old_size ) {
+    ASSERT( cv.capacity()>=expected_size, NULL );
     ASSERT( cv.size()==expected_size, NULL );
     ASSERT( cv.empty()==(expected_size==0), NULL );
     for( int j=0; j<int(expected_size); ++j ) {
@@ -148,7 +150,7 @@ void TestResizeAndCopy() {
     typedef tbb::concurrent_vector<Foo, allocator_t> vector_t;
     allocator_t::init_counters();
     for( int old_size=0; old_size<=128; NextSize( old_size ) ) {
-        for( int new_size=old_size; new_size<=1280; NextSize( new_size ) ) {
+        for( int new_size=0; new_size<=1280; NextSize( new_size ) ) {
             long count = FooCount;
             vector_t v;
             ASSERT( count==FooCount, NULL );
@@ -157,10 +159,10 @@ void TestResizeAndCopy() {
             for( int j=0; j<old_size/2; ++j )
                 ASSERT( v[j].state == Foo::CopyInitialized, NULL);
             v.assign(FooIterator(0), FooIterator(old_size));
-            v.grow_to_at_least(new_size);
+            v.resize(new_size, Foo(33) );
             ASSERT( count+new_size==FooCount, NULL );
             for( int j=0; j<new_size; ++j ) {
-                int expected = j<old_size ? j : Foo::initial_value_of_bar;
+                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);
             }
@@ -199,14 +201,22 @@ void TestCapacity() {
                 ASSERT( v.capacity()>=old_size, NULL );
                 ASSERT( v.capacity()>=new_size, NULL );
                 ASSERT( v.empty(), NULL );
-                for( size_t i=0; i<2*new_size; ++i ) {
+                size_t fill_size = 2*new_size;
+                for( size_t i=0; i<fill_size; ++i ) {
                     ASSERT( size_t(FooCount)==count+i, NULL );
+#if TBB_DEPRECATED
                     size_t j = v.grow_by(1);
+#else
+                    size_t j = v.grow_by(1) - v.begin();
+#endif
                     ASSERT( j==i, NULL );
                     v[j].bar() = int(~j);
                 }
-                vector_t copy_of_v(v); // should allocate first segment with same size as for compact()
-                v.compact(); // TODO: how to check if optimization was performed correctly
+                vector_t copy_of_v(v); // should allocate first segment with same size as for shrink_to_fit()
+                if(__TBB_Log2(/*reserved size*/old_size|1) > __TBB_Log2(fill_size|1) )
+                    ASSERT( v.capacity() != copy_of_v.capacity(), NULL );
+                v.shrink_to_fit();
+                ASSERT( v.capacity() == copy_of_v.capacity(), NULL );
                 CheckVector(v, new_size*2, old_size); // check vector correctness
                 ASSERT( v==copy_of_v, NULL ); // TODO: check also segments layout equality
             }
@@ -249,13 +259,13 @@ struct CheckElement {
 void TestParallelFor( int nthread ) {
     typedef tbb::concurrent_vector<int> vector_t;
     vector_t v;
-    v.grow_to_at_least(N);  
+    v.resize(N);
     tbb::tick_count t0 = tbb::tick_count::now();
     if( Verbose )
         std::printf("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;      
+    const vector_t& u = v;
     tbb::parallel_for( u.range(10000), CheckElement(u.begin()) );
     tbb::tick_count t2 = tbb::tick_count::now();
     if( Verbose )
@@ -336,8 +346,7 @@ void CheckIteratorComparison( V& u ) {
 template<typename T>
 void TestSequentialFor() {
     typedef tbb::concurrent_vector<Foo> V;
-    V v;
-    v.grow_by(N);
+    V v(N);
     ASSERT(v.grow_by(0) == v.grow_by(0, Foo()), NULL);
 
     // Check iterator 
@@ -359,6 +368,7 @@ void TestSequentialFor() {
     // Check const_iterator going forwards
     const V& u = v;
     typename V::const_iterator cp = u.begin();
+    ASSERT( cp == v.cbegin(), NULL );
     ASSERT( (*cp).is_const(), NULL );
     ASSERT( cp->is_const(), NULL );
     ASSERT( *cp == v.front(), NULL);
@@ -374,6 +384,7 @@ void TestSequentialFor() {
 
     // Now go backwards
     cp = u.end();
+    ASSERT( cp == v.cend(), NULL );
     for( int i=int(u.size()); i>0; ) {
         --i;
         V::const_iterator &cpr = --cp;
@@ -415,8 +426,10 @@ void TestSequentialFor() {
         for( int j=-i; size_t(i+j)<u.size(); j=(j<50?j+1:j*5) ) {
             ASSERT( (u.begin()+i)[j].bar()==i+j, NULL );
             ASSERT( (v.begin()+i)[j].bar()==i+j, NULL );
+            ASSERT((v.cbegin()+i)[j].bar()==i+j, NULL );
             ASSERT( (i+u.begin())[j].bar()==i+j, NULL );
             ASSERT( (i+v.begin())[j].bar()==i+j, NULL );
+            ASSERT((i+v.cbegin())[j].bar()==i+j, NULL );
         }
 
     CheckIteratorComparison<typename V::iterator, typename V::iterator>(v);
@@ -426,6 +439,7 @@ void TestSequentialFor() {
 
     TestIteratorAssignment<typename V::const_iterator>( u.begin() );
     TestIteratorAssignment<typename V::const_iterator>( v.begin() );
+    TestIteratorAssignment<typename V::const_iterator>( v.cbegin() );
     TestIteratorAssignment<typename V::iterator>( v.begin() );
     // doesn't compile as expected: TestIteratorAssignment<typename V::iterator>( u.begin() );
 
@@ -445,13 +459,15 @@ void TestSequentialFor() {
     
     // Check const_reverse_iterator 
     typename V::const_reverse_iterator crp = u.rbegin();
+    ASSERT( crp == v.crbegin(), NULL );
     ASSERT( *crp == v.back(), NULL);
     for( size_t i=v.size(); i>0; --i, ++crp ) {
         typename V::const_reference cpref = *crp;
         ASSERT( size_t(cpref.bar())==i-1, NULL );
         ASSERT( crp!=u.rend(), NULL );
     }
-    ASSERT( crp==u.rend(), NULL );
+    ASSERT( crp == u.rend(), NULL );
+    ASSERT( crp == v.crend(), NULL );
 
     TestIteratorAssignment<typename V::const_reverse_iterator>( u.rbegin() );
     TestIteratorAssignment<typename V::reverse_iterator>( v.rbegin() );
@@ -479,7 +495,7 @@ void TestSequentialFor() {
 
 static const size_t Modulus = 7;
 
-typedef static_counting_allocator<tbb::cache_aligned_allocator<Foo> > MyAllocator;
+typedef static_counting_allocator<tbb::zero_allocator<Foo> > MyAllocator;
 typedef tbb::concurrent_vector<Foo, MyAllocator> MyVector;
 
 class GrowToAtLeast: NoAssign {
@@ -488,9 +504,15 @@ public:
     void operator()( const tbb::blocked_range<size_t>& range ) const {
         for( size_t i=range.begin(); i!=range.end(); ++i ) {
             size_t n = my_vector.size();
-            size_t k = i % (2*n+1);
-            my_vector.grow_to_at_least(k+1);
-            ASSERT( my_vector.size()>=k+1, NULL );
+            size_t req = (i % (2*n+1))+1;
+#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) )
+                ASSERT( p->state == Foo::DefaultInitialized || p->state == Foo::ZeroInitialized, NULL);
+#endif
+            ASSERT( my_vector.size()>=req, NULL );
         }
     }
     GrowToAtLeast( MyVector& vector ) : my_vector(vector) {}
@@ -504,7 +526,7 @@ void TestConcurrentGrowToAtLeast() {
     }
     v.clear();
     ASSERT( 0 == v.get_allocator().frees, NULL);
-    v.compact();
+    v.shrink_to_fit();
     size_t items_allocated = v.get_allocator().items_allocated,
            items_freed = v.get_allocator().items_freed;
     size_t allocations = v.get_allocator().allocations,
@@ -514,23 +536,36 @@ void TestConcurrentGrowToAtLeast() {
 }
 
 //! Test concurrent invocations of method concurrent_vector::grow_by
+template<typename MyVector>
 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 ) {
             if( i&1 ) {
+#if TBB_DEPRECATED
                 Foo& element = my_vector[my_vector.grow_by(1)]; 
                 element.bar() = i;
+#else
+                my_vector.grow_by(1)->bar() = i;
+#endif
             } else {
                 Foo f;
                 f.bar() = i;
-                size_t k;
+#if TBB_DEPRECATED
+                size_t r;
+#else
+                typename MyVector::iterator r;
+#endif
                 if( i&2 )
-                    k = my_vector.push_back( f );
+                    r = my_vector.push_back( f );
                 else
-                    k = my_vector.grow_by(1, f);
-                ASSERT( my_vector[k].bar()==i, NULL );
+                    r = my_vector.grow_by(1, f);
+#if TBB_DEPRECATED
+                ASSERT( my_vector[r].bar()==i, NULL );
+#else
+                ASSERT( r->bar()==i, NULL );
+#endif
             }
         }
     }
@@ -543,7 +578,7 @@ void TestConcurrentGrowBy( int nthread ) {
     {
         int m = 100000; MyAllocator a;
         MyVector v( a );
-        tbb::parallel_for( tbb::blocked_range<int>(0,m,1000), GrowBy(v) );
+        tbb::parallel_for( tbb::blocked_range<int>(0,m,1000), GrowBy<MyVector>(v) );
         ASSERT( v.size()==size_t(m), NULL );
 
         // Verify that v is a permutation of 0..m
@@ -602,7 +637,7 @@ void TestAssign() {
             for( int i=0; i<src_size; ++i )
                 ASSERT( v[i].bar()==i, NULL );
             ASSERT( 0 == u.get_allocator().frees, NULL);
-            u.compact(); // deallocate unused memory
+            u.shrink_to_fit(); // deallocate unused memory
             size_t items_allocated = u.get_allocator().items_allocated,
                    items_freed = u.get_allocator().items_freed;
             size_t allocations = u.get_allocator().allocations,
@@ -663,7 +698,11 @@ public:
     void operator()( const tbb::blocked_range<Number>& r ) const {
         for( Number i=r.begin(); i!=r.end(); ++i ) { 
             if( i%2 && is_prime(i) ) {
+#if TBB_DEPRECATED
                 Primes[Primes.grow_by(1)] = i;
+#else
+                Primes.push_back( i );
+#endif
             }
         }
     }
@@ -721,38 +760,7 @@ void TestSort() {
 //------------------------------------------------------------------------
 // Test exceptions safety (from allocator and items constructors)
 //------------------------------------------------------------------------
-template<typename MyVector>
-class GrowthException: NoAssign {
-    MyVector& my_vector;
-public:
-    static volatile bool my_cancel;
-    void operator()( const tbb::blocked_range<int>& range ) const {
-        if(!my_cancel) for( int i=range.begin(); i!=range.end(); ++i ) {
-            try {
-                if( i&1 ) {
-                    Foo& element = my_vector[my_vector.grow_by(1)]; 
-                    element.bar() = i;
-                } else {
-                    Foo f;
-                    f.bar() = i;
-                    size_t k;
-                    if( i&2 )
-                        k = my_vector.push_back( f );
-                    else
-                        k = my_vector.grow_by(1, f);
-                    ASSERT( my_vector[k].bar()==i, NULL );
-                }
-            } catch(...) {
-                my_cancel = true;
-            }
-        }
-    }
-    GrowthException( MyVector& vector ) : my_vector(vector) { my_cancel = false; }
-};
-
-template<typename MyVector>
-volatile bool GrowthException<MyVector>::my_cancel = false;
-
+#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;
@@ -803,12 +811,15 @@ void TestExceptions() {
                         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
-                        victim.compact(); // should start defragmenting first segment
+                        victim.shrink_to_fit(); // should start defragmenting first segment
                     } break;
                 case grow: {
                         tbb::task_scheduler_init init;
-                        tbb::parallel_for( tbb::blocked_range<int>(0, N, 5), GrowthException<vector_t>(victim) );
-                        if(GrowthException<vector_t>::my_cancel) throw tbb::bad_last_alloc(); // parallel algorithms don't support exception passing yet
+                        try {
+                            tbb::parallel_for( tbb::blocked_range<int>(0, N, 5), GrowBy<vector_t>(victim) );
+                        } catch(...) {
+                            throw tbb::bad_last_alloc();
+                        }
                     } break;
                 default:;
                 }
@@ -817,6 +828,13 @@ void TestExceptions() {
                 allocator_t::set_limits(); MaxFooCount = 0;
                 size_t capacity = victim.capacity();
                 size_t size = victim.size();
+#if TBB_DEPRECATED
+                size_t req_size = victim.grow_by(0);
+#else
+                size_t req_size = victim.grow_by(0) - victim.begin();
+#endif
+                ASSERT( size <= capacity, NULL);
+                ASSERT( req_size >= size, NULL);
                 switch(m) {
                 case reserve:
                     if(t) ASSERT(false, NULL);
@@ -839,8 +857,11 @@ void TestExceptions() {
                     }
                 case grow:
                 case op_equ:
-                    if(!t) ASSERT(capacity > 0 && capacity < N, "unexpected capacity");
-                    {// not related to if(!t)
+                    if(!t) {
+                        ASSERT(capacity > 0, NULL);
+                        ASSERT(capacity < N, "unexpected capacity");
+                    }
+                    {
                         vector_t copy_of_victim(victim);
                         ASSERT(copy_of_victim.size() > 0, NULL);
                         for(int i = 0; ; ++i) {
@@ -850,7 +871,7 @@ void TestExceptions() {
                                 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) < 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(...) {
@@ -869,7 +890,7 @@ void TestExceptions() {
                     } break;
                 case compact:
                     ASSERT(capacity > 0, "unexpected capacity");
-                    ASSERT(victim == src, "compact() is broken");
+                    ASSERT(victim == src, "shrink_to_fit() is broken");
                     break;
 
                 default:; // nothing to check here
@@ -881,7 +902,7 @@ void TestExceptions() {
         ASSERT(false, "unexpected exception");
     }
 }
-
+#endif// __TBB_EXCEPTIONS
 //------------------------------------------------------------------------
 
 //! Test driver
@@ -892,12 +913,13 @@ int main( int argc, char* argv[] ) {
     if( MinThread<1 ) {
         std::printf("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> ();
     TestResizeAndCopy();
     TestAssign();
+#endif
     TestCapacity();
     for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) {
         tbb::task_scheduler_init init( nthread );
@@ -905,15 +927,20 @@ int main( int argc, char* argv[] ) {
         TestConcurrentGrowToAtLeast();
         TestConcurrentGrowBy( nthread );
     }
+#if !TBB_DEPRECATED
     TestComparison();
+#if !__TBB_FLOATING_POINT_BROKEN
     TestFindPrimes();
+#endif
     TestSort();
-#if __GLIBC__==2&&__GLIBC_MINOR__==3
+#if __TBB_EXCEPTIONS
+#if __TBB_EXCEPTION_HANDLING_BROKEN
     printf("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");
diff --git a/src/test/test_eh_algorithms.cpp b/src/test/test_eh_algorithms.cpp
index e99a7e4..80f9fdd 100644
--- a/src/test/test_eh_algorithms.cpp
+++ b/src/test/test_eh_algorithms.cpp
@@ -26,7 +26,6 @@
     the GNU General Public License.
 */
 
-#include "stddef.h"
 #include "tbb/task_scheduler_init.h"
 #include "tbb/tbb_exception.h"
 #include "tbb/task.h"
@@ -36,184 +35,56 @@
 #include "tbb/parallel_do.h"
 #include "tbb/pipeline.h"
 #include "tbb/blocked_range.h"
-
-#include <typeinfo>
-
-#include "harness.h"
-#include "harness_trace.h"
-
+#include "harness_assert.h"
 
 #if __TBB_EXCEPTIONS
 
-//------------------------------------------------------------------------
-// Utility definitions
-//------------------------------------------------------------------------
-
-#define ITER_RANGE  100000
-#define ITER_GRAIN  1000
+#define FLAT_RANGE  100000
+#define FLAT_GRAIN  1000
 #define NESTING_RANGE  100
 #define NESTING_GRAIN  10
-#define NESTED_RANGE  (ITER_RANGE / NESTING_RANGE)
-#define NESTED_GRAIN  (ITER_GRAIN / NESTING_GRAIN)
-#define EXCEPTION_DESCR "Test exception"
-
-namespace internal = tbb::internal;
-using internal::intptr;
-
-namespace util {
-
-#if _WIN32 || _WIN64
-
-    typedef DWORD tid_t;
-
-    tid_t get_my_tid () { return GetCurrentThreadId(); }
-
-    void sleep ( int ms ) { ::Sleep(ms); }
-
-#else /* !WIN */
-
-    typedef pthread_t tid_t;
-
-    tid_t get_my_tid () { return pthread_self(); }
-
-    void sleep ( int ms ) {
-        timespec  requested = { ms / 1000, (ms % 1000)*1000000 };
-        timespec  remaining = {0};
-        nanosleep(&requested, &remaining);
-    }
-
-#endif /* !WIN */
-
-inline intptr num_subranges ( intptr length, intptr grain ) {
-    intptr n = 1;
-    for( ; length>grain; length-=length>>1 ) 
-        n*=2;
-    return n;
-}
-
-} // namespace util
+#define NESTED_RANGE  (FLAT_RANGE / NESTING_RANGE)
+#define NESTED_GRAIN  (FLAT_GRAIN / NESTING_GRAIN)
 
-int g_max_concurrency = 0;
-int g_num_threads = 0;
+tbb::atomic<intptr_t> g_FedTasksCount; // number of tasks added by parallel_do feeder
 
-inline void yield_if_singlecore() { if ( g_max_concurrency == 1 ) __TBB_Yield(); }
+#include <limits.h> // for INT_MAX
 
+inline intptr_t Existed () { return INT_MAX; }
 
-class test_exception : public std::exception
-{
-    const char* my_description;
-public:
-    test_exception ( const char* description ) : my_description(description) {}
-
-    const char* what() const throw() { return my_description; }
-};
-
-class solitary_test_exception : public test_exception
-{
-public:
-    solitary_test_exception ( const char* description ) : test_exception(description) {}
-};
+#include "harness_eh.h"
 
-
-tbb::atomic<intptr> g_cur_executed, // number of times a body was requested to process data
-                    g_exc_executed, // snapshot of execution statistics at the moment of the 1st exception throwing
-                    g_catch_executed, // snapshot of execution statistics at the moment when the 1st exception is caught
-                    g_exceptions, // number of exceptions exposed to TBB users (i.e. intercepted by the test code)
-                    g_added_tasks_count; // number of tasks added by parallel_do feeder
-
-util::tid_t  g_master = 0;
-
-volatile intptr g_exception_thrown = 0;
-volatile bool g_throw_exception = true;
-volatile bool g_no_exception = true;
-volatile bool g_unknown_exception = false;
-volatile bool g_task_was_cancelled = false;
-
-bool    g_exception_in_master = false;
-bool    g_solitary_exception = true;
-volatile bool   g_wait_completed = false;
-
-void reset_globals () {
-    g_cur_executed = g_exc_executed = g_catch_executed = 0;
-    g_exceptions = 0;
-    g_exception_thrown = 0;
-    g_throw_exception = true;
-    g_no_exception = true;
-    g_unknown_exception = false;
-    g_task_was_cancelled = false;
-    g_wait_completed = false;
-    g_added_tasks_count = 0;
-}
-
-void throw_test_exception ( intptr throw_threshold ) {
-    if ( !g_throw_exception  ||  g_exception_in_master ^ (util::get_my_tid() == g_master) )
-        return; 
-    if ( !g_solitary_exception ) {
-        __TBB_CompareAndSwapW(&g_exc_executed, g_cur_executed, 0);
-        TRACE ("About to throw one of multiple test_exceptions (thread %08x):", util::get_my_tid());
-        g_exception_thrown = 1;
-        throw (test_exception(EXCEPTION_DESCR));
-    }
-    while ( g_cur_executed < throw_threshold )
-        yield_if_singlecore();
-    if ( __TBB_CompareAndSwapW(&g_exception_thrown, 1, 0) == 0 ) {
-        g_exc_executed = g_cur_executed;
-        TRACE ("About to throw solitary test_exception... :");
-        throw (solitary_test_exception(EXCEPTION_DESCR));
-    }
+inline void ResetGlobals (  bool throwException = true, bool flog = false ) {
+    ResetEhGlobals( throwException, flog );
+    g_FedTasksCount = 0;
 }
 
-#define TRY()   \
-    bool no_exception = true, unknown_exception = false;    \
-    try {
-
-#define CATCH()     \
-    } catch ( tbb::captured_exception& e ) {     \
-        g_catch_executed = g_cur_executed;  \
-        ASSERT (strcmp(e.name(), (g_solitary_exception ? typeid(solitary_test_exception) : typeid(test_exception)).name() ) == 0, "Unexpected original exception name");    \
-        ASSERT (strcmp(e.what(), EXCEPTION_DESCR) == 0, "Unexpected original exception info");   \
-        TRACE ("Executed at throw moment %d; upon catch %d", (intptr)g_exc_executed, (intptr)g_catch_executed);  \
-        g_no_exception = no_exception = false;   \
-        ++g_exceptions; \
-    }   \
-    catch ( ... ) { \
-        g_no_exception = false;   \
-        g_unknown_exception = unknown_exception = true;   \
-    }
-
-#define ASSERT_EXCEPTION()     \
-    ASSERT (g_exception_thrown ? !g_no_exception : g_no_exception, "throw without catch or catch without throw");   \
-    ASSERT (!g_no_exception, "no exception occurred");    \
-    ASSERT (!g_unknown_exception, "unknown exception was caught");
-
-#define CATCH_AND_ASSERT()     \
-    CATCH() \
-    ASSERT_EXCEPTION()
-
-#define ASSERT_TEST_POSTCOND()
-
-
-//------------------------------------------------------------------------
-// Tests
-//------------------------------------------------------------------------
+////////////////////////////////////////////////////////////////////////////////
+// Tests for tbb::parallel_for and tbb::parallel_reduce
 
 typedef size_t count_type;
 typedef tbb::blocked_range<count_type> range_type;
 
+inline intptr_t NumSubranges ( intptr_t length, intptr_t grain ) {
+    intptr_t n = 1;
+    for( ; length > grain; length -= length >> 1 )
+        n *= 2;
+    return n;
+}
 
 template<class Body>
-intptr test_num_subranges_calculation ( intptr length, intptr grain, intptr nested_length, intptr nested_grain ) {
-    reset_globals();
-    g_throw_exception = false;
-    intptr  nesting_body_calls = util::num_subranges(length, grain),
-            nested_body_calls = util::num_subranges(nested_length, nested_grain),
-            calls_in_normal_case = nesting_body_calls * (nested_body_calls + 1);
+intptr_t TestNumSubrangesCalculation ( intptr_t length, intptr_t grain, intptr_t nested_length, intptr_t nested_grain ) {
+    ResetGlobals();
+    g_ThrowException = false;
+    intptr_t nestingCalls = NumSubranges(length, grain),
+             nestedCalls = NumSubranges(nested_length, nested_grain),
+             maxExecuted = nestingCalls * (nestedCalls + 1);
     tbb::parallel_for( range_type(0, length, grain), Body() );
-    ASSERT (g_cur_executed == calls_in_normal_case, "Wrong estimation of bodies invocation count");
-    return calls_in_normal_case;
+    ASSERT (g_CurExecuted == maxExecuted, "Wrong estimation of bodies invocation count");
+    return maxExecuted;
 }
 
-class no_throw_pfor_body {
+class NoThrowParForBody {
 public:
     void operator()( const range_type& r ) const {
         volatile long x;
@@ -224,54 +95,51 @@ public:
 };
 
 void Test0 () {
-    TRACEP ("");
-    reset_globals();
+    ResetGlobals();
     tbb::simple_partitioner p;
     for( size_t i=0; i<10; ++i ) {
-        tbb::parallel_for( range_type(0, 0, 1), no_throw_pfor_body() );
-        tbb::parallel_for( range_type(0, 0, 1), no_throw_pfor_body(), p );
-        tbb::parallel_for( range_type(0, 128, 8), no_throw_pfor_body() );
-        tbb::parallel_for( range_type(0, 128, 8), no_throw_pfor_body(), p );
+        tbb::parallel_for( range_type(0, 0, 1), NoThrowParForBody() );
+        tbb::parallel_for( range_type(0, 0, 1), NoThrowParForBody(), p );
+        tbb::parallel_for( range_type(0, 128, 8), NoThrowParForBody() );
+        tbb::parallel_for( range_type(0, 128, 8), NoThrowParForBody(), p );
     }
 } // void Test0 ()
 
 //! Template that creates a functor suitable for parallel_reduce from a functor for parallel_for.
-template<typename ForBody>
-class ReduceBody: NoAssign {
-    ForBody my_body;
+template<typename ParForBody>
+class SimpleParReduceBody: NoAssign {
+    ParForBody m_Body;
 public:
-    void operator()( const range_type& r ) const {my_body(r);}
-    ReduceBody( count_type c ) : my_body(c) {}
-    ReduceBody( ReduceBody& left, tbb::split ) : my_body(left.my_body) {}
-    void join( ReduceBody& /*right*/ ) {}
-};
+    void operator()( const range_type& r ) const { m_Body(r); }
+    SimpleParReduceBody() {}
+    SimpleParReduceBody( SimpleParReduceBody& left, tbb::split ) : m_Body(left.m_Body) {}
+    void join( SimpleParReduceBody& /*right*/ ) {}
+}; // SimpleParReduceBody
 
 //! Test parallel_for and parallel_reduce for a given partitioner.
 /** The Body need only be suitable for a parallel_for. */
-template<typename Body, typename Partitioner>
+template<typename ParForBody, typename Partitioner>
 void TestParallelLoopAux( Partitioner& partitioner ) {
     for( int i=0; i<2; ++i ) {
-        TRACEP ("");
-        reset_globals();
+        ResetGlobals();
         TRY();
-            if( i==0 ) 
-                tbb::parallel_for( range_type(0, ITER_RANGE, ITER_GRAIN), Body(ITER_RANGE/3), partitioner ); 
+            if( i==0 )
+                tbb::parallel_for( range_type(0, FLAT_RANGE, FLAT_GRAIN), ParForBody(), partitioner );
             else {
-                ReduceBody<Body> rb(ITER_RANGE/3);
-                tbb::parallel_reduce( range_type(0, ITER_RANGE, ITER_GRAIN), rb, partitioner ); 
+                SimpleParReduceBody<ParForBody> rb;
+                tbb::parallel_reduce( range_type(0, FLAT_RANGE, FLAT_GRAIN), rb, partitioner );
             }
         CATCH_AND_ASSERT();
-        ASSERT (!no_exception, "No exception thrown from the nesting parallel_for");
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
-        TRACE ("Executed at the end of test %d; number of exceptions", (intptr)g_cur_executed);
-        ASSERT (g_exceptions == 1, "No try_blocks in any body expected in this test");
-        if ( !g_solitary_exception )
-            ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
+        ASSERT (exceptionCaught, "No exception thrown from the nesting parallel_for");
+        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
+        ASSERT (g_Exceptions == 1, "No try_blocks in any body expected in this test");
+        if ( !g_SolitaryException )
+            ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
     }
-} 
+}
 
 //! Test with parallel_for and parallel_reduce, over all three kinds of partitioners.
-/** The Body need only be suitable for a parallel_for. */
+/** The Body only needs to be suitable for tbb::parallel_for. */
 template<typename Body>
 void TestParallelLoop() {
     // The simple and auto partitioners should be const, but not the affinity partitioner.
@@ -279,249 +147,176 @@ void TestParallelLoop() {
     TestParallelLoopAux<Body>( p0 );
     const tbb::auto_partitioner p1;
     TestParallelLoopAux<Body>( p1 );
-    tbb::affinity_partitioner p2;       
+    tbb::affinity_partitioner p2;
     TestParallelLoopAux<Body>( p2 );
 }
 
-class simple_pfor_body: NoAssign {
-    const count_type my_throw_limit;
+class SimpleParForBody: NoAssign {
 public:
-    simple_pfor_body( count_type throw_limit=0 ) : my_throw_limit(throw_limit) {}
     void operator()( const range_type& r ) const {
+        Harness::ConcurrencyTracker ct;
         volatile long x;
-        count_type end = r.end();
-        for( count_type i=r.begin(); i!=end; ++i )
+        for( count_type i = r.begin(); i != r.end(); ++i )
             x = 0;
-        ++g_cur_executed;
-        if ( g_exception_in_master ^ (util::get_my_tid() == g_master) )
-        {
-            // Make absolutely sure that worker threads on multicore machines had a chance to steal something
-            util::sleep(10);
-        }
-        if( my_throw_limit<r.end() )
-            throw_test_exception(1);
+        ++g_CurExecuted;
+        WaitUntilConcurrencyPeaks();
+        ThrowTestException(1);
     }
 };
 
 void Test1() {
-    TestParallelLoop<simple_pfor_body>();
+    TestParallelLoop<SimpleParForBody>();
 } // void Test1 ()
 
-class nesting_pfor_body: NoAssign {
-    const count_type my_throw_limit;
+class NestingParForBody: NoAssign {
 public:
-    nesting_pfor_body( count_type throw_limit=0 ) : my_throw_limit(throw_limit) {}
     void operator()( const range_type& ) const {
-        ++g_cur_executed;
-        if ( util::get_my_tid() == g_master )
-            yield_if_singlecore();
-        tbb::parallel_for( tbb::blocked_range<size_t>(0, NESTED_RANGE, NESTED_GRAIN), simple_pfor_body() );
+        Harness::ConcurrencyTracker ct;
+        ++g_CurExecuted;
+        tbb::parallel_for( tbb::blocked_range<size_t>(0, NESTED_RANGE, NESTED_GRAIN), SimpleParForBody() );
     }
 };
 
 //! Uses parallel_for body containing a nested parallel_for with the default context not wrapped by a try-block.
-/** Nested algorithms are spawned inside the new bound context by default. Since 
-    exceptions thrown from the nested parallel_for are not handled by the caller 
-    (nesting parallel_for body) in this test, they will cancel all the sibling nested 
+/** Nested algorithms are spawned inside the new bound context by default. Since
+    exceptions thrown from the nested parallel_for are not handled by the caller
+    (nesting parallel_for body) in this test, they will cancel all the sibling nested
     algorithms. **/
 void Test2 () {
-    TestParallelLoop<nesting_pfor_body>();
+    TestParallelLoop<NestingParForBody>();
 } // void Test2 ()
 
-class nesting_pfor_with_isolated_context_body {
+class NestingParForBodyWithIsolatedCtx {
 public:
     void operator()( const range_type& ) const {
         tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        ++g_cur_executed;
-        // Give other threads a chance to steal their first tasks
-        __TBB_Yield();
-        tbb::parallel_for( tbb::blocked_range<size_t>(0, NESTED_RANGE, NESTED_GRAIN), simple_pfor_body(), tbb::simple_partitioner(), ctx );
+        ++g_CurExecuted;
+        tbb::parallel_for( tbb::blocked_range<size_t>(0, NESTED_RANGE, NESTED_GRAIN), SimpleParForBody(), tbb::simple_partitioner(), ctx );
     }
 };
 
 //! Uses parallel_for body invoking a nested parallel_for with an isolated context without a try-block.
-/** Even though exceptions thrown from the nested parallel_for are not handled 
-    by the caller in this test, they will not affect sibling nested algorithms 
-    already running because of the isolated contexts. However because the first 
-    exception cancels the root parallel_for only the first g_num_threads subranges
+/** Even though exceptions thrown from the nested parallel_for are not handled
+    by the caller in this test, they will not affect sibling nested algorithms
+    already running because of the isolated contexts. However because the first
+    exception cancels the root parallel_for only the first g_NumThreads subranges
     will be processed (which launch nested parallel_fors) **/
 void Test3 () {
-    TRACEP ("");
-    reset_globals();
-    typedef nesting_pfor_with_isolated_context_body body_type;
-    intptr  nested_body_calls = util::num_subranges(NESTED_RANGE, NESTED_GRAIN),
-            min_num_calls = (g_num_threads - 1) * nested_body_calls;
+    ResetGlobals();
+    typedef NestingParForBodyWithIsolatedCtx body_type;
+    intptr_t  nestedCalls = NumSubranges(NESTED_RANGE, NESTED_GRAIN),
+            minExecuted = (g_NumThreads - 1) * nestedCalls;
     TRY();
         tbb::parallel_for( range_type(0, NESTING_RANGE, NESTING_GRAIN), body_type() );
     CATCH_AND_ASSERT();
-    ASSERT (!no_exception, "No exception thrown from the nesting parallel_for");
-    TRACE ("Executed at the end of test %d", (intptr)g_cur_executed);
-    if ( g_solitary_exception ) {
-        ASSERT (g_cur_executed > min_num_calls, "Too few tasks survived exception");
-        ASSERT (g_cur_executed <= min_num_calls + (g_catch_executed + g_num_threads), "Too many tasks survived exception");
+    ASSERT (exceptionCaught, "No exception thrown from the nesting parallel_for");
+    if ( g_SolitaryException ) {
+        ASSERT (g_CurExecuted > minExecuted, "Too few tasks survived exception");
+        ASSERT (g_CurExecuted <= minExecuted + (g_ExecutedAtCatch + g_NumThreads), "Too many tasks survived exception");
     }
-    ASSERT (g_exceptions == 1, "No try_blocks in any body expected in this test");
-    if ( !g_solitary_exception )
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
+    ASSERT (g_Exceptions == 1, "No try_blocks in any body expected in this test");
+    if ( !g_SolitaryException )
+        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
 } // void Test3 ()
 
-
-class nesting_pfor_with_eh_body {
+class NestingParForExceptionSafeBody {
 public:
     void operator()( const range_type& ) const {
         tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        ++g_cur_executed;
         TRY();
-            tbb::parallel_for( tbb::blocked_range<size_t>(0, NESTED_RANGE, NESTED_GRAIN), simple_pfor_body(), tbb::simple_partitioner(), ctx );
+            tbb::parallel_for( tbb::blocked_range<size_t>(0, NESTED_RANGE, NESTED_GRAIN), SimpleParForBody(), tbb::simple_partitioner(), ctx );
         CATCH();
     }
 };
 
 //! Uses parallel_for body invoking a nested parallel_for (with default bound context) inside a try-block.
-/** Since exception(s) thrown from the nested parallel_for are handled by the caller 
-    in this test, they do not affect neither other tasks of the the root parallel_for 
+/** Since exception(s) thrown from the nested parallel_for are handled by the caller
+    in this test, they do not affect neither other tasks of the the root parallel_for
     nor sibling nested algorithms. **/
 void Test4 () {
-    TRACEP ("");
-    reset_globals();
-    intptr  nested_body_calls = util::num_subranges(NESTED_RANGE, NESTED_GRAIN),
-            nesting_body_calls = util::num_subranges(NESTING_RANGE, NESTING_GRAIN),
-            calls_in_normal_case = nesting_body_calls * (nested_body_calls + 1);
+    ResetGlobals( true, true );
+    intptr_t  nestedCalls = NumSubranges(NESTED_RANGE, NESTED_GRAIN),
+            nestingCalls = NumSubranges(NESTING_RANGE, NESTING_GRAIN),
+            maxExecuted = nestingCalls * nestedCalls;
     TRY();
-        tbb::parallel_for( range_type(0, NESTING_RANGE, NESTING_GRAIN), nesting_pfor_with_eh_body() );
+        tbb::parallel_for( range_type(0, NESTING_RANGE, NESTING_GRAIN), NestingParForExceptionSafeBody() );
     CATCH();
-    ASSERT (no_exception, "All exceptions must have been handled in the parallel_for body");
-    TRACE ("Executed %d (normal case %d), exceptions %d, in master only? %d", (intptr)g_cur_executed, calls_in_normal_case, (intptr)g_exceptions, g_exception_in_master);
-    intptr  min_num_calls = 0;
-    if ( g_solitary_exception ) {
-        min_num_calls = calls_in_normal_case - nested_body_calls;
-        ASSERT (g_exceptions == 1, "No exception registered");
-        ASSERT (g_cur_executed <= min_num_calls + g_num_threads, "Too many tasks survived exception");
+    ASSERT (!exceptionCaught, "All exceptions must have been handled in the parallel_for body");
+    intptr_t  minExecuted = 0;
+    if ( g_SolitaryException ) {
+        minExecuted = maxExecuted - nestedCalls;
+        ASSERT (g_Exceptions == 1, "No exception registered");
+        ASSERT (g_CurExecuted >= minExecuted, "Too few tasks executed");
+        ASSERT (g_CurExecuted <= minExecuted + g_NumThreads, "Too many tasks survived exception");
     }
-    else if ( !g_exception_in_master ) {
-        // Each nesting body + at least 1 of its nested body invocations
-        min_num_calls = 2 * nesting_body_calls;
-        ASSERT (g_exceptions > 1 && g_exceptions <= nesting_body_calls, "Unexpected actual number of exceptions");
-        ASSERT (g_cur_executed >= min_num_calls + (nesting_body_calls - g_exceptions) * nested_body_calls, "Too few tasks survived exception");
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived multiple exceptions");
-        // Additional nested_body_calls accounts for the minimal amount of tasks spawned 
-        // by not throwing threads. In the minimal case it is either the master thread or the only worker.
-        ASSERT (g_cur_executed <= min_num_calls + (nesting_body_calls - g_exceptions + 1) * nested_body_calls + g_exceptions + g_num_threads, "Too many tasks survived exception");
+    else {
+        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 <= nestingCalls * (1 + g_NumThreads), "Too many tasks survived exception");
     }
 } // void Test4 ()
 
-
-class my_cancellator_task : public tbb::task
-{
-    tbb::task_group_context &my_ctx_to_cancel;
-    intptr my_cancel_threshold;
-
-    tbb::task* execute () {
-        s_cancellator_ready = true;
-        while ( g_cur_executed < my_cancel_threshold )
-            yield_if_singlecore();
-        my_ctx_to_cancel.cancel_group_execution();
-        g_catch_executed = g_cur_executed;
-        return NULL;
-    }
-public:
-    my_cancellator_task ( tbb::task_group_context& ctx, intptr threshold ) 
-        : my_ctx_to_cancel(ctx), my_cancel_threshold(threshold)
-    {}
-
-    static volatile bool s_cancellator_ready;
-};
-
-volatile bool my_cancellator_task::s_cancellator_ready = false;
-
-class pfor_body_to_cancel {
+class ParForBodyToCancel {
 public:
     void operator()( const range_type& ) const {
-        ++g_cur_executed;
-        do {
-            __TBB_Yield();
-        } while( !my_cancellator_task::s_cancellator_ready );
+        ++g_CurExecuted;
+        CancellatorTask::WaitUntilReady();
     }
 };
 
 template<class B>
-class my_worker_task : public tbb::task
-{
+class ParForLauncherTask : public tbb::task {
     tbb::task_group_context &my_ctx;
 
     tbb::task* execute () {
-        tbb::parallel_for( range_type(0, ITER_RANGE, ITER_GRAIN), B(), tbb::simple_partitioner(), my_ctx );
+        tbb::parallel_for( range_type(0, FLAT_RANGE, FLAT_GRAIN), B(), tbb::simple_partitioner(), my_ctx );
         return NULL;
     }
 public:
-    my_worker_task ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}
+    ParForLauncherTask ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}
 };
 
-
 //! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).
 void Test5 () {
-    TRACEP ("");
-    reset_globals();
-    g_throw_exception = false;
-    intptr  threshold = util::num_subranges(ITER_RANGE, ITER_GRAIN) / 4;
-    tbb::task_group_context  ctx;
-    ctx.reset();
-    my_cancellator_task::s_cancellator_ready = false;
-    tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
-    r.set_ref_count(3);
-    r.spawn( *new( r.allocate_child() ) my_cancellator_task(ctx, threshold) );
-    __TBB_Yield();
-    r.spawn( *new( r.allocate_child() ) my_worker_task<pfor_body_to_cancel>(ctx) );
-    TRY();
-        r.wait_for_all();
-    CATCH();
-    r.destroy(r);
-    ASSERT (no_exception, "Cancelling tasks should not cause any exceptions");
-    //ASSERT_WARNING (g_catch_executed < threshold + 2 * g_num_threads, "Too many tasks were executed between reaching threshold and signaling cancellation");
-    ASSERT (g_cur_executed < g_catch_executed + g_num_threads, "Too many tasks were executed after cancellation");
+    ResetGlobals( false );
+    RunCancellationTest<ParForLauncherTask<ParForBodyToCancel>, CancellatorTask>( NumSubranges(FLAT_RANGE, FLAT_GRAIN) / 4 );
+    ASSERT (g_CurExecuted < g_ExecutedAtCatch + g_NumThreads, "Too many tasks were executed after cancellation");
 } // void Test5 ()
 
-class my_cancellator_2_task : public tbb::task
-{
-    tbb::task_group_context &my_ctx_to_cancel;
+class CancellatorTask2 : public tbb::task {
+    tbb::task_group_context &m_GroupToCancel;
 
     tbb::task* execute () {
-        util::sleep(20);  // allow the first workers to start
-        my_ctx_to_cancel.cancel_group_execution();
-        g_catch_executed = g_cur_executed;
+        Harness::ConcurrencyTracker ct;
+        WaitUntilConcurrencyPeaks();
+        m_GroupToCancel.cancel_group_execution();
+        g_ExecutedAtCatch = g_CurExecuted;
         return NULL;
     }
 public:
-    my_cancellator_2_task ( tbb::task_group_context& ctx ) : my_ctx_to_cancel(ctx) {}
+    CancellatorTask2 ( tbb::task_group_context& ctx, intptr_t ) : m_GroupToCancel(ctx) {}
 };
 
-class pfor_body_to_cancel_2 {
+class ParForBodyToCancel2 {
 public:
     void operator()( const range_type& ) const {
-        ++g_cur_executed;
+        ++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();
+        while( !tbb::task::self().is_cancelled() )
+            __TBB_Yield();
     }
 };
 
 //! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).
 /** This version also tests task::is_cancelled() method. **/
 void Test6 () {
-    TRACEP ("");
-    reset_globals();
-    tbb::task_group_context  ctx;
-    tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
-    r.set_ref_count(3);
-    r.spawn( *new( r.allocate_child() ) my_cancellator_2_task(ctx) );
-    __TBB_Yield();
-    r.spawn( *new( r.allocate_child() ) my_worker_task<pfor_body_to_cancel_2>(ctx) );
-    TRY();
-        r.wait_for_all();
-    CATCH();
-    r.destroy(r);
-    ASSERT (no_exception, "Cancelling tasks should not cause any exceptions");
-    ASSERT_WARNING (g_catch_executed < g_num_threads, "Somehow worker tasks started their execution before the cancellator task");
-    ASSERT (g_cur_executed <= g_catch_executed, "Some tasks were executed after cancellation");
+    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");
 } // void Test6 ()
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -530,47 +325,47 @@ void Test6 () {
 
 #define LOOP_COUNT 16
 #define MAX_NESTING 3
-#define REDUCE_RANGE 1024 
+#define REDUCE_RANGE 1024
 #define REDUCE_GRAIN 256
 
-class my_worker_t {
+class Worker {
 public:
-    void doit (int & result, int nest);
+    void DoWork (int & result, int nest);
 };
 
-class reduce_test_body_t {
-    my_worker_t * my_shared_worker;
-    int my_nesting_level;
-    int my_result;
+class RecursiveParReduceBodyWithSharedWorker {
+    Worker * m_SharedWorker;
+    int m_NestingLevel;
+    int m_Result;
 public:
-    reduce_test_body_t ( reduce_test_body_t& src, tbb::split )
-        : my_shared_worker(src.my_shared_worker)
-        , my_nesting_level(src.my_nesting_level)
-        , my_result(0)
+    RecursiveParReduceBodyWithSharedWorker ( RecursiveParReduceBodyWithSharedWorker& src, tbb::split )
+        : m_SharedWorker(src.m_SharedWorker)
+        , m_NestingLevel(src.m_NestingLevel)
+        , m_Result(0)
     {}
-    reduce_test_body_t ( my_worker_t *w, int nesting )
-        : my_shared_worker(w)
-        , my_nesting_level(nesting)
-        , my_result(0)
+    RecursiveParReduceBodyWithSharedWorker ( Worker *w, int nesting )
+        : m_SharedWorker(w)
+        , m_NestingLevel(nesting)
+        , m_Result(0)
     {}
 
     void operator() ( const tbb::blocked_range<size_t>& r ) {
         for (size_t i = r.begin (); i != r.end (); ++i) {
             int result = 0;
-            my_shared_worker->doit (result, my_nesting_level);
-            my_result += result;
+            m_SharedWorker->DoWork (result, m_NestingLevel);
+            m_Result += result;
         }
     }
-    void join (const reduce_test_body_t & x) {
-        my_result += x.my_result;
+    void join (const RecursiveParReduceBodyWithSharedWorker & x) {
+        m_Result += x.m_Result;
     }
-    int result () { return my_result; }
+    int result () { return m_Result; }
 };
 
-void my_worker_t::doit ( int& result, int nest ) {
+void Worker::DoWork ( int& result, int nest ) {
     ++nest;
     if ( nest < MAX_NESTING ) {
-        reduce_test_body_t rt (this, nest);
+        RecursiveParReduceBodyWithSharedWorker rt (this, nest);
         tbb::parallel_reduce (tbb::blocked_range<size_t>(0, REDUCE_RANGE, REDUCE_GRAIN), rt);
         result = rt.result ();
     }
@@ -580,19 +375,19 @@ void my_worker_t::doit ( int& result, int nest ) {
 
 //! Regression test for hanging that occurred with the first version of cancellation propagation
 void Test7 () {
-    TRACEP ("");
-    my_worker_t w;
+    Worker w;
     int result = 0;
-    w.doit (result, 0);
+    w.DoWork (result, 0);
     ASSERT ( result == 1048576, "Wrong calculation result");
 }
 
-void RunTests () {
-    tbb::task_scheduler_init init (g_num_threads);
-    g_master = util::get_my_tid();
-    
+void RunParForAndReduceTests () {
+    REMARK( "parallel for and reduce tests" );
+    tbb::task_scheduler_init init (g_NumThreads);
+    g_Master = Harness::CurrentTid();
+
     Test0();
-#if !(__GLIBC__==2&&__GLIBC_MINOR__==3)
+#if !__TBB_EXCEPTION_HANDLING_BROKEN
     Test1();
     Test3();
     Test4();
@@ -602,711 +397,434 @@ void RunTests () {
     Test7();
 }
 
-// Parallel_do testing
-
-#define ITER_TEST_NUMBER_OF_ELEMENTS 1000
-
-// Forward iterator type
-template <class T>
-class ForwardIterator {
-    size_t * my_ptr;
-public:
-    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;
-   
-    ForwardIterator ( size_t * ptr ) : my_ptr(ptr){}
-    
-    ForwardIterator ( const ForwardIterator& r ) : my_ptr(r.my_ptr){}
-    
-    size_t& operator* () { return *my_ptr; }
-    
-    ForwardIterator& operator++ () { ++my_ptr; return *this; }
-
-    bool operator== ( const ForwardIterator& r ) { return my_ptr == r.my_ptr; }
-};
-
-
-template <class T>
-class RandomIterator {
-    size_t * my_ptr;
-public:
-    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;
-   
-    RandomIterator ( size_t * ptr ) : my_ptr(ptr){}
-    
-    RandomIterator ( const RandomIterator& r ) : my_ptr(r.my_ptr){}
-    
-    size_t& operator* () { return *my_ptr; }
-    
-    RandomIterator& operator++ () { ++my_ptr; return *this; }
-
-    bool operator== ( const RandomIterator& r ) { return my_ptr == r.my_ptr; }
-    size_t operator- (const RandomIterator &r) {return my_ptr - r.my_ptr;}
-    RandomIterator operator+ (size_t n) {return RandomIterator(my_ptr + n);}
-};
-
-// Simple functor object, no exception throwing
-class nothrow_pdo_body
-{
-public:
-    //! This form of the function call operator can be used when the body needs to add more work during the processing
-    void operator() ( size_t &value ) const {
-        value = value + 1000;
-    }
-}; // class nothrow_pdo_body
-
-// Simple functor object with feeder, no exception throwing
-class nothrow_pdo_body_with_feeder
-{
-public:
-    //! This form of the function call operator can be used when the body needs to add more work during the processing
-    void operator() ( size_t &value, tbb::parallel_do_feeder<size_t>& feeder ) const {
-        value = value + 1000;
-        
-        if (g_added_tasks_count < 500 )
-        {
-            g_added_tasks_count ++;
-            feeder.add(0);
-        }
+////////////////////////////////////////////////////////////////////////////////
+// Tests for tbb::parallel_do
+
+#define ITER_RANGE          1000
+#define ITEMS_TO_FEED       50
+#define NESTED_ITER_RANGE   100
+#define NESTING_ITER_RANGE  50
+
+#define PREPARE_RANGE(Iterator, rangeSize)  \
+    size_t test_vector[rangeSize + 1]; \
+    for (int i =0; i < rangeSize; i++) \
+        test_vector[i] = i; \
+    Iterator begin(&test_vector[0]); \
+    Iterator end(&test_vector[rangeSize])
+
+void Feed ( tbb::parallel_do_feeder<size_t> &feeder, size_t val ) {
+    if (g_FedTasksCount < ITEMS_TO_FEED) { 
+        ++g_FedTasksCount; 
+        feeder.add(val);
     }
-}; // class nothrow_pdo_body_with_feeder
-
-// Test parallel_do without exceptions throwing
-template <class Iterator> void Test0_parallel_do () {
-    TRACEP ("");
-    reset_globals();
-    size_t values[ITER_TEST_NUMBER_OF_ELEMENTS];
-
-    for (int i =0; i < ITER_TEST_NUMBER_OF_ELEMENTS; i++) values[i] = i;
+}
 
-    Iterator begin(&values[0]);
-    Iterator end(&values[ITER_TEST_NUMBER_OF_ELEMENTS - 1]);
-    tbb::parallel_do<Iterator, nothrow_pdo_body>(begin, end, nothrow_pdo_body());    
-    g_added_tasks_count = 0;
-    tbb::parallel_do<Iterator, nothrow_pdo_body_with_feeder>(begin, end, nothrow_pdo_body_with_feeder());    
-} // void Test0_parallel_do_forward ()
+#include "harness_iterator.h"
 
 // Simple functor object with exception
-class simple_pdo_body
-{
+class SimpleParDoBody {
 public:
-    //! This form of the function call operator can be used when the body needs to add more work during the processing
     void operator() ( size_t &value ) const {
-        value = value + 1000;
-
-        ++g_cur_executed;
-        if ( g_exception_in_master ^ (util::get_my_tid() == g_master) )
-        {            
-            // Make absolutely sure that worker threads on multicore machines had a chance to steal something
-            util::sleep(10);
-        }
-        throw_test_exception(1);
+        ++g_CurExecuted;
+        Harness::ConcurrencyTracker ct;
+        value += 1000;
+        WaitUntilConcurrencyPeaks();
+        ThrowTestException(1);
     }
-}; // class simple_pdo_body
+};
 
 // Simple functor object with exception and feeder
-class simple_pdo_body_feeder
-{
+class SimpleParDoBodyWithFeeder : SimpleParDoBody {
 public:
-    //! This form of the function call operator can be used when the body needs to add more work during the processing
     void operator() ( size_t &value, tbb::parallel_do_feeder<size_t> &feeder ) const {
-        value = value + 1000;
-        if (g_added_tasks_count < 500) {
-            g_added_tasks_count++;
-            feeder.add(0);
-        }
-
-        ++g_cur_executed;
-        if ( g_exception_in_master ^ (util::get_my_tid() == g_master) )
-        {            
-            // Make absolutely sure that worker threads on multicore machines had a chance to steal something
-            util::sleep(10);
-        }
-        throw_test_exception(1);
+        Feed(feeder, 0);
+        SimpleParDoBody::operator()(value);
     }
-}; // class simple_pdo_body_feeder
+};
 
 // Tests exceptions without nesting
-template <class Iterator, class simple_body> void Test1_parallel_do () {
-    TRACEP ("");
-    reset_globals();
-    
-    size_t test_vector[ITER_TEST_NUMBER_OF_ELEMENTS + 1];
-
-    for (int i =0; i < ITER_TEST_NUMBER_OF_ELEMENTS; i++) test_vector[i] = i;
-
-    Iterator begin(&test_vector[0]);
-    Iterator end(&test_vector[ITER_TEST_NUMBER_OF_ELEMENTS]);    
-
-    g_added_tasks_count = 0;
-
+template <class Iterator, class simple_body>
+void Test1_parallel_do () {
+    ResetGlobals();
+    PREPARE_RANGE(Iterator, ITER_RANGE);
     TRY();
         tbb::parallel_do<Iterator, simple_body>(begin, end, simple_body() );
     CATCH_AND_ASSERT();
-
-    ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
-    TRACE ("Executed at the end of test %d; number of exceptions", (intptr)g_cur_executed);
-    ASSERT (g_exceptions == 1, "No try_blocks in any body expected in this test");
-    if ( !g_solitary_exception )
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
+    ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
+    ASSERT (g_Exceptions == 1, "No try_blocks in any body expected in this test");
+    if ( !g_SolitaryException )
+        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
 
 } // void Test1_parallel_do ()
 
-
-template <class Iterator> class nesting_pdo_body {
-public:  
+template <class Iterator>
+class NestingParDoBody {
+public:
     void operator()( size_t& /*value*/ ) const {
-        ++g_cur_executed;
-        if ( util::get_my_tid() == g_master )
-            yield_if_singlecore();
-
-        size_t test_vector[101];
-
-        for (int i =0; i < 100; i++) test_vector[i] = i;
-
-        Iterator begin(&test_vector[0]);
-        Iterator end(&test_vector[100]);    
- 
-        tbb::parallel_do<Iterator, simple_pdo_body>(begin, end, simple_pdo_body());
+        ++g_CurExecuted;
+        PREPARE_RANGE(Iterator, NESTED_ITER_RANGE);
+        tbb::parallel_do<Iterator, SimpleParDoBody>(begin, end, SimpleParDoBody());
     }
 };
 
-template <class Iterator> class nesting_pdo_body_feeder {
-public:  
-    void operator()( size_t& /*value*/, tbb::parallel_do_feeder<size_t>& feeder ) const {
-        ++g_cur_executed;
-
-        if (g_added_tasks_count < 500) {
-            g_added_tasks_count++;
-            feeder.add(0);
-        }
-
-        if ( util::get_my_tid() == g_master )
-            yield_if_singlecore();
-
-        size_t test_vector[101];
-
-        for (int i =0; i < 100; i++) test_vector[i] = i;
-
-        Iterator begin(&test_vector[0]);
-        Iterator end(&test_vector[100]);    
- 
-        tbb::parallel_do<Iterator, simple_pdo_body>(begin, end, simple_pdo_body());
+template <class Iterator>
+class NestingParDoBodyWithFeeder : NestingParDoBody<Iterator> {
+public:
+    void operator()( size_t& value, tbb::parallel_do_feeder<size_t>& feeder ) const {
+        Feed(feeder, 0);
+        NestingParDoBody<Iterator>::operator()(value);
     }
 };
 
 //! Uses parallel_do body containing a nested parallel_do with the default context not wrapped by a try-block.
-/** Nested algorithms are spawned inside the new bound context by default. Since 
-    exceptions thrown from the nested parallel_do are not handled by the caller 
-    (nesting parallel_do body) in this test, they will cancel all the sibling nested 
+/** Nested algorithms are spawned inside the new bound context by default. Since
+    exceptions thrown from the nested parallel_do are not handled by the caller
+    (nesting parallel_do body) in this test, they will cancel all the sibling nested
     algorithms. **/
-template <class Iterator, class nesting_body> void Test2_parallel_do () {
-    TRACEP ("");
-    reset_globals();
-
-    size_t test_vector[ITER_TEST_NUMBER_OF_ELEMENTS + 1];
-
-    for (int i =0; i < ITER_TEST_NUMBER_OF_ELEMENTS; i++) test_vector[i] = i;
-
-    Iterator begin(&test_vector[0]);
-    Iterator end(&test_vector[ITER_TEST_NUMBER_OF_ELEMENTS]);    
-
-    g_added_tasks_count = 0;
-
+template <class Iterator, class nesting_body>
+void Test2_parallel_do () {
+    ResetGlobals();
+    PREPARE_RANGE(Iterator, ITER_RANGE);
     TRY();
         tbb::parallel_do<Iterator, nesting_body >(begin, end, nesting_body() );
     CATCH_AND_ASSERT();
-
-    ASSERT (!no_exception, "No exception thrown from the nesting parallel_for");
-    //if ( g_solitary_exception )
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
-    TRACE ("Executed at the end of test %d", (intptr)g_cur_executed);
-    ASSERT (g_exceptions == 1, "No try_blocks in any body expected in this test");
-    if ( !g_solitary_exception )
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
+    ASSERT (exceptionCaught, "No exception thrown from the nesting parallel_for");
+    //if ( g_SolitaryException )
+        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
+    ASSERT (g_Exceptions == 1, "No try_blocks in any body expected in this test");
+    if ( !g_SolitaryException )
+        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
 } // void Test2_parallel_do ()
 
-template <class Iterator> class nesting_pdo_with_isolated_context_body {
+template <class Iterator> 
+class NestingParDoBodyWithIsolatedCtx {
 public:
     void operator()( size_t& /*value*/ ) const {
         tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        ++g_cur_executed;
-
-        __TBB_Yield();
-        size_t test_vector[101];
-
-        for (int i =0; i < 100; i++) test_vector[i] = i;
-
-        Iterator begin(&test_vector[0]);
-        Iterator end(&test_vector[100]);    
-
-        tbb::parallel_do<Iterator, simple_pdo_body>(begin, end, simple_pdo_body(), ctx);
+        ++g_CurExecuted;
+        PREPARE_RANGE(Iterator, NESTED_ITER_RANGE);
+        tbb::parallel_do<Iterator, SimpleParDoBody>(begin, end, SimpleParDoBody(), ctx);
     }
 };
 
-template <class Iterator> class nesting_pdo_with_isolated_context_body_and_feeder {
+template <class Iterator> 
+class NestingParDoBodyWithIsolatedCtxWithFeeder : NestingParDoBodyWithIsolatedCtx<Iterator> {
 public:
-    void operator()( size_t& /*value*/, tbb::parallel_do_feeder<size_t> &feeder ) const {
-        tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        ++g_cur_executed;
-
-        if (g_added_tasks_count < 50) {
-            g_added_tasks_count++;
-            feeder.add(0);
-        }
-
-        __TBB_Yield();
-        size_t test_vector[101];
-
-        for (int i =0; i < 100; i++) test_vector[i] = i;
-
-        Iterator begin(&test_vector[0]);
-        Iterator end(&test_vector[100]);    
-
-        tbb::parallel_do<Iterator, simple_pdo_body>(begin, end, simple_pdo_body(), ctx);
+    void operator()( size_t& value, tbb::parallel_do_feeder<size_t> &feeder ) const {
+        Feed(feeder, 0);
+        NestingParDoBodyWithIsolatedCtx<Iterator>::operator()(value);
     }
 };
 
 //! Uses parallel_do body invoking a nested parallel_do with an isolated context without a try-block.
-/** Even though exceptions thrown from the nested parallel_do are not handled 
-    by the caller in this test, they will not affect sibling nested algorithms 
-    already running because of the isolated contexts. However because the first 
-    exception cancels the root parallel_do only the first g_num_threads subranges
+/** Even though exceptions thrown from the nested parallel_do are not handled
+    by the caller in this test, they will not affect sibling nested algorithms
+    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 parallel_dos) **/
-template <class Iterator, class nesting_body> void Test3_parallel_do () {
-    TRACEP ("");    
-    reset_globals();    
-    intptr  nested_body_calls = 100,
-            min_num_calls = (g_num_threads - 1) * nested_body_calls;
-    
-    size_t test_vector[101];
-
-    for (int i =0; i < 100; i++) test_vector[i] = i;
-
-    Iterator begin(&test_vector[0]);
-    Iterator end(&test_vector[100]);    
-
+template <class Iterator, class nesting_body>
+void Test3_parallel_do () {
+    ResetGlobals();
+    PREPARE_RANGE(Iterator, NESTING_ITER_RANGE);
+    intptr_t nestedCalls = NESTED_ITER_RANGE,
+             minExecuted = (g_NumThreads - 1) * nestedCalls;
     TRY();
-        tbb::parallel_do<Iterator, nesting_body >(begin, end,nesting_body());
+        tbb::parallel_do<Iterator, nesting_body >(begin, end, nesting_body());
     CATCH_AND_ASSERT();
-
-    ASSERT (!no_exception, "No exception thrown from the nesting parallel_for");
-    TRACE ("Executed at the end of test %d", (intptr)g_cur_executed);
-    if ( g_solitary_exception ) {
-        ASSERT (g_cur_executed > min_num_calls, "Too few tasks survived exception");
-        ASSERT (g_cur_executed <= min_num_calls + (g_catch_executed + g_num_threads), "Too many tasks survived exception");
+    ASSERT (exceptionCaught, "No exception thrown from the nesting parallel_for");
+    if ( g_SolitaryException ) {
+        ASSERT (g_CurExecuted > minExecuted, "Too few tasks survived exception");
+        ASSERT (g_CurExecuted <= minExecuted + (g_ExecutedAtCatch + g_NumThreads), "Too many tasks survived exception");
     }
-    ASSERT (g_exceptions == 1, "No try_blocks in any body expected in this test");
-    if ( !g_solitary_exception )
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
+    ASSERT (g_Exceptions == 1, "No try_blocks in any body expected in this test");
+    if ( !g_SolitaryException )
+        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
 } // void Test3_parallel_do ()
 
-
-template <class Iterator> class nesting_pdo_with_eh_body {
+template <class Iterator>
+class NestingParDoWithEhBody {
 public:
     void operator()( size_t& /*value*/ ) const {
-        size_t test_vector[100];
-
-        for (int i =0; i < 100; i++) test_vector[i] = i;
-
-        Iterator begin(&test_vector[0]);
-        Iterator end(&test_vector[100]);            
-
         tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        ++g_cur_executed;
+        PREPARE_RANGE(Iterator, NESTED_ITER_RANGE);
         TRY();
-            tbb::parallel_do<Iterator, simple_pdo_body>(begin, end, simple_pdo_body(), ctx);            
+            tbb::parallel_do<Iterator, SimpleParDoBody>(begin, end, SimpleParDoBody(), ctx);
         CATCH();
     }
 };
 
-template <class Iterator> class nesting_pdo_with_eh_body_and_feeder: NoAssign {
+template <class Iterator>
+class NestingParDoWithEhBodyWithFeeder : NoAssign, NestingParDoWithEhBody<Iterator> {
 public:
-    void operator()( size_t &/*value*/, tbb::parallel_do_feeder<size_t> &feeder ) const {
-        size_t test_vector[100];
-
-        for (int i =0; i < 100; i++) test_vector[i] = i;
-
-        Iterator begin(&test_vector[0]);
-        Iterator end(&test_vector[100]);    
-
-        if (g_added_tasks_count < 5) {
-            g_added_tasks_count++;
-            feeder.add(0);
-        }
-
-        tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        ++g_cur_executed;
-        TRY();
-            tbb::parallel_do<Iterator, simple_pdo_body>(begin, end, simple_pdo_body(), ctx);            
-        CATCH();
+    void operator()( size_t &value, tbb::parallel_do_feeder<size_t> &feeder ) const {
+        Feed(feeder, 0);
+        NestingParDoWithEhBody<Iterator>::operator()(value);
     }
 };
 
-
 //! Uses parallel_for body invoking a nested parallel_for (with default bound context) inside a try-block.
-/** Since exception(s) thrown from the nested parallel_for are handled by the caller 
-    in this test, they do not affect neither other tasks of the the root parallel_for 
+/** Since exception(s) thrown from the nested parallel_for are handled by the caller
+    in this test, they do not affect neither other tasks of the the root parallel_for
     nor sibling nested algorithms. **/
-
-template <class Iterator, class nesting_body_with_eh> void Test4_parallel_do () {
-    TRACEP ("");
-    reset_globals();
-
-    intptr  nested_body_calls = 100,
-        nesting_body_calls = 10,
-        calls_in_normal_case = nesting_body_calls * nested_body_calls;
-
-    size_t test_vector[10];
-
-    for (int i =0; i < 10; i++) test_vector[i] = i;
-
-    Iterator begin(&test_vector[0]);
-    Iterator end(&test_vector[10]);
-
+template <class Iterator, class nesting_body_with_eh>
+void Test4_parallel_do () {
+    ResetGlobals( true, true );
+    PREPARE_RANGE(Iterator, NESTING_ITER_RANGE);
     TRY();
         tbb::parallel_do<Iterator, nesting_body_with_eh>(begin, end, nesting_body_with_eh());
     CATCH();
-    ASSERT (no_exception, "All exceptions must have been handled in the parallel_do body");
-    TRACE ("Executed %d (normal case %d), exceptions %d, in master only? %d", (intptr)g_cur_executed, calls_in_normal_case, (intptr)g_exceptions, g_exception_in_master);
-    intptr  min_num_calls = 0;
-    if ( g_solitary_exception ) {
-        min_num_calls = calls_in_normal_case - nested_body_calls;
-        ASSERT (g_exceptions == 1, "No exception registered");
-        ASSERT (g_cur_executed <= min_num_calls + g_num_threads, "Too many tasks survived exception");
+    ASSERT (!exceptionCaught, "All exceptions must have been handled in the parallel_do body");
+    intptr_t nestedCalls = NESTED_ITER_RANGE,
+             nestingCalls = NESTING_ITER_RANGE + g_FedTasksCount,
+             maxExecuted = nestingCalls * nestedCalls,
+             minExecuted = 0;
+    if ( g_SolitaryException ) {
+        minExecuted = maxExecuted - nestedCalls;
+        ASSERT (g_Exceptions == 1, "No exception registered");
+        ASSERT (g_CurExecuted >= minExecuted, "Too few tasks executed");
+        ASSERT (g_CurExecuted <= minExecuted + g_NumThreads, "Too many tasks survived exception");
     }
-    else if ( !g_exception_in_master ) {
-        // Each nesting body + at least 1 of its nested body invocations
-        nesting_body_calls += g_added_tasks_count;
-        min_num_calls = 2 * nesting_body_calls;        
-        ASSERT (g_exceptions > 1 && g_exceptions <= nesting_body_calls, "Unexpected actual number of exceptions");
-        ASSERT (g_cur_executed >= min_num_calls + (nesting_body_calls - g_exceptions) * nested_body_calls, "Too few tasks survived exception");
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived multiple exceptions");
-        // Additional nested_body_calls accounts for the minimal amount of tasks spawned 
-        // by not throwing threads. In the minimal case it is either the master thread or the only worker.
-        ASSERT (g_cur_executed <= min_num_calls + (nesting_body_calls - g_exceptions + 1) * nested_body_calls + g_exceptions + g_num_threads, "Too many tasks survived exception");
+    else {
+        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 <= nestingCalls * (1 + g_NumThreads), "Too many tasks survived exception");
     }
 } // void Test4_parallel_do ()
 
-class pdo_body_to_cancel {
+class ParDoBodyToCancel {
 public:
     void operator()( size_t& /*value*/ ) const {
-        ++g_cur_executed;
-        do {
-            util::sleep(10);
-            __TBB_Yield();
-        } while( !my_cancellator_task::s_cancellator_ready );
+        ++g_CurExecuted;
+        CancellatorTask::WaitUntilReady();
     }
 };
 
-class pdo_body_to_cancel_with_feeder {
+class ParDoBodyToCancelWithFeeder : ParDoBodyToCancel {
 public:
-    void operator()( size_t& /*value*/, tbb::parallel_do_feeder<size_t> &feeder ) const {
-        ++g_cur_executed;
-
-        if (g_added_tasks_count < 50) {
-            g_added_tasks_count++;
-            feeder.add(0);
-        }
-
-        do {
-            util::sleep(10);
-            __TBB_Yield();
-        } while( !my_cancellator_task::s_cancellator_ready );
+    void operator()( size_t& value, tbb::parallel_do_feeder<size_t> &feeder ) const {
+        Feed(feeder, 0);
+        ParDoBodyToCancel::operator()(value);
     }
 };
 
 template<class B, class Iterator>
-class my_worker_pdo_task : public tbb::task
-{
+class ParDoWorkerTask : public tbb::task {
     tbb::task_group_context &my_ctx;
 
     tbb::task* execute () {
-        size_t test_vector[100];
-
-        for (int i =0; i < 100; i++) test_vector[i] = i;
-
-        Iterator begin(&test_vector[0]);
-        Iterator end(&test_vector[100]);
-
+        PREPARE_RANGE(Iterator, NESTED_ITER_RANGE);
         tbb::parallel_do<Iterator, B>( begin, end, B(), my_ctx );
         return NULL;
     }
 public:
-    my_worker_pdo_task ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}
+    ParDoWorkerTask ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}
 };
 
 //! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).
-template <class Iterator, class body_to_cancel> void Test5_parallel_do () {
-    TRACEP ("");
-    reset_globals();
-    g_throw_exception = false;
-    intptr  threshold = 10;
+template <class Iterator, class body_to_cancel>
+void Test5_parallel_do () {
+    ResetGlobals( false );
+    intptr_t  threshold = 10;
     tbb::task_group_context  ctx;
     ctx.reset();
-    my_cancellator_task::s_cancellator_ready = false;
     tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
     r.set_ref_count(3);
-    r.spawn( *new( r.allocate_child() ) my_cancellator_task(ctx, threshold) );
+    r.spawn( *new( r.allocate_child() ) CancellatorTask(ctx, threshold) );
     __TBB_Yield();
-    r.spawn( *new( r.allocate_child() ) my_worker_pdo_task<body_to_cancel, Iterator>(ctx) );
+    r.spawn( *new( r.allocate_child() ) ParDoWorkerTask<body_to_cancel, Iterator>(ctx) );
     TRY();
         r.wait_for_all();
     CATCH();
     r.destroy(r);
-    ASSERT (no_exception, "Cancelling tasks should not cause any exceptions");    
-    ASSERT (g_cur_executed < g_catch_executed + g_num_threads, "Too many tasks were executed after cancellation");
+    ASSERT (!exceptionCaught, "Cancelling tasks should not cause any exceptions");
+    ASSERT (g_CurExecuted < g_ExecutedAtCatch + g_NumThreads, "Too many tasks were executed after cancellation");
 } // void Test5_parallel_do ()
 
-
-class pdo_body_to_cancel_2 {
+class ParDoBodyToCancel2 {
 public:
     void operator()( size_t& /*value*/ ) const {
-        ++g_cur_executed;
-        // 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();
+        ++g_CurExecuted;
+        // 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();
     }
 };
 
-class pdo_body_to_cancel_2_with_feeder {
+class ParDoBodyToCancel2WithFeeder : ParDoBodyToCancel2 {
 public:
-    void operator()( size_t& /*value*/, tbb::parallel_do_feeder<size_t> &feeder ) const {
-        ++g_cur_executed;
-
-        if (g_added_tasks_count < 50) {
-            g_added_tasks_count++;
-            feeder.add(0);
-        }
-
-        // 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();
+    void operator()( size_t& value, tbb::parallel_do_feeder<size_t> &feeder ) const {
+        Feed(feeder, 0);
+        ParDoBodyToCancel2::operator()(value);
     }
 };
 
 //! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).
 /** This version also tests task::is_cancelled() method. **/
-template <class Iterator, class body_to_cancel> void Test6_parallel_do () {
-    TRACEP ("");
-    reset_globals();
-    tbb::task_group_context  ctx;
-    tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
-    r.set_ref_count(3);
-    r.spawn( *new( r.allocate_child() ) my_cancellator_2_task(ctx) );    
-    __TBB_Yield();
-    r.spawn( *new( r.allocate_child() ) my_worker_pdo_task<body_to_cancel, Iterator>(ctx) );
-    TRY();
-        r.wait_for_all();
-    CATCH();
-    r.destroy(r);
-    ASSERT (no_exception, "Cancelling tasks should not cause any exceptions");    
-    ASSERT (g_cur_executed <= g_catch_executed, "Some tasks were executed after cancellation");
+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");
 } // void Test6_parallel_do ()
 
 // This body throws an exception only if the task was added by feeder
-class pdo_body_exception_only_in_task_added_by_feeder
-{
+class ParDoBodyWithThrowingFeederTasks {
 public:
     //! This form of the function call operator can be used when the body needs to add more work during the processing
     void operator() ( size_t &value, tbb::parallel_do_feeder<size_t> &feeder ) const {
-        ++g_cur_executed;
-
-        if (g_added_tasks_count < 50) {
-            g_added_tasks_count++;
-            feeder.add(1);
-        }
-
-        if (value == 1) throw_test_exception(1);
+        ++g_CurExecuted;
+        Feed(feeder, 1);
+        if (value == 1)
+            ThrowTestException(1);
     }
-}; // class pdo_body_exception_only_in_task_added_by_feeder
+}; // class ParDoBodyWithThrowingFeederTasks
 
 // Test exception in task, which was added by feeder.
-template <class Iterator> void Test8_parallel_do () {
-    TRACEP ("");
-    reset_globals();
-    size_t values[ITER_TEST_NUMBER_OF_ELEMENTS];
-
-    for (int i =0; i < ITER_TEST_NUMBER_OF_ELEMENTS; i++) values[i] = 0;
-
-    Iterator begin(&values[0]);
-    Iterator end(&values[ITER_TEST_NUMBER_OF_ELEMENTS - 1]);
+template <class Iterator>
+void Test8_parallel_do () {
+    ResetGlobals();
+    PREPARE_RANGE(Iterator, ITER_RANGE);
     TRY();
-        tbb::parallel_do<Iterator, pdo_body_exception_only_in_task_added_by_feeder>(begin, end, pdo_body_exception_only_in_task_added_by_feeder());    
-    CATCH();    
-
-    TRACE ("Executed at the end of test %d; number of exceptions", (intptr)g_cur_executed);
-    if (g_solitary_exception)
-        ASSERT (!no_exception, "At least one exception should occur");
+        tbb::parallel_do<Iterator, ParDoBodyWithThrowingFeederTasks>(begin, end, ParDoBodyWithThrowingFeederTasks());
+    CATCH();
+    if (g_SolitaryException)
+        ASSERT (exceptionCaught, "At least one exception should occur");
 } // void Test8_parallel_do ()
 
-
-void RunParallelDoTests() {
-    tbb::task_scheduler_init init (g_num_threads);
-    g_master = util::get_my_tid();
-
-    Test0_parallel_do<RandomIterator<size_t> >();
-    Test0_parallel_do<ForwardIterator<size_t> >();
-#if !(__GLIBC__==2&&__GLIBC_MINOR__==3)
-    Test1_parallel_do<RandomIterator<size_t>, simple_pdo_body >();
-    Test1_parallel_do<RandomIterator<size_t>, simple_pdo_body_feeder >();
-    Test1_parallel_do<ForwardIterator<size_t>, simple_pdo_body >();
-    Test1_parallel_do<ForwardIterator<size_t>, simple_pdo_body_feeder >();    
-    Test2_parallel_do<RandomIterator<size_t>, nesting_pdo_body<RandomIterator<size_t> > >();
-    Test2_parallel_do<RandomIterator<size_t>, nesting_pdo_body_feeder<RandomIterator<size_t> > >();
-    Test2_parallel_do<ForwardIterator<size_t>, nesting_pdo_body<ForwardIterator<size_t> > >();
-    Test2_parallel_do<ForwardIterator<size_t>, nesting_pdo_body_feeder<ForwardIterator<size_t> > >();
-    Test3_parallel_do<ForwardIterator<size_t>, nesting_pdo_with_isolated_context_body<ForwardIterator<size_t> > >();
-    Test3_parallel_do<RandomIterator<size_t>, nesting_pdo_with_isolated_context_body<RandomIterator<size_t> > >();    
-    Test3_parallel_do<ForwardIterator<size_t>, nesting_pdo_with_isolated_context_body_and_feeder<ForwardIterator<size_t> > >();
-    Test3_parallel_do<RandomIterator<size_t>, nesting_pdo_with_isolated_context_body_and_feeder<RandomIterator<size_t> > >(); 
-    Test4_parallel_do<ForwardIterator<size_t>, nesting_pdo_with_eh_body<ForwardIterator<size_t> > >();    
-    Test4_parallel_do<RandomIterator<size_t>, nesting_pdo_with_eh_body<RandomIterator<size_t> > >();    
-    Test4_parallel_do<ForwardIterator<size_t>, nesting_pdo_with_eh_body_and_feeder<ForwardIterator<size_t> > >();    
-    Test4_parallel_do<RandomIterator<size_t>, nesting_pdo_with_eh_body_and_feeder<RandomIterator<size_t> > >();
-#endif        
-    Test5_parallel_do<ForwardIterator<size_t>, pdo_body_to_cancel >();
-    Test5_parallel_do<RandomIterator<size_t>, pdo_body_to_cancel >();
-    Test5_parallel_do<ForwardIterator<size_t>, pdo_body_to_cancel_with_feeder >();
-    Test5_parallel_do<RandomIterator<size_t>, pdo_body_to_cancel_with_feeder >();    
-    Test6_parallel_do<ForwardIterator<size_t>, pdo_body_to_cancel_2 >();
-    Test6_parallel_do<RandomIterator<size_t>, pdo_body_to_cancel_2 >();
-    Test6_parallel_do<ForwardIterator<size_t>, pdo_body_to_cancel_2_with_feeder >();
-    Test6_parallel_do<RandomIterator<size_t>, pdo_body_to_cancel_2_with_feeder >();
-#if !(__GLIBC__==2&&__GLIBC_MINOR__==3)
-    Test8_parallel_do<ForwardIterator<size_t> >();
-    Test8_parallel_do<RandomIterator<size_t> >();
+#define RunWithSimpleBody(func, body)       \
+    func<Harness::RandomIterator<size_t>, body>();           \
+    func<Harness::RandomIterator<size_t>, body##WithFeeder>();  \
+    func<Harness::ForwardIterator<size_t>, body>();         \
+    func<Harness::ForwardIterator<size_t>, body##WithFeeder>()
+
+#define RunWithTemplatedBody(func, body)       \
+    func<Harness::RandomIterator<size_t>, body<Harness::RandomIterator<size_t> > >();           \
+    func<Harness::RandomIterator<size_t>, body##WithFeeder<Harness::RandomIterator<size_t> > >();  \
+    func<Harness::ForwardIterator<size_t>, body<Harness::ForwardIterator<size_t> > >();         \
+    func<Harness::ForwardIterator<size_t>, body##WithFeeder<Harness::ForwardIterator<size_t> > >()
+
+void RunParDoTests() {
+    REMARK( "parallel do tests" );
+    tbb::task_scheduler_init init (g_NumThreads);
+    g_Master = Harness::CurrentTid();
+#if !__TBB_EXCEPTION_HANDLING_BROKEN
+    RunWithSimpleBody(Test1_parallel_do, SimpleParDoBody);
+    RunWithTemplatedBody(Test2_parallel_do, NestingParDoBody);
+    RunWithTemplatedBody(Test3_parallel_do, NestingParDoBodyWithIsolatedCtx);
+    RunWithTemplatedBody(Test4_parallel_do, NestingParDoWithEhBody);
+#endif
+    RunWithSimpleBody(Test5_parallel_do, ParDoBodyToCancel);
+    RunWithSimpleBody(Test6_parallel_do, ParDoBodyToCancel2);
+#if !__TBB_EXCEPTION_HANDLING_BROKEN
+    Test8_parallel_do<Harness::ForwardIterator<size_t> >();
+    Test8_parallel_do<Harness::RandomIterator<size_t> >();
 #endif
 }
 
-// Pipeline testing
-#define TEST_PROLOGUE() \
-    TRACEP ("");    \
-    {   \
-    tbb::task_scheduler_init init (g_num_threads);  \
-    g_master = util::get_my_tid();  \
-    reset_globals();    \
+////////////////////////////////////////////////////////////////////////////////
+// Tests for tbb::pipeline
 
-#define TEST_EPILOGUE() \
-    }   \
+#define NUM_ITEMS   100
 
-const size_t buffer_size = 100,
-             data_end_tag = size_t(~0);
+const size_t c_DataEndTag = size_t(~0);
 
-size_t g_num_tokens = 0;
+size_t g_NumTokens = 0;
 
 // Simple input filter class, it assigns 1 to all array members
 // It stops when it receives item equal to -1
-class input_filter: public tbb::filter {
-    tbb::atomic<size_t> my_item;
-    size_t my_buffer[buffer_size + 1];
-
-public:    
-    input_filter() : tbb::filter(parallel) {
-        my_item = 0;
-        for (size_t i = 0; i < buffer_size; ++i ) {
-            my_buffer[i] = 1;
-        }
-        my_buffer[buffer_size] = data_end_tag;
+class InputFilter: public tbb::filter {
+    tbb::atomic<size_t> m_Item;
+    size_t m_Buffer[NUM_ITEMS + 1];
+public:
+    InputFilter() : tbb::filter(parallel) {
+        m_Item = 0;
+        for (size_t i = 0; i < NUM_ITEMS; ++i )
+            m_Buffer[i] = 1;
+        m_Buffer[NUM_ITEMS] = c_DataEndTag;
     }
 
     void* operator()( void* ) {
-        size_t item = my_item.fetch_and_increment();
-        if ( item >= buffer_size ) { // end of input
+        size_t item = m_Item.fetch_and_increment();
+        if ( item >= NUM_ITEMS )
             return NULL;
-        }
-        size_t &value = my_buffer[item];
-        value = 1;
-        return &value;
+        m_Buffer[item] = 1;
+        return &m_Buffer[item];
     }
 
-    size_t* buffer() { return my_buffer; }
-}; // class input_filter
+    size_t* buffer() { return m_Buffer; }
+}; // class InputFilter
 
 // Pipeline filter, without exceptions throwing
-class no_throw_filter: public tbb::filter {
-    size_t my_value;
+class NoThrowFilter : public tbb::filter {
+    size_t m_Value;
 public:
     enum operation {
         addition,
         subtraction,
         multiplication
-    } my_operation;
+    } m_Operation;
 
-    no_throw_filter(operation _operation, size_t value, bool is_parallel) 
+    NoThrowFilter(operation _operation, size_t value, bool is_parallel)
         : filter(is_parallel? tbb::filter::parallel : tbb::filter::serial_in_order),
-        my_value(value), my_operation(_operation)
+        m_Value(value), m_Operation(_operation)
     {}
     void* operator()(void* item) {
         size_t &value = *(size_t*)item;
-        ASSERT(value != data_end_tag, "terminator element is being processed");
-        switch (my_operation){
+        ASSERT(value != c_DataEndTag, "terminator element is being processed");
+        switch (m_Operation){
             case addition:
-                value += my_value;
+                value += m_Value;
                 break;
             case subtraction:
-                value -= my_value;
+                value -= m_Value;
                 break;
             case multiplication:
-                value *= my_value;
+                value *= m_Value;
                 break;
             default:
-                ASSERT(0, "Wrong operation parameter passed to no_throw_filter");
-        } // switch (my_operation)
+                ASSERT(0, "Wrong operation parameter passed to NoThrowFilter");
+        } // switch (m_Operation)
         return item;
-    }    
+    }
 };
 
 // Test pipeline without exceptions throwing
 void Test0_pipeline () {
-    TEST_PROLOGUE()
-
+    ResetGlobals();
     // Run test when serial filter is the first non-input filter
-    input_filter my_input_filter;
-    no_throw_filter my_filter_1(no_throw_filter::addition, 99, false);
-    no_throw_filter my_filter_2(no_throw_filter::subtraction, 90, true);
-    no_throw_filter my_filter_3(no_throw_filter::multiplication, 5, false);
+    InputFilter inputFilter;
+    NoThrowFilter filter1(NoThrowFilter::addition, 99, false);
+    NoThrowFilter filter2(NoThrowFilter::subtraction, 90, true);
+    NoThrowFilter filter3(NoThrowFilter::multiplication, 5, false);
     // Result should be 50 for all items except the last
-
-    tbb::pipeline my_pipeline;
-    my_pipeline.add_filter(my_input_filter);
-    my_pipeline.add_filter(my_filter_1);
-    my_pipeline.add_filter(my_filter_2);
-    my_pipeline.add_filter(my_filter_3);
-    my_pipeline.run(8);    
-    
-    for (size_t i = 0; i < buffer_size; ++i) {
-        ASSERT(my_input_filter.buffer()[i] == 50, "pipeline didn't process items properly");
-    }
-    TEST_EPILOGUE()
+    tbb::pipeline p;
+    p.add_filter(inputFilter);
+    p.add_filter(filter1);
+    p.add_filter(filter2);
+    p.add_filter(filter3);
+    p.run(8);
+    for (size_t i = 0; i < NUM_ITEMS; ++i)
+        ASSERT(inputFilter.buffer()[i] == 50, "pipeline didn't process items properly");
 } // void Test0_pipeline ()
 
 // Simple filter with exception throwing
-class simple_filter : public tbb::filter
-{
+class SimpleFilter : public tbb::filter {
 public:
-    simple_filter (tbb::filter::mode _mode ) : filter (_mode) {}
-
-    void* operator()(void* item) {        
-        ++g_cur_executed;
-        if ( g_exception_in_master ^ (util::get_my_tid() == g_master) )
-        {            
-            // Make absolutely sure that worker threads on multicore machines had a chance to steal something
-            util::sleep(10);
-        }
-        throw_test_exception(1);
+    SimpleFilter (tbb::filter::mode _mode ) : filter (_mode) {}
 
+    void* operator()(void* item) {
+        Harness::ConcurrencyTracker ct;
+        ++g_CurExecuted;
+        WaitUntilConcurrencyPeaks();
+        ThrowTestException(1);
         return item;
     }
-}; // class simple_filter
+}; // class SimpleFilter
 
 // This enumeration represents filters order in pipeline
-enum filter_set {
+enum FilterSet {
     parallel__parallel=0,
     parallel__serial=1,
     parallel__serial_out_of_order=2,
@@ -1319,8 +837,7 @@ enum filter_set {
 };
 
 // The function returns filter type using filter number in set
-tbb::filter::mode filter_mode (filter_set set, int number)
-{
+tbb::filter::mode filter_mode (FilterSet set, int number) {
     size_t tmp = set << (2 * (2 - number));
     switch (tmp&12){
         case 0:
@@ -1334,273 +851,226 @@ tbb::filter::mode filter_mode (filter_set set, int number)
     return tbb::filter::parallel; // We should never get here, just to prevent compiler warnings
 }
 
-
-template<typename InputFilter, typename Filter>
-class custom_pipeline : protected tbb::pipeline {
-    typedef tbb::pipeline base;
-    InputFilter my_input_filter;
-    Filter my_filter_1;
-    Filter my_filter_2;
-
+template<typename InFilter, typename Filter>
+class CustomPipeline : protected tbb::pipeline {
+    InFilter inputFilter;
+    Filter filter1;
+    Filter filter2;
 public:
-    custom_pipeline( filter_set filter_set )
-        : my_filter_1(filter_mode(filter_set, 1))
-        , my_filter_2(filter_mode(filter_set, 2))
+    CustomPipeline( FilterSet FilterSet )
+        : filter1(filter_mode(FilterSet, 1))
+        , filter2(filter_mode(FilterSet, 2))
     {
-       add_filter(my_input_filter);
-       add_filter(my_filter_1);
-       add_filter(my_filter_2);
+       add_filter(inputFilter);
+       add_filter(filter1);
+       add_filter(filter2);
     }
-    void run () { base::run(g_num_tokens); }
-    void run ( tbb::task_group_context& ctx ) { base::run(g_num_tokens, ctx); }
-    using base::add_filter;
+    void run () { tbb::pipeline::run(g_NumTokens); }
+    void run ( tbb::task_group_context& ctx ) { tbb::pipeline::run(g_NumTokens, ctx); }
+
+    using tbb::pipeline::add_filter;
 };
 
-typedef custom_pipeline<input_filter, simple_filter> simple_pipeline;
+typedef CustomPipeline<InputFilter, SimpleFilter> SimplePipeline;
 
 // Tests exceptions without nesting
-void Test1_pipeline ( filter_set mode ) {
-    TEST_PROLOGUE()
-    
-    simple_pipeline test_pipeline(mode);
+void Test1_pipeline ( FilterSet mode ) {
+    ResetGlobals();
+    SimplePipeline testPipeline(mode);
     TRY();
-        test_pipeline.run();
-        if ( g_cur_executed == 2 * buffer_size ) {
+        testPipeline.run();
+        if ( g_CurExecuted == 2 * NUM_ITEMS ) {
             // In case of all serial filters they might be all executed in the thread(s)
             // where exceptions are not allowed by the common test logic. So we just quit.
             return;
         }
     CATCH_AND_ASSERT();
+    ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
+    ASSERT (g_Exceptions == 1, "No try_blocks in any body expected in this test");
+    if ( !g_SolitaryException )
+        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
 
-    ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
-    TRACE ("Executed at the end of test %d; number of exceptions", (intptr)g_cur_executed);
-    ASSERT (g_exceptions == 1, "No try_blocks in any body expected in this test");
-    if ( !g_solitary_exception )
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
-
-    TEST_EPILOGUE()
 } // void Test1_pipeline ()
 
 // Filter with nesting
-class nesting_filter : public tbb::filter
-{
+class NestingFilter : public tbb::filter {
 public:
-    nesting_filter(tbb::filter::mode _mode )
-        : filter ( _mode)
-    {}
-
-    void* operator()(void* item) {        
-        ++g_cur_executed;
-        if ( util::get_my_tid() == g_master )
-            yield_if_singlecore();
-
-        simple_pipeline test_pipeline(serial__parallel);
-        test_pipeline.run();        
+    NestingFilter( tbb::filter::mode _mode ) : tbb::filter( _mode) {}
 
+    void* operator()(void* item) {
+        ++g_CurExecuted;
+        SimplePipeline testPipeline(serial__parallel);
+        testPipeline.run();
         return item;
     }
-}; // class nesting_filter
+}; // class NestingFilter
 
 //! Uses pipeline containing a nested pipeline with the default context not wrapped by a try-block.
-/** Nested algorithms are spawned inside the new bound context by default. Since 
-    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 
+/** Nested algorithms are spawned inside the new bound context by default. Since
+    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 ( filter_set mode ) {
-    TEST_PROLOGUE()
-
-    custom_pipeline<input_filter, nesting_filter> test_pipeline(mode);
+void Test2_pipeline ( FilterSet mode ) {
+    ResetGlobals();
+    CustomPipeline<InputFilter, NestingFilter> testPipeline(mode);
     TRY();
-        test_pipeline.run();
+        testPipeline.run();
     CATCH_AND_ASSERT();
-
-    ASSERT (!no_exception, "No exception thrown from the nesting pipeline");
-    //if ( g_solitary_exception )
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
-    TRACE ("Executed at the end of test %d", (intptr)g_cur_executed);
-    ASSERT (g_exceptions == 1, "No try_blocks in any body expected in this test");
-    if ( !g_solitary_exception )
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
-    TEST_EPILOGUE()
+    ASSERT (exceptionCaught, "No exception thrown from the nesting pipeline");
+    ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
+    ASSERT (g_Exceptions == 1, "No try_blocks in any body expected in this test");
+    if ( !g_SolitaryException )
+        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
 } // void Test2_pipeline ()
 
-class nesting_filter_with_isolated_context : public tbb::filter
-{
+class NestingFilterWithIsolatedCtx : public tbb::filter {
 public:
-    nesting_filter_with_isolated_context(tbb::filter::mode _mode )
-        : filter ( _mode)
-    {}
+    NestingFilterWithIsolatedCtx(tbb::filter::mode m ) : filter (m) {}
 
-    void* operator()(void* item) {        
+    void* operator()(void* item) {
+        ++g_CurExecuted;
         tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        ++g_cur_executed;
-        __TBB_Yield();
-        simple_pipeline test_pipeline(serial__parallel);
-        test_pipeline.run(ctx);
+        SimplePipeline testPipeline(serial__parallel);
+        testPipeline.run(ctx);
         return item;
     }
-}; // class nesting_filter_with_isolated_context
+}; // class NestingFilterWithIsolatedCtx
 
 //! Uses pipeline invoking a nested pipeline with an isolated context without a try-block.
-/** Even though exceptions thrown from the nested pipeline are not handled 
-    by the caller in this test, they will not affect sibling nested algorithms 
-    already running because of the isolated contexts. However because the first 
-    exception cancels the root parallel_do only the first g_num_threads subranges
+/** Even though exceptions thrown from the nested pipeline are not handled
+    by the caller in this test, they will not affect sibling nested algorithms
+    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 ( filter_set mode ) {
-    TEST_PROLOGUE()
-    intptr  nested_body_calls = 100,
-            min_num_calls = (g_num_threads - 1) * nested_body_calls;
-    
-    custom_pipeline<input_filter, nesting_filter_with_isolated_context> test_pipeline(mode);
+void Test3_pipeline ( FilterSet mode ) {
+    ResetGlobals();
+    intptr_t nestedCalls = 100,
+             minExecuted = (g_NumThreads - 1) * nestedCalls;
+    CustomPipeline<InputFilter, NestingFilterWithIsolatedCtx> testPipeline(mode);
     TRY();
-        test_pipeline.run();
+        testPipeline.run();
     CATCH_AND_ASSERT();
-
-    ASSERT (!no_exception, "No exception thrown from the nesting parallel_for");
-    TRACE ("Executed at the end of test %d", (intptr)g_cur_executed);
-    if ( g_solitary_exception ) {
-        ASSERT (g_cur_executed > min_num_calls, "Too few tasks survived exception");
-        ASSERT (g_cur_executed <= min_num_calls + (g_catch_executed + g_num_threads), "Too many tasks survived exception");
+    ASSERT (exceptionCaught, "No exception thrown from the nesting parallel_for");
+    if ( g_SolitaryException ) {
+        ASSERT (g_CurExecuted > minExecuted, "Too few tasks survived exception");
+        ASSERT (g_CurExecuted <= minExecuted + (g_ExecutedAtCatch + g_NumThreads), "Too many tasks survived exception");
     }
-    ASSERT (g_exceptions == 1, "No try_blocks in any body expected in this test");
-    if ( !g_solitary_exception )
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived exception");
-    TEST_EPILOGUE();
+    ASSERT (g_Exceptions == 1, "No try_blocks in any body expected in this test");
+    if ( !g_SolitaryException )
+        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived exception");
 } // void Test3_pipeline ()
 
-class nesting_filter_with_eh_body : public tbb::filter
-{
+class NestingFilterWithEhBody : public tbb::filter {
 public:
-    nesting_filter_with_eh_body(tbb::filter::mode _mode )
-        : filter ( _mode)
-    {}
+    NestingFilterWithEhBody(tbb::filter::mode m ) : filter(m) {}
 
-    void* operator()(void* item) {        
+    void* operator()(void* item) {
         tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        ++g_cur_executed;
-        simple_pipeline test_pipeline(serial__parallel);
+        SimplePipeline testPipeline(serial__parallel);
         TRY();
-            test_pipeline.run(ctx);
+            testPipeline.run(ctx);
         CATCH();
         return item;
     }
-}; // class nesting_filter_with_eh_body
+}; // class NestingFilterWithEhBody
 
 //! Uses pipeline body invoking a nested pipeline (with default bound context) inside a try-block.
-/** Since exception(s) thrown from the nested pipeline are handled by the caller 
-    in this test, they do not affect neither other tasks of the the root pipeline 
+/** Since exception(s) thrown from the nested pipeline are handled by the caller
+    in this test, they do not affect neither other tasks of the the root pipeline
     nor sibling nested algorithms. **/
 
-void Test4_pipeline ( filter_set mode ) {
-    TEST_PROLOGUE()
-
-    intptr  nested_body_calls = buffer_size + 1,
-            nesting_body_calls = 2 * (buffer_size + 1),
-            calls_in_normal_case = nesting_body_calls * nested_body_calls;
-
-    custom_pipeline<input_filter, nesting_filter_with_eh_body> test_pipeline(mode);
+void Test4_pipeline ( FilterSet mode ) {
+#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");
+        return;
+    }
+#endif
+    ResetGlobals( true, true );
+    intptr_t nestedCalls = NUM_ITEMS + 1,
+             nestingCalls = 2 * (NUM_ITEMS + 1),
+             maxExecuted = nestingCalls * nestedCalls;
+    CustomPipeline<InputFilter, NestingFilterWithEhBody> testPipeline(mode);
     TRY();
-        test_pipeline.run();
+        testPipeline.run();
     CATCH_AND_ASSERT();
-
-
-    ASSERT (no_exception, "All exceptions must have been handled in the parallel_do body");
-    TRACE ("Executed %d (normal case %d), exceptions %d, in master only? %d", (intptr)g_cur_executed, calls_in_normal_case, (intptr)g_exceptions, g_exception_in_master);
-    intptr  min_num_calls = 0;
-    if ( g_solitary_exception ) {
-        min_num_calls = calls_in_normal_case - nested_body_calls;
-        ASSERT (g_exceptions == 1, "No exception registered");
-        ASSERT (g_cur_executed <= min_num_calls + g_num_threads, "Too many tasks survived exception");
+    ASSERT (!exceptionCaught, "All exceptions must have been handled in the parallel_do body");
+    intptr_t  minExecuted = 0;
+    if ( g_SolitaryException ) {
+        minExecuted = maxExecuted - nestedCalls;
+        ASSERT (g_Exceptions == 1, "No exception registered");
+        ASSERT (g_CurExecuted <= minExecuted + g_NumThreads, "Too many tasks survived exception");
     }
-    else if ( !g_exception_in_master ) {
-        // Each nesting body + at least 1 of its nested body invocations
-        nesting_body_calls += g_added_tasks_count;
-        min_num_calls = 2 * nesting_body_calls;        
-        ASSERT (g_exceptions > 1 && g_exceptions <= nesting_body_calls, "Unexpected actual number of exceptions");
-        ASSERT (g_cur_executed <= g_catch_executed + g_num_threads, "Too many tasks survived multiple exceptions");
-        // Additional nested_body_calls accounts for the minimal amount of tasks spawned 
-        // by not throwing threads. In the minimal case it is either the master thread or the only worker.
-        ASSERT (g_cur_executed <= min_num_calls + (nesting_body_calls - g_exceptions + 1) * nested_body_calls + g_exceptions + g_num_threads, "Too many tasks survived exception");
+    else {
+        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 <= nestingCalls * (1 + g_NumThreads), "Too many tasks survived exception");
     }
-    TEST_EPILOGUE()
 } // void Test4_pipeline ()
 
-
-class filter_to_cancel : public tbb::filter
-{
+class FilterToCancel : public tbb::filter {
 public:
-    filter_to_cancel(bool is_parallel) 
-        : filter ( is_parallel ? tbb::filter::parallel : tbb::filter::serial_in_order)
+    FilterToCancel(bool is_parallel)
+        : filter( is_parallel ? tbb::filter::parallel : tbb::filter::serial_in_order )
     {}
-
     void* operator()(void* item) {
-        ++g_cur_executed;
-        do {
-            util::sleep(10);
-            __TBB_Yield();
-        } while( !my_cancellator_task::s_cancellator_ready );
+        ++g_CurExecuted;
+        CancellatorTask::WaitUntilReady();
         return item;
     }
-}; // class filter_to_cancel
-
+}; // class FilterToCancel
 
-template <class Filter_to_cancel> class my_worker_pipeline_task : public tbb::task
-{
+template <class Filter_to_cancel> 
+class PipelineLauncherTask : public tbb::task {
     tbb::task_group_context &my_ctx;
-
 public:
-    my_worker_pipeline_task ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}
+    PipelineLauncherTask ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}
 
     tbb::task* execute () {
         // Run test when serial filter is the first non-input filter
-        input_filter my_input_filter;
-        Filter_to_cancel my_filter_to_cancel(true);        
-        
-        tbb::pipeline my_pipeline;
-        my_pipeline.add_filter(my_input_filter);            
-        my_pipeline.add_filter(my_filter_to_cancel);                
-
-        my_pipeline.run(g_num_tokens, my_ctx);
-
+        InputFilter inputFilter;
+        Filter_to_cancel filterToCancel(true);
+        tbb::pipeline p;
+        p.add_filter(inputFilter);
+        p.add_filter(filterToCancel);
+        p.run(g_NumTokens, my_ctx);
         return NULL;
     }
-
 };
 
 //! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).
 void Test5_pipeline () {
-    TEST_PROLOGUE()
-
-    g_throw_exception = false;
-    intptr  threshold = 10;
+    ResetGlobals();
+    g_ThrowException = false;
+    intptr_t  threshold = 10;
     tbb::task_group_context ctx;
     ctx.reset();
-    my_cancellator_task::s_cancellator_ready = false;
     tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
     r.set_ref_count(3);
-    r.spawn( *new( r.allocate_child() ) my_cancellator_task(ctx, threshold) );
+    r.spawn( *new( r.allocate_child() ) CancellatorTask(ctx, threshold) );
     __TBB_Yield();
-    r.spawn( *new( r.allocate_child() ) my_worker_pipeline_task<filter_to_cancel>(ctx) );
+    r.spawn( *new( r.allocate_child() ) PipelineLauncherTask<FilterToCancel>(ctx) );
     TRY();
         r.wait_for_all();
     CATCH();
     r.destroy(r);
-    ASSERT (no_exception, "Cancelling tasks should not cause any exceptions");    
-    ASSERT (g_cur_executed < g_catch_executed + g_num_threads, "Too many tasks were executed after cancellation");
-    TEST_EPILOGUE()
+    ASSERT (!exceptionCaught, "Cancelling tasks should not cause any exceptions");
+    ASSERT (g_CurExecuted < g_ExecutedAtCatch + g_NumThreads, "Too many tasks were executed after cancellation");
 } // void Test5_pipeline ()
 
-class filter_to_cancel_2 : public tbb::filter {
+class FilterToCancel2 : public tbb::filter {
 public:
-    filter_to_cancel_2(bool is_parallel) 
+    FilterToCancel2(bool is_parallel)
         : filter ( is_parallel ? tbb::filter::parallel : tbb::filter::serial_in_order)
     {}
 
     void* operator()(void* item) {
-        ++g_cur_executed;
+        ++g_CurExecuted;
         // 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();
+        while( !tbb::task::self().is_cancelled() )
+            __TBB_Yield();
         return item;
     }
 };
@@ -1608,183 +1078,154 @@ public:
 //! Test for cancelling an algorithm from outside (from a task running in parallel with the algorithm).
 /** This version also tests task::is_cancelled() method. **/
 void Test6_pipeline () {
-    TEST_PROLOGUE()
-
-    tbb::task_group_context  ctx;
-    tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
-    r.set_ref_count(3);
-    r.spawn( *new( r.allocate_child() ) my_cancellator_2_task(ctx) );    
-    __TBB_Yield();
-    r.spawn( *new( r.allocate_child() ) my_worker_pipeline_task<filter_to_cancel_2>(ctx) );
-    TRY();
-        r.wait_for_all();
-    CATCH();
-    r.destroy(r);
-    ASSERT (no_exception, "Cancelling tasks should not cause any exceptions");    
-    ASSERT (g_cur_executed <= g_catch_executed, "Some tasks were executed after cancellation");
-    TEST_EPILOGUE()
+    ResetGlobals();
+    RunCancellationTest<PipelineLauncherTask<FilterToCancel2>, CancellatorTask2>();
+    ASSERT (g_CurExecuted <= g_ExecutedAtCatch, "Some tasks were executed after cancellation");
 } // void Test6_pipeline ()
 
 //! Testing filter::finalize method
-const int FINALIZE_SIZE_OF_EACH_BUFFER = buffer_size + 1;
-const int FINALIZE_NUMBER_OF_BUFFERS = 10000;
-tbb::atomic<size_t> allocated_count; // Number of currently allocated buffers
-tbb::atomic<size_t> total_count; // Total number of allocated buffers
+#define BUFFER_SIZE     32
+#define NUM_BUFFERS     1024
+
+tbb::atomic<size_t> g_AllocatedCount; // Number of currently allocated buffers
+tbb::atomic<size_t> g_TotalCount; // Total number of allocated buffers
 
 //! Base class for all filters involved in finalize method testing
-class finalize_base_filter: public tbb::filter{
+class FinalizationBaseFilter : public tbb::filter {
 public:
-    finalize_base_filter (tbb::filter::mode _mode) 
-        : filter ( _mode)
-    {}
+    FinalizationBaseFilter ( tbb::filter::mode m ) : filter(m) {}
 
     // Deletes buffers if exception occured
     virtual void finalize( void* item ) {
-        size_t* my_item = (size_t*)item;
-        delete[] my_item;
-        allocated_count--;
+        size_t* m_Item = (size_t*)item;
+        delete[] m_Item;
+        --g_AllocatedCount;
     }
 };
 
 //! Input filter to test finalize method
-class finalize_input_filter: public finalize_base_filter {
+class InputFilterWithFinalization: public FinalizationBaseFilter {
 public:
-    finalize_input_filter() : finalize_base_filter(tbb::filter::serial)
-    {
-        total_count = 0;        
+    InputFilterWithFinalization() : FinalizationBaseFilter(tbb::filter::serial) {
+        g_TotalCount = 0;
     }
     void* operator()( void* ){
-        if (total_count == FINALIZE_NUMBER_OF_BUFFERS) {
+        if (g_TotalCount == NUM_BUFFERS)
             return NULL;
-        }
-
-        size_t* item = new size_t[FINALIZE_SIZE_OF_EACH_BUFFER];
-        for (int i = 0; i < FINALIZE_SIZE_OF_EACH_BUFFER; i++)
+        size_t* item = new size_t[BUFFER_SIZE];
+        for (int i = 0; i < BUFFER_SIZE; i++)
             item[i] = 1;
-        total_count++;
-        allocated_count ++;
+        ++g_TotalCount;
+        ++g_AllocatedCount;
         return item;
     }
 };
 
 // The filter multiplies each buffer item by 10.
-class finalize_process_filter: public finalize_base_filter {        
+class ProcessingFilterWithFinalization : public FinalizationBaseFilter {
 public:
-    finalize_process_filter (tbb::filter::mode _mode) : finalize_base_filter (_mode) {}
-
-    void* operator()( void* item){
-        if (total_count > FINALIZE_NUMBER_OF_BUFFERS / 2)
-            throw_test_exception(1);
-
-        size_t* my_item = (size_t*)item;
-        for (int i = 0; i < FINALIZE_SIZE_OF_EACH_BUFFER; i++)
-            my_item[i] *= 10;
-
+    ProcessingFilterWithFinalization (tbb::filter::mode _mode) : FinalizationBaseFilter (_mode) {}
+
+    void* operator()( void* item) {
+        if (g_TotalCount > NUM_BUFFERS / 2)
+            ThrowTestException(1);
+        size_t* m_Item = (size_t*)item;
+        for (int i = 0; i < BUFFER_SIZE; i++)
+            m_Item[i] *= 10;
         return item;
     }
 };
 
 // Output filter deletes previously allocated buffer
-class finalize_output_filter: public finalize_base_filter {        
+class OutputFilterWithFinalization : public FinalizationBaseFilter {
 public:
-    finalize_output_filter (tbb::filter::mode _mode) : finalize_base_filter (_mode) {}
+    OutputFilterWithFinalization (tbb::filter::mode m) : FinalizationBaseFilter (m) {}
 
     void* operator()( void* item){
-        size_t* my_item = (size_t*)item;
-        delete[] my_item;
-        allocated_count--;
-
-        return NULL; // not used
+        size_t* m_Item = (size_t*)item;
+        delete[] m_Item;
+        --g_AllocatedCount;
+        return NULL;
     }
 };
 
 //! Tests filter::finalize method
-void Test8_pipeline (filter_set mode) {
-    TEST_PROLOGUE()
-
-    allocated_count = 0;
+void Test8_pipeline (FilterSet mode) {
+    ResetGlobals();
+    g_AllocatedCount = 0;
+    CustomPipeline<InputFilterWithFinalization, ProcessingFilterWithFinalization> testPipeline(mode);
+    OutputFilterWithFinalization my_output_filter(tbb::filter::parallel);
 
-    custom_pipeline<finalize_input_filter, finalize_process_filter> test_pipeline(mode);
-    finalize_output_filter my_output_filter(tbb::filter::parallel);
-
-    test_pipeline.add_filter(my_output_filter);
+    testPipeline.add_filter(my_output_filter);
     TRY();
-        test_pipeline.run();
-        //TRACEP("Pipeline run finished\n");
+        testPipeline.run();
     CATCH();
-
-    TEST_EPILOGUE()
-
-    ASSERT (allocated_count == 0, "Memory leak: Some my_object weren't destroyed");
+    ASSERT (g_AllocatedCount == 0, "Memory leak: Some my_object weren't destroyed");
 } // void Test8_pipeline ()
 
 // Tests pipeline function passed with different combination of filters
-template<void pipeline_test(filter_set)> 
+template<void testFunc(FilterSet)>
 void TestWithDifferentFilters() {
-    pipeline_test(parallel__parallel);
-    pipeline_test(parallel__serial);
-    pipeline_test(parallel__serial_out_of_order);
-    pipeline_test(serial__parallel);
-    pipeline_test(serial__serial);
-    pipeline_test(serial__serial_out_of_order);
-    pipeline_test(serial_out_of_order__parallel);
-    pipeline_test(serial_out_of_order__serial);
-    pipeline_test(serial_out_of_order__serial_out_of_order);
+    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);
 }
 
 void RunPipelineTests() {
-    g_num_tokens = 2 * g_num_threads;
+    REMARK( "pipeline tests" );
+    tbb::task_scheduler_init init (g_NumThreads);
+    g_Master = Harness::CurrentTid();
+    g_NumTokens = 2 * g_NumThreads;
 
     Test0_pipeline();
-#if !(__GLIBC__==2&&__GLIBC_MINOR__==3)
+#if !__TBB_EXCEPTION_HANDLING_BROKEN
     TestWithDifferentFilters<Test1_pipeline>();
     TestWithDifferentFilters<Test2_pipeline>();
-#endif /* __GLIBC__ */
+    TestWithDifferentFilters<Test3_pipeline>();
+    TestWithDifferentFilters<Test4_pipeline>();
+#endif /* !__TBB_EXCEPTION_HANDLING_BROKEN */
     Test5_pipeline();
     Test6_pipeline();
-#if !(__GLIBC__==2&&__GLIBC_MINOR__==3)
+#if !__TBB_EXCEPTION_HANDLING_BROKEN
     TestWithDifferentFilters<Test8_pipeline>();
 #endif
 }
-
 #endif /* __TBB_EXCEPTIONS */
 
 
-//------------------------------------------------------------------------
-// Entry point
-//------------------------------------------------------------------------
-
-/** 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) 
+/** 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 **/
 int main(int argc, char* argv[]) {
-    // Set default minimum number of threads
-    MinThread = 2;
     ParseCommandLine( argc, argv );
-    MinThread = min(MinThread, MaxThread);
-    ASSERT (MinThread>=2, "Minimal number of threads must be 2 or more");
-    ASSERT (ITER_RANGE >= ITER_GRAIN * MaxThread, "Fix defines");
+    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);
-    for ( g_num_threads = MinThread; g_num_threads <= MaxThread; g_num_threads += step ) {
-        TRACE ("Number of threads %d", g_num_threads);
-        g_max_concurrency = min(g_num_threads, tbb::task_scheduler_init::default_num_threads());
+    for ( g_NumThreads = MinThread; g_NumThreads <= MaxThread; g_NumThreads += step ) {
+        REMARK ("Number of threads %d", g_NumThreads);
         // Execute in all the possible modes
         for ( size_t j = 0; j < 4; ++j ) {
-            g_exception_in_master = (j & 1) == 1;
-            g_solitary_exception = (j & 2) == 1;
-            RunTests();
-            RunParallelDoTests();
+            g_ExceptionInMaster = (j & 1) == 1;
+            g_SolitaryException = (j & 2) == 1;
+            RunParForAndReduceTests();
+            RunParDoTests();
             RunPipelineTests();
         }
     }
-#if __GLIBC__==2&&__GLIBC_MINOR__==3
+#if __TBB_EXCEPTION_HANDLING_BROKEN
     printf("Warning: Exception handling tests are skipped due to a known issue.\n");
-#endif // workaround
+#endif
     printf("done\n");
-#else  /* __TBB_EXCEPTIONS */
+#else  /* !__TBB_EXCEPTIONS */
     printf("skipped\n");
-#endif /* __TBB_EXCEPTIONS */
+#endif /* !__TBB_EXCEPTIONS */
     return 0;
 }
-
diff --git a/src/test/test_eh_tasks.cpp b/src/test/test_eh_tasks.cpp
index 3e5aa7f..506b0bf 100644
--- a/src/test/test_eh_tasks.cpp
+++ b/src/test/test_eh_tasks.cpp
@@ -40,201 +40,77 @@
 #include "tbb/tick_count.h"
 #include <string>
 
-#include "harness.h"
-#include "harness_trace.h"
-
 #define NUM_CHILD_TASKS                 256
 #define NUM_ROOT_TASKS                  32
 #define NUM_ROOTS_IN_GROUP              8
-#define EXCEPTION_DESCR "Test exception"
-
-namespace internal = tbb::internal;
-using internal::intptr;
-
-namespace util {
-
-    void sleep ( int ms ) {
-    #if _WIN32 || _WIN64
-        ::Sleep(ms);
-    #else
-        timespec  requested = { ms / 1000, (ms % 1000)*1000000 };
-        timespec  remaining = {0};
-        nanosleep(&requested, &remaining);
-    #endif
-    }
-} // namespace util
-
-int g_max_concurrency = 0;
-int g_num_threads = 0;
-
-inline void yield_if_singlecore() { if ( g_max_concurrency == 1 ) __TBB_Yield(); }
-
-
-class test_exception : public std::exception
-{
-    const char* my_description;
-public:
-    test_exception ( const char* description ) : my_description(description) {}
-
-    const char* what() const throw() { return my_description; }
-};
-
-class solitary_test_exception : public test_exception
-{
-public:
-    solitary_test_exception ( const char* description ) : test_exception(description) {}
-};
-
 
 //! Statistics about number of tasks in different states
-class task_statistics_t
-{
+class TaskStats {
     typedef tbb::spin_mutex::scoped_lock lock_t;
     //! Number of tasks allocated that was ever allocated
-    volatile intptr my_existed;
+    volatile intptr_t m_Existed;
     //! Number of tasks executed to the moment
-    volatile intptr my_executed;
+    volatile intptr_t m_Executed;
     //! Number of tasks allocated but not yet destroyed to the moment
-    volatile intptr my_existing;
-
-    mutable tbb::spin_mutex  my_mutex;
+    volatile intptr_t m_Existing;
 
+    mutable tbb::spin_mutex  m_Mutex;
 public:
     //! Assumes that assignment is noncontended for the left-hand operand
-    const task_statistics_t& operator= ( const task_statistics_t& rhs ) {
+    const TaskStats& operator= ( const TaskStats& rhs ) {
         if ( this != &rhs ) {
-            lock_t lock(rhs.my_mutex);
-            my_existed = rhs.my_existed;
-            my_executed = rhs.my_executed;
-            my_existing = rhs.my_existing;
+            lock_t lock(rhs.m_Mutex);
+            m_Existed = rhs.m_Existed;
+            m_Executed = rhs.m_Executed;
+            m_Existing = rhs.m_Existing;
         }
         return *this;
     }
-
-    intptr existed () const { return my_existed; }
-    intptr executed () const { return my_executed; }
-    intptr existing () const { return my_existing; }
-
-    void inc_existed () { lock_t lock(my_mutex); ++my_existed; ++my_existing; }
-    void inc_executed () { lock_t lock(my_mutex); ++my_executed; }
-    void dec_existing () { lock_t lock(my_mutex); --my_existing; }
-
-    //! Assumed to be used in noncontended manner only
-    void reset () { my_executed = my_existing = my_existed = 0; }
-
-    void trace (const char* prefix ) { 
-        const char* separator = prefix && prefix[0] ? " " : "";
-        lock_t lock(my_mutex);
-        TRACE ("%s%stasks total %u, existing %u, executed %u", prefix, separator, (intptr)my_existed, (intptr)my_existing, (intptr)my_executed);
-    }
+    intptr_t Existed() const { return m_Existed; }
+    intptr_t Executed() const { return m_Executed; }
+    intptr_t Existing() const { return m_Existing; }
+    void IncExisted() { lock_t lock(m_Mutex); ++m_Existed; ++m_Existing; }
+    void IncExecuted() { lock_t lock(m_Mutex); ++m_Executed; }
+    void DecExisting() { lock_t lock(m_Mutex); --m_Existing; }
+    //! Assumed to be used in uncontended manner only
+    void Reset() { m_Executed = m_Existing = m_Existed = 0; }
 };
 
-task_statistics_t   g_cur_stat,
-                    g_exc_stat; // snapshot of statistics at the moment of exception throwing
-
-internal::GenericScheduler  *g_master = NULL;
+TaskStats g_CurStat;
 
-volatile intptr g_exception_thrown = 0;
-volatile bool g_throw_exception = true;
-volatile bool g_no_exception = true;
-volatile bool g_unknown_exception = false;
-volatile bool g_task_was_cancelled = false;
-tbb::atomic<int> g_tasks_started;
-int g_tasks_wait_limit = 0;
-const int c_timeout = 50000;
+inline intptr_t Existed () { return g_CurStat.Existed(); }
 
-bool    g_exception_in_master = false;
-bool    g_solitary_exception = true;
+#include "harness_eh.h"
 
-//volatile intptr g_num_tasks_when_last_exception = 0;
+bool g_BoostExecutedCount = true;
+volatile bool g_TaskWasCancelled = false;
 
-
-void reset_globals () {
-    g_cur_stat.reset();
-    g_exc_stat.reset();
-    g_exception_thrown = 0;
-    g_throw_exception = true;
-    g_no_exception = true;
-    g_unknown_exception = false;
-    g_task_was_cancelled = false;
-    g_tasks_started = 0;
-    g_tasks_wait_limit = g_num_threads;
+inline void ResetGlobals () {
+    ResetEhGlobals();
+    g_BoostExecutedCount = true;
+    g_TaskWasCancelled = false;
+    g_CurStat.Reset();
 }
 
-intptr num_tasks () { return g_master->get_task_node_count(true); }
-
-void throw_test_exception ( intptr throw_threshold ) {
-    if ( !g_throw_exception  ||  g_exception_in_master ^ (internal::GetThreadSpecific() == g_master) )
-        return; 
-    while ( g_cur_stat.existed() < throw_threshold )
-        yield_if_singlecore();
-    if ( !g_solitary_exception ) {
-        TRACE ("About to throw one of multiple test_exceptions... :");
-        throw test_exception(EXCEPTION_DESCR);
-    }
-    if ( __TBB_CompareAndSwapW(&g_exception_thrown, 1, 0) == 0 ) {
-        g_exc_stat = g_cur_stat;
-        TRACE ("About to throw solitary test_exception... :");
-        throw solitary_test_exception(EXCEPTION_DESCR);
-    }
-}
-
-// Default timeout value (50000) translates to 20-50 ms on most of the modern architectures
-inline void wait_for_exception_with_timeout ( int timeout = 50000 ) {
-    int wait_count = 0;
-    while ( g_no_exception && (++wait_count < timeout) ) __TBB_Yield();
-    if ( wait_count == timeout )
-        TRACE("wait_for_exception_with_timeout: wait failed\n");
+inline void WaitForException () {
+    while ( !g_ExceptionCaught )
+        __TBB_Yield();
 }
 
-#define TRY()   \
-    bool no_exception = true, unknown_exception = false;    \
-    try {
+#define ASSERT_TEST_POSTCOND() \
+    ASSERT (g_CurStat.Existed() >= g_CurStat.Executed(), "Total number of tasks is less than executed");  \
+    ASSERT (!g_CurStat.Existing(), "Not all task objects have been destroyed"); \
+    ASSERT (!tbb::task::self().is_cancelled(), "Scheduler's default context has not been cleaned up properly");
 
-// When changing this macro check test10 as well - it uses similar code
-#define CATCH()     \
-    } catch ( tbb::captured_exception& e ) {     \
-        ASSERT (strcmp(e.name(), (g_solitary_exception ? typeid(solitary_test_exception) : typeid(test_exception)).name() ) == 0, "Unexpected original exception name");    \
-        ASSERT (strcmp(e.what(), EXCEPTION_DESCR) == 0, "Unexpected original exception info");   \
-        if ( g_solitary_exception ) {   \
-            g_exc_stat.trace("stat at throw moment:");  \
-            g_cur_stat.trace("stat upon catch     :");  \
-        }   \
-        g_no_exception = no_exception = false;   \
-    }   \
-    catch ( ... ) { \
-        g_no_exception = false;   \
-        g_unknown_exception = unknown_exception = true;   \
-    }
 
-#define ASSERT_EXCEPTION()     \
-    ASSERT (!g_no_exception, "no exception occurred");    \
-    ASSERT (!g_unknown_exception, "unknown exception was caught");
-
-#define CATCH_AND_ASSERT()     \
-    CATCH() \
-    ASSERT_EXCEPTION()
-
-#define ASSERT_TEST_POSTCOND()   \
-    ASSERT (g_cur_stat.existed() >= g_cur_stat.executed(), "Total number of tasks is less than executed");  \
-    ASSERT (!g_cur_stat.existing(), "Not all task objects have been destroyed");
-    
-#define TEST_PROLOGUE() \
-    TRACEP ("");    \
-    {   \
-    tbb::task_scheduler_init init (g_num_threads);  \
-    g_master = internal::GetThreadSpecific();       \
-    reset_globals();
-
-#define TEST_EPILOGUE() \
-    }   \
-    ASSERT_TEST_POSTCOND()
-
-class my_throwing_task : public tbb::task {
+class SimpleThrowingTask : public tbb::task {
 public:
     tbb::task* execute () { throw 0; }
-    ~my_throwing_task() {
+
+    ~SimpleThrowingTask() {
+#if !__TBB_RELAXED_OWNERSHIP
         ASSERT( tbb::task::self().is_owned_by_current_thread(), NULL );
+#endif /* !__TBB_RELAXED_OWNERSHIP */
     }
 };
 
@@ -243,101 +119,82 @@ void Test0 () {
     tbb::task_scheduler_init init (1);
     tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
     tbb::task_list tl;
-    tl.push_back( *new( r.allocate_child() ) my_throwing_task );
-    tl.push_back( *new( r.allocate_child() ) my_throwing_task );
+    tl.push_back( *new( r.allocate_child() ) SimpleThrowingTask );
+    tl.push_back( *new( r.allocate_child() ) SimpleThrowingTask );
     r.set_ref_count( 3 );
     try {
         r.spawn_and_wait_for_all( tl );
     }
-    catch (...) {
-    }
+    catch (...) {}
     r.destroy( r );
 }
 
-class my_base_task : public tbb::task
-{
+class TaskBase : public tbb::task {
     tbb::task* execute () {
         tbb::task* t = NULL;
-        try { t = do_execute(); } 
-        catch ( ... ) { g_cur_stat.inc_executed(); throw; }
-        g_cur_stat.inc_executed();
+        try { 
+            t = do_execute();
+        } catch ( ... ) { 
+            g_CurStat.IncExecuted(); 
+            throw;
+        }
+        g_CurStat.IncExecuted();
         return t;
     }
 protected:
-    my_base_task ( bool throw_exception = true ) : my_throw(throw_exception) { g_cur_stat.inc_existed(); }
-    ~my_base_task () { g_cur_stat.dec_existing(); }
+    TaskBase ( bool throwException = true ) : m_Throw(throwException) { g_CurStat.IncExisted(); }
+    ~TaskBase () { g_CurStat.DecExisting(); }
 
     virtual tbb::task* do_execute () = 0;
 
-    bool my_throw;
-}; // class my_base_task
+    bool m_Throw;
+}; // class TaskBase
 
-class my_leaf_task : public my_base_task
+class LeafTask : public TaskBase
 {
     tbb::task* do_execute () {
-        ++g_tasks_started;
-        if ( my_throw )
-            throw_test_exception(NUM_CHILD_TASKS/2);
-        if ( !g_throw_exception )
+        Harness::ConcurrencyTracker ct;
+        WaitUntilConcurrencyPeaks();
+        if ( g_BoostExecutedCount )
+            ++g_CurExecuted;
+        if ( m_Throw )
+            ThrowTestException(NUM_CHILD_TASKS/2);
+        if ( !g_ThrowException )
             __TBB_Yield();
         return NULL;
     }
 public:
-    my_leaf_task ( bool throw_exception = true ) : my_base_task(throw_exception) {}
+    LeafTask ( bool throw_exception = true ) : TaskBase(throw_exception) {}
 };
 
-class my_simple_root_task : public my_base_task
-{
+class SimpleRootTask : public TaskBase {
     tbb::task* do_execute () {
         set_ref_count(NUM_CHILD_TASKS + 1);
-        for ( size_t i = 0; i < NUM_CHILD_TASKS; ++i ) {
-            my_leaf_task &t = *new( allocate_child() ) my_leaf_task(my_throw);
-            spawn(t);
-            __TBB_Yield();
-        }
-//        ++g_tasks_started;
-        if ( g_exception_in_master  ^  (internal::GetThreadSpecific() == g_master) )
-        {
-            // Make absolutely sure that worker threads on multicore machines had a chance to steal something
-//            util::sleep(10);
-            int n = 0;
-//            while ( (++n < c_timeout) && (g_tasks_started < g_tasks_wait_limit) ) __TBB_Yield();
-            while ( (++n < c_timeout) && !g_tasks_started ) __TBB_Yield();
-            if ( n == c_timeout )
-                TRACE("my_simple_root_task: wait failed\n");
-        }
+        for ( size_t i = 0; i < NUM_CHILD_TASKS; ++i )
+            spawn( *new( allocate_child() ) LeafTask(m_Throw) );
         wait_for_all();
         return NULL;
     }
 public:
-    my_simple_root_task ( bool throw_exception = true ) : my_base_task(throw_exception) {}
+    SimpleRootTask ( bool throw_exception = true ) : TaskBase(throw_exception) {}
 };
 
 //! Default exception behavior test. 
 /** Allocates a root task that spawns a bunch of children, one or several of which throw 
     a test exception in a worker or master thread (depending on the global setting). **/
 void Test1 () {
-    TEST_PROLOGUE();
+    ResetGlobals();
     tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
-    ASSERT (!g_cur_stat.existing() && !g_cur_stat.existed() && !g_cur_stat.executed(), 
+    ASSERT (!g_CurStat.Existing() && !g_CurStat.Existed() && !g_CurStat.Executed(), 
             "something wrong with the task accounting");
     r.set_ref_count(NUM_CHILD_TASKS + 1);
-    for ( int i = 0; i < NUM_CHILD_TASKS; ++i ) {
-        my_leaf_task &t = *new( r.allocate_child() ) my_leaf_task;
-        r.spawn(t);
-        // Make sure that worker threads on multicore machines had a chance to steal something
-//        util::sleep(1);
-        int n = 0;
-//        while ( ++n < c_timeout && g_no_exception && g_tasks_started < min (i + 1, g_num_threads - 1) ) __TBB_Yield();
-        while ( ++n < c_timeout && !g_tasks_started ) __TBB_Yield();
-        if ( n == c_timeout )
-            TRACE("Test1: wait failed\n");
-    }
+    for ( int i = 0; i < NUM_CHILD_TASKS; ++i )
+        r.spawn( *new( r.allocate_child() ) LeafTask );
     TRY();
         r.wait_for_all();
     CATCH_AND_ASSERT();
     r.destroy(r);
-    TEST_EPILOGUE();
+    ASSERT_TEST_POSTCOND();
 } // void Test1 ()
 
 //! Default exception behavior test. 
@@ -345,91 +202,81 @@ void Test1 () {
     a test exception in a worker thread. (Similar to Test1, except that the root task 
     is spawned by the test function, and children are created by the root task instead 
     of the test function body.) **/
-void Test2 ()
-{
-    TEST_PROLOGUE();
-    my_simple_root_task &r = *new( tbb::task::allocate_root() ) my_simple_root_task;
-    ASSERT (g_cur_stat.existing() == 1 && g_cur_stat.existed() == 1 && !g_cur_stat.executed(), 
+void Test2 () {
+    ResetGlobals();
+    SimpleRootTask &r = *new( tbb::task::allocate_root() ) SimpleRootTask;
+    ASSERT (g_CurStat.Existing() == 1 && g_CurStat.Existed() == 1 && !g_CurStat.Executed(), 
             "something wrong with the task accounting");
     TRY();
         tbb::task::spawn_root_and_wait(r);
     CATCH_AND_ASSERT();
-    ASSERT (!g_no_exception, "no exception occurred");
-    TEST_EPILOGUE();
+    ASSERT (g_ExceptionCaught, "no exception occurred");
+    ASSERT_TEST_POSTCOND();
 } // void Test2 ()
 
 //! The same as Test2() except the root task has explicit context.
 /** The context is initialized as bound in order to check correctness of its associating 
     with a root task. **/
-void Test3 ()
-{
-    TEST_PROLOGUE();
+void Test3 () {
+    ResetGlobals();
     tbb::task_group_context  ctx(tbb::task_group_context::bound);
-    my_simple_root_task &r = *new( tbb::task::allocate_root(ctx) ) my_simple_root_task;
-    ASSERT (g_cur_stat.existing() == 1 && g_cur_stat.existed() == 1 && !g_cur_stat.executed(), 
+    SimpleRootTask &r = *new( tbb::task::allocate_root(ctx) ) SimpleRootTask;
+    ASSERT (g_CurStat.Existing() == 1 && g_CurStat.Existed() == 1 && !g_CurStat.Executed(), 
             "something wrong with the task accounting");
     TRY();
         tbb::task::spawn_root_and_wait(r);
     CATCH_AND_ASSERT();
-    ASSERT (!g_no_exception, "no exception occurred");
-    TEST_EPILOGUE();
+    ASSERT (g_ExceptionCaught, "no exception occurred");
+    ASSERT_TEST_POSTCOND();
 } // void Test2 ()
 
-class my_root_with_context_launcher_task : public my_base_task
-{
-    tbb::task_group_context::kind_type my_context_kind;
+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);
-        my_simple_root_task &r = *new( allocate_root(ctx) ) my_simple_root_task;
+        SimpleRootTask &r = *new( allocate_root(ctx) ) SimpleRootTask;
         TRY();
             spawn_root_and_wait(r);
             // Give a child of our siblings a chance to throw the test exception
-            wait_for_exception_with_timeout();
+            WaitForException();
         CATCH();
-        ASSERT_WARNING (!g_no_exception, "no exception occurred - machine overloaded?");
-        ASSERT (!g_unknown_exception, "unknown exception was caught");
+        ASSERT (!g_UnknownException, "unknown exception was caught");
         return NULL;
     }
 public:
-    my_root_with_context_launcher_task ( tbb::task_group_context::kind_type ctx_kind = tbb::task_group_context::isolated ) : my_context_kind(ctx_kind) {}
+    RootLauncherTask ( tbb::task_group_context::kind_type ctx_kind = tbb::task_group_context::isolated ) : m_CtxKind(ctx_kind) {}
 };
 
 /** Allocates and spawns a bunch of roots, which allocate and spawn new root with 
     isolated context, which at last spawns a bunch of children each, one of which 
     throws a test exception in a worker thread. **/
 void Test4 () {
-    TEST_PROLOGUE();
+    ResetGlobals();
     tbb::task_list  tl;
-    for ( size_t i = 0; i < NUM_ROOT_TASKS; ++i ) {
-        my_root_with_context_launcher_task &r = *new( tbb::task::allocate_root() ) my_root_with_context_launcher_task;
-        tl.push_back(r);
-    }
+    for ( size_t i = 0; i < NUM_ROOT_TASKS; ++i )
+        tl.push_back( *new( tbb::task::allocate_root() ) RootLauncherTask );
     TRY();
         tbb::task::spawn_root_and_wait(tl);
     CATCH_AND_ASSERT();
-    ASSERT (no_exception, "unexpected exception intercepted");
-    g_cur_stat.trace("stat at end of test :");
-    intptr  num_tasks_expected = NUM_ROOT_TASKS * (NUM_CHILD_TASKS + 2);
-    ASSERT (g_cur_stat.existed() == num_tasks_expected, "Wrong total number of tasks");
-    if ( g_solitary_exception )
-        ASSERT (g_cur_stat.executed() >= num_tasks_expected - NUM_CHILD_TASKS, "Unexpected number of executed tasks");
-    TEST_EPILOGUE();
+    ASSERT (!exceptionCaught, "exception in this scope is unexpected");
+    intptr_t  num_tasks_expected = NUM_ROOT_TASKS * (NUM_CHILD_TASKS + 2);
+    ASSERT (g_CurStat.Existed() == num_tasks_expected, "Wrong total number of tasks");
+    if ( g_SolitaryException )
+        ASSERT (g_CurStat.Executed() >= num_tasks_expected - NUM_CHILD_TASKS, "Unexpected number of executed tasks");
+    ASSERT_TEST_POSTCOND();
 } // void Test4 ()
 
-class my_root_with_context_group_launcher_task : public my_base_task
-{
+class RootsGroupLauncherTask : public TaskBase {
     tbb::task* do_execute () {
         tbb::task_group_context  ctx (tbb::task_group_context::isolated);
         tbb::task_list  tl;
-        for ( size_t i = 0; i < NUM_ROOT_TASKS; ++i ) {
-            my_simple_root_task &r = *new( allocate_root(ctx) ) my_simple_root_task;
-            tl.push_back(r);
-        }
+        for ( size_t i = 0; i < NUM_ROOT_TASKS; ++i )
+            tl.push_back( *new( allocate_root(ctx) ) SimpleRootTask );
         TRY();
             spawn_root_and_wait(tl);
             // Give worker a chance to throw exception
-            wait_for_exception_with_timeout();
+            WaitForException();
         CATCH_AND_ASSERT();
         return NULL;
     }
@@ -439,50 +286,42 @@ class my_root_with_context_group_launcher_task : public my_base_task
     with an isolated context shared by all group members, which at last spawn a bunch 
     of children each, one of which throws a test exception in a worker thread. **/
 void Test5 () {
-    TEST_PROLOGUE();
+    ResetGlobals();
     tbb::task_list  tl;
-    for ( size_t i = 0; i < NUM_ROOTS_IN_GROUP; ++i ) {
-        my_root_with_context_group_launcher_task &r = *new( tbb::task::allocate_root() ) my_root_with_context_group_launcher_task;
-        tl.push_back(r);
-    }
+    for ( size_t i = 0; i < NUM_ROOTS_IN_GROUP; ++i )
+        tl.push_back( *new( tbb::task::allocate_root() ) RootsGroupLauncherTask );
     TRY();
         tbb::task::spawn_root_and_wait(tl);
     CATCH_AND_ASSERT();
-    ASSERT (no_exception, "unexpected exception intercepted");
-    g_cur_stat.trace("stat at end of test :");
-    if ( g_solitary_exception )  {
-        intptr  num_tasks_expected = NUM_ROOTS_IN_GROUP * (1 + NUM_ROOT_TASKS * (1 + NUM_CHILD_TASKS));
-        intptr  min_num_tasks_executed = num_tasks_expected - NUM_ROOT_TASKS * (NUM_CHILD_TASKS + 1);
-        ASSERT (g_cur_stat.executed() >= min_num_tasks_executed, "Too few tasks executed");
+    ASSERT (!exceptionCaught, "unexpected exception intercepted");
+    if ( g_SolitaryException )  {
+        intptr_t  num_tasks_expected = NUM_ROOTS_IN_GROUP * (1 + NUM_ROOT_TASKS * (1 + NUM_CHILD_TASKS));
+        intptr_t  min_num_tasks_executed = num_tasks_expected - NUM_ROOT_TASKS * (NUM_CHILD_TASKS + 1);
+        ASSERT (g_CurStat.Executed() >= min_num_tasks_executed, "Too few tasks executed");
     }
-    TEST_EPILOGUE();
+    ASSERT_TEST_POSTCOND();
 } // void Test5 ()
 
-class my_throwing_root_with_context_launcher_task : public my_base_task
-{
+class ThrowingRootLauncherTask : public TaskBase {
     tbb::task* do_execute () {
         tbb::task_group_context  ctx (tbb::task_group_context::bound);
-        my_simple_root_task &r = *new( allocate_root(ctx) ) my_simple_root_task(false);
+        SimpleRootTask &r = *new( allocate_root(ctx) ) SimpleRootTask(false);
         TRY();
             spawn_root_and_wait(r);
         CATCH();
-        ASSERT (no_exception, "unexpected exception intercepted");
-        throw_test_exception(NUM_CHILD_TASKS);
-        __TBB_Yield();
-        g_task_was_cancelled |= is_cancelled();
+        ASSERT (!exceptionCaught, "unexpected exception intercepted");
+        ThrowTestException(NUM_CHILD_TASKS);
+        g_TaskWasCancelled |= is_cancelled();
         return NULL;
     }
 };
 
-class my_bound_hierarchy_launcher_task : public my_base_task
-{
-    bool my_recover;
+class BoundHierarchyLauncherTask : public TaskBase {
+    bool m_Recover;
 
     void alloc_roots ( tbb::task_group_context& ctx, tbb::task_list& tl ) {
-        for ( size_t i = 0; i < NUM_ROOT_TASKS; ++i ) {
-            my_throwing_root_with_context_launcher_task &r = *new( allocate_root(ctx) ) my_throwing_root_with_context_launcher_task;
-            tl.push_back(r);
-        }
+        for ( size_t i = 0; i < NUM_ROOT_TASKS; ++i )
+            tl.push_back( *new( allocate_root(ctx) ) ThrowingRootLauncherTask );
     }
 
     tbb::task* do_execute () {
@@ -492,14 +331,14 @@ class my_bound_hierarchy_launcher_task : public my_base_task
         TRY();
             spawn_root_and_wait(tl);
         CATCH_AND_ASSERT();
-        ASSERT (!no_exception, "no exception occurred");
+        ASSERT (exceptionCaught, "no exception occurred");
         ASSERT (!tl.empty(), "task list was cleared somehow");
-        if ( g_solitary_exception )
-            ASSERT (g_task_was_cancelled, "No tasks were cancelled despite of exception");
-        if ( my_recover ) {
+        if ( g_SolitaryException )
+            ASSERT (g_TaskWasCancelled, "No tasks were cancelled despite of exception");
+        if ( m_Recover ) {
             // Test task_group_context::unbind and task_group_context::reset methods
-            g_throw_exception = false;
-            no_exception = true;
+            g_ThrowException = false;
+            exceptionCaught = false;
             tl.clear();
             alloc_roots(ctx, tl);
             ctx.reset();
@@ -507,16 +346,16 @@ class my_bound_hierarchy_launcher_task : public my_base_task
                 spawn_root_and_wait(tl);
             }
             catch (...) {
-                no_exception = false;
+                exceptionCaught = true;
             }
-            ASSERT (no_exception, "unexpected exception occurred");
+            ASSERT (!exceptionCaught, "unexpected exception occurred");
         }
         return NULL;
     }
 public:
-    my_bound_hierarchy_launcher_task ( bool recover = false ) : my_recover(recover) {}
+    BoundHierarchyLauncherTask ( bool recover = false ) : m_Recover(recover) {}
 
-}; // class my_bound_hierarchy_launcher_task
+}; // class BoundHierarchyLauncherTask
 
 //! Test for bound contexts forming 2 level tree. Exception is thrown on the 1st (root) level.
 /** Allocates and spawns a root that spawns a bunch of 2nd level roots sharing 
@@ -525,26 +364,25 @@ public:
     in the end. Leaves do not generate exceptions. The test exception is generated 
     by one of the 2nd level roots. **/
 void Test6 () {
-    TEST_PROLOGUE();
-    my_bound_hierarchy_launcher_task &r = *new( tbb::task::allocate_root() ) my_bound_hierarchy_launcher_task;
+    ResetGlobals();
+    BoundHierarchyLauncherTask &r = *new( tbb::task::allocate_root() ) BoundHierarchyLauncherTask;
     TRY();
         tbb::task::spawn_root_and_wait(r);
     CATCH_AND_ASSERT();
-    ASSERT (no_exception, "unexpected exception intercepted");
-    g_cur_stat.trace("stat at end of test :");
-    // After the first of the branches (my_throwing_root_with_context_launcher_task) completes, 
+    ASSERT (!exceptionCaught, "unexpected exception intercepted");
+    // After the first of the branches (ThrowingRootLauncherTask) completes, 
     // the rest of the task tree may be collapsed before having a chance to execute leaves.
     // A number of branches running concurrently with the first one will be able to spawn leaves though.
     /// \todo: If additional checkpoints are added to scheduler the following assertion must weaken
-    intptr  num_tasks_expected = 1 + NUM_ROOT_TASKS * (2 + NUM_CHILD_TASKS);
-    intptr  min_num_tasks_created = 1 + g_num_threads * 2 + NUM_CHILD_TASKS;
-    // 2 stands for my_bound_hierarchy_launcher_task and my_simple_root_task
-    // 1 corresponds to my_bound_hierarchy_launcher_task 
-    intptr  min_num_tasks_executed = 2 + 1 + NUM_CHILD_TASKS;
-    ASSERT (g_cur_stat.existed() <= num_tasks_expected, "Number of expected tasks is calculated incorrectly");
-    ASSERT (g_cur_stat.existed() >= min_num_tasks_created, "Too few tasks created");
-    ASSERT (g_cur_stat.executed() >= min_num_tasks_executed, "Too few tasks executed");
-    TEST_EPILOGUE();
+    intptr_t  num_tasks_expected = 1 + NUM_ROOT_TASKS * (2 + NUM_CHILD_TASKS);
+    intptr_t  min_num_tasks_created = 1 + g_NumThreads * 2 + NUM_CHILD_TASKS;
+    // 2 stands for BoundHierarchyLauncherTask and SimpleRootTask
+    // 1 corresponds to BoundHierarchyLauncherTask 
+    intptr_t  min_num_tasks_executed = 2 + 1 + NUM_CHILD_TASKS;
+    ASSERT (g_CurStat.Existed() <= num_tasks_expected, "Number of expected tasks is calculated incorrectly");
+    ASSERT (g_CurStat.Existed() >= min_num_tasks_created, "Too few tasks created");
+    ASSERT (g_CurStat.Executed() >= min_num_tasks_executed, "Too few tasks executed");
+    ASSERT_TEST_POSTCOND();
 } // void Test6 ()
 
 //! Tests task_group_context::unbind and task_group_context::reset methods.
@@ -554,33 +392,29 @@ void Test6 () {
     in the end. Leaves do not generate exceptions. The test exception is generated 
     by one of the 2nd level roots. **/
 void Test7 () {
-    TEST_PROLOGUE();
-    my_bound_hierarchy_launcher_task &r = *new( tbb::task::allocate_root() ) my_bound_hierarchy_launcher_task;
+    ResetGlobals();
+    BoundHierarchyLauncherTask &r = *new( tbb::task::allocate_root() ) BoundHierarchyLauncherTask;
     TRY();
         tbb::task::spawn_root_and_wait(r);
     CATCH_AND_ASSERT();
-    ASSERT (no_exception, "unexpected exception intercepted");
-    TEST_EPILOGUE();
+    ASSERT (!exceptionCaught, "unexpected exception intercepted");
+    ASSERT_TEST_POSTCOND();
 } // void Test6 ()
 
-class my_bound_hierarchy_launcher_task_2 : public my_base_task
-{
+class BoundHierarchyLauncherTask2 : public TaskBase {
     tbb::task* do_execute () {
         tbb::task_group_context  ctx;
         tbb::task_list  tl;
-        for ( size_t i = 0; i < NUM_ROOT_TASKS; ++i ) {
-            my_root_with_context_launcher_task &r = *new( allocate_root(ctx) ) my_root_with_context_launcher_task(tbb::task_group_context::bound);
-            tl.push_back(r);
-        }
+        for ( size_t i = 0; i < NUM_ROOT_TASKS; ++i )
+            tl.push_back( *new( allocate_root(ctx) ) RootLauncherTask(tbb::task_group_context::bound) );
         TRY();
             spawn_root_and_wait(tl);
         CATCH_AND_ASSERT();
-        // Exception must be intercepted by my_root_with_context_launcher_task
-        ASSERT (no_exception, "no exception occurred");
+        // Exception must be intercepted by RootLauncherTask
+        ASSERT (!exceptionCaught, "no exception occurred");
         return NULL;
     }
-}; // class my_bound_hierarchy_launcher_task_2
-
+}; // class BoundHierarchyLauncherTask2
 
 //! Test for bound contexts forming 2 level tree. Exception is thrown in the 2nd (outer) level.
 /** Allocates and spawns a root that spawns a bunch of 2nd level roots sharing 
@@ -588,195 +422,241 @@ class my_bound_hierarchy_launcher_task_2 : public my_base_task
     root with  the bound context, and these 3rd level roots spawn bunches of leaves 
     in the end. The test exception is generated by one of the leaves. **/
 void Test8 () {
-    TEST_PROLOGUE();
-    my_bound_hierarchy_launcher_task_2 &r = *new( tbb::task::allocate_root() ) my_bound_hierarchy_launcher_task_2;
+    ResetGlobals();
+    BoundHierarchyLauncherTask2 &r = *new( tbb::task::allocate_root() ) BoundHierarchyLauncherTask2;
     TRY();
         tbb::task::spawn_root_and_wait(r);
     CATCH_AND_ASSERT();
-    ASSERT (no_exception, "unexpected exception intercepted");
-    g_cur_stat.trace("stat at end of test :");
-    if ( g_solitary_exception )  {
-        intptr  num_tasks_expected = 1 + NUM_ROOT_TASKS * (2 + NUM_CHILD_TASKS);
-        intptr  min_num_tasks_created = 1 + g_num_threads * (2 + NUM_CHILD_TASKS);
-        intptr  min_num_tasks_executed = num_tasks_expected - (NUM_CHILD_TASKS + 1);
-        ASSERT (g_cur_stat.existed() <= num_tasks_expected, "Number of expected tasks is calculated incorrectly");
-        ASSERT (g_cur_stat.existed() >= min_num_tasks_created, "Too few tasks created");
-        ASSERT (g_cur_stat.executed() >= min_num_tasks_executed, "Too few tasks executed");
-    }
-    TEST_EPILOGUE();
+    ASSERT (!exceptionCaught, "unexpected exception intercepted");
+    if ( g_SolitaryException )  {
+        intptr_t  num_tasks_expected = 1 + NUM_ROOT_TASKS * (2 + NUM_CHILD_TASKS);
+        intptr_t  min_num_tasks_created = 1 + g_NumThreads * (2 + NUM_CHILD_TASKS);
+        intptr_t  min_num_tasks_executed = num_tasks_expected - (NUM_CHILD_TASKS + 1);
+        ASSERT (g_CurStat.Existed() <= num_tasks_expected, "Number of expected tasks is calculated incorrectly");
+        ASSERT (g_CurStat.Existed() >= min_num_tasks_created, "Too few tasks created");
+        ASSERT (g_CurStat.Executed() >= min_num_tasks_executed, "Too few tasks executed");
+    }
+    ASSERT_TEST_POSTCOND();
 } // void Test8 ()
 
+template<class T>
+class CtxLauncherTask : public tbb::task {
+    tbb::task_group_context &m_Ctx;
 
-class my_cancellation_root_task : public my_base_task
-{
-    tbb::task_group_context &my_ctx_to_cancel;
-    intptr              my_cancel_threshold;
-
-    tbb::task* do_execute () {
-        while ( g_cur_stat.executed() < my_cancel_threshold )
-            yield_if_singlecore();
-        my_ctx_to_cancel.cancel_group_execution();
-        g_exc_stat = g_cur_stat;
-        return NULL;
-    }
-public:
-    my_cancellation_root_task ( tbb::task_group_context& ctx, intptr threshold ) 
-        : my_ctx_to_cancel(ctx), my_cancel_threshold(threshold)
-    {}
-};
-
-class my_calculation_root_task : public my_base_task
-{
-    tbb::task_group_context &my_ctx;
-
-    tbb::task* do_execute () {
-        tbb::task::spawn_root_and_wait( *new( tbb::task::allocate_root(my_ctx) ) my_simple_root_task );
+    tbb::task* execute () {
+        tbb::task::spawn_root_and_wait( *new( tbb::task::allocate_root(m_Ctx) ) T );
         return NULL;
     }
 public:
-    my_calculation_root_task ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}
+    CtxLauncherTask ( tbb::task_group_context& ctx ) : m_Ctx(ctx) {}
 };
 
-
 //! Test for cancelling a task hierarchy from outside (from a task running in parallel with it).
 void Test9 () {
-    TEST_PROLOGUE();
-    g_throw_exception = false;
-    g_tasks_wait_limit = g_num_threads - 1;
-    intptr  threshold = NUM_CHILD_TASKS / 4;
+    ResetGlobals();
+    g_ThrowException = false;
     tbb::task_group_context  ctx;
     tbb::task_list  tl;
-    tl.push_back( *new( tbb::task::allocate_root() ) my_calculation_root_task(ctx) );
-    tl.push_back( *new( tbb::task::allocate_root() ) my_cancellation_root_task(ctx, threshold) );
+    tl.push_back( *new( tbb::task::allocate_root() ) CtxLauncherTask<SimpleRootTask>(ctx) );
+    tl.push_back( *new( tbb::task::allocate_root() ) CancellatorTask(ctx, NUM_CHILD_TASKS / 4) );
     TRY();
         tbb::task::spawn_root_and_wait(tl);
     CATCH();
-    ASSERT (no_exception, "Cancelling tasks should not cause any exceptions");
-    // g_exc_stat contains statistics snapshot at the moment right after cancellation signal sending
-    TRACE ("Threshold %d; executed: after cancellation signal %d, total %d", threshold, g_exc_stat.executed(), g_cur_stat.executed());
-    // 2 - root tasks in the calculation branch
-    //ASSERT_WARNING (g_exc_stat.executed() - threshold <= g_num_threads + 2, "too many tasks executed between reaching threshold and statistics cutoff");
-    // 3 - all root tasks 
-    ASSERT (g_cur_stat.executed() <= g_exc_stat.executed() + g_num_threads + 3, "Too many tasks were executed after cancellation");
-    TEST_EPILOGUE();
+    ASSERT (!exceptionCaught, "Cancelling tasks should not cause any exceptions");
+    ASSERT (g_CurStat.Executed() <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks were executed after cancellation");
+    ASSERT_TEST_POSTCOND();
 } // void Test9 ()
 
-
-//static tbb::atomic<int> g_int_exception_data_counter;
-
 template<typename T>
-void throw_movable_exception ( intptr throw_threshold, const T& data ) {
-    if ( g_exception_in_master ^ (internal::GetThreadSpecific() == g_master) )
+void ThrowMovableException ( intptr_t threshold, const T& data ) {
+    if ( IsThrowingThread() )
         return; 
-    if ( !g_solitary_exception ) {
-        TRACE ("About to throw one of multiple movable_exceptions... :");
+    if ( !g_SolitaryException ) {
+        g_ExceptionThrown = 1;
+        REMARK ("About to throw one of multiple movable_exceptions... :");
         throw tbb::movable_exception<T>(data);
     }
-    while ( g_cur_stat.existed() < throw_threshold )
-        yield_if_singlecore();
-    if ( __TBB_CompareAndSwapW(&g_exception_thrown, 1, 0) == 0 ) {
-        g_exc_stat = g_cur_stat;
-        TRACE ("About to throw solitary movable_exception... :");
+    while ( g_CurStat.Existed() < threshold )
+        __TBB_Yield();
+    if ( __TBB_CompareAndSwapW(&g_ExceptionThrown, 1, 0) == 0 ) {
+        REMARK ("About to throw solitary movable_exception... :");
         throw tbb::movable_exception<T>(data);
     }
 }
 
-const int g_int_exception_data = -375;
-const std::string g_string_exception_data = "My test string";
+const int g_IntExceptionData = -375;
+const std::string g_StringExceptionData = "My test string";
 
 // Exception data class implementing minimal requirements of tbb::movable_exception 
-class my_exception_data_t {
-    const my_exception_data_t& operator = ( const my_exception_data_t& src );
-    explicit my_exception_data_t ( int n ) : my_int(n), my_string(g_string_exception_data) {}
+class ExceptionData {
+    const ExceptionData& operator = ( const ExceptionData& src );
+    explicit ExceptionData ( int n ) : m_Int(n), m_String(g_StringExceptionData) {}
 public:
-    my_exception_data_t ( const my_exception_data_t& src ) : my_int(src.my_int), my_string(src.my_string) {}
-    ~my_exception_data_t () {}
+    ExceptionData ( const ExceptionData& src ) : m_Int(src.m_Int), m_String(src.m_String) {}
+    ~ExceptionData () {}
 
-    int my_int;
-    std::string my_string;
+    int m_Int;
+    std::string m_String;
 
     // Simple way to provide an instance when all initializing constructors are private
     // and to avoid memory reclamation problems.
-    static my_exception_data_t s_data;
+    static ExceptionData s_data;
 };
 
-my_exception_data_t my_exception_data_t::s_data(g_int_exception_data);
+ExceptionData ExceptionData::s_data(g_IntExceptionData);
 
-typedef tbb::movable_exception<int> solitary_movable_exception;
-typedef tbb::movable_exception<my_exception_data_t> multiple_movable_exception;
+typedef tbb::movable_exception<int> SolitaryMovableException;
+typedef tbb::movable_exception<ExceptionData> MultipleMovableException;
 
-class my_leaf_task_with_movable_exceptions : public my_base_task
-{
-    bool my_int_as_data;
+class LeafTaskWithMovableExceptions : public TaskBase {
+    bool m_IntAsData;
 
     tbb::task* do_execute () {
-        ++g_tasks_started;
-        if ( g_solitary_exception )
-            throw_movable_exception<int>(NUM_CHILD_TASKS/2, g_int_exception_data);
-        else {
-            throw_movable_exception<my_exception_data_t>(NUM_CHILD_TASKS/2, my_exception_data_t::s_data);
-        }
+        Harness::ConcurrencyTracker ct;
+        WaitUntilConcurrencyPeaks();
+        if ( g_SolitaryException )
+            ThrowMovableException<int>(NUM_CHILD_TASKS/2, g_IntExceptionData);
+        else
+            ThrowMovableException<ExceptionData>(NUM_CHILD_TASKS/2, ExceptionData::s_data);
         return NULL;
     }
 };
 
-//! Test for movable_exception behavior and semantics. 
+void CheckException ( tbb::tbb_exception& e ) {
+    ASSERT (strcmp(e.name(), (g_SolitaryException ? typeid(SolitaryMovableException) 
+                                                   : typeid(MultipleMovableException)).name() ) == 0, 
+                                                   "Unexpected original exception name");
+    ASSERT (strcmp(e.what(), "tbb::movable_exception") == 0, "Unexpected original exception info ");
+    if ( g_SolitaryException ) {
+        SolitaryMovableException& me = dynamic_cast<SolitaryMovableException&>(e);
+        ASSERT (me.data() == g_IntExceptionData, "Unexpected solitary movable_exception data");
+    }
+    else {
+        MultipleMovableException& me = dynamic_cast<MultipleMovableException&>(e);
+        ASSERT (me.data().m_Int == g_IntExceptionData, "Unexpected multiple movable_exception int data");
+        ASSERT (me.data().m_String == g_StringExceptionData, "Unexpected multiple movable_exception string data");
+    }
+}
+
+void CheckException () {
+    try {
+        throw;
+    } catch ( tbb::tbb_exception& e ) {
+        CheckException(e);
+    }
+    catch ( ... ) {
+    }
+}
+
+//! Test for movable_exception behavior, and external exception recording.
 /** Allocates a root task that spawns a bunch of children, one or several of which throw 
-    a movable exception in a worker or master thread (depending on the global settings). **/
+    a movable exception in a worker or master thread (depending on the global settings).
+    The test also checks the correctness of multiple rethrowing of the pending exception. **/
 void Test10 () {
-    TEST_PROLOGUE();
-    tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
-    ASSERT (!g_cur_stat.existing() && !g_cur_stat.existed() && !g_cur_stat.executed(), 
+    ResetGlobals();
+    tbb::task_group_context ctx;
+    tbb::empty_task *r = new( tbb::task::allocate_root() ) tbb::empty_task;
+    ASSERT (!g_CurStat.Existing() && !g_CurStat.Existed() && !g_CurStat.Executed(), 
             "something wrong with the task accounting");
-    r.set_ref_count(NUM_CHILD_TASKS + 1);
-    for ( int i = 0; i < NUM_CHILD_TASKS; ++i ) {
-        my_leaf_task_with_movable_exceptions &t = *new( r.allocate_child() ) my_leaf_task_with_movable_exceptions;
-        r.spawn(t);
-        // Make sure that worker threads on multicore machines had a chance to steal something
-//        util::sleep(20);
-//        __TBB_Yield();
-        int n = 0;
-        while ( ++n < c_timeout && !g_tasks_started ) __TBB_Yield();
-        if ( n == c_timeout )
-            TRACE("Test10: wait failed\n");
-    }
+    r->set_ref_count(NUM_CHILD_TASKS + 1);
+    for ( int i = 0; i < NUM_CHILD_TASKS; ++i )
+        r->spawn( *new( r->allocate_child() ) LeafTaskWithMovableExceptions );
     TRY()
-        r.wait_for_all();
-    } catch ( tbb::tbb_exception& e ) {
-        ASSERT (strcmp(e.name(), (g_solitary_exception ? typeid(solitary_movable_exception) 
-                                                       : typeid(multiple_movable_exception)).name() ) == 0, 
-                                                       "Unexpected original exception name");
-        ASSERT (strcmp(e.what(), "tbb::movable_exception") == 0, "Unexpected original exception info ");
-        if ( g_solitary_exception ) {
-            solitary_movable_exception& me = dynamic_cast<solitary_movable_exception&>(e);
-            ASSERT (me.data() == g_int_exception_data, "Unexpected solitary movable_exception data");
+        r->wait_for_all();
+    } catch ( ... ) {
+        ASSERT (!ctx.is_group_execution_cancelled(), "");
+        CheckException();
+        try {
+            throw;
+        } catch ( tbb::tbb_exception& e ) {
+            CheckException(e);
+            g_ExceptionCaught = exceptionCaught = true;
         }
-        else {
-            multiple_movable_exception& me = dynamic_cast<multiple_movable_exception&>(e);
-            ASSERT (me.data().my_int == g_int_exception_data, "Unexpected multiple movable_exception int data");
-            ASSERT (me.data().my_string == g_string_exception_data, "Unexpected multiple movable_exception string data");
-        }
-        if ( g_solitary_exception ) {
-            g_exc_stat.trace("stat at throw moment:");
-            g_cur_stat.trace("stat upon catch     :");
+        catch ( ... ) {
+            g_ExceptionCaught = true;
+            g_UnknownException = unknownException = true;
         }
-        g_no_exception = no_exception = false;
+        ctx.register_pending_exception();
+        ASSERT (ctx.is_group_execution_cancelled(), "After exception registration the context must be in the cancelled state");
+    }
+    r->destroy(*r);
+    ASSERT_EXCEPTION();
+    ASSERT_TEST_POSTCOND();
+
+    r = new( tbb::task::allocate_root(ctx) ) tbb::empty_task;
+    r->set_ref_count(1);
+    g_ExceptionCaught = g_UnknownException = false;
+    try {
+        r->wait_for_all();
+    } catch ( tbb::tbb_exception& e ) {
+        CheckException(e);
+        g_ExceptionCaught = true;
     }
     catch ( ... ) {
-        g_no_exception = false;
-        g_unknown_exception = unknown_exception = true;
+        g_ExceptionCaught = true;
+        g_UnknownException = true;
     }
-    r.destroy(r);
-    ASSERT_EXCEPTION();
-    TEST_EPILOGUE();
+    ASSERT (g_ExceptionCaught, "no exception occurred");
+    ASSERT (!g_UnknownException, "unknown exception was caught");
+    r->destroy(*r);
 } // void Test10 ()
 
 
+const int MaxNestingDepth = 256;
 
-void TestExceptionHandling ()
-{
-    TRACE ("Number of threads %d", g_num_threads);
+class CtxDestroyerTask : public tbb::task {
+    int m_nestingLevel;
 
+    tbb::task* execute () {
+        ASSERT ( m_nestingLevel >= 0 && m_nestingLevel < MaxNestingDepth, "Wrong nesting level. The test is broken" );
+        tbb::task_group_context  ctx;
+        tbb::task *t = new( tbb::task::allocate_root(ctx) ) tbb::empty_task;
+        int level = ++m_nestingLevel;
+        if ( level < MaxNestingDepth ) {
+            execute();
+        }
+        else {
+            CancellatorTask::WaitUntilReady();
+            ++g_CurExecuted;
+        }
+        if ( ctx.is_group_execution_cancelled() )
+            ++s_numCancelled;
+        t->destroy(*t);
+        return NULL;
+    }
+public:
+    CtxDestroyerTask () : m_nestingLevel(0) { s_numCancelled = 0; }
+
+    static int s_numCancelled;
+};
+
+int CtxDestroyerTask::s_numCancelled = 0;
+
+//! Test for data race between cancellation propagation and context destruction.
+/** If the data race ever occurs, an assertion inside TBB will be triggered. **/
+void TestCtxDestruction () {
+    for ( size_t i = 0; i < 10; ++i ) {
+        tbb::task_group_context  ctx;
+        tbb::task_list  tl;
+        ResetGlobals();
+        g_BoostExecutedCount = false;
+        g_ThrowException = false;
+        CancellatorTask::Reset();
+        // CtxLauncherTask just runs some work to cancel
+        //tl.push_back( *new( tbb::task::allocate_root() ) CtxLauncherTask<SimpleRootTask>(ctx) );
+        tl.push_back( *new( tbb::task::allocate_root() ) CtxLauncherTask<CtxDestroyerTask>(ctx) );
+        tl.push_back( *new( tbb::task::allocate_root() ) CancellatorTask(ctx, 1) );
+        tbb::task::spawn_root_and_wait(tl);
+        ASSERT( g_CurExecuted == 1, "Test is broken" );
+        ASSERT( CtxDestroyerTask::s_numCancelled <= MaxNestingDepth, "Test is broken" );
+    }
+} // void TestCtxDestruction()
+
+void RunTests ()
+{
+    REMARK ("Number of threads %d", g_NumThreads);
+    tbb::task_scheduler_init init (g_NumThreads);
+    g_Master = Harness::CurrentTid();
     Test1();
     Test2();
     Test3();
@@ -787,30 +667,23 @@ void TestExceptionHandling ()
     Test8();
     Test9();
     Test10();
+    TestCtxDestruction();
 }
-
 #endif /* __TBB_EXCEPTIONS */
 
-//------------------------------------------------------------------------
 
-/** 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 **/
 int main(int argc, char* argv[]) {
     ParseCommandLine( argc, argv );
+    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");
-    MaxThread = std::min<int>(NUM_ROOTS_IN_GROUP, MaxThread);
-    MinThread = std::min<int>(MinThread, MaxThread);
-    ASSERT (MinThread>=2, "Minimal number of threads must be 2 or more");
 #if __TBB_EXCEPTIONS
-    // Test0 always runs with one thread
+    // Test0 always runs on one thread
     Test0();
-    int step = max(MaxThread - MinThread, 1);
-    for ( g_num_threads = MinThread; g_num_threads <= MaxThread; g_num_threads += step ) {
-        g_max_concurrency = min(g_num_threads, tbb::task_scheduler_init::default_num_threads());
+    for ( g_NumThreads = MinThread; g_NumThreads <= MaxThread; ++g_NumThreads ) {
         for ( size_t j = 0; j < 2; ++j ) {
-            g_solitary_exception = (j & 2) == 1;
-            TestExceptionHandling();
+            g_SolitaryException = (j & 2) == 1;
+            RunTests();
         }
     }
     printf("done\n");
@@ -819,5 +692,3 @@ int main(int argc, char* argv[]) {
 #endif /* __TBB_EXCEPTIONS */
     return 0;
 }
-
-
diff --git a/src/test/test_enumerable_thread_specific.cpp b/src/test/test_enumerable_thread_specific.cpp
new file mode 100644
index 0000000..36009d7
--- /dev/null
+++ b/src/test/test_enumerable_thread_specific.cpp
@@ -0,0 +1,932 @@
+/*
+    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 "tbb/enumerable_thread_specific.h"
+#include "tbb/task_scheduler_init.h"
+#include "tbb/parallel_for.h"
+#include "tbb/parallel_reduce.h"
+#include "tbb/blocked_range.h"
+#include "tbb/tick_count.h"
+#include "tbb/tbb_allocator.h"
+#include "tbb/tbb_thread.h"
+
+#include <cstring>
+#include <vector>
+#include <deque>
+#include <list>
+#include <map>
+#include <utility>
+
+#include "harness_assert.h"
+#include "harness.h"
+
+static tbb::atomic<int> construction_counter;
+static tbb::atomic<int> destruction_counter;
+
+const int REPETITIONS = 10;
+const int N = 100000;
+const int VALID_NUMBER_OF_KEYS = 100;
+const double EXPECTED_SUM = (REPETITIONS + 1) * N;
+
+//
+// A minimal class
+// Define: default and copy constructor, and allow implicit operator&
+// Hide: operator=
+//
+
+class minimal: NoAssign {
+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() { ++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
+template <typename T>
+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 {
+        return left + right;
+    }
+};
+
+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 {
+        return left + right;
+    }
+};
+
+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; }
+
+template <typename T>
+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 combine_one_helper {
+public:
+    combine_one_helper(T& _result) : my_result(_result) {}
+    void operator()(const T& new_bit) { test_helper<T>::sum(my_result, new_bit); }
+    combine_one_helper& operator=(const combine_one_helper& other) { 
+        test_helper<T>::set(my_result, test_helper<T>::get(other)); 
+        return *this; 
+    }
+private:
+    T& my_result;
+};
+
+
+
+//// end functors
+
+template< typename T >
+void run_serial_scalar_tests(const char *test_name) {
+    tbb::tick_count t0;
+    T sum;
+    test_helper<T>::init(sum);
+
+    if (Verbose) printf("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); 
+        }
+    }
+ 
+    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());
+}
+
+
+template <typename T>
+class parallel_scalar_body: NoAssign {
+    
+    tbb::enumerable_thread_specific<T> &sums;
+ 
+public:
+
+    parallel_scalar_body ( tbb::enumerable_thread_specific<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 );
+    }
+   
+};
+
+template< typename T >
+void run_parallel_scalar_tests(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); 
+        init.initialize(p);
+
+        tbb::tick_count t0;
+
+        T iterator_sum;
+        test_helper<T>::init(iterator_sum);
+
+        T finit_ets_sum;
+        test_helper<T>::init(finit_ets_sum);
+
+        T const_iterator_sum; 
+        test_helper<T>::init(const_iterator_sum);
+
+        T range_sum;
+        test_helper<T>::init(range_sum);
+
+        T const_range_sum;
+        test_helper<T>::init(const_range_sum);
+
+        T cconst_sum;
+        test_helper<T>::init(cconst_sum);
+
+        T assign_sum;
+        test_helper<T>::init(assign_sum);
+
+        T cassgn_sum;
+        test_helper<T>::init(cassgn_sum);
+        T non_cassgn_sum;
+        test_helper<T>::init(non_cassgn_sum);
+
+        T combine_sum;
+        test_helper<T>::init(combine_sum);
+
+        T combine_ref_sum;
+        test_helper<T>::init(combine_ref_sum);
+
+        T combine_one_sum;
+        test_helper<T>::init(combine_one_sum);
+
+        for (int t = -1; t < REPETITIONS; ++t) {
+            if (Verbose && t == 0) t0 = tbb::tick_count::now(); 
+
+            tbb::enumerable_thread_specific<T> sums(exemplar);
+            FunctorAddFinit<T> my_finit;
+            tbb::enumerable_thread_specific<T> finit_ets(my_finit);
+
+            ASSERT( sums.empty(), NULL);
+            tbb::parallel_for( tbb::blocked_range<int>( 0, N, 10000 ), parallel_scalar_body<T>( sums ) );
+            ASSERT( !sums.empty(), NULL);
+
+            ASSERT( finit_ets.empty(), NULL);
+            tbb::parallel_for( tbb::blocked_range<int>( 0, N, 10000 ), parallel_scalar_body<T>( finit_ets ) );
+            ASSERT( !finit_ets.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>));
+
+            combine_one_helper<T> my_helper(combine_one_sum);
+            sums.combine_each(my_helper);
+
+            // use iterator
+            typename tbb::enumerable_thread_specific<T>::size_type size = 0;
+            for ( typename tbb::enumerable_thread_specific<T>::iterator i = sums.begin(); i != sums.end(); ++i ) {
+                 ++size;
+                 test_helper<T>::sum(iterator_sum, *i);
+            }
+            ASSERT( sums.size() == size, NULL);
+
+            // use const_iterator
+            for ( typename tbb::enumerable_thread_specific<T>::const_iterator i = sums.begin(); i != sums.end(); ++i ) {
+                 test_helper<T>::sum(const_iterator_sum, *i);
+            }
+           
+            // use range_type
+            typename tbb::enumerable_thread_specific<T>::range_type r = sums.range();  
+            for ( typename tbb::enumerable_thread_specific<T>::range_type::const_iterator i = r.begin(); i != r.end(); ++i ) {
+                 test_helper<T>::sum(range_sum, *i);
+            }
+           
+            // use const_range_type
+            typename tbb::enumerable_thread_specific<T>::const_range_type cr = sums.range();  
+            for ( typename tbb::enumerable_thread_specific<T>::const_range_type::iterator i = cr.begin(); i != cr.end(); ++i ) {
+                 test_helper<T>::sum(const_range_sum, *i);
+            }
+
+            // test copy constructor, with TLS-cached locals
+
+            typedef typename tbb::enumerable_thread_specific<T, tbb::cache_aligned_allocator<T>, tbb::ets_key_per_instance> cached_ets_type;
+
+            cached_ets_type cconst(sums); 
+            /// tbb::enumerable_thread_specific<T> cconst(sums);
+
+            for ( typename cached_ets_type::const_iterator i = cconst.begin(); i != cconst.end(); ++i ) {
+                 test_helper<T>::sum(cconst_sum, *i);
+            }
+           
+            // test assignment
+            tbb::enumerable_thread_specific<T> assigned;
+            assigned = sums;
+
+            for ( typename tbb::enumerable_thread_specific<T>::const_iterator i = assigned.begin(); i != assigned.end(); ++i ) {
+                 test_helper<T>::sum(assign_sum, *i);
+            }
+
+            // test assign to and from cached locals
+            cached_ets_type cassgn;
+            cassgn = sums;
+            for ( typename cached_ets_type::const_iterator i = cassgn.begin(); i != cassgn.end(); ++i ) {
+                 test_helper<T>::sum(cassgn_sum, *i);
+            }
+
+            tbb::enumerable_thread_specific<T> non_cassgn;
+            non_cassgn = cassgn;
+            for ( typename tbb::enumerable_thread_specific<T>::const_iterator i = non_cassgn.begin(); i != non_cassgn.end(); ++i ) {
+                 test_helper<T>::sum(non_cassgn_sum, *i);
+            }
+
+            // test finit-initialized ets
+            for(typename tbb::enumerable_thread_specific<T>::const_iterator i = finit_ets.begin(); i != finit_ets.end(); ++i) {
+                test_helper<T>::sum(finit_ets_sum, *i);
+            }
+
+        }
+
+        ASSERT( EXPECTED_SUM == test_helper<T>::get(iterator_sum), NULL);
+        ASSERT( EXPECTED_SUM == test_helper<T>::get(const_iterator_sum), NULL);
+        ASSERT( EXPECTED_SUM == test_helper<T>::get(range_sum), NULL);
+        ASSERT( EXPECTED_SUM == test_helper<T>::get(const_range_sum), NULL);
+
+        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(cconst_sum), NULL);
+        ASSERT( EXPECTED_SUM == test_helper<T>::get(assign_sum), NULL);
+        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);
+
+        if (Verbose)
+            printf("done\nparallel %s, %d, %g, %g\n", test_name, p, test_helper<T>::get(iterator_sum), 
+                                                      ( tbb::tick_count::now() - t0).seconds());
+        init.terminate();
+    }
+}
+
+
+template <typename T>
+class parallel_vector_for_body: NoAssign {
+    
+    tbb::enumerable_thread_specific< std::vector<T, tbb::tbb_allocator<T> > > &locals;
+ 
+public:
+
+    parallel_vector_for_body ( tbb::enumerable_thread_specific< 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);
+
+        for (int i = r.begin(); i < r.end(); ++i) {
+            locals.local().push_back( one );
+        }
+    }
+   
+};
+
+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) {
+    tbb::tick_count t0;
+    tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred);
+    typedef std::vector<T, tbb::tbb_allocator<T> > container_type;
+
+    for (int p = MinThread; p <= MaxThread; ++p) { 
+
+        if (p == 0) continue;
+        if (Verbose) printf("Testing parallel %s on %d thread(s)... ", test_name, p);
+        init.initialize(p);
+
+        T sum;
+        test_helper<T>::init(sum);
+
+        for (int t = -1; t < REPETITIONS; ++t) {
+            if (Verbose && t == 0) t0 = tbb::tick_count::now(); 
+            typedef typename tbb::enumerable_thread_specific< container_type > ets_type;
+            ets_type vs;
+
+            ASSERT( vs.empty(), NULL);
+            tbb::parallel_for ( tbb::blocked_range<int> (0, N, 10000), parallel_vector_for_body<T>( vs ) );
+            ASSERT( !vs.empty(), NULL);
+
+            // copy construct
+            ets_type vs2(vs); // this causes an assertion failure, related to allocators...
+
+            // assign
+            ets_type vs3;
+            vs3 = vs;
+
+            parallel_vector_reduce_body< typename tbb::enumerable_thread_specific< std::vector< T, tbb::tbb_allocator<T>  > >::const_range_type, T > pvrb;
+            tbb::parallel_reduce ( vs.range(1), pvrb );
+
+            test_helper<T>::sum(sum, pvrb.sum);
+
+            ASSERT( vs.size() == pvrb.count, NULL);
+
+            tbb::flattened2d<ets_type> fvs = flatten2d(vs);
+            size_t ccount = fvs.size();
+            size_t elem_cnt = 0;
+            for(typename tbb::flattened2d<ets_type>::const_iterator i = fvs.begin(); i != fvs.end(); ++i) {
+                ++elem_cnt;
+            };
+            ASSERT(ccount == elem_cnt, NULL);
+
+            elem_cnt = 0;
+            for(typename tbb::flattened2d<ets_type>::iterator i = fvs.begin(); i != fvs.end(); ++i) {
+                ++elem_cnt;
+            };
+            ASSERT(ccount == elem_cnt, NULL);
+        }
+
+        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());
+        init.terminate();
+    }
+}
+
+template<typename T>
+void run_cross_type_vector_tests(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;
+
+    for (int p = MinThread; p <= MaxThread; ++p) { 
+
+        if (p == 0) continue;
+        if (Verbose) printf("Testing parallel %s on %d thread(s)... ", test_name, p);
+        init.initialize(p);
+
+        T sum;
+        test_helper<T>::init(sum);
+
+        for (int t = -1; t < REPETITIONS; ++t) {
+            if (Verbose && t == 0) t0 = tbb::tick_count::now(); 
+            typedef typename tbb::enumerable_thread_specific< container_type, tbb::cache_aligned_allocator<container_type>, tbb::ets_no_key > ets_nokey_type;
+            typedef typename tbb::enumerable_thread_specific< container_type, tbb::cache_aligned_allocator<container_type>, tbb::ets_key_per_instance > ets_tlskey_type;
+            ets_nokey_type vs;
+
+            ASSERT( vs.empty(), NULL);
+            tbb::parallel_for ( tbb::blocked_range<int> (0, N, 10000), parallel_vector_for_body<T>( vs ) );
+            ASSERT( !vs.empty(), NULL);
+
+            // copy construct
+            ets_tlskey_type vs2(vs);
+
+            // assign
+            ets_nokey_type vs3;
+            vs3 = vs2;
+
+            parallel_vector_reduce_body< typename tbb::enumerable_thread_specific< std::vector< T, tbb::tbb_allocator<T>  > >::const_range_type, T > pvrb;
+            tbb::parallel_reduce ( vs3.range(1), pvrb );
+
+            test_helper<T>::sum(sum, pvrb.sum);
+
+            ASSERT( vs3.size() == pvrb.count, NULL);
+
+            tbb::flattened2d<ets_nokey_type> fvs = flatten2d(vs3);
+            size_t ccount = fvs.size();
+            size_t elem_cnt = 0;
+            for(typename tbb::flattened2d<ets_nokey_type>::const_iterator i = fvs.begin(); i != fvs.end(); ++i) {
+                ++elem_cnt;
+            };
+            ASSERT(ccount == elem_cnt, NULL);
+
+            elem_cnt = 0;
+            for(typename tbb::flattened2d<ets_nokey_type>::iterator i = fvs.begin(); i != fvs.end(); ++i) {
+                ++elem_cnt;
+            };
+            ASSERT(ccount == elem_cnt, NULL);
+        }
+
+        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());
+        init.terminate();
+    }
+}
+
+template< typename T >
+void run_serial_vector_tests(const char *test_name) {
+    tbb::tick_count t0;
+    T sum;
+    test_helper<T>::init(sum);
+    T one;
+    test_helper<T>::set(one, 1);
+
+    if (Verbose) printf("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; 
+        for (int i = 0; i < N; ++i) {
+            v.push_back( one );
+        }
+        for (typename std::vector<T, tbb::tbb_allocator<T> >::const_iterator i = v.begin(); i != v.end(); ++i) 
+            test_helper<T>::sum(sum, *i); 
+    }
+
+    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());
+}
+
+void 
+run_serial_tests() {
+    run_serial_scalar_tests<int>("int");
+    run_serial_scalar_tests<double>("double");
+    run_serial_scalar_tests<minimal>("minimal");
+    run_serial_vector_tests<int>("std::vector<int, tbb::tbb_allocator<int> >");
+    run_serial_vector_tests<double>("std::vector<double, tbb::tbb_allocator<double> >");
+}
+
+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> >");
+}
+
+void
+run_cross_type_tests() {
+    // cross-type scalar tests are part of run_serial_scalar_tests
+    run_cross_type_vector_tests<int>("std::vector<int, tbb::tbb_allocator<int> >");
+    run_parallel_vector_tests<double>("std::vector<double, tbb::tbb_allocator<double> >");
+}
+
+typedef tbb::enumerable_thread_specific<minimal> * minimal_ptr;
+
+class set_body {
+    minimal_ptr *a;
+
+public:
+    set_body( minimal_ptr *_a ) : a(_a) { }
+
+    void operator() ( ) const {
+        for (int i = 0; i < VALID_NUMBER_OF_KEYS; ++i) {
+            a[i]->local().set_value(i + 1);
+        }
+    }
+ 
+};
+
+void do_tbb_threads( int max_threads, minimal_ptr *a ) {
+    std::vector< tbb::tbb_thread * > threads;
+
+    for (int p = 0; p < max_threads; ++p) { 
+        threads.push_back( new tbb::tbb_thread ( set_body( a ) ) ); 
+    }
+
+    for (int p = 0; p < max_threads; ++p) {
+        threads[p]->join();
+    }
+    for(int p = 0; p < max_threads; ++p) {
+        delete threads[p];
+    }
+}
+
+void
+flog_key_creation_and_deletion() {
+
+    const int FLOG_REPETITIONS = 100;
+    minimal_ptr a[VALID_NUMBER_OF_KEYS];
+    tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred);
+
+    for (int p = MinThread; p <= MaxThread; ++p) { 
+
+        if (p == 0) continue;
+
+        if (Verbose) printf("Testing repeated deletes on %d threads... ", p);
+
+        for (int j = 0; j < FLOG_REPETITIONS; ++j) {
+            construction_counter = 0;
+            destruction_counter = 0;
+
+            // causes VALID_NUMER_OF_KEYS exemplar instances to be constructed 
+            for (int i = 0; i < VALID_NUMBER_OF_KEYS; ++i) {
+                a[i] = new tbb::enumerable_thread_specific<minimal>;
+            }
+
+            // causes p * VALID_NUMBER_OF_KEYS minimals to be created
+            do_tbb_threads(p, a); 
+
+            for (int i = 0; i < VALID_NUMBER_OF_KEYS; ++i) {
+                for ( tbb::enumerable_thread_specific< minimal >::iterator tli = a[i]->begin();
+                      tli != a[i]->end(); ++tli ) {
+                    ASSERT( (*tli).value() == i+1, NULL );
+                }
+                delete a[i];
+                a[i] = NULL;
+            }
+        }
+
+        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);
+
+        construction_counter = 0;
+        destruction_counter = 0;
+
+        // causes VALID_NUMER_OF_KEYS exemplar instances to be constructed 
+        for (int i = 0; i < VALID_NUMBER_OF_KEYS; ++i) {
+            a[i] = new tbb::enumerable_thread_specific<minimal>;
+        }
+ 
+        for (int j = 0; j < FLOG_REPETITIONS; ++j) {
+
+            // causes p * VALID_NUMBER_OF_KEYS minimals to be created
+            do_tbb_threads(p, a);
+
+            for (int i = 0; i < VALID_NUMBER_OF_KEYS; ++i) {
+                for ( tbb::enumerable_thread_specific< minimal >::iterator tli = a[i]->begin();
+                      tli != a[i]->end(); ++tli ) {
+                    ASSERT( (*tli).value() == i+1, NULL );
+                }
+                a[i]->clear();
+                ASSERT( static_cast<int>(a[i]->end() - a[i]->begin()) == 0, NULL );
+            }
+
+        }
+
+        for (int i = 0; i < VALID_NUMBER_OF_KEYS; ++i) {
+            delete a[i];
+            a[i] = NULL;
+        }
+
+        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");
+    }
+
+}
+
+template <typename inner_container>
+void 
+flog_segmented_interator() {
+
+    bool found_error = false;
+    typedef typename inner_container::value_type T;
+    typedef std::vector< inner_container > nested_vec;
+    inner_container my_inner_container;
+    my_inner_container.clear();
+    nested_vec my_vec;
+
+    // simple nested vector (neither level empty)
+    const int maxval = 10;
+    for(int i=0; i < maxval; i++) {
+        my_vec.push_back(my_inner_container);
+        for(int j = 0; j < maxval; j++) {
+            my_vec.at(i).push_back((T)(maxval * i + j));
+        }
+    }
+
+    tbb::internal::segmented_iterator<nested_vec, T> my_si(my_vec);
+
+    T ii;
+    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));
+        }
+    }
+
+    // outer level empty
+    my_vec.clear();
+    for(my_si=my_vec.begin(); my_si != my_vec.end(); ++my_si) {
+        found_error = true;
+    }
+
+    // inner levels empty
+    my_vec.clear();
+    for(int i =0; i < maxval; ++i) {
+        my_vec.push_back(my_inner_container);
+    }
+    for(my_si = my_vec.begin(); my_si != my_vec.end(); ++my_si) {
+        found_error = true;
+    }
+
+    // every other inner container is empty
+    my_vec.clear();
+    for(int i=0; i < maxval; ++i) {
+        my_vec.push_back(my_inner_container);
+        if(i%2) {
+            for(int j = 0; j < maxval; ++j) {
+                my_vec.at(i).push_back((T)(maxval * (i/2) + j));
+            }
+        }
+    }
+    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);
+        }
+    }
+
+    tbb::internal::segmented_iterator<nested_vec, const T> my_csi(my_vec);
+    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));
+        }
+    }
+
+    // outer level empty
+    my_vec.clear();
+    for(my_csi=my_vec.begin(); my_csi != my_vec.end(); ++my_csi) {
+        found_error = true;
+    }
+
+    // inner levels empty
+    my_vec.clear();
+    for(int i =0; i < maxval; ++i) {
+        my_vec.push_back(my_inner_container);
+    }
+    for(my_csi = my_vec.begin(); my_csi != my_vec.end(); ++my_csi) {
+        found_error = true;
+    }
+
+    // every other inner container is empty
+    my_vec.clear();
+    for(int i=0; i < maxval; ++i) {
+        my_vec.push_back(my_inner_container);
+        if(i%2) {
+            for(int j = 0; j < maxval; ++j) {
+                my_vec.at(i).push_back((T)(maxval * (i/2) + j));
+            }
+        }
+    }
+    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);
+        }
+    }
+
+
+    if(found_error) printf("segmented_iterator failed\n");
+}
+
+template <typename Key, typename Val>
+void
+flog_segmented_iterator_map() {
+   typedef typename std::map<Key, Val> my_map;
+   typedef std::vector< my_map > nested_vec;
+   my_map my_inner_container;
+   my_inner_container.clear();
+   nested_vec my_vec;
+   my_vec.clear();
+   bool found_error = false;
+
+   // simple nested vector (neither level empty)
+   const int maxval = 4;
+   for(int i=0; i < maxval; i++) {
+       my_vec.push_back(my_inner_container);
+       for(int j = 0; j < maxval; j++) {
+           my_vec.at(i).insert(std::make_pair<Key,Val>(maxval * i + j, 2*(maxval*i + j)));
+       }
+   }
+
+   tbb::internal::segmented_iterator<nested_vec, std::pair<const Key, Val> > my_si(my_vec);
+   Key ii;
+   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));
+       }
+   }
+
+   tbb::internal::segmented_iterator<nested_vec, const std::pair<const Key, Val> > my_csi(my_vec);
+   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));
+       }
+   }
+}
+
+void
+run_segmented_iterator_tests() {
+   // only the following containers can be used with the segmented iterator.
+    if(Verbose) printf("Running Segmented Iterator Tests\n");
+   flog_segmented_interator<std::vector< int > >();
+   flog_segmented_interator<std::vector< double > >();
+   flog_segmented_interator<std::deque< int > >();
+   flog_segmented_interator<std::deque< double > >();
+   flog_segmented_interator<std::list< int > >();
+   flog_segmented_interator<std::list< double > >();
+
+   flog_segmented_iterator_map<int, int>();
+   flog_segmented_iterator_map<int, 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);
+
+    // test initializer with exemplar (combine returns the exemplar value if no threads have created locals.)
+    T initializer0;
+    test_helper<T>::init(initializer0);
+    T initializer7;
+    test_helper<T>::set(initializer7,7);
+    tbb::enumerable_thread_specific<T> create1(initializer7);
+    ASSERT(7 == test_helper<T>::get(create1.combine(my_combine<T>)), NULL);
+
+    // test copy construction with exemplar initializer
+    tbb::enumerable_thread_specific<T> copy1(create1);
+    ASSERT(7 == test_helper<T>::get(copy1.combine(my_combine<T>)), NULL);
+
+    // test copy assignment with exemplar initializer
+    tbb::enumerable_thread_specific<T> assign1(initializer0);
+    assign1 = create1;
+    ASSERT(7 == test_helper<T>::get(assign1.combine(my_combine<T>)), NULL);
+
+    // test creation with finit function (combine returns finit return value if no threads have created locals)
+    FunctorAddFinit7<T> my_finit7;
+    tbb::enumerable_thread_specific<T> create2(my_finit7);
+    ASSERT(7 == test_helper<T>::get(create2.combine(my_combine<T>)), NULL);
+
+    // test copy construction with function initializer
+    tbb::enumerable_thread_specific<T> copy2(create2);
+    ASSERT(7 == test_helper<T>::get(copy2.combine(my_combine<T>)), NULL);
+
+    // test copy assignment with function initializer
+    FunctorAddFinit<T> my_finit;
+    tbb::enumerable_thread_specific<T> assign2(my_finit);
+    assign2 = create2;
+    ASSERT(7 == test_helper<T>::get(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");
+}
+
+int main(int argc, char *argv[]) {
+   ParseCommandLine(argc, argv);
+   run_segmented_iterator_tests();
+
+   flog_key_creation_and_deletion();
+
+   if (MinThread == 0) 
+      run_serial_tests();
+
+   if (MaxThread > 0) {
+      run_parallel_tests();
+      run_cross_type_tests();
+   }
+
+    run_assignment_and_copy_constructor_tests();
+
+   printf("done\n");
+   return 0;
+}
+
diff --git a/src/test/test_handle_perror.cpp b/src/test/test_handle_perror.cpp
index ef49048..db2c0f2 100644
--- a/src/test/test_handle_perror.cpp
+++ b/src/test/test_handle_perror.cpp
@@ -31,13 +31,13 @@
 
 #include <cerrno>
 #include <stdexcept>
-#include "tbb/tbb_misc.h"
+#include "../tbb/tbb_misc.h"
 #include "harness.h"
 
 static void TestHandlePerror() {
     bool caught = false;
     try {
-	tbb::internal::handle_perror( EAGAIN, "apple" );
+        tbb::internal::handle_perror( EAGAIN, "apple" );
     } catch( std::runtime_error& e ) {
 	if( Verbose )
 	    printf("caught runtime_exception('%s')\n",e.what());
diff --git a/src/test/test_ittnotify.cpp b/src/test/test_ittnotify.cpp
new file mode 100644
index 0000000..42dde99
--- /dev/null
+++ b/src/test/test_ittnotify.cpp
@@ -0,0 +1,103 @@
+/*
+    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.
+*/
+
+#if !TBB_USE_THREADING_TOOLS
+    #define TBB_USE_THREADING_TOOLS 1
+#endif
+
+#include "harness.h"
+
+#if DO_ITT_NOTIFY
+
+#include "tbb/spin_mutex.h"
+#include "tbb/spin_rw_mutex.h"
+#include "tbb/queuing_rw_mutex.h"
+#include "tbb/queuing_mutex.h"
+#include "tbb/mutex.h"
+#include "tbb/recursive_mutex.h"
+#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"
+
+
+template<typename M>
+class WorkEmulator: NoAssign {
+    M& m_mutex;
+    static volatile size_t s_anchor;
+public:
+    void operator()( tbb::blocked_range<size_t>& range ) const {
+        for( size_t i=range.begin(); i!=range.end(); ++i ) {
+            typename M::scoped_lock lock(m_mutex);
+            for ( size_t j = 0; j!=range.end(); ++j )
+                s_anchor = (s_anchor - i) / 2 + (s_anchor + j) / 2;
+        }
+    }
+    WorkEmulator( M& mutex ) : m_mutex(mutex) {}
+};
+
+template<typename M>
+volatile size_t WorkEmulator<M>::s_anchor = 0;
+
+
+template<class M>
+void Test( const char * name ) {
+    REMARK("%s time = ",name);
+    M mtx;
+    tbb::profiling::set_name(mtx, name);
+
+    const int n = 10000;
+    tbb::parallel_for( tbb::blocked_range<size_t>(0,n,n/100), WorkEmulator<M>(mtx) );
+}
+
+    #define TEST_MUTEX(type, name)  Test<tbb::type>( name )
+
+#endif /* !DO_ITT_NOTIFY */
+
+int main( int argc, char * argv[] ) {
+    // Default is to run on two threads
+    MinThread = MaxThread = 2;
+    ParseCommandLine( argc, argv );
+#if DO_ITT_NOTIFY
+    for( int p=MinThread; p<=MaxThread; ++p ) {
+        REMARK( "testing with %d workers\n", p );
+        tbb::task_scheduler_init init( p );
+        TEST_MUTEX( spin_mutex, "Spin Mutex" );
+        TEST_MUTEX( queuing_mutex, "Queuing Mutex" );
+        TEST_MUTEX( queuing_rw_mutex, "Queuing RW Mutex" );
+        TEST_MUTEX( spin_rw_mutex, "Spin RW Mutex" );
+    }
+    std::printf("done\n");
+#else /* !DO_ITT_NOTIFY */
+    std::printf("skip\n");
+#endif /* !DO_ITT_NOTIFY */
+    return 0;
+}
diff --git a/src/test/test_malloc_compliance.cpp b/src/test/test_malloc_compliance.cpp
index 598677e..c4363d6 100644
--- a/src/test/test_malloc_compliance.cpp
+++ b/src/test/test_malloc_compliance.cpp
@@ -46,17 +46,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: %d\n", GetLastError());
+            printf("Can't assign create job object: %ld\n", GetLastError());
             exit(1);
         }
         if (0 == AssignProcessToJobObject(hJob, GetCurrentProcess())) {
-            printf("Can't assign process to job object: %d\n", GetLastError());
+            printf("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: %d\n", GetLastError());
+        printf("Can't set limits: %ld\n", GetLastError());
         exit(1);
     }
 }
@@ -65,6 +65,7 @@ void limitMem( int limit )
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
+#include <sys/types.h>  // uint64_t on FreeBSD, needed for rlim_t
 
 void limitMem( int limit )
 {
@@ -84,8 +85,10 @@ void limitMem( int limit )
 #include <vector>
 #define __TBB_NO_IMPLICIT_LINKAGE 1
 #include "tbb/scalable_allocator.h"
+#include "tbb/tbb_machine.h"
 
 #include "harness.h"
+#include "harness_barrier.h"
 #if __linux__
 #include <stdint.h> // uintptr_t
 #endif
@@ -142,6 +145,28 @@ static bool perProcessLimits = true;
 
 const size_t POWERS_OF_2 = 20;
 
+#if __linux__  && __ia64__
+/* Can't use Intel compiler intrinsic due to internal error reported by
+   10.1 compiler */
+pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+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;
+}
+
+void __TBB_machine_pause(int32_t /*delay*/) {}
+
+#elif (_WIN32||_WIN64) && defined(_M_AMD64)
+
+void __TBB_machine_pause(__int32 /*delay*/ ) {}
+
+#endif
+
 struct MemStruct
 {
     void* Pointer;
@@ -156,12 +181,13 @@ class CMemTest: NoAssign
     UINT CountErrors;
     int total_threads;
     bool FullLog;
+    Harness::SpinBarrier *limitBarrier;
     static bool firstTime;
 
 public:
-    CMemTest(int total_threads,
+    CMemTest(int total_threads, Harness::SpinBarrier *limitBarrier,
              bool isVerbose=false) :
-        CountErrors(0), total_threads(total_threads)
+        CountErrors(0), total_threads(total_threads), limitBarrier(limitBarrier)
         {
             srand((UINT)time(NULL));
             FullLog=isVerbose;
@@ -179,6 +205,15 @@ public:
     ~CMemTest() {}
 };
 
+class Limit {
+    int limit;
+public:
+    Limit(int limit) : limit(limit) {}
+    void operator() () const {
+        limitMem(limit);
+    }
+};
+
 int argC;
 char** argV;
 
@@ -186,8 +221,8 @@ struct RoundRobin: NoAssign {
     const long number_of_threads;
     mutable CMemTest test;
 
-    RoundRobin( long p, bool verbose ) :
-        number_of_threads(p), test(p, verbose) {}
+    RoundRobin( long p, Harness::SpinBarrier *limitBarrier, bool verbose ) :
+        number_of_threads(p), test(p, limitBarrier, verbose) {}
     void operator()( int /*id*/ ) const 
         {
             test.RunAllTests(number_of_threads);
@@ -249,6 +284,58 @@ void ReallocParam()
         Trealloc(bufs[j], 0);
 }
 
+int main(int argc, char* argv[])
+{
+    argC=argc;
+    argV=argv;
+    MaxThread = MinThread = 1;
+    Tmalloc=scalable_malloc;
+    Trealloc=scalable_realloc;
+    Tcalloc=scalable_calloc;
+    Tfree=scalable_free;
+    Rposix_memalign=scalable_posix_memalign;
+    Raligned_malloc=scalable_aligned_malloc;
+    Raligned_realloc=scalable_aligned_realloc;
+    Taligned_free=scalable_aligned_free;
+
+    // check if we were called to test standard behavior
+    for (int i=1; i< argc; i++) {
+        if (strcmp((char*)*(argv+i),"-s")==0)
+        {
+            setSystemAllocs();
+            argC--;
+            break;
+        }
+    }
+
+    ParseCommandLine( argC, argV );
+#if __linux__
+    /* According to man pthreads 
+       "NPTL threads do not share resource limits (fixed in kernel 2.6.10)".
+       Use per-threads limits for affected systems.
+     */
+    if ( LinuxKernelVersion() < 2*1000000 + 6*1000 + 10)
+        perProcessLimits = false;
+#endif    
+    //-------------------------------------
+#if __APPLE__
+    /* Skip due to lack of memory limit enforcing under Mac OS X. */
+#else
+    limitMem(200);
+    ReallocParam();
+    limitMem(0);
+#endif
+    for( int p=MaxThread; p>=MinThread; --p ) {
+        if( Verbose )
+            printf("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");
+    return 0;
+}
+
 struct TestStruct
 {
     DWORD field1:2;
@@ -345,135 +432,85 @@ void CMemTest::InvariantDataRealloc(bool aligned)
     //printf("end check\n");
 }
 
+struct PtrSize {
+    void  *ptr;
+    size_t size;
+};
+
+static int cmpAddrs(const void *p1, const void *p2)
+{
+    const PtrSize *a = (const PtrSize *)p1;
+    const PtrSize *b = (const PtrSize *)p2;
+
+    return a->ptr < b->ptr ? -1 : ( a->ptr == b->ptr ? 0 : 1);
+}
+
 void CMemTest::AddrArifm()
 {
-    int* MasPointer[COUNT_ELEM];
-    size_t *MasCountElem = (size_t*)Tmalloc(COUNT_ELEM*sizeof(size_t));
-    size_t count;
-    int* tmpAddr;
-    int j;
-    UINT CountZero=0;
-    CountErrors=0;
+    PtrSize *arr = (PtrSize*)Tmalloc(COUNT_ELEM*sizeof(PtrSize));
+
     if (FullLog) printf("\nUnique pointer using Address arithmetics\n");
     if (FullLog) printf("malloc....");
-    ASSERT(MasCountElem, NULL);
+    ASSERT(arr, NULL);
     for (int i=0; i<COUNT_ELEM; i++)
     {
-        count=rand()%MAX_SIZE;
-        if (count == 0)
-            CountZero++;
-        tmpAddr=(int*)Tmalloc(count*sizeof(int));
-        for (j=0; j<i; j++) // find a place for the new address
-        {
-            if (*(MasPointer+j)>tmpAddr) break;
-        }
-        for (int k=i; k>j; k--)
-        {
-            MasPointer[k]=MasPointer[k-1];
-            MasCountElem[k]=MasCountElem[k-1];
-        }
-        MasPointer[j]=tmpAddr;
-        MasCountElem[j]=count*sizeof(int);/**/
+        arr[i].size=rand()%MAX_SIZE;
+        arr[i].ptr=Tmalloc(arr[i].size);
     }
-    if (FullLog) printf("Count zero: %d\n",CountZero);
+    qsort(arr, COUNT_ELEM, sizeof(PtrSize), cmpAddrs);
+
     for (int i=0; i<COUNT_ELEM-1; i++)
     {
-        if (NULL!=MasPointer[i] && NULL!=MasPointer[i+1]
-            && (uintptr_t)MasPointer[i]+MasCountElem[i] > (uintptr_t)MasPointer[i+1])
-        {
-            CountErrors++;
-            if (ShouldReportError()) printf("malloc: intersection detect at 0x%p between %llu element(int) and 0x%p\n",
-                                            (MasPointer+i),(long long unsigned)MasCountElem[i],(MasPointer+i+1));
-        }
+        if (NULL!=arr[i].ptr && NULL!=arr[i+1].ptr)
+            ASSERT((uintptr_t)arr[i].ptr+arr[i].size <= (uintptr_t)arr[i+1].ptr,
+                   "intersection detected");
     }
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
-    error_occurred |= ( CountErrors>0 ) ;
     //----------------------------------------------------------------
-    CountErrors=0;
     if (FullLog) printf("realloc....");
     for (int i=0; i<COUNT_ELEM; i++)
     {
-        count=MasCountElem[i]*2;
-        if (count == 0)
-            CountZero++;
-        tmpAddr=(int*)Trealloc(MasPointer[i],count);
-        if (NULL==tmpAddr && 0!=count)
-            Tfree(MasPointer[i]);
-        for (j=0; j<i; j++) // find a place for the new address
-        {
-            if (*(MasPointer+j)>tmpAddr) break;
-        }
-        for (int k=i; k>j; k--)
-        {
-            MasPointer[k]=MasPointer[k-1];
-            MasCountElem[k]=MasCountElem[k-1];
+        size_t count=arr[i].size*2;
+        void *tmpAddr=Trealloc(arr[i].ptr,count);
+        if (NULL!=tmpAddr) {
+            arr[i].ptr = tmpAddr;
+            arr[i].size = count;
+        } else if (count==0) { // becasue realloc(..., 0) works as free
+            arr[i].ptr = NULL;
+            arr[i].size = 0;
         }
-        MasPointer[j]=tmpAddr;
-        MasCountElem[j]=count;//*sizeof(int);/**/
     }
-    if (FullLog) printf("Count zero: %d\n",CountZero);
+    qsort(arr, COUNT_ELEM, sizeof(PtrSize), cmpAddrs);
 
-    // now we have a sorted array of pointers
     for (int i=0; i<COUNT_ELEM-1; i++)
     {
-        if (NULL!=MasPointer[i] && NULL!=MasPointer[i+1]
-            && (uintptr_t)MasPointer[i]+MasCountElem[i] > (uintptr_t)MasPointer[i+1])
-        {
-            CountErrors++;
-            if (ShouldReportError()) printf("realloc: intersection detect at 0x%p between %llu element(int) and 0x%p\n",
-                                            (MasPointer+i),(long long unsigned)MasCountElem[i],(MasPointer+i+1));
-        }
+        if (NULL!=arr[i].ptr && NULL!=arr[i+1].ptr)
+            ASSERT((uintptr_t)arr[i].ptr+arr[i].size <= (uintptr_t)arr[i+1].ptr,
+                   "intersection detected");
     }
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
-    error_occurred |= ( CountErrors>0 ) ;
     for (int i=0; i<COUNT_ELEM; i++)
     {
-        Tfree(MasPointer[i]);
+        Tfree(arr[i].ptr);
     }
     //-------------------------------------------
-    CountErrors=0;
     if (FullLog) printf("calloc....");
     for (int i=0; i<COUNT_ELEM; i++)
     {
-        count=rand()%MAX_SIZE;
-        if (count == 0)
-            CountZero++;
-        tmpAddr=(int*)Tcalloc(count*sizeof(int),2);
-        for (j=0; j<i; j++) // find a place for the new address
-        {
-            if (*(MasPointer+j)>tmpAddr) break;
-        }
-        for (int k=i; k>j; k--)
-        {
-            MasPointer[k]=MasPointer[k-1];
-            MasCountElem[k]=MasCountElem[k-1];
-        }
-        MasPointer[j]=tmpAddr;
-        MasCountElem[j]=count*sizeof(int)*2;/**/
+        arr[i].size=rand()%MAX_SIZE;
+        arr[i].ptr=Tcalloc(arr[i].size,1);
     }
-    if (FullLog) printf("Count zero: %d\n",CountZero);
+    qsort(arr, COUNT_ELEM, sizeof(PtrSize), cmpAddrs);
 
-    // now we have a sorted array of pointers
     for (int i=0; i<COUNT_ELEM-1; i++)
     {
-        if (NULL!=MasPointer[i] && NULL!=MasPointer[i+1]
-            && (uintptr_t)MasPointer[i]+MasCountElem[i] > (uintptr_t)MasPointer[i+1])
-        {
-            CountErrors++;
-            if (ShouldReportError()) printf("calloc: intersection detect at 0x%p between %llu element(int) and 0x%p\n",
-                                            (MasPointer+i),(long long unsigned)MasCountElem[i],(MasPointer+i+1));
-        }
+        if (NULL!=arr[i].ptr && NULL!=arr[i+1].ptr)
+            ASSERT((uintptr_t)arr[i].ptr+arr[i].size <= (uintptr_t)arr[i+1].ptr,
+                   "intersection detected");
     }
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
-    error_occurred |= ( CountErrors>0 ) ;
     for (int i=0; i<COUNT_ELEM; i++)
     {
-        Tfree(MasPointer[i]);
+        Tfree(arr[i].ptr);
     }
-    Tfree(MasCountElem);
+    Tfree(arr);
 }
 
 void CMemTest::Zerofilling()
@@ -491,7 +528,7 @@ void CMemTest::Zerofilling()
             continue;
         for (size_t j=0; j<CountElement; j++)
         {
-            if (!TSMas->IzZero())
+            if (!(TSMas+j)->IzZero())
             {
                 CountErrors++;
                 if (ShouldReportError()) printf("detect nonzero element at TestStruct\n");
@@ -680,10 +717,10 @@ void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
 void CMemTest::UniquePointer()
 {
     CountErrors=0;
-    int* MasPointer[COUNT_ELEM];
+    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");
-    ASSERT(MasCountElem, NULL);
+    ASSERT(MasCountElem && MasPointer, NULL);
     //
     //-------------------------------------------------------
     //malloc
@@ -770,6 +807,7 @@ void CMemTest::UniquePointer()
     for (int i=0; i<COUNT_ELEM; i++)
         Tfree(MasPointer[i]);
     Tfree(MasCountElem);
+    Tfree(MasPointer);
 }
 
 bool CMemTest::ShouldReportError()
@@ -874,78 +912,35 @@ void CMemTest::TestAlignedParameters()
     }
 }
 
-void CMemTest::RunAllTests(int /*total_threads*/)
+void CMemTest::RunAllTests(int total_threads)
 {
+    Limit limit_200M(200*total_threads), no_limit(0);
+
     Zerofilling();
     Free_NULL();
     InvariantDataRealloc(/*aligned=*/false);
     if (Raligned_realloc)
         InvariantDataRealloc(/*aligned=*/true);
     TestAlignedParameters();
-    if (FullLog) printf("All tests ended\nclearing memory....");
-}
-
-int main(int argc, char* argv[])
-{
-    argC=argc;
-    argV=argv;
-    MaxThread = MinThread = 1;
-    Tmalloc=scalable_malloc;
-    Trealloc=scalable_realloc;
-    Tcalloc=scalable_calloc;
-    Tfree=scalable_free;
-    Rposix_memalign=scalable_posix_memalign;
-    Raligned_malloc=scalable_aligned_malloc;
-    Raligned_realloc=scalable_aligned_realloc;
-    Taligned_free=scalable_aligned_free;
-
-    // check if we were called to test standard behavior
-    for (int i=1; i< argc; i++) {
-        if (strcmp((char*)*(argv+i),"-s")==0)
-        {
-            setSystemAllocs();
-            argC--;
-            break;
-        }
-    }
-
-    ParseCommandLine( argC, argV );
-
-    CMemTest test(1, Verbose);
-    // Tests with memory limit also run in serial only
-#if __APPLE__
-    /* Skip due to lack of memory limit enforcing under Mac OS X. */
-#else
-    limitMem(200);
-    ReallocParam(); /* this test should be first to have enough unfragmented memory */
-    test.NULLReturn(1*MByte,100*MByte);
-    limitMem(0);
-#endif
-
-    // Long tests, so running in serial only. TODO - rework to make shorter
 #if __APPLE__
-    /* TODO:  check why skipped on Mac OS X */
+    printf("Warning: skipping some tests (known issue on Mac OS* X)\n");
 #else
-    test.UniquePointer();
-    test.AddrArifm();
-#endif
-
-#if __linux__
-    /* According to man pthreads 
-       "NPTL threads do not share resource limits (fixed in kernel 2.6.10)".
-       Use per-threads limits for affected systems.
+    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 ( LinuxKernelVersion() < 2*1000000 + 6*1000 + 10)
-        perProcessLimits = false;
-#endif    
-
-    // Tests running in parallel
-    for( int p=MaxThread; p>=MinThread; --p ) {
-        if( Verbose )
-            printf("testing with %d threads\n", p );
-        NativeParallelFor( p, RoundRobin(p, Verbose) );
-    }
-
-    if( !error_occurred ) printf("done\n");
-    return 0;
+    if (perProcessLimits)
+        limitBarrier->wait(limit_200M);
+    else
+        limitMem(200);
+    NULLReturn(1*MByte,100*MByte);
+    if (perProcessLimits)
+        limitBarrier->wait(no_limit);
+    else
+        limitMem(0);
+#endif
+    if (FullLog) printf("All tests ended\nclearing memory...");
 }
diff --git a/src/test/test_malloc_functionality.cpp b/src/test/test_malloc_functionality.cpp
new file mode 100644
index 0000000..dbc6f1b
--- /dev/null
+++ b/src/test/test_malloc_functionality.cpp
@@ -0,0 +1,159 @@
+/*
+    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 "tbb/scalable_allocator.h"
+#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;
+
+const int LARGE_MEM_SIZES_NUM = 10;
+const size_t MByte = 1024*1024;
+
+class AllocInfo {
+    int *p;
+    int val;
+    int size;
+public:
+    AllocInfo() : p(NULL), val(0), size(0) {}
+    explicit AllocInfo(int size) : p((int*)scalable_malloc(size*sizeof(int))),
+                                   val(rand()), size(size) {
+        ASSERT(p, NULL);
+        for (int k=0; k<size; k++)
+            p[k] = val;
+    }
+    void check() const {
+        for (int k=0; k<size; k++)
+            ASSERT(p[k] == val, NULL);
+    }
+    void clear() {
+        scalable_free(p);
+    }
+};
+
+class Run: NoAssign {
+    const int allThreads;
+    Harness::SpinBarrier *barrier;
+public:
+    static int largeMemSizes[LARGE_MEM_SIZES_NUM];
+
+    Run( int allThreads, Harness::SpinBarrier *barrier ) : 
+        allThreads(allThreads), barrier(barrier) {}
+    void operator()( int /*mynum*/ ) const {
+        testObjectCaching();
+    }
+private:
+    void testObjectCaching() const {
+        AllocInfo allocs[LARGE_MEM_SIZES_NUM];
+
+        // push to maximal cache limit
+        for (int i=0; i<2; i++) {
+            const int sizes[] = { MByte/sizeof(int),
+                                  (MByte-2*largeObjectCacheStep)/sizeof(int) };
+            for (int q=0; q<2; q++) {
+                size_t curr = 0;
+                for (int j=0; j<LARGE_MEM_SIZES_NUM; j++, curr++)
+                    new (allocs+curr) AllocInfo(sizes[q]);
+
+                for (size_t j=0; j<curr; j++) {
+                    allocs[j].check();
+                    allocs[j].clear();
+                }
+            }
+        }
+        
+        barrier->wait();
+
+        // check caching correctness
+        for (int i=0; i<10; i++) {
+            size_t curr = 0;
+            for (int j=0; j<LARGE_MEM_SIZES_NUM-1; j++, curr++)
+                new (allocs+curr) AllocInfo(largeMemSizes[j]);
+
+            new (allocs+curr) 
+                AllocInfo((int)(4*minLargeObjectSize +
+                                2*minLargeObjectSize*(1.*rand()/RAND_MAX)));
+            curr++;
+
+            for (size_t j=0; j<curr; j++) {
+                allocs[j].check();
+                allocs[j].clear();
+            }
+        }
+    }
+};
+
+int Run::largeMemSizes[LARGE_MEM_SIZES_NUM];
+
+int main(int argc, char* argv[])
+{
+    ParseCommandLine( argc, argv );
+
+    for (int i=0; i<LARGE_MEM_SIZES_NUM; i++)
+        Run::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;
+    }
+
+    printf("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_malloc_overload.cpp b/src/test/test_malloc_overload.cpp
index ae58a6c..0affffc 100644
--- a/src/test/test_malloc_overload.cpp
+++ b/src/test/test_malloc_overload.cpp
@@ -29,6 +29,9 @@
 
 #if __linux__
 #define MALLOC_REPLACEMENT_AVAILABLE 1
+#elif _WIN32
+#define MALLOC_REPLACEMENT_AVAILABLE 2
+#include "tbb/tbbmalloc_proxy.h"
 #endif
 
 #if MALLOC_REPLACEMENT_AVAILABLE
@@ -39,10 +42,29 @@
 #include <stdio.h>
 #include <new>
 
+#if __linux__
 #include <dlfcn.h>
 #include <unistd.h> // for sysconf
 #include <stdint.h> // for uintptr_t
 
+#elif _WIN32
+#include <stddef.h>
+#if __MINGW32__
+#include <unistd.h>
+#else
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+#endif
+
+#endif /* OS selection */
+
+#if _WIN32
+// On Windows, the tricky way to print "done" is necessary to create 
+// dependence on msvcpXX.dll, for sake of a regression test.
+// On Linux, C++ RTL headers are undesirable because of breaking strict ANSI mode.
+#include <string>
+#endif
+
 
 template<typename T>
 static inline T alignDown(T arg, uintptr_t alignment) {
@@ -74,10 +96,14 @@ const uint32_t minLargeObjectSize = 8065;
 
 /* end of inclusion from MemoryAllocator.cpp */
 
-/* Correct only for arge blocks, i.e. not smaller then minLargeObjectSize */
+/* Correct only for large blocks, i.e. not smaller then minLargeObjectSize */
 static bool scalableMallocLargeBlock(void *object, size_t size)
 {
     ASSERT(size >= minLargeObjectSize, NULL);
+#if MALLOC_REPLACEMENT_AVAILABLE == 2
+    // Check that _msize works correctly
+    ASSERT(_msize(object) >= size, NULL);
+#endif
 
     LargeObjectHeader *h = (LargeObjectHeader*)((uintptr_t)object-sizeof(LargeObjectHeader));
     return h->mallocUniqueID==theMallocUniqueID && h->objectSize==size;
@@ -91,10 +117,12 @@ 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");
         return 1;
     }
+#endif
 
     ptr = malloc(minLargeObjectSize);
     ASSERT(ptr!=NULL && scalableMallocLargeBlock(ptr, minLargeObjectSize), NULL);
@@ -106,6 +134,8 @@ int main(int , char *[])
     ASSERT(ptr1!=NULL && scalableMallocLargeBlock(ptr1, minLargeObjectSize*10), NULL);
     free(ptr1);
 
+#if MALLOC_REPLACEMENT_AVAILABLE == 1
+
     int ret = posix_memalign(&ptr, 1024, 3*minLargeObjectSize);
     ASSERT(0==ret && ptr!=NULL && scalableMallocLargeBlock(ptr, 3*minLargeObjectSize), NULL);
     free(ptr);
@@ -131,6 +161,17 @@ int main(int , char *[])
            && !info.hblkhd && !info.usmblks && !info.fsmblks 
            && !info.uordblks && !info.fordblks && !info.keepcost, NULL);
 
+#elif MALLOC_REPLACEMENT_AVAILABLE == 2
+
+    ptr = _aligned_malloc(minLargeObjectSize,16);
+    ASSERT(ptr!=NULL && scalableMallocLargeBlock(ptr, minLargeObjectSize), NULL);
+
+    ptr1 = _aligned_realloc(ptr, minLargeObjectSize*10,16);
+    ASSERT(ptr1!=NULL && scalableMallocLargeBlock(ptr1, minLargeObjectSize*10), NULL);
+    _aligned_free(ptr1);
+
+#endif
+
     BigStruct *f = new BigStruct;
     ASSERT(f!=NULL && scalableMallocLargeBlock(f, sizeof(BigStruct)), NULL);
     delete f;
@@ -147,7 +188,13 @@ int main(int , char *[])
     ASSERT(f!=NULL && scalableMallocLargeBlock(f, 2*sizeof(BigStruct)), NULL);
     delete []f;
 
-    printf("done\n");
+#if _WIN32
+    std::string stdstring = "done";
+    const char* s = stdstring.c_str();
+#else
+    const char* s = "done";
+#endif
+    printf("%s\n", s);
     return 0;
 }
 
diff --git a/src/test/test_model_plugin.cpp b/src/test/test_model_plugin.cpp
index e28ded0..111091e 100644
--- a/src/test/test_model_plugin.cpp
+++ b/src/test/test_model_plugin.cpp
@@ -136,8 +136,8 @@ int use_lot_of_tls() {
     pthread_key_t result;
     int setspecific_dummy=10;
     while( pthread_key_create(&result, NULL)==0 
-	       && count < 4096 ) // Sun Solaris doesn't have any built-in limit, so we set something big enough
-	{
+           && 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);
         pthread_setspecific(result,&setspecific_dummy);
diff --git a/src/test/test_mutex.cpp b/src/test/test_mutex.cpp
index f05ddfc..2b2198f 100644
--- a/src/test/test_mutex.cpp
+++ b/src/test/test_mutex.cpp
@@ -93,16 +93,94 @@ struct AddOne: NoAssign {
     AddOne( C& counter_ ) : counter(counter_) {}
 };
 
+//! Adaptor for using ISO C++0x style mutex as a TBB-style mutex.
+template<typename M>
+class TBB_MutexFromISO_Mutex {
+    M my_iso_mutex;
+public:
+    typedef TBB_MutexFromISO_Mutex mutex_type;
+
+    class scoped_lock;
+    friend class scoped_lock;
+
+    class scoped_lock {
+        mutex_type* my_mutex;
+    public:
+        scoped_lock() : my_mutex(NULL) {}
+        scoped_lock( mutex_type& m ) : my_mutex(NULL) {
+            acquire(m);
+        }
+        scoped_lock( mutex_type& m, bool is_writer ) : my_mutex(NULL) {
+            acquire(m,is_writer);
+        }
+        void acquire( mutex_type& m ) {
+            m.my_iso_mutex.lock();
+            my_mutex = &m;
+        }
+        bool try_acquire( mutex_type& m ) {
+            if( m.my_iso_mutex.try_lock() ) {
+                my_mutex = &m;
+                return true;
+            } else {
+                return false;
+            }
+        }
+        void release() {
+            my_mutex->my_iso_mutex.unlock();
+            my_mutex = NULL;
+        }
+
+        // Methods for reader-writer mutex
+        // These methods can be instantiated only if M supports lock_read() and try_lock_read().
+        
+        void acquire( mutex_type& m, bool is_writer ) {
+            if( is_writer ) m.my_iso_mutex.lock();
+            else m.my_iso_mutex.lock_read();
+            my_mutex = &m;
+        } 
+        bool try_acquire( mutex_type& m, bool is_writer ) {
+            if( is_writer ? m.my_iso_mutex.try_lock() : m.my_iso_mutex.try_lock_read() ) {
+                my_mutex = &m;
+                return true;
+            } else {
+                return false;
+            }
+        }
+        bool upgrade_to_writer() {
+            my_mutex->my_iso_mutex.unlock();
+            my_mutex->my_iso_mutex.lock(); 
+            return false;
+        }
+        bool downgrade_to_reader() {
+            my_mutex->my_iso_mutex.unlock();
+            my_mutex->my_iso_mutex.lock_read(); 
+            return false;
+        }
+        ~scoped_lock() {
+            if( my_mutex ) 
+                release();
+        }
+    };    
+  
+    static const bool is_recursive_mutex = M::is_recursive_mutex;
+    static const bool is_rw_mutex = M::is_rw_mutex;
+};
+
+namespace tbb {
+    namespace profiling {
+        template<typename M>
+        void set_name( const TBB_MutexFromISO_Mutex<M>&, const char* ) {}  
+    }
+}
+
 //! Generic test of a TBB mutex type M.
 /** Does not test features specific to reader-writer locks. */
 template<typename M>
 void Test( const char * name ) {
-    TRACE("%s time = ",name);
+    REMARK("%s time = ",name);
     Counter<M> counter;
     counter.value = 0;
-#if __TBB_NAMING_API_SUPPORT 
     tbb::profiling::set_name(counter.mutex, name);
-#endif /* __TBB_NAMING_API_SUPPORT */
 #if TBBTEST_LOW_WORKLOAD
     const int n = 10000;
 #else
@@ -111,7 +189,7 @@ void Test( const char * name ) {
     tbb::tick_count t0 = tbb::tick_count::now();
     tbb::parallel_for(tbb::blocked_range<size_t>(0,n,n/10),AddOne<Counter<M> >(counter));
     tbb::tick_count t1 = tbb::tick_count::now();
-    TRACE("%g usec\n",(t1-t0).seconds());
+    REMARK("%g usec\n",(t1-t0).seconds());
     if( counter.value!=n )
         std::printf("ERROR for %s: counter.value=%ld\n",name,counter.value);
 }
@@ -129,9 +207,7 @@ struct Invariant {
         single_value = 0;
         for( size_t k=0; k<N; ++k )
             value[k] = 0;
-#if __TBB_NAMING_API_SUPPORT 
         tbb::profiling::set_name(mutex, mutex_name_);
-#endif /* __TBB_NAMING_API_SUPPORT */
     }
     void update() {
         for( size_t k=0; k<N; ++k )
@@ -224,7 +300,7 @@ struct TwiddleInvariant: NoAssign {
 /** This test is generic so that we can test any other kinds of ReaderWriter locks we write later. */
 template<typename M>
 void TestReaderWriterLock( const char * mutex_name ) {
-    TRACE( "%s readers & writers time = ", mutex_name );
+    REMARK( "%s readers & writers time = ", mutex_name );
     Invariant<M,8> invariant(mutex_name);
 #if TBBTEST_LOW_WORKLOAD
     const size_t n = 10000;
@@ -238,7 +314,7 @@ void TestReaderWriterLock( const char * mutex_name ) {
     long expected_value = n/4;
     if( !invariant.value_is(expected_value) )
         std::printf("ERROR for %s: final invariant value is wrong\n",mutex_name);
-    TRACE( "%g usec\n", (t1-t0).seconds() );
+    REMARK( "%g usec\n", (t1-t0).seconds() );
 }
 
 #if _MSC_VER && !defined(__INTEL_COMPILER)
@@ -371,15 +447,13 @@ struct RecursiveAcquisition {
 template<typename M>
 void TestRecursiveMutex( const char * mutex_name )
 {
-#if __TBB_NAMING_API_SUPPORT
     for ( int i = 0; i < RecurN; ++i ) {
         tbb::profiling::set_name(RecurMutex[i], mutex_name);
     }
-#endif /* __TBB_NAMING_API_SUPPORT */
     tbb::tick_count t0 = tbb::tick_count::now();
     tbb::parallel_for(tbb::blocked_range<size_t>(0,10000,500), RecursiveAcquisition());
     tbb::tick_count t1 = tbb::tick_count::now();
-    TRACE( "%s recursive mutex time = %g usec\n", mutex_name, (t1-t0).seconds() );
+    REMARK( "%s recursive mutex time = %g usec\n", mutex_name, (t1-t0).seconds() );
 }
 
 template<typename C>
@@ -457,6 +531,35 @@ void TestNullRWMutex( const char * name ) {
     tbb::parallel_for(tbb::blocked_range<size_t>(0,n,10),NullUpgradeDowngrade<M>(m, name));
 }
 
+//! Test ISO C++0x compatibility portion of TBB mutex 
+template<typename M>
+void TestISO( const char * name ) {
+    typedef TBB_MutexFromISO_Mutex<M> tbb_from_iso;
+    Test<tbb_from_iso>( name );
+}
+
+//! Test ISO C++0x try_lock functionality of a non-reenterable mutex */
+template<typename M>
+void TestTryAcquire_OneThreadISO( const char * name ) {
+    typedef TBB_MutexFromISO_Mutex<M> tbb_from_iso;
+    TestTryAcquire_OneThread<tbb_from_iso>( name );
+}
+
+//! Test ISO-like C++0x compatibility portion of TBB reader-writer mutex 
+template<typename M>
+void TestReaderWriterLockISO( const char * name ) {
+    typedef TBB_MutexFromISO_Mutex<M> tbb_from_iso;
+    TestReaderWriterLock<tbb_from_iso>( name );
+    TestTryAcquireReader_OneThread<tbb_from_iso>( name );
+}
+
+//! Test ISO C++0x compatibility portion of TBB recursive mutex 
+template<typename M>
+void TestRecursiveMutexISO( const char * name ) {
+    typedef TBB_MutexFromISO_Mutex<M> tbb_from_iso;
+    TestRecursiveMutex<tbb_from_iso>(name); 
+}
+
 #include "tbb/task_scheduler_init.h"
 
 int main( int argc, char * argv[] ) {
@@ -465,7 +568,7 @@ int main( int argc, char * argv[] ) {
     ParseCommandLine( argc, argv );
     for( int p=MinThread; p<=MaxThread; ++p ) {
         tbb::task_scheduler_init init( p );
-        TRACE( "testing with %d workers\n", static_cast<int>(p) );
+        REMARK( "testing with %d workers\n", static_cast<int>(p) );
 #if TBBTEST_LOW_WORKLOAD
         // The amount of work is decreased in this mode to bring the length 
         // of the runs under tools into the tolerable limits.
@@ -504,8 +607,23 @@ int main( int argc, char * argv[] ) {
             TestReaderWriterLock<tbb::spin_rw_mutex>( "Spin RW Mutex" );
 
             TestRecursiveMutex<tbb::recursive_mutex>( "Recursive Mutex" );
+
+            // Test ISO C++0x interface  
+            TestISO<tbb::spin_mutex>( "ISO Spin Mutex" );
+            TestISO<tbb::mutex>( "ISO Mutex" );
+            TestISO<tbb::spin_rw_mutex>( "ISO Spin RW Mutex" );
+            TestISO<tbb::recursive_mutex>( "ISO Recursive Mutex" );
+            TestTryAcquire_OneThreadISO<tbb::spin_mutex>( "ISO Spin Mutex" );
+#if USE_PTHREAD 
+            // under ifdef because on Windows tbb::mutex is reenterable and the test will fail
+            TestTryAcquire_OneThreadISO<tbb::mutex>( "ISO Mutex" );
+#endif /* USE_PTHREAD */
+            TestTryAcquire_OneThreadISO<tbb::spin_rw_mutex>( "ISO Spin RW Mutex" );
+            TestTryAcquire_OneThreadISO<tbb::recursive_mutex>( "ISO Recursive Mutex" );
+            TestReaderWriterLockISO<tbb::spin_rw_mutex>( "ISO Spin RW Mutex" );
+            TestRecursiveMutexISO<tbb::recursive_mutex>( "ISO Recursive Mutex" );
         }
-        TRACE( "calling destructor for task_scheduler_init\n" );
+        REMARK( "calling destructor for task_scheduler_init\n" );
     }
     std::printf("done\n");
     return 0;
diff --git a/src/test/test_parallel_do.cpp b/src/test/test_parallel_do.cpp
index 8142fb2..ff155b0 100644
--- a/src/test/test_parallel_do.cpp
+++ b/src/test/test_parallel_do.cpp
@@ -31,7 +31,6 @@
 #include "tbb/atomic.h"
 #include "harness.h"
 #include "harness_cpu.h"
-#include <memory>
 
 #if defined(_MSC_VER) && defined(_Wp64)
     // Workaround for overzealous compiler warnings in /Wp64 mode
@@ -52,45 +51,7 @@ public:
     size_t value() const volatile { return x; }
 };
 
-template <class T>
-class InputIterator {
-    value_t * my_ptr;
-public:
-    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;
-   
-    InputIterator( value_t * ptr): my_ptr(ptr){}
-    
-    value_t& operator* () { return *my_ptr; }
-    
-    InputIterator& operator++ () { ++my_ptr; return *this; }
-
-    bool operator== ( const InputIterator& r ) { return my_ptr == r.my_ptr; }
-};
-
-template <class T>
-class ForwardIterator {
-    value_t * my_ptr;
-public:
-    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;
-   
-    ForwardIterator ( value_t * ptr ) : my_ptr(ptr){}
-    
-    ForwardIterator ( const ForwardIterator& r ) : my_ptr(r.my_ptr){}
-    
-    value_t& operator* () { return *my_ptr; }
-    
-    ForwardIterator& operator++ () { ++my_ptr; return *this; }
-
-    bool operator== ( const ForwardIterator& r ) { return my_ptr == r.my_ptr; }
-};
+#include "harness_iterator.h"
 
 static size_t g_tasks_expected = 0;
 static tbb::atomic<size_t> g_tasks_observed;
@@ -250,9 +211,9 @@ void Run( int nthread ) {
         // Test for random access iterators
         TestIterator<value_t*>(nthread, depth);
         // Test for input iterators
-        TestIterator<InputIterator<value_t> >(nthread, depth);
+        TestIterator<Harness::InputIterator<value_t> >(nthread, depth);
         // Test for forward iterators
-        TestIterator<ForwardIterator<value_t> >(nthread, depth);
+        TestIterator<Harness::ForwardIterator<value_t> >(nthread, depth);
     }
 }
 
diff --git a/src/test/test_parallel_for.cpp b/src/test/test_parallel_for.cpp
index 01b1e5f..5459b08 100644
--- a/src/test/test_parallel_for.cpp
+++ b/src/test/test_parallel_for.cpp
@@ -138,6 +138,95 @@ void Flog( int nthread ) {
         printf("time=%g\tnthread=%d\tpad=%d\n",(T1-T0).seconds(),nthread,int(Pad));
 }
 
+// Testing parallel_for with step support
+const size_t PFOR_BUFFER_TEST_SIZE = 1024;
+// test_buffer has some extra items beyound right bound
+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]++;
+}
+
+#include <stdexcept> // std::invalid_argument
+template <typename T>
+void TestParallelForWithStepSupport()
+{
+    const T pfor_buffer_test_size = static_cast<T>(PFOR_BUFFER_TEST_SIZE);
+    const T pfor_buffer_actual_size = static_cast<T>(PFOR_BUFFER_ACTUAL_SIZE);
+    // Testing parallel_for with different step values
+    for (T begin = 0; begin < pfor_buffer_test_size - 1; begin += pfor_buffer_test_size / 10 + 1) {
+        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>);
+            // 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");
+                pfor_buffer[i] = 0;
+            }
+            // Verifying that no extra items were processed and right bound of array wasn't crossed
+            for (T i = 0; i < pfor_buffer_actual_size; i++) {
+                ASSERT(pfor_buffer[i] == 0, "parallel_for processed an extra element");
+            }
+        }
+    }
+
+    // Testing some corner cases
+    tbb::parallel_for(static_cast<T>(2), static_cast<T>(1), static_cast<T>(1), TestFunction<T>);
+    try{
+        tbb::parallel_for(static_cast<T>(1), static_cast<T>(100), static_cast<T>(0), TestFunction<T>);  // should cause std::invalid_argument
+    }catch(std::invalid_argument){
+        return;
+    }
+    ASSERT(0, "std::invalid_argument should be thrown");
+}
+
+// Exception support test
+#define HARNESS_EH_SIMPLE_MODE 1
+#include "tbb/tbb_exception.h"
+#include "harness_eh.h"
+
+void test_function_with_exception(size_t)
+{
+    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();
+}
+
+// Cancellaton support test
+void function_to_cancel(size_t ) {
+    ++g_CurExecuted;
+    CancellatorTask::WaitUntilReady();
+}
+
+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);
+        
+        return NULL;
+    }
+public:
+    my_worker_pfor_step_task ( tbb::task_group_context &context) : my_ctx(context) { }
+};
+
+void TestCancellation()
+{
+    ResetEhGlobals();
+    RunCancellationTest<my_worker_pfor_step_task, CancellatorTask>();
+}
+
 #include <cstdio>
 #include "tbb/task_scheduler_init.h"
 #include "harness_cpu.h"
@@ -158,10 +247,27 @@ int main( int argc, char* argv[] ) {
             Flog<1000>(p);
             Flog<10000>(p);
 
-           // Test that all workers sleep when no work
-           TestCPUUserTime(p);
+            // Testing with different integer types
+            TestParallelForWithStepSupport<short>();
+            TestParallelForWithStepSupport<unsigned short>();
+            TestParallelForWithStepSupport<int>();
+            TestParallelForWithStepSupport<unsigned int>();
+            TestParallelForWithStepSupport<long>();
+            TestParallelForWithStepSupport<unsigned long>();
+            TestParallelForWithStepSupport<long long>();
+            TestParallelForWithStepSupport<unsigned long long>();
+            TestParallelForWithStepSupport<size_t>();
+#if !__TBB_EXCEPTION_HANDLING_BROKEN && !(__GNUC__==4 && __GNUC_MINOR__==1 && __TBB_ipf)
+            TestExceptionsSupport();
+#endif
+            if (p>1) TestCancellation();
+            // Test that all workers sleep when no work
+            TestCPUUserTime(p);
         }
-    } 
+    }
+#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");
+#endif
     printf("done\n");
     return 0;
 }
diff --git a/src/test/test_parallel_for_each.cpp b/src/test/test_parallel_for_each.cpp
new file mode 100644
index 0000000..7e7c36f
--- /dev/null
+++ b/src/test/test_parallel_for_each.cpp
@@ -0,0 +1,164 @@
+/*
+    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 "tbb/parallel_for_each.h"
+#include "tbb/task_scheduler_init.h"
+#include "tbb/atomic.h"
+#include "harness.h"
+#include "harness_iterator.h"
+
+tbb::atomic<size_t> sum;
+// This function is called via parallel_for_each
+void TestFunction (size_t value) {
+    sum += (unsigned int)value;
+}
+
+const size_t NUMBER_OF_ELEMENTS = 1000;
+
+// Tests tbb::parallel_for_each functionality
+template <typename Iterator>
+void RunPForEachTests()
+{
+    size_t test_vector[NUMBER_OF_ELEMENTS + 1];
+
+    sum = 0;
+    size_t test_sum = 0;
+
+    for (size_t i =0; i < NUMBER_OF_ELEMENTS; i++) { 
+        test_vector[i] = i;
+        test_sum += i;
+    }
+    test_vector[NUMBER_OF_ELEMENTS] = 1000000; // parallel_for_each shouldn't touch this element
+
+    Iterator begin(&test_vector[0]);
+    Iterator end(&test_vector[NUMBER_OF_ELEMENTS]);
+
+    tbb::parallel_for_each(begin, end, TestFunction);
+    ASSERT(sum == test_sum, "Not all items of test vector were processed by parallel_for_each");
+    ASSERT(test_vector[NUMBER_OF_ELEMENTS] == 1000000, "parallel_for_each processed an extra element");
+}
+
+// Exception support test
+#define HARNESS_EH_SIMPLE_MODE 1
+#include "tbb/tbb_exception.h"
+#include "harness_eh.h"
+
+void test_function_with_exception(size_t)
+{
+    ThrowTestException();
+}
+
+template <typename Iterator>
+void TestExceptionsSupport()
+{
+    REMARK (__FUNCTION__);
+    size_t test_vector[NUMBER_OF_ELEMENTS + 1];
+
+    for (size_t i = 0; i < NUMBER_OF_ELEMENTS; i++) { 
+        test_vector[i] = i;
+    }
+
+    Iterator begin(&test_vector[0]);
+    Iterator end(&test_vector[NUMBER_OF_ELEMENTS]);
+
+    TRY();
+        tbb::parallel_for_each(begin, end, test_function_with_exception);
+    CATCH_AND_ASSERT();
+}
+
+// Cancellaton support test
+void function_to_cancel(size_t ) {
+    ++g_CurExecuted;
+    CancellatorTask::WaitUntilReady();
+}
+
+template <typename Iterator>
+class my_worker_pforeach_task : public tbb::task
+{
+    tbb::task_group_context &my_ctx;
+
+    tbb::task* execute () {
+        size_t test_vector[NUMBER_OF_ELEMENTS + 1];
+        for (size_t i = 0; i < NUMBER_OF_ELEMENTS; i++) { 
+            test_vector[i] = i;
+        }
+        Iterator begin(&test_vector[0]);
+        Iterator end(&test_vector[NUMBER_OF_ELEMENTS]);
+
+        tbb::parallel_for_each(begin, end, function_to_cancel);
+        
+        return NULL;
+    }
+public:
+    my_worker_pforeach_task ( tbb::task_group_context &context) : my_ctx(context) { }
+};
+
+template <typename Iterator>
+void TestCancellation()
+{
+    REMARK (__FUNCTION__);
+    ResetEhGlobals();
+    RunCancellationTest<my_worker_pforeach_task<Iterator>, CancellatorTask>();
+}
+
+#include "harness_cpu.h"
+
+int main( int argc, char* argv[] ) {
+    MinThread=1;
+    MaxThread=2;
+    ParseCommandLine( argc, argv );
+    if( MinThread<1 ) {
+        printf("number of threads must be positive\n");
+        exit(1);
+    }
+
+    for( int p=MinThread; p<=MaxThread; ++p ) {
+        tbb::task_scheduler_init init( p );
+        RunPForEachTests<Harness::RandomIterator<size_t> >();
+        RunPForEachTests<Harness::InputIterator<size_t> >();
+        RunPForEachTests<Harness::ForwardIterator<size_t> >();
+
+#if !__TBB_EXCEPTION_HANDLING_BROKEN
+        TestExceptionsSupport<Harness::RandomIterator<size_t> >();
+        TestExceptionsSupport<Harness::InputIterator<size_t> >();
+        TestExceptionsSupport<Harness::ForwardIterator<size_t> >();
+#endif
+        if (p > 1) {
+            TestCancellation<Harness::RandomIterator<size_t> >();
+            TestCancellation<Harness::InputIterator<size_t> >();
+            TestCancellation<Harness::ForwardIterator<size_t> >();
+        }
+        // Test that all workers sleep when no work
+        TestCPUUserTime(p);
+    }
+#if __TBB_EXCEPTION_HANDLING_BROKEN
+    printf("Warning: Exception handling tests are skipped due to a known issue.\n");
+#endif
+    printf("done\n");
+    return 0;
+}
diff --git a/src/test/test_parallel_invoke.cpp b/src/test/test_parallel_invoke.cpp
new file mode 100644
index 0000000..c4a9361
--- /dev/null
+++ b/src/test/test_parallel_invoke.cpp
@@ -0,0 +1,296 @@
+/*
+    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 "tbb/parallel_invoke.h"
+#include "tbb/task_scheduler_init.h"
+#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;
+
+// Some macros to make the test easier to read
+
+// 10 functions test0 ... test9 are defined
+// pointer to each function is also defined
+
+#define TEST_FUNCTION(value) void test##value () \
+{   \
+    ASSERT(!(function_counter & (1 << value)), "Test function has already been called"); \
+    function_counter += 1 << value; \
+}   \
+void (*test_pointer##value)(void) = &test##value;
+
+TEST_FUNCTION(0)
+TEST_FUNCTION(1)
+TEST_FUNCTION(2)
+TEST_FUNCTION(3)
+TEST_FUNCTION(4)
+TEST_FUNCTION(5)
+TEST_FUNCTION(6)
+TEST_FUNCTION(7)
+TEST_FUNCTION(8)
+TEST_FUNCTION(9)
+
+// The same with functors
+#define TEST_FUNCTOR(value) class test_functor##value  \
+{   \
+public: \
+    void operator() () const {  \
+        function_counter += 1 << value;   \
+    }   \
+} functor##value;
+
+TEST_FUNCTOR(0)
+TEST_FUNCTOR(1)
+TEST_FUNCTOR(2)
+TEST_FUNCTOR(3)
+TEST_FUNCTOR(4)
+TEST_FUNCTOR(5)
+TEST_FUNCTOR(6)
+TEST_FUNCTOR(7)
+TEST_FUNCTOR(8)
+TEST_FUNCTOR(9)
+
+#define INIT_TEST function_counter = 0;
+
+#define VALIDATE_INVOKE_RUN(number_of_args, test_type) \
+    ASSERT( (size_t)function_counter == (size_t)(1 << number_of_args) - 1, "parallel_invoke called with " #number_of_args " arguments didn't process all " #test_type);
+
+// Calls parallel_invoke for different number of arguments
+// It can be called with and without user context
+template <typename F0, typename F1, typename F2, typename F3, typename F4, typename F5,
+    typename F6, typename F7, typename F8, typename F9>
+void call_parallel_invoke( size_t n, 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) {
+    switch(n) {
+    default:
+        ASSERT(false, "number of arguments must be between 2 and 10");
+    case 2:
+        if (context)
+            tbb::parallel_invoke (f0, f1, *context);
+        else
+            tbb::parallel_invoke (f0, f1);
+        break;
+    case 3:
+        if (context)
+            tbb::parallel_invoke (f0, f1, f2, *context);
+        else
+            tbb::parallel_invoke (f0, f1, f2);
+        break;
+    case 4:
+        if(context)
+            tbb::parallel_invoke (f0, f1, f2, f3, *context);
+        else
+            tbb::parallel_invoke (f0, f1, f2, f3);
+        break;
+    case 5:
+        if(context)
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, *context);
+        else
+            tbb::parallel_invoke (f0, f1, f2, f3, f4);
+        break;
+    case 6:
+        if(context)
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5, *context);
+        else
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5);
+        break;
+    case 7:
+        if(context)
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5, f6, *context);
+        else
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5, f6);
+        break;
+    case 8:
+        if(context)
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5, f6, f7, *context);
+        else
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5, f6, f7);
+        break;
+    case 9:
+        if(context)
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5, f6, f7, f8, *context);
+        else
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5, f6, f7, f8);
+        break;
+    case 10:
+        if(context)
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, *context);
+        else
+            tbb::parallel_invoke (f0, f1, f2, f3, f4, f5, f6, f7, f8, f9);
+        break;
+    }
+}
+
+void test_parallel_invoke()
+{
+    REMARK (__FUNCTION__);
+    // Testing parallel_invoke with functions
+    for (int n = 2; n <=10; n++)
+    {
+        INIT_TEST;
+        call_parallel_invoke(n, test0, test1, test2, test3, test4, test5, test6, test7, test8, test9, NULL);
+        VALIDATE_INVOKE_RUN(n, "functions");
+    }
+    
+    // Testing with pointers to functions
+    for (int n = 2; n <=10; n++)
+    {
+        INIT_TEST;
+        call_parallel_invoke(n, test_pointer0, test_pointer1, test_pointer2, test_pointer3, test_pointer4,
+            test_pointer5, test_pointer6, test_pointer7, test_pointer8, test_pointer9, NULL);
+        VALIDATE_INVOKE_RUN(n, "pointers to function");
+    }
+
+    // Testing parallel_invoke with functors
+    for (int n = 2; n <=10; n++)
+    {
+        INIT_TEST;
+        call_parallel_invoke(n, functor0, functor1, functor2, functor3, functor4,
+            functor5, functor6, functor7, functor8, functor9, NULL);
+        VALIDATE_INVOKE_RUN(n, "functors");
+    }
+}
+
+// Exception handling support test
+
+#define HARNESS_EH_SIMPLE_MODE 1
+#include "harness_eh.h"
+
+volatile size_t exception_mask; // each bit represents whether the function should throw exception or not
+
+// throws exception if corresponding exception_mask bit is set
+#define TEST_FUNCTION_WITH_THROW(value) void test_with_throw##value () {\
+    if (exception_mask & (1 << value)){   \
+        ThrowTestException();    \
+    } \
+}
+
+TEST_FUNCTION_WITH_THROW(0)
+TEST_FUNCTION_WITH_THROW(1)
+TEST_FUNCTION_WITH_THROW(2)
+TEST_FUNCTION_WITH_THROW(3)
+TEST_FUNCTION_WITH_THROW(4)
+TEST_FUNCTION_WITH_THROW(5)
+TEST_FUNCTION_WITH_THROW(6)
+TEST_FUNCTION_WITH_THROW(7)
+TEST_FUNCTION_WITH_THROW(8)
+TEST_FUNCTION_WITH_THROW(9)
+
+void TestExceptionHandling()
+{
+    REMARK (__FUNCTION__);
+    for( size_t n = 2; n <= 10; ++n ) {
+        for( exception_mask = 1; exception_mask < (size_t) (1 << n); ++exception_mask ) {
+            ResetEhGlobals();
+            TRY();
+                REMARK("Calling parallel_invoke, number of functions = %d, exception_mask = %d\n", n, exception_mask);
+                call_parallel_invoke(n, test_with_throw0, test_with_throw1, test_with_throw2, test_with_throw3,
+                    test_with_throw4, test_with_throw5, test_with_throw6, test_with_throw7, test_with_throw8, test_with_throw9, NULL);
+            CATCH_AND_ASSERT();
+        }
+    }
+}
+
+// Cancellaton support test
+void function_to_cancel() {
+    ++g_CurExecuted;
+    CancellatorTask::WaitUntilReady();
+}
+
+// The function is used to test cancellation
+void simple_test_nothrow (){
+    ++g_CurExecuted;
+}
+
+size_t g_numFunctions,
+       g_functionToCancel;
+
+class ParInvokeLauncherTask : public tbb::task
+{
+    tbb::task_group_context &my_ctx;
+    void(*func_array[10])(void);
+
+    tbb::task* execute () {
+        func_array[g_functionToCancel] = &function_to_cancel;
+        call_parallel_invoke(g_numFunctions, func_array[0], func_array[1], func_array[2], func_array[3],
+            func_array[4], func_array[5], func_array[6], func_array[7], func_array[8], func_array[9], &my_ctx);
+        return NULL;
+    }
+public:
+    ParInvokeLauncherTask ( tbb::task_group_context& ctx ) : my_ctx(ctx) {
+        for (int i = 0; i <=9; ++i)
+            func_array[i] = &simple_test_nothrow;
+    }
+};
+
+void TestCancellation ()
+{
+    REMARK (__FUNCTION__);
+    for ( int n = 2; n <= 10; ++n ) {
+        for ( int m = 0; m <= n - 1; ++m ) {
+            g_numFunctions = n;
+            g_functionToCancel = m;
+            ResetEhGlobals();
+            RunCancellationTest<ParInvokeLauncherTask, CancellatorTask>();
+        }
+    }
+}
+
+//------------------------------------------------------------------------
+// Entry point
+//------------------------------------------------------------------------
+
+#include "harness_cpu.h"
+
+int main(int argc, char* argv[]) {
+    // Set default minimum number of threads
+    MinThread = 2;
+    ParseCommandLine( argc, argv );
+    MinThread = min(MinThread, MaxThread);
+    ASSERT (MinThread>=1, "Minimal number of threads must be 1 or more");
+    for ( int p = MinThread; p <= MaxThread; ++p ) {
+        tbb::task_scheduler_init init(p);
+        test_parallel_invoke();
+        if (p > 1) {
+#if __TBB_EXCEPTION_HANDLING_BROKEN
+            printf("Warning: Exception handling tests are skipped due to a known issue.\n");
+#else
+            TestExceptionHandling();
+#endif
+            TestCancellation();
+        }
+        TestCPUUserTime(p);
+    }
+    printf("done\n");
+    return 0;
+}
+
diff --git a/src/test/test_parallel_reduce.cpp b/src/test/test_parallel_reduce.cpp
index fb70727..a110ea4 100644
--- a/src/test/test_parallel_reduce.cpp
+++ b/src/test/test_parallel_reduce.cpp
@@ -40,7 +40,7 @@ class MinimalRange {
     size_t begin, end;
     friend class FooBody;
     explicit MinimalRange( size_t i ) : begin(0), end(i) {}
-    friend void Flog( int nthread );
+    friend void Flog( int nthread, bool inteference );
 public:
     MinimalRange( MinimalRange& r, tbb::split ) : end(r.end) {
         begin = r.end = (r.begin+r.end)/2;
@@ -54,7 +54,7 @@ class FooBody {
 private:
     FooBody( const FooBody& );          // Deny access
     void operator=( const FooBody& );   // Deny access
-    friend void Flog( int nthread );
+    friend void Flog( int nthread, bool interference );
     //! Parent that created this body via split operation.  NULL if original body.
     FooBody* parent;
     //! Total number of index values processed by body and its children.
@@ -110,7 +110,7 @@ public:
 #include "harness.h"
 #include "tbb/tick_count.h"
 
-void Flog( int nthread ) {
+void Flog( int nthread, bool interference=false ) {
     for (int mode = 0;  mode < 4; mode++) {
         tbb::tick_count T0 = tbb::tick_count::now();
         long join_count = 0;        
@@ -147,10 +147,63 @@ void Flog( int nthread ) {
         }
         tbb::tick_count T1 = tbb::tick_count::now();
         if( Verbose )
-            printf("time=%g join_count=%ld ForkCount=%ld nthread=%d\n",(T1-T0).seconds(),join_count,long(ForkCount), nthread);
+            printf("time=%g join_count=%ld ForkCount=%ld nthread=%d%s\n",
+                   (T1-T0).seconds(),join_count,long(ForkCount), nthread, interference ? " with interference)":"");
     }
 }
 
+class DeepThief: public tbb::task {
+    /*override*/tbb::task* execute() {
+        if( !is_stolen_task() )
+            spawn(*child);
+        wait_for_all();
+        return NULL;
+    }
+    task* child;
+    friend void FlogWithInterference(int);
+public:
+    DeepThief() : child() {}
+};
+
+//! Test for problem in TBB 2.1 parallel_reduce where middle of a range is stolen.
+/** Warning: this test is a somewhat abusive use of TBB somewhat because 
+    it requires two or more threads to avoid deadlock. */
+void FlogWithInterference( int nthread ) {
+    ASSERT( nthread>=2, "requires too or more threads" );
+
+    // Build linear chain of tasks. 
+    // The purpose is to drive up "task depth" in TBB 2.1.
+    // An alternative would be to use add_to_depth, but that method is deprecated in TBB 2.2,
+    // and this way we generalize to catching problems with implicit depth calculations.
+    tbb::task* root = new( tbb::task::allocate_root() ) tbb::empty_task;
+    root->set_ref_count(2);
+    tbb::task* t = root;
+    for( int i=0; i<3; ++i ) {
+        t = new( t->allocate_child() ) tbb::empty_task;
+        t->set_ref_count(1);
+    }
+
+    // Append a DeepThief to the chain.
+    DeepThief* deep_thief = new( t->allocate_child() ) DeepThief;
+    deep_thief->set_ref_count(2);
+
+    // Append a leaf to the chain. 
+    tbb::task* leaf = new( deep_thief->allocate_child() ) tbb::empty_task;
+    deep_thief->child = leaf;
+
+    root->spawn(*deep_thief);
+
+    Flog(nthread,true);
+
+    if( root->ref_count()==2 ) {
+        // Spawn leaf, which when it finishes, cause the DeepThief and rest of the chain to finish.
+        root->spawn( *leaf );
+    }
+    // Wait for all tasks in the chain from root to leaf to finish.
+    root->wait_for_all();
+    root->destroy( *root );
+}
+
 #include "tbb/task_scheduler_init.h"
 #include "harness_cpu.h"
 
@@ -165,6 +218,7 @@ int main( int argc, char* argv[] ) {
     for( int p=MinThread; p<=MaxThread; ++p ) {
         tbb::task_scheduler_init init( p );
         Flog(p);
+        if( p>=2 ) FlogWithInterference(p);
 
         // Test that all workers sleep when no work
         TestCPUUserTime(p);
diff --git a/src/test/test_parallel_sort.cpp b/src/test/test_parallel_sort.cpp
index 70612aa..20f2c83 100644
--- a/src/test/test_parallel_sort.cpp
+++ b/src/test/test_parallel_sort.cpp
@@ -402,7 +402,7 @@ bool parallel_sortTest(size_t n, tbb::concurrent_vector<Minimal>::iterator iter,
     by each type are tested.
 */
 void Flog() {
-    // For eacg type create: 
+    // For each type create: 
     // the list to be sorted by parallel_sort (array) 
     // the list to be sort by STL sort (array_2)
     // and a less function object
@@ -413,18 +413,20 @@ void Flog() {
     Minimal *minimal_array_2 = new Minimal[N];
     MinimalCompare minimal_less;
 
+#if !__TBB_FLOATING_POINT_BROKEN
     float *float_array = new float[N];
     float *float_array_2 = new float[N];
     std::less<float> float_less;
 
-    std::string *string_array = new std::string[N];
-    std::string *string_array_2 = new std::string[N];
-    std::less<std::string> string_less;
-
     tbb::concurrent_vector<float> float_cv1;
     tbb::concurrent_vector<float> float_cv2;
     float_cv1.grow_to_at_least(N);
     float_cv2.grow_to_at_least(N);
+#endif /* !__TBB_FLOATING_POINT_BROKEN */
+
+    std::string *string_array = new std::string[N];
+    std::string *string_array_2 = new std::string[N];
+    std::less<std::string> string_less;
 
     tbb::concurrent_vector<Minimal> minimal_cv1;
     tbb::concurrent_vector<Minimal> minimal_cv2;
@@ -441,6 +443,7 @@ void Flog() {
     parallel_sortTest(9999, minimal_array, minimal_array_2, &minimal_less);
     parallel_sortTest(50000, minimal_array, minimal_array_2, &minimal_less);
 
+#if !__TBB_FLOATING_POINT_BROKEN
     current_type = "float (no less)";
     parallel_sortTest(0, float_array, float_array_2, static_cast<std::less<float> *>(NULL)); 
     parallel_sortTest(1, float_array, float_array_2, static_cast<std::less<float> *>(NULL)); 
@@ -455,20 +458,6 @@ void Flog() {
     parallel_sortTest(9999, float_array, float_array_2, &float_less); 
     parallel_sortTest(50000, float_array, float_array_2, &float_less); 
 
-    current_type = "string (no less)";
-    parallel_sortTest(0, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
-    parallel_sortTest(1, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
-    parallel_sortTest(10, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
-    parallel_sortTest(9999, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
-    parallel_sortTest(50000, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
-
-    current_type = "string (less)";
-    parallel_sortTest(0, string_array, string_array_2, &string_less);
-    parallel_sortTest(1, string_array, string_array_2, &string_less);
-    parallel_sortTest(10, string_array, string_array_2, &string_less);
-    parallel_sortTest(9999, string_array, string_array_2, &string_less);
-    parallel_sortTest(50000, string_array, string_array_2, &string_less);
-
     current_type = "concurrent_vector<float> (no less)";
     parallel_sortTest(0, float_cv1.begin(), float_cv2.begin(), static_cast<std::less<float> *>(NULL));
     parallel_sortTest(1, float_cv1.begin(), float_cv2.begin(), static_cast<std::less<float> *>(NULL));
@@ -482,6 +471,21 @@ void Flog() {
     parallel_sortTest(10, float_cv1.begin(), float_cv2.begin(), &float_less);
     parallel_sortTest(9999, float_cv1.begin(), float_cv2.begin(), &float_less);
     parallel_sortTest(50000, float_cv1.begin(), float_cv2.begin(), &float_less);
+#endif /* !__TBB_FLOATING_POINT_BROKEN */
+
+    current_type = "string (no less)";
+    parallel_sortTest(0, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
+    parallel_sortTest(1, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
+    parallel_sortTest(10, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
+    parallel_sortTest(9999, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
+    parallel_sortTest(50000, string_array, string_array_2, static_cast<std::less<std::string> *>(NULL));
+
+    current_type = "string (less)";
+    parallel_sortTest(0, string_array, string_array_2, &string_less);
+    parallel_sortTest(1, string_array, string_array_2, &string_less);
+    parallel_sortTest(10, string_array, string_array_2, &string_less);
+    parallel_sortTest(9999, string_array, string_array_2, &string_less);
+    parallel_sortTest(50000, string_array, string_array_2, &string_less);
 
     current_type = "concurrent_vector<Minimal> (less)";
     parallel_sortTest(0, minimal_cv1.begin(), minimal_cv2.begin(), &minimal_less);
@@ -493,8 +497,10 @@ void Flog() {
     delete [] minimal_array;
     delete [] minimal_array_2;
 
+#if !__TBB_FLOATING_POINT_BROKEN
     delete [] float_array;
     delete [] float_array_2;
+#endif /* !__TBB_FLOATING_POINT_BROKEN */
 
     delete [] string_array;
     delete [] string_array_2;
diff --git a/src/test/test_pipeline.cpp b/src/test/test_pipeline.cpp
index fdeed75..3685fb4 100644
--- a/src/test/test_pipeline.cpp
+++ b/src/test/test_pipeline.cpp
@@ -26,18 +26,26 @@
     the GNU General Public License.
 */
 
+#include "tbb/tbb_stddef.h"
 #include "tbb/pipeline.h"
 #include "tbb/spin_mutex.h"
+#include "tbb/atomic.h"
 #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.
 
 struct Buffer {
-    int id;
+    //! Indicates that the buffer is not used.
+    static const unsigned long unused = ~0ul;
+    unsigned long id;
     //! True if Buffer is in use.
     bool is_busy;
-    int sequence_number;
-    Buffer() : id(-1), is_busy(false), sequence_number(-1) {}
+    unsigned long sequence_number;
+    Buffer() : id(unused), is_busy(false), sequence_number(unused) {}
 };
 
 class waiting_probe {
@@ -51,21 +59,24 @@ public:
     void probe( ); // defined below
 };
 
-static const int MaxStreamSize = 1<<12;
+static const unsigned MaxStreamSize = 8000;
+static const unsigned MaxStreamItemsPerThread = 1000;
 //! Maximum number of filters allowed
-static const int MaxFilters = 5;
-static int StreamSize;
-static const size_t MaxBuffer = 8;
+static const unsigned MaxFilters = 5;
+static unsigned StreamSize;
+static const unsigned MaxBuffer = 8;
 static bool Done[MaxFilters][MaxStreamSize];
 static waiting_probe WaitTest;
-static size_t out_of_order_count;
+static unsigned out_of_order_count;
+
+#include "harness_concurrency_tracker.h"
 
 class BaseFilter: public tbb::filter {
     bool* const my_done;
     const bool my_is_last;  
     bool my_is_running;
 public:
-    tbb::atomic<int> current_token;
+    tbb::atomic<tbb::internal::Token> current_token;
     BaseFilter( tbb::filter::mode type, bool done[], bool is_last ) : 
         filter(type),
         my_done(done),
@@ -78,27 +89,28 @@ public:
         return static_cast<Buffer*>(item);
     } 
     /*override*/void* operator()( void* item ) {
+        Harness::ConcurrencyTracker ct;
         if( is_serial() )
             ASSERT( !my_is_running, "premature entry to serial stage" );
         my_is_running = true;
         Buffer* b = get_buffer(item);
         if( b ) {
             if( is_ordered() ) {
-                if( b->sequence_number == -1 ) 
+                if( b->sequence_number == Buffer::unused ) 
                     b->sequence_number = current_token-1;
-                else 
+                else
                     ASSERT( b->sequence_number==current_token-1, "item arrived out of order" );
             } else if( is_serial() ) {
-                    if( b->sequence_number != current_token-1 && b->sequence_number != -1 )
-                        out_of_order_count++;
+                if( b->sequence_number != current_token-1 && b->sequence_number != Buffer::unused )
+                    out_of_order_count++;
             }
-            ASSERT( 0<=b->id && b->id<StreamSize, NULL ); 
+            ASSERT( b->id < StreamSize, NULL ); 
             ASSERT( !my_done[b->id], "duplicate processing of token?" ); 
             ASSERT( b->is_busy, NULL );
             my_done[b->id] = true;
             if( my_is_last ) {
-                b->id = -1;
-                b->sequence_number = -1;
+                b->id = Buffer::unused;
+                b->sequence_number = Buffer::unused;
                 __TBB_store_with_release(b->is_busy, false);
             }
         }
@@ -106,18 +118,19 @@ public:
         return b;  
     }
 };
+
 class InputFilter: public BaseFilter {
     tbb::spin_mutex input_lock;
     Buffer buffer[MaxBuffer];
-    const size_t my_number_of_tokens;
+    const tbb::internal::Token my_number_of_tokens;
 public:
-    InputFilter( tbb::filter::mode type, size_t ntokens, bool done[], bool is_last ) :
+    InputFilter( tbb::filter::mode type, tbb::internal::Token ntokens, bool done[], bool is_last ) :
         BaseFilter(type, done, is_last),
         my_number_of_tokens(ntokens)
     {}
     /*override*/Buffer* get_buffer( void* ) {
-        int next_input;
-        size_t free_buffer = 0; 
+        unsigned long next_input;
+        unsigned free_buffer = 0; 
         { // lock protected scope
             tbb::spin_mutex::scoped_lock lock(input_lock);
             if( current_token>=StreamSize )
@@ -138,9 +151,9 @@ public:
         Buffer* b = &buffer[free_buffer]; 
         ASSERT( &buffer[0] <= b, NULL ); 
         ASSERT( b <= &buffer[MaxBuffer-1], NULL ); 
-        ASSERT( b->id == -1, NULL);
+        ASSERT( b->id == Buffer::unused, NULL);
         b->id = next_input;
-        ASSERT( b->sequence_number == -1, NULL);
+        ASSERT( b->sequence_number == Buffer::unused, NULL);
         return b;
     }
 };
@@ -150,9 +163,10 @@ struct hacked_pipeline {
     tbb::filter* filter_list;
     tbb::filter* filter_end;
     tbb::empty_task* end_counter;
-    tbb::internal::Token input_tokens;
-    tbb::internal::Token token_counter;
+    tbb::atomic<tbb::internal::Token> input_tokens;
+    tbb::atomic<tbb::internal::Token> token_counter;
     bool end_of_input;
+    bool has_thread_bound_filters;
 
     virtual ~hacked_pipeline();
 };
@@ -165,6 +179,7 @@ struct hacked_ordered_buffer {
     tbb::spin_mutex array_mutex;
     tbb::internal::Token high_token;
     bool is_ordered;
+    bool is_bound;
 };
 
 //! The struct below repeats layout of tbb::filter.
@@ -174,35 +189,40 @@ struct hacked_filter {
     unsigned char my_filter_mode;
     tbb::filter* prev_filter_in_pipeline;
     tbb::pipeline* my_pipeline;
+    tbb::filter* next_segment;
 
     virtual ~hacked_filter();
 };
 
+bool do_hacking_tests = true;
 const tbb::internal::Token tokens_before_wraparound = 0xF;
 
-void TestTrivialPipeline( size_t nthread, int number_of_filters ) {
+void TestTrivialPipeline( unsigned nthread, unsigned number_of_filters ) {
     // There are 3 filter types: parallel, serial_in_order and serial_out_of_order 
     static const tbb::filter::mode filter_table[] = { tbb::filter::parallel, tbb::filter::serial_in_order, tbb::filter::serial_out_of_order}; 
-    const int number_of_filter_types = int(sizeof(filter_table)/sizeof(filter_table[0]));
-    if( Verbose ) 
-        printf("testing with %d threads and %d filters\n", int(nthread), number_of_filters );
+    const unsigned number_of_filter_types = sizeof(filter_table)/sizeof(filter_table[0]);
+    REMARK( "testing with %lu threads and %lu filters\n", nthread, number_of_filters );
     ASSERT( number_of_filters<=MaxFilters, "too many filters" );
     ASSERT( sizeof(hacked_pipeline) == sizeof(tbb::pipeline), "layout changed for tbb::pipeline?" );
     ASSERT( sizeof(hacked_filter) == sizeof(tbb::filter), "layout changed for tbb::filter?" );
-    size_t ntokens = nthread<MaxBuffer ? nthread : MaxBuffer;
+    tbb::internal::Token ntokens = nthread<MaxBuffer ? nthread : MaxBuffer;
     // Count maximum iterations number
-    int limit = 1;
-    for( int i=0; i<number_of_filters; ++i)
+    unsigned limit = 1;
+    for( unsigned i=0; i<number_of_filters; ++i)
         limit *= number_of_filter_types;
     // Iterate over possible filter sequences
-    for( int numeral=0; numeral<limit; ++numeral ) {
+    for( unsigned numeral=0; numeral<limit; ++numeral ) {
         // Build pipeline
         tbb::pipeline pipeline;
-        // A private member of pipeline is hacked there for sake of testing wrap-around immunity.
-        ((hacked_pipeline*)(void*)&pipeline)->token_counter = ~tokens_before_wraparound;
+        if( do_hacking_tests ) {
+            // A private member of pipeline is hacked there for sake of testing wrap-around immunity.
+            ((hacked_pipeline*)(void*)&pipeline)->token_counter = ~tokens_before_wraparound;
+        }
         tbb::filter* filter[MaxFilters];
-        int temp = numeral;
-        for( int i=0; i<number_of_filters; ++i, temp/=number_of_filter_types ) {
+        unsigned temp = numeral;
+        // parallelism_limit is the upper bound on the possible parallelism
+        unsigned parallelism_limit = 0;
+        for( unsigned i=0; i<number_of_filters; ++i, temp/=number_of_filter_types ) {
             tbb::filter::mode filter_type = filter_table[temp%number_of_filter_types];
             const bool is_last = i==number_of_filters-1;
             if( i==0 )
@@ -212,25 +232,45 @@ void TestTrivialPipeline( size_t nthread, int number_of_filters ) {
             pipeline.add_filter(*filter[i]);
             // The ordered buffer of serial filters is hacked as well.
             if ( filter[i]->is_serial() ) {
-                ((hacked_filter*)(void*)filter[i])->input_buffer->low_token = ~tokens_before_wraparound;
-                if ( !filter[i]->is_ordered() )
+                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;
+                }
+                parallelism_limit += 1;
+            } else {
+                parallelism_limit = nthread;
             }
         }
-        for( StreamSize=0; StreamSize<=MaxStreamSize; StreamSize += StreamSize/3+1 ) {
+        // Account for clipping of parallelism.
+        if( parallelism_limit>nthread ) 
+            parallelism_limit = nthread;
+        if( parallelism_limit>ntokens )
+            parallelism_limit = (unsigned)ntokens;
+        Harness::ConcurrencyTracker::Reset();
+        unsigned streamSizeLimit = min( MaxStreamSize, nthread * MaxStreamItemsPerThread );
+        for( StreamSize=0; StreamSize<=streamSizeLimit; ) {
             memset( Done, 0, sizeof(Done) );
-            for( int i=0; i<number_of_filters; ++i ) {
+            for( unsigned i=0; i<number_of_filters; ++i ) {
                 static_cast<BaseFilter*>(filter[i])->current_token=0;
             }
             pipeline.run( ntokens );
-            for( int i=0; i<number_of_filters; ++i )
+            ASSERT( !Harness::ConcurrencyTracker::InstantParallelism(), "filter still running?" );
+            for( unsigned i=0; i<number_of_filters; ++i )
                 ASSERT( static_cast<BaseFilter*>(filter[i])->current_token==StreamSize, NULL );
-            for( int i=0; i<MaxFilters; ++i )
-                for( int j=0; j<StreamSize; ++j ) {
+            for( unsigned i=0; i<MaxFilters; ++i )
+                for( unsigned j=0; j<StreamSize; ++j ) {
                     ASSERT( Done[i][j]==(i<number_of_filters), NULL );
                 }
+            if( StreamSize < min(nthread*8, 32u) ) {
+                ++StreamSize;
+            } else {
+                StreamSize = StreamSize*8/3;
+            }
         }
-        for( int i=number_of_filters; --i>=0; ) {
+        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;
         }
@@ -244,7 +284,7 @@ static int nthread; // knowing number of threads is necessary to call TestCPUUse
 
 void waiting_probe::probe( ) {
     if( nthread==1 ) return;
-    if( Verbose ) printf("emulating wait for input\n");
+    REMARK("emulating wait for input\n");
     // Test that threads sleep while no work.
     // The master doesn't sleep so there could be 2 active threads if a worker is waiting for input
     TestCPUUserTime(nthread, 2);
@@ -261,6 +301,11 @@ int main( int argc, char* argv[] ) {
         printf("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");
+        do_hacking_tests = false;
+    }
 
     // Test with varying number of threads.
     for( nthread=MinThread; nthread<=MaxThread; ++nthread ) {
@@ -268,8 +313,8 @@ int main( int argc, char* argv[] ) {
         tbb::task_scheduler_init init(nthread);
 
         // Test pipelines with n filters
-        for( int n=0; n<=5; ++n )
-            TestTrivialPipeline(size_t(nthread),n);
+        for( unsigned n=0; n<=MaxFilters; ++n )
+            TestTrivialPipeline(nthread,n);
 
         // Test that all workers sleep when no work
         TestCPUUserTime(nthread);
diff --git a/src/test/test_pipeline_with_tbf.cpp b/src/test/test_pipeline_with_tbf.cpp
new file mode 100644
index 0000000..ace350a
--- /dev/null
+++ b/src/test/test_pipeline_with_tbf.cpp
@@ -0,0 +1,353 @@
+/*
+    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 "tbb/pipeline.h"
+#include "tbb/spin_mutex.h"
+#include "tbb/atomic.h"
+#include "tbb/tbb_thread.h"
+#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.
+
+struct Buffer {
+    //! Indicates that the buffer is not used.
+    static const unsigned long unused = ~0ul;
+    unsigned long id;
+    //! True if Buffer is in use.
+    bool is_busy;
+    unsigned long sequence_number;
+    Buffer() : id(unused), is_busy(false), sequence_number(unused) {}
+};
+
+class waiting_probe {
+    size_t check_counter;
+public:
+    waiting_probe() : check_counter(0) {}
+    bool required( ) {
+        ++check_counter;
+        return !((check_counter+1)&size_t(0x7FFF));
+    }
+    void probe( ); // defined below
+};
+
+static const unsigned MaxStreamSize = 8000;
+static const unsigned MaxStreamItemsPerThread = 1000;
+//! Maximum number of filters allowed
+static const unsigned MaxFilters = 4;
+static unsigned StreamSize;
+static const unsigned MaxBuffer = 8;
+static bool Done[MaxFilters][MaxStreamSize];
+static waiting_probe WaitTest;
+static unsigned out_of_order_count;
+
+#include "harness_concurrency_tracker.h"
+
+template<typename T>
+class BaseFilter: public T {
+    bool* const my_done;
+    const bool my_is_last;  
+    bool my_is_running;
+public:
+    tbb::atomic<tbb::internal::Token> current_token;
+    BaseFilter( tbb::filter::mode type, bool done[], bool is_last ) : 
+        T(type),
+        my_done(done),
+        my_is_last(is_last),
+        my_is_running(false),
+        current_token()
+    {}
+    virtual Buffer* get_buffer( void* item ) {
+        current_token++;
+        return static_cast<Buffer*>(item);
+    } 
+    /*override*/void* operator()( void* item ) {
+        Harness::ConcurrencyTracker ct;
+        if( this->is_serial() )
+            ASSERT( !my_is_running, "premature entry to serial stage" );
+        my_is_running = true;
+        Buffer* b = get_buffer(item);
+        if( b ) {
+            if( this->is_ordered() ) {
+                if( b->sequence_number == Buffer::unused ) 
+                    b->sequence_number = current_token-1;
+                else
+                    ASSERT( b->sequence_number==current_token-1, "item arrived out of order" );
+            } else if( this->is_serial() ) {
+                if( b->sequence_number != current_token-1 && b->sequence_number != Buffer::unused )
+                    out_of_order_count++;
+            }
+            ASSERT( b->id < StreamSize, NULL ); 
+            ASSERT( !my_done[b->id], "duplicate processing of token?" ); 
+            ASSERT( b->is_busy, NULL );
+            my_done[b->id] = true;
+            if( my_is_last ) {
+                b->id = Buffer::unused;
+                b->sequence_number = Buffer::unused;
+                __TBB_store_with_release(b->is_busy, false);
+            }
+        }
+        my_is_running = false;
+        return b;  
+    }
+};
+
+template<typename T>
+class InputFilter: public BaseFilter<T> {
+    tbb::spin_mutex input_lock;
+    Buffer buffer[MaxBuffer];
+    const tbb::internal::Token my_number_of_tokens;
+public:
+    InputFilter( tbb::filter::mode type, tbb::internal::Token ntokens, bool done[], bool is_last ) :
+        BaseFilter<T>(type, done, is_last),
+        my_number_of_tokens(ntokens)
+    {}
+    /*override*/Buffer* get_buffer( void* ) {
+        unsigned long next_input;
+        unsigned free_buffer = 0; 
+        { // lock protected scope
+            tbb::atomic<tbb::internal::Token>& current_token = this->current_token;
+            tbb::spin_mutex::scoped_lock lock(input_lock);
+            if( current_token>=StreamSize )
+                return NULL;
+            next_input = current_token++; 
+            // once in a while, emulate waiting for input; this only makes sense for serial input
+            if( this->is_serial() && WaitTest.required() )
+                WaitTest.probe( );
+            while( free_buffer<MaxBuffer )
+                if( __TBB_load_with_acquire(buffer[free_buffer].is_busy) )
+                    ++free_buffer;
+                else {
+                    buffer[free_buffer].is_busy = true;
+                    break;
+                }
+        }
+        ASSERT( free_buffer<my_number_of_tokens, "premature reuse of buffer" );
+        Buffer* b = &buffer[free_buffer]; 
+        ASSERT( &buffer[0] <= b, NULL ); 
+        ASSERT( b <= &buffer[MaxBuffer-1], NULL ); 
+        ASSERT( b->id == Buffer::unused, NULL);
+        b->id = next_input;
+        ASSERT( b->sequence_number == Buffer::unused, NULL);
+        return b;
+    }
+};
+
+class process_loop {
+public:
+    void operator()( tbb::thread_bound_filter* tbf ) {
+        tbb::thread_bound_filter::result_type flag;
+        do
+            flag = tbf->process_item();
+        while( flag != tbb::thread_bound_filter::end_of_stream );
+    }
+};
+
+//! The struct below repeats layout of tbb::pipeline.
+struct hacked_pipeline {
+    tbb::filter* filter_list;
+    tbb::filter* filter_end;
+    tbb::empty_task* end_counter;
+    tbb::atomic<tbb::internal::Token> input_tokens;
+    tbb::atomic<tbb::internal::Token> global_token_counter;
+    bool end_of_input;
+    bool has_thread_bound_filters;
+
+    virtual ~hacked_pipeline();
+};
+
+//! The struct below repeats layout of tbb::internal::ordered_buffer.
+struct hacked_ordered_buffer {
+    void* array; // This should be changed to task_info* if ever used
+    tbb::internal::Token array_size;
+    tbb::internal::Token low_token;
+    tbb::spin_mutex array_mutex;
+    tbb::internal::Token high_token;
+    bool is_ordered;
+    bool is_bound;
+};
+
+//! The struct below repeats layout of tbb::filter.
+struct hacked_filter {
+    tbb::filter* next_filter_in_pipeline;
+    hacked_ordered_buffer* input_buffer;
+    unsigned char my_filter_mode;
+    tbb::filter* prev_filter_in_pipeline;
+    tbb::pipeline* my_pipeline;
+    tbb::filter* next_segment;
+
+    virtual ~hacked_filter();
+};
+
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    // Workaround for overzealous compiler warnings
+    // Suppress compiler warning about constant conditional expression
+    #pragma warning (disable: 4127)
+#endif
+
+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}; 
+    // There are 2 thread-bound filter types: serial_in_order and serial_out_of_order 
+    static const tbb::filter::mode tb_filters_table[] = { tbb::filter::serial_in_order, tbb::filter::serial_out_of_order }; 
+    
+    const unsigned number_of_non_tb_filter_types = sizeof(non_tb_filters_table)/sizeof(non_tb_filters_table[0]);
+    const unsigned number_of_tb_filter_types = sizeof(tb_filters_table)/sizeof(tb_filters_table[0]);
+    const unsigned number_of_filter_types = number_of_non_tb_filter_types + number_of_tb_filter_types;
+
+    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);
+            }
+            pipeline.add_filter(*filter[i]);
+            if ( filter[i]->is_serial() ) {
+                parallelism_limit += 1;
+            } else {
+                parallelism_limit = nthread;
+            }
+        }
+        // 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 );
+            }
+        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();
+    }
+}
+
+#include "harness_cpu.h"
+
+static int nthread; // knowing number of threads is necessary to call TestCPUUserTime
+
+void waiting_probe::probe( ) {
+    if( nthread==1 ) return;
+    REMARK("emulating wait for input\n");
+    // Test that threads sleep while no work.
+    // The master doesn't sleep so there could be 2 active threads if a worker is waiting for input
+    TestCPUUserTime(nthread, 2);
+}
+
+#include "tbb/task_scheduler_init.h"
+
+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");
+        exit(1);
+    }
+
+    // Test with varying number of threads.
+    for( nthread=MinThread; nthread<=MaxThread; ++nthread ) {
+        // Initialize TBB task scheduler
+        tbb::task_scheduler_init init(nthread);
+
+        // Test pipelines with n filters
+        for( unsigned n=MaxFilters; n<=MaxFilters; ++n ) {
+            // 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);
+        }
+
+        // Test that all workers sleep when no work
+        TestCPUUserTime(nthread);
+    }
+    if( !out_of_order_count )
+        printf("Warning: out of order serial filter received tokens in order\n");
+    printf("done\n");
+    return 0;
+}
diff --git a/src/test/test_task.cpp b/src/test/test_task.cpp
index 7639030..082ba0f 100644
--- a/src/test/test_task.cpp
+++ b/src/test/test_task.cpp
@@ -28,6 +28,7 @@
 
 #include "tbb/task.h"
 #include "tbb/atomic.h"
+#include "tbb/tbb_thread.h"
 #include "harness_assert.h"
 #include <cstdlib>
 
@@ -35,6 +36,55 @@
 // 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;
+
+    volatile uintptr_t my_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)
+    {}
+
+    /*override*/
+    tbb::task* execute() {
+        if( !my_parent || (my_depth > 0 &&  my_parent->my_go_ahead) ) {
+            if ( my_parent ) {
+                // We are stolen, let our parent to start waiting for us
+                my_parent->my_go_ahead = false;
+            }
+            tbb::task &t = *new( tbb::task::allocate_child() ) this_type(this, my_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;
+                __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;
+            wait_for_all();
+        }
+        return NULL;
+    }
+}; // UnboundedlyRecursiveOnUnboundedStealingTask
+
+#endif /* __TBB_TASK_DEQUE */
+
+
 tbb::atomic<int> Count;
 
 class RecursiveTask: public tbb::task {
@@ -81,6 +131,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 );
+    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 ) 
@@ -410,6 +470,153 @@ void TestLeftRecursion( int p ) {
 }
 
 //------------------------------------------------------------------------
+// Test for computing with DAG of tasks.
+//------------------------------------------------------------------------
+
+class DagTask: public tbb::task {
+    typedef unsigned long long number_t;
+    const int i, j;
+    number_t sum_from_left, sum_from_above;
+    void check_sum( number_t sum ) {
+        number_t expected_sum = 1;
+        for( int k=i+1; k<=i+j; ++k ) 
+            expected_sum *= k;
+        for( int k=1; k<=j; ++k ) 
+            expected_sum /= k;
+        ASSERT(sum==expected_sum, NULL);
+    }
+public:
+    DagTask *successor_to_below, *successor_to_right;
+    DagTask( int i_, int j_ ) : i(i_), j(j_), sum_from_left(0), sum_from_above(0) {}
+    task* execute() {
+        __TBB_ASSERT( ref_count()==0, NULL );
+        number_t sum = i==0 && j==0 ? 1 : sum_from_left+sum_from_above;
+        check_sum(sum);
+        ++execution_count;
+        if( DagTask* t = successor_to_right ) {
+            t->sum_from_left = sum;
+            if( t->decrement_ref_count()==0 )
+                // Test using spawn to evaluate DAG
+                spawn( *t );
+        }
+        if( DagTask* t = successor_to_below ) {
+            t->sum_from_above = sum;
+            if( t->decrement_ref_count()==0 ) 
+                // Test using bypass to evaluate DAG
+                return t;
+        } 
+        return NULL;  
+    }
+    ~DagTask() {++destruction_count;}
+    static tbb::atomic<int> execution_count;
+    static tbb::atomic<int> destruction_count;
+};
+
+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);
+    tbb::task_scheduler_init init(p);
+    DagTask::execution_count=0;
+    DagTask::destruction_count=0;
+    const int n = 10;
+    DagTask* a[n][n];
+    for( int i=0; i<n; ++i ) 
+        for( int j=0; j<n; ++j )
+            a[i][j] = new( tbb::task::allocate_root() ) DagTask(i,j);
+    for( int i=0; i<n; ++i ) 
+        for( int j=0; j<n; ++j ) {
+            a[i][j]->successor_to_below = i+1<n ? a[i+1][j] : NULL;
+            a[i][j]->successor_to_right = j+1<n ? a[i][j+1] : NULL;
+            a[i][j]->set_ref_count((i>0)+(j>0));
+        }
+    a[n-1][n-1]->increment_ref_count();
+    a[n-1][n-1]->spawn_and_wait_for_all(*a[0][0]);
+    ASSERT( DagTask::execution_count == n*n - 1, NULL );
+    a[n-1][n-1]->destroy(*a[n-1][n-1]);
+    ASSERT( DagTask::destruction_count > n*n - p, NULL );
+    while ( DagTask::destruction_count != n*n )
+        __TBB_Yield();
+}
+
+#include "harness_barrier.h"
+
+class RelaxedOwnershipTask: public tbb::task {
+    tbb::task &m_taskToSpawn,
+              &m_taskToDestroy,
+              &m_taskToExecute;
+    static Harness::SpinBarrier m_barrier;
+
+    tbb::task* execute () {
+        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 );
+        r.spawn_and_wait_for_all( m_taskToExecute );
+        parent()->destroy( r );
+        return NULL;
+    }
+public:
+    RelaxedOwnershipTask ( tbb::task& toSpawn, tbb::task& toDestroy, tbb::task& toExecute )
+        : m_taskToSpawn(toSpawn)
+        , m_taskToDestroy(toDestroy)
+        , m_taskToExecute(toExecute)
+    {}
+    static void SetBarrier ( int numThreads ) { m_barrier.initialize( numThreads ); }
+};
+
+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);
+    tbb::task_scheduler_init init(p);
+    RelaxedOwnershipTask::SetBarrier(p);
+    tbb::task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
+    tbb::task_list tl;
+    for ( int i = 0; i < p; ++i ) {
+        tbb::task &tS = *new( r.allocate_child() ) tbb::empty_task,
+                  &tD = *new( r.allocate_child() ) tbb::empty_task,
+                  &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.spawn_and_wait_for_all( tl );
+    r.destroy( r );
+}
+
+//------------------------------------------------------------------------
+// Test for running TBB scheduler on user-created thread.
+//------------------------------------------------------------------------
+
+void RunSchedulerInstanceOnUserThread( int n_child ) {
+    tbb::task* e = new( tbb::task::allocate_root() ) tbb::empty_task;
+    e->set_ref_count(1+n_child);
+    for( int i=0; i<n_child; ++i )
+        e->spawn( *new(e->allocate_child()) tbb::empty_task );
+    e->wait_for_all();
+    e->destroy(*e);
+}
+
+void TestUserThread( int p ) {
+    tbb::task_scheduler_init init(p);
+    // Try with both 0 and 1 children.  Only the latter scenario permits stealing.
+    for( int n_child=0; n_child<2; ++n_child ) {
+        tbb::tbb_thread t( RunSchedulerInstanceOnUserThread, n_child );
+        t.join();
+    }
+}
+
+//------------------------------------------------------------------------
 int main(int argc, char* argv[]) {
     MinThread = 1;
     ParseCommandLine( argc, argv );
@@ -422,7 +629,15 @@ int main(int argc, char* argv[]) {
         TestSpawnRootList( p );
         TestSafeContinuation( p );
         TestLeftRecursion( p );
+        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");
     return 0;
diff --git a/src/test/test_task_assertions.cpp b/src/test/test_task_assertions.cpp
index 34af7a7..e81d637 100644
--- a/src/test/test_task_assertions.cpp
+++ b/src/test/test_task_assertions.cpp
@@ -50,29 +50,34 @@ struct AbuseOneTask {
     void operator()( int ) const {
         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
-        tbb::task_list 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 );
@@ -87,6 +92,7 @@ struct AbuseOneTask {
         // 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;
     }
diff --git a/src/test/test_ScalableAllocator_STL.cpp b/src/test/test_task_auto_init.cpp
similarity index 81%
copy from src/test/test_ScalableAllocator_STL.cpp
copy to src/test/test_task_auto_init.cpp
index 4b1397f..9a0d829 100644
--- a/src/test/test_ScalableAllocator_STL.cpp
+++ b/src/test/test_task_auto_init.cpp
@@ -26,16 +26,15 @@
     the GNU General Public License.
 */
 
-// Test whether scalable_allocator works with some of the host's STL containers.
-
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "tbb/scalable_allocator.h"
-
-// The actual body of the test is there:
-#include "test_allocator_STL.h"
+#include "tbb/task.h"
+#include <cstdio>
 
+//! Test driver
 int main() {
-    TestAllocatorWithSTL<tbb::scalable_allocator>();
-    printf("done\n");
+    // 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);
+    tbb::task::spawn_root_and_wait(*root);
+    std::printf("done\n");
     return 0;
 }
diff --git a/src/test/test_task_group.cpp b/src/test/test_task_group.cpp
new file mode 100644
index 0000000..6981767
--- /dev/null
+++ b/src/test/test_task_group.cpp
@@ -0,0 +1,821 @@
+/*
+    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.
+*/
+
+//! 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)
+
+#if !TBBTEST_USE_TBB
+    #if _MSC_VER < 1600
+        #ifdef TBBTEST_USE_TBB
+            #undef TBBTEST_USE_TBB
+        #endif
+        #define TBBTEST_USE_TBB 1
+    #endif
+#endif
+
+#if TBBTEST_USE_TBB
+
+    #include "tbb/compat/ppl.h"
+    #include "tbb/task_scheduler_init.h"
+
+    #if _MSC_VER
+        typedef tbb::internal::uint32_t uint_t;
+    #else
+        typedef uint32_t uint_t;
+    #endif
+
+#else /* !TBBTEST_USE_TBB */
+
+    #pragma warning(disable: 4100 4180)
+
+    #include <ppl.h>
+
+    typedef unsigned int uint_t;
+
+    #define __TBB_SILENT_CANCELLATION_BROKEN  (_MSC_VER == 1600)
+
+#endif /* !TBBTEST_USE_TBB */
+
+
+#include "tbb/atomic.h"
+#include "harness_concurrency_tracker.h"
+#include "harness_trace.h"
+
+unsigned g_MaxConcurrency = 0;
+
+typedef tbb::atomic<uint_t> atomic_t;
+typedef Concurrency::task_handle<void(*)()> handle_type;
+
+//------------------------------------------------------------------------
+// Tests for the thread safety of the task_group manipulations
+//------------------------------------------------------------------------
+
+#include "harness_barrier.h"
+
+enum SharingMode {
+    VagabondGroup = 1,
+    ParallelWait = 2
+};
+
+class  SharedGroupBodyImpl : NoCopy, Harness::NoAfterlife {
+    static const uint_t c_numTasks0 = 4096,
+                        c_numTasks1 = 1024;
+
+    const uint_t m_numThreads;
+    const uint_t m_sharingMode;
+
+    Concurrency::task_group *m_taskGroup;
+    atomic_t m_tasksSpawned,
+             m_threadsReady;
+    Harness::SpinBarrier m_barrier;
+
+    static atomic_t s_tasksExecuted;
+
+    struct TaskFunctor {
+        SharedGroupBodyImpl *m_pOwner;
+        void operator () () {
+            if ( m_pOwner->m_sharingMode & ParallelWait ) {
+                while ( Harness::ConcurrencyTracker::PeakParallelism() < m_pOwner->m_numThreads )
+                    __TBB_Yield();
+            }
+            ++s_tasksExecuted;
+        }
+    };
+
+    TaskFunctor m_taskFunctor;
+
+    void Spawn ( uint_t numTasks ) {
+        for ( uint_t i = 0; i < numTasks; ++i ) {
+            ++m_tasksSpawned;
+            Harness::ConcurrencyTracker ct;
+            m_taskGroup->run( m_taskFunctor );
+        }
+        ++m_threadsReady;
+    }
+
+    void DeleteTaskGroup () {
+        delete m_taskGroup;
+        m_taskGroup = NULL;
+    }
+
+    void Wait () {
+        while ( m_threadsReady != m_numThreads )
+            __TBB_Yield();
+        const uint_t numSpawned = c_numTasks0 + c_numTasks1 * (m_numThreads - 1);
+        ASSERT ( m_tasksSpawned == numSpawned, "Wrong number of spawned tasks. The test is broken" );
+        REMARK("Max spawning parallelism is %u out of %u", Harness::ConcurrencyTracker::PeakParallelism(), g_MaxConcurrency);
+        if ( m_sharingMode & ParallelWait ) {
+            m_barrier.wait( &Harness::ConcurrencyTracker::Reset );
+            {
+                Harness::ConcurrencyTracker ct;
+                m_taskGroup->wait();
+            }
+            ASSERT ( Harness::ConcurrencyTracker::PeakParallelism() > 1, "No parallel waiting detected" );
+            m_barrier.wait();
+        }
+        else
+            m_taskGroup->wait();
+        ASSERT ( m_tasksSpawned == numSpawned, "No tasks should be spawned after wait starts. The test is broken" );
+        ASSERT ( s_tasksExecuted == numSpawned, "Not all spawned tasks were executed" );
+    }
+
+public:
+    SharedGroupBodyImpl ( uint_t numThreads, uint_t sharingMode = 0 )
+        : m_numThreads(numThreads)
+        , m_sharingMode(sharingMode)
+        , m_taskGroup(NULL)
+        , m_barrier(numThreads)
+    {
+        ASSERT ( m_numThreads > 1, "SharedGroupBody tests require concurrency" );
+        ASSERT ( !(m_sharingMode & VagabondGroup) || m_numThreads == 2, "In vagabond mode SharedGroupBody must be used with 2 threads only" );
+        Harness::ConcurrencyTracker::Reset();
+        s_tasksExecuted = 0;
+        m_tasksSpawned = 0;
+        m_threadsReady = 0;
+        m_taskFunctor.m_pOwner = this;
+    }
+
+    void Run ( uint_t idx ) {
+#if TBBTEST_USE_TBB
+        tbb::task_scheduler_init init;
+#endif
+        AssertLive();
+        if ( idx == 0 ) {
+            ASSERT ( !m_taskGroup && !m_tasksSpawned, "SharedGroupBody must be reset before reuse");
+            m_taskGroup = new Concurrency::task_group;
+            Spawn( c_numTasks0 );
+            Wait();
+            if ( m_sharingMode & VagabondGroup )
+                m_barrier.wait();
+            else
+                DeleteTaskGroup();
+        }
+        else {
+            while ( m_tasksSpawned == 0 )
+                __TBB_Yield();
+            ASSERT ( m_taskGroup, "Task group is not initialized");
+            Spawn (c_numTasks1);
+            if ( m_sharingMode & ParallelWait )
+                Wait();
+            if ( m_sharingMode & VagabondGroup ) {
+                ASSERT ( idx == 1, "In vagabond mode SharedGroupBody must be used with 2 threads only" );
+                m_barrier.wait();
+                DeleteTaskGroup();
+            }
+        }
+        AssertLive();
+    }
+};
+
+atomic_t SharedGroupBodyImpl::s_tasksExecuted;
+
+class  SharedGroupBody : NoAssign, Harness::NoAfterlife {
+    bool m_bOwner;
+    mutable SharedGroupBodyImpl *m_pImpl;
+public:
+    SharedGroupBody ( uint_t numThreads, uint_t sharingMode = 0 )
+        : m_bOwner(true)
+        , m_pImpl( new SharedGroupBodyImpl(numThreads, sharingMode) )
+    {}
+    SharedGroupBody ( const SharedGroupBody& src )
+        : m_bOwner(false)
+        , m_pImpl(src.m_pImpl)
+    {}
+    ~SharedGroupBody () {
+        if ( m_bOwner )
+            delete m_pImpl;
+    }
+    void operator() ( uint_t idx ) const { m_pImpl->Run(idx); }
+};
+
+void TestParallelSpawn () {
+    NativeParallelFor( g_MaxConcurrency, SharedGroupBody(g_MaxConcurrency) );
+}
+
+void TestParallelWait () {
+    NativeParallelFor( g_MaxConcurrency, SharedGroupBody(g_MaxConcurrency, ParallelWait) );
+}
+
+// Tests non-stack-bound task group (the group that is allocated by one thread and destroyed by the other)
+void TestVagabondGroup () {
+    NativeParallelFor( 2, SharedGroupBody(2, VagabondGroup) );
+}
+
+//------------------------------------------------------------------------
+// Common requisites of the Fibonacci tests
+//------------------------------------------------------------------------
+
+const uint_t N = 20;
+const uint_t F = 6765;
+
+atomic_t g_Sum;
+
+#define FIB_TEST_PROLOGUE() \
+    const unsigned numRepeats = g_MaxConcurrency * (TBB_USE_DEBUG ? 4 : 16);    \
+    Harness::ConcurrencyTracker::Reset()
+
+#define FIB_TEST_EPILOGUE(sum) \
+    ASSERT( sum == numRepeats * F, NULL ); \
+    REMARK("Realized parallelism in Fib test is %u out of %u", Harness::ConcurrencyTracker::PeakParallelism(), g_MaxConcurrency)
+
+//------------------------------------------------------------------------
+// Test for a complex tree of task groups
+//
+// The test executes a tree of task groups of the same sort with asymmetric 
+// descendant nodes distribution at each level at each level. 
+//
+// The chores are specified as functor objects. Each task group contains only one chore.
+//------------------------------------------------------------------------
+
+template<uint_t Func(uint_t)>
+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() () {
+        *m_pRes = Func(m_Num);
+    } 
+};
+
+uint_t Fib_SpawnRightChildOnly ( uint_t n ) {
+    Harness::ConcurrencyTracker ct;
+    if( n<2 ) {
+        return n;
+    } else {
+        uint_t y = ~0u;
+        Concurrency::task_group tg;
+        tg.run( FibTask<Fib_SpawnRightChildOnly>(&y, n-1) );
+        uint_t x = Fib_SpawnRightChildOnly(n-2);
+        tg.wait();
+        return y+x;
+    }
+}
+
+void TestFib1 () {
+    FIB_TEST_PROLOGUE();
+    uint_t sum = 0; 
+    for( unsigned i = 0; i < numRepeats; ++i )
+        sum += Fib_SpawnRightChildOnly(N);
+    FIB_TEST_EPILOGUE(sum);
+}
+
+
+//------------------------------------------------------------------------
+// Test for a mixed tree of task groups.
+//
+// The test executes a tree with multiple task of one sort at the first level, 
+// each of which originates in its turn a binary tree of descendant task groups.
+//
+// The chores are specified both as functor objects and as function pointers
+//------------------------------------------------------------------------
+
+uint_t Fib_SpawnBothChildren( uint_t n ) {
+    Harness::ConcurrencyTracker ct;
+    if( n<2 ) {
+        return n;
+    } else {
+        uint_t  y = ~0u,
+                x = ~0u;
+        Concurrency::task_group tg;
+        tg.run( FibTask<Fib_SpawnBothChildren>(&x, n-2) );
+        tg.run( FibTask<Fib_SpawnBothChildren>(&y, n-1) );
+        tg.wait();
+        return y + x;
+    }
+}
+
+void RunFib2 () {
+    g_Sum += Fib_SpawnBothChildren(N);
+}
+
+void TestFib2 () {
+    FIB_TEST_PROLOGUE();
+    g_Sum = 0; 
+    Concurrency::task_group rg;
+    for( unsigned i = 0; i < numRepeats; ++i )
+        rg.run( &RunFib2 );
+    rg.wait();
+    FIB_TEST_EPILOGUE(g_Sum);
+}
+
+
+//------------------------------------------------------------------------
+// Test for a complex tree of task groups
+// The chores are specified as task handles for recursive functor objects.
+//------------------------------------------------------------------------
+
+class FibTask_SpawnRightChildOnly : NoAssign, Harness::NoAfterlife {
+    uint_t* m_pRes;
+    uint_t m_Num;
+
+public:
+    FibTask_SpawnRightChildOnly( uint_t* y, uint_t n ) : m_pRes(y), m_Num(n) {}
+    void operator() () {
+        Harness::ConcurrencyTracker ct;
+        AssertLive();
+        if( m_Num < 2 ) {
+            *m_pRes = m_Num;
+        } else {
+            uint_t y = ~0u;
+            Concurrency::task_group tg;
+            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;
+        }
+    }
+};
+
+uint_t RunFib3 ( uint_t n ) {
+    uint_t res = ~0u;
+    FibTask_SpawnRightChildOnly func(&res, n);
+    func();
+    return res;
+}
+
+void TestFib3 () {
+    FIB_TEST_PROLOGUE();
+    uint_t sum = 0; 
+    for( unsigned i = 0; i < numRepeats; ++i )
+        sum += RunFib3(N);
+    FIB_TEST_EPILOGUE(sum);
+}
+
+//------------------------------------------------------------------------
+// Test for a mixed tree of task groups.
+// The chores are specified as task handles for both functor objects and function pointers
+//------------------------------------------------------------------------
+
+template<class task_group_type>
+class FibTask_SpawnBothChildren : NoAssign, Harness::NoAfterlife {
+    uint_t* m_pRes;
+    uint_t m_Num;
+public:
+    FibTask_SpawnBothChildren( uint_t* y, uint_t n ) : m_pRes(y), m_Num(n) {}
+    void operator() () {
+        Harness::ConcurrencyTracker ct;
+        AssertLive();
+        if( m_Num < 2 ) {
+            *m_pRes = m_Num;
+        } else {
+            uint_t  x = ~0u, // initialized only to suppress warning 
+                    y = ~0u;
+            task_group_type tg;
+            Concurrency::task_handle<FibTask_SpawnBothChildren> h1 = FibTask_SpawnBothChildren(&y, m_Num-1),
+                                                                h2 = FibTask_SpawnBothChildren(&x, m_Num-2);
+            tg.run( h1 );
+            tg.run( h2 );
+            tg.wait();
+            *m_pRes = x + y;
+        }
+    }
+};
+
+template<class task_group_type>
+void RunFib4 () {
+    uint_t res = ~0u;
+    FibTask_SpawnBothChildren<task_group_type> func(&res, N);
+    func();
+    g_Sum += res;
+}
+
+template<class task_group_type>
+void TestFib4 () {
+    FIB_TEST_PROLOGUE();
+    g_Sum = 0; 
+    task_group_type rg;
+    const unsigned hSize = sizeof(handle_type);
+    char *handles = new char [numRepeats * hSize];
+    handle_type *h = NULL;
+    for( unsigned i = 0; ; ++i ) {
+        h = (handle_type*)(handles + i * hSize);
+#if __TBB_FUNC_PTR_AS_TEMPL_PARAM_BROKEN
+        new ( h ) handle_type((void(*)())RunFib4<task_group_type>);
+#else
+        new ( h ) handle_type(RunFib4<task_group_type>);
+#endif
+        if ( i == numRepeats - 1 )
+            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
+        ((handle_type*)(handles + i * hSize))->Concurrency::task_handle<void(*)()>::~task_handle();
+#else
+        ((handle_type*)(handles + i * hSize))->~handle_type();
+#endif
+    delete handles;
+    FIB_TEST_EPILOGUE(g_Sum);
+}
+
+#if __TBB_LAMBDAS_PRESENT && !__TBB_LAMBDA_AS_TEMPL_PARAM_BROKEN
+//------------------------------------------------------------------------
+// Test for a mixed tree of task groups.
+// The chores are specified as lambdas
+//------------------------------------------------------------------------
+
+void TestFibWithLambdas () {
+    REMARK ("Lambdas test");
+    FIB_TEST_PROLOGUE();
+    atomic_t sum;
+    sum = 0;
+    Concurrency::task_group rg;
+    for( unsigned i = 0; i < numRepeats; ++i )
+        rg.run( [&](){sum += Fib_SpawnBothChildren(N);} );
+    rg.wait();
+    FIB_TEST_EPILOGUE(sum);
+}
+#endif /* __TBB_LAMBDAS_PRESENT */
+
+
+//------------------------------------------------------------------------
+// Tests for exception handling and cancellation behavior.
+//------------------------------------------------------------------------
+
+class test_exception : public std::exception
+{
+    const char* m_strDescription;
+public:
+    test_exception ( const char* descr ) : m_strDescription(descr) {}
+
+    test_exception& operator= ( const test_exception& src ) {
+        m_strDescription = src.m_strDescription;
+        return *this;
+    }
+
+    const char* what() const throw() { return m_strDescription; }
+};
+
+#if TBB_USE_CAPTURED_EXCEPTION
+    #include "tbb/tbb_exception.h"
+    typedef tbb::captured_exception TestException;
+#else
+    typedef test_exception TestException;
+#endif
+
+#include <string.h>
+
+#define NUM_CHORES      512
+#define NUM_GROUPS      64
+#define SKIP_CHORES     (NUM_CHORES/4)
+#define SKIP_GROUPS     (NUM_GROUPS/4)
+#define EXCEPTION_DESCR1 "Test exception 1"
+#define EXCEPTION_DESCR2 "Test exception 2"
+
+atomic_t g_ExceptionCount;
+atomic_t g_TaskCount;
+unsigned g_ExecutedAtCancellation;
+bool g_Rethrow;
+bool g_Throw;
+#if __TBB_SILENT_CANCELLATION_BROKEN
+    volatile bool g_CancellationPropagationInProgress;
+    #define CATCH_ANY()                                     \
+        catch ( ... ) {                                     \
+            if ( g_CancellationPropagationInProgress ) {    \
+                if ( g_Throw ) {                            \
+                    exceptionCaught = true;                 \
+                    ++g_ExceptionCount;                     \
+                }                                           \
+            } else                                          \
+                ASSERT( false, "Unknown exception" );       \
+        }
+#else
+    #define CATCH_ANY()  catch ( ... ) { ASSERT( false, "Unknown exception" ); }
+#endif
+
+inline
+void ResetGlobals ( bool bThrow, bool bRethrow ) {
+    g_Throw = bThrow;
+    g_Rethrow = bRethrow;
+#if __TBB_SILENT_CANCELLATION_BROKEN
+    g_CancellationPropagationInProgress = false;
+#endif
+    g_ExceptionCount = 0;
+    g_TaskCount = 0;
+    Harness::ConcurrencyTracker::Reset();
+}
+
+class ThrowingTask : NoAssign, Harness::NoAfterlife {
+    atomic_t &m_TaskCount;
+public:
+    ThrowingTask( atomic_t& counter ) : m_TaskCount(counter) {}
+    void operator() () {
+        Harness::ConcurrencyTracker ct;
+        AssertLive();
+        if ( g_Throw ) {
+            if ( ++m_TaskCount == SKIP_CHORES ) 
+                throw test_exception(EXCEPTION_DESCR1);
+            __TBB_Yield();
+        }
+        else {
+            ++g_TaskCount;
+            while( !Concurrency::is_current_task_group_canceling() )
+                __TBB_Yield();
+        }
+    }
+};
+
+void LaunchChildren () {
+    atomic_t count;
+    count = 0;
+    Concurrency::task_group g;
+    bool exceptionCaught = false;
+    for( unsigned i = 0; i < NUM_CHORES; ++i )
+        g.run( ThrowingTask(count) );
+    Concurrency::task_group_status status = Concurrency::not_complete;
+    try {
+        status = g.wait();
+    } catch ( TestException& e ) {
+        ASSERT( e.what(), "Empty what() string" );
+        ASSERT( strcmp(e.what(), EXCEPTION_DESCR1) == 0, "Unknown exception" );
+        exceptionCaught = true;
+        ++g_ExceptionCount;
+    } CATCH_ANY();
+    ASSERT( !g_Throw || exceptionCaught || status == Concurrency::canceled, "No exception in the child task group" );
+    if ( g_Rethrow && g_ExceptionCount > SKIP_GROUPS ) {
+#if __TBB_SILENT_CANCELLATION_BROKEN
+        g_CancellationPropagationInProgress = true;
+#endif
+        throw test_exception(EXCEPTION_DESCR2);
+    }
+}
+
+void TestEh1 () {
+    ResetGlobals( true, false );
+    Concurrency::task_group rg;
+    for( unsigned i = 0; i < NUM_GROUPS; ++i )
+        // TBB version does not require taking function address 
+        rg.run( &LaunchChildren );
+    try {
+        rg.wait();
+    } catch ( ... ) {
+        ASSERT( false, "Unexpected exception" );
+    }
+    ASSERT( g_ExceptionCount <= NUM_GROUPS, "Too many exceptions from the child groups. The test is broken" );
+    ASSERT( g_ExceptionCount == NUM_GROUPS, "Not all child groups threw the exception" );
+}
+
+void TestEh2 () {
+    ResetGlobals( true, true );
+    Concurrency::task_group rg;
+    bool exceptionCaught = false;
+    for( unsigned i = 0; i < NUM_GROUPS; ++i )
+        // TBB version does not require taking function address 
+        rg.run( &LaunchChildren );
+    try {
+        rg.wait();
+    } catch ( TestException& e ) {
+        ASSERT( e.what(), "Empty what() string" );
+        ASSERT( strcmp(e.what(), EXCEPTION_DESCR2) == 0, "Unknown exception" );
+        ASSERT ( !rg.is_canceling(), "wait() has not reset cancellation state" );
+        exceptionCaught = true;
+    } CATCH_ANY();
+    ASSERT( exceptionCaught, "No exception thrown from the root task group" );
+    ASSERT( g_ExceptionCount >= SKIP_GROUPS, "Too few exceptions from the child groups. The test is broken" );
+    ASSERT( g_ExceptionCount <= NUM_GROUPS - SKIP_GROUPS, "Too many exceptions from the child groups. The test is broken" );
+    ASSERT( g_ExceptionCount < NUM_GROUPS - SKIP_GROUPS, "None of the child groups was cancelled" );
+}
+
+//------------------------------------------------------------------------
+// Tests for manual cancellation of the task_group hierarchy
+//------------------------------------------------------------------------
+
+void TestCancellation1 () {
+    ResetGlobals( false, false );
+    Concurrency::task_group rg;
+    for( unsigned i = 0; i < NUM_GROUPS; ++i )
+        // TBB version does not require taking function address 
+        rg.run( &LaunchChildren );
+    ASSERT ( !Concurrency::is_current_task_group_canceling(), "Unexpected cancellation" );
+    ASSERT ( !rg.is_canceling(), "Unexpected cancellation" );
+#if __TBB_SILENT_CANCELLATION_BROKEN
+    g_CancellationPropagationInProgress = true;
+#endif
+    while ( g_MaxConcurrency > 1 && g_TaskCount == 0 )
+        __TBB_Yield();
+    rg.cancel();
+    g_ExecutedAtCancellation = g_TaskCount;
+    ASSERT ( rg.is_canceling(), "No cancellation reported" );
+    rg.wait();
+    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" );
+}
+
+//------------------------------------------------------------------------
+// Tests for manual cancellation of the structured_task_group hierarchy
+//------------------------------------------------------------------------
+
+void StructuredLaunchChildren () {
+    atomic_t count;
+    count = 0;
+    Concurrency::structured_task_group g;
+    bool exceptionCaught = false;
+    typedef Concurrency::task_handle<ThrowingTask> handle_type;
+    static const unsigned hSize = sizeof(handle_type);
+    char handles[NUM_CHORES * hSize];
+    for( unsigned i = 0; i < NUM_CHORES; ++i ) {
+        handle_type *h = (handle_type*)(handles + i * hSize);
+        new ( h ) handle_type( ThrowingTask(count) );
+        g.run( *h );
+    }
+    try {
+        g.wait();
+    } catch ( TestException& e ) {
+        ASSERT( e.what(), "Empty what() string" );
+        ASSERT( strcmp(e.what(), EXCEPTION_DESCR1) == 0, "Unknown exception" );
+#if __TBB_SILENT_CANCELLATION_BROKEN
+        ASSERT ( !g.is_canceling() || g_CancellationPropagationInProgress, "wait() has not reset cancellation state" );
+#else
+        ASSERT ( !g.is_canceling(), "wait() has not reset cancellation state" );
+#endif
+        exceptionCaught = true;
+        ++g_ExceptionCount;
+    } CATCH_ANY();
+    ASSERT( !g_Throw || exceptionCaught, "No exception in the child task group" );
+    for( unsigned i = 0; i < NUM_CHORES; ++i )
+        ((handle_type*)(handles + i * hSize))->~handle_type();
+    if ( g_Rethrow && g_ExceptionCount > SKIP_GROUPS ) {
+#if __TBB_SILENT_CANCELLATION_BROKEN
+        g_CancellationPropagationInProgress = true;
+#endif
+        throw test_exception(EXCEPTION_DESCR2);
+    }
+}
+
+class StructuredCancellationTestDriver {
+    static const unsigned hSize = sizeof(handle_type);
+    char m_handles[NUM_CHORES * hSize];
+
+public:
+    void Launch ( Concurrency::structured_task_group& rg ) {
+        ResetGlobals( false, false );
+        for( unsigned i = 0; i < NUM_GROUPS; ++i ) {
+            handle_type *h = (handle_type*)(m_handles + i * hSize);
+            new ( h ) handle_type( StructuredLaunchChildren );
+            rg.run( *h );
+        }
+        ASSERT ( !Concurrency::is_current_task_group_canceling(), "Unexpected cancellation" );
+        ASSERT ( !rg.is_canceling(), "Unexpected cancellation" );
+#if __TBB_SILENT_CANCELLATION_BROKEN
+        g_CancellationPropagationInProgress = true;
+#endif
+        while ( g_MaxConcurrency > 1 && g_TaskCount == 0 )
+            __TBB_Yield();
+    }
+
+    void Finish () {
+        for( unsigned i = 0; i < NUM_GROUPS; ++i )
+            ((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" );
+    }
+}; // StructuredCancellationTestDriver
+
+void TestStructuredCancellation1 () {
+    StructuredCancellationTestDriver driver;
+    Concurrency::structured_task_group sg;
+    driver.Launch( sg );
+    sg.cancel();
+    g_ExecutedAtCancellation = g_TaskCount;
+    ASSERT ( sg.is_canceling(), "No cancellation reported" );
+    sg.wait();
+    driver.Finish();
+}
+
+#if defined(_MSC_VER)
+    #pragma warning (disable: 4127)
+#endif
+
+template<bool Throw>
+void TestStructuredCancellation2 () {
+    bool exception_occurred = false,
+         unexpected_exception = false;
+    StructuredCancellationTestDriver driver;
+    try {
+        Concurrency::structured_task_group tg;
+        driver.Launch( tg );
+        if ( Throw )
+            throw int(); // Initiate stack unwinding
+    }
+    catch ( const Concurrency::missing_wait& ) {
+        exception_occurred = true;
+        unexpected_exception = Throw;
+    }
+    catch ( int ) {
+        exception_occurred = true;
+        unexpected_exception = !Throw;
+    }
+    catch ( ... ) {
+        exception_occurred = unexpected_exception = true;
+    }
+    __TBB_ASSERT( exception_occurred, NULL );
+    __TBB_ASSERT( !unexpected_exception, NULL );
+    driver.Finish();
+}
+
+#include "harness_bad_expr.h"
+
+void EmptyFunction () {}
+
+void TestStructuredWait () {
+    Concurrency::structured_task_group sg;
+    handle_type h(EmptyFunction);
+    sg.run(h);
+    sg.wait();
+#if TBB_USE_ASSERT
+    tbb::set_assertion_handler( AssertionFailureHandler );
+    TRY_BAD_EXPR( sg.wait(), "wait()" );
+    tbb::set_assertion_handler( NULL );
+#endif /* TBB_USE_ASSERT */
+}
+
+int main(int argc, char* argv[]) {
+    MinThread = 1;
+    ParseCommandLine( argc, argv );
+    for( int p=MinThread; p<=MaxThread; ++p ) {
+        g_MaxConcurrency = p;
+#if TBBTEST_USE_TBB
+        tbb::task_scheduler_init init(p);
+#else
+        Concurrency::SchedulerPolicy sp( 4,
+                                Concurrency::SchedulerKind, Concurrency::ThreadScheduler,
+                                Concurrency::MinConcurrency, 1,
+                                Concurrency::MaxConcurrency    , p,
+                                Concurrency::TargetOversubscriptionFactor, 1);
+        Concurrency::Scheduler  *s = Concurrency::Scheduler::Create( sp );
+        if ( p > 1 ) {
+            TestVagabondGroup();
+        }
+#endif /* !TBBTEST_USE_TBB */
+        if ( p > 1 ) {
+            TestParallelSpawn();
+            TestParallelWait();
+        }
+        TestFib1();
+        TestFib2();
+        TestFib3();
+        TestFib4<Concurrency::task_group>();
+        TestFib4<Concurrency::structured_task_group>();
+#if __TBB_LAMBDAS_PRESENT && !__TBB_LAMBDA_AS_TEMPL_PARAM_BROKEN
+        TestFibWithLambdas();
+#endif
+        TestCancellation1();
+        TestStructuredCancellation1();
+#if !__TBB_EXCEPTION_HANDLING_BROKEN
+        TestEh1();
+        TestEh2();
+        TestStructuredWait();
+        TestStructuredCancellation2<true>();
+        TestStructuredCancellation2<false>();
+#endif /* !__TBB_EXCEPTION_HANDLING_BROKEN */
+#if !TBBTEST_USE_TBB
+        s->Release();
+#endif
+    }
+#if __TBB_EXCEPTION_HANDLING_BROKEN
+    printf("Warning: Exception handling tests are skipped because of a known issue.\n");
+#endif
+    printf("done\n");
+    return 0;
+}
diff --git a/src/test/test_task_leaks.cpp b/src/test/test_task_leaks.cpp
index cd073c1..429eca5 100644
--- a/src/test/test_task_leaks.cpp
+++ b/src/test/test_task_leaks.cpp
@@ -54,7 +54,7 @@ class ChangeProducer: public tbb::task {
 public:
     /*override*/ tbb::task* execute() {
         if( is_stolen_task() ) {
-            Producer = GetThreadSpecific();
+            Producer = internal::Governor::local_scheduler();
         }
         return NULL;
     }
@@ -70,7 +70,7 @@ public:
     /*override*/ tbb::task* execute() {
         if( my_depth>0 ) {
             int child_count = my_child_count;
-            scheduler* my_sched = GetThreadSpecific();
+            scheduler* my_sched = internal::Governor::local_scheduler();
             tbb::task& c  = *new( tbb::task::allocate_continuation() ) tbb::empty_task;
             c.set_ref_count( child_count );
             recycle_as_child_of(c);
@@ -149,7 +149,7 @@ void TestTaskReclamation() {
     if( Verbose )
         printf("Starting with %d threads\n", MinThread);
     // For now, the master will produce "additional" tasks; later a worker will replace it;
-    Producer  = GetThreadSpecific();
+    Producer  = internal::Governor::local_scheduler();
     int N = 20;
     // First N iterations fill internal buffers and collect initial statistics
     for( int i=0; i<N; ++i ) {
@@ -160,7 +160,7 @@ void TestTaskReclamation() {
         if( m-initial_amount_of_memory > 0)
             initial_amount_of_memory = m;
 
-        tbb::internal::intptr n = GetThreadSpecific()->get_task_node_count( /*count_arena_workers=*/true );
+        intptr_t n = internal::Governor::local_scheduler()->get_task_node_count( /*count_arena_workers=*/true );
         task_count_sum += n;
         task_count_sum_square += n*n;
 
@@ -178,7 +178,7 @@ void TestTaskReclamation() {
         // These iterations check for excessive memory use and unreasonable task count
         RunTaskGenerators( i );
 
-        tbb::internal::intptr n = GetThreadSpecific()->get_task_node_count( /*count_arena_workers=*/true );
+        intptr_t n = internal::Governor::local_scheduler()->get_task_node_count( /*count_arena_workers=*/true );
         size_t m = GetMemoryUsage();
 
         if( (m-initial_amount_of_memory > 0) && (n > average+4*sigma) ) {
diff --git a/src/test/test_task_scheduler_observer.cpp b/src/test/test_task_scheduler_observer.cpp
index 4b37582..854829b 100644
--- a/src/test/test_task_scheduler_observer.cpp
+++ b/src/test/test_task_scheduler_observer.cpp
@@ -44,54 +44,31 @@ public:
 #include "harness_assert.h"
 #include "tbb/atomic.h"
 
-struct TLS {
+tbb::atomic<int> EntryCount;
+tbb::atomic<int> ExitCount;
+
+struct State {
     FlagType MyFlags;
     bool IsMaster;
+    State() : MyFlags(), IsMaster() {}
 };
 
-#if _WIN32 || _WIN64
-
-__declspec(thread) TLS MyTLS;
-TLS& GetTLS() {return MyTLS;}
-
-#else
-
-#include <pthread.h>
-static pthread_key_t TLS_Key;
-
-TLS& GetTLS() {
-    TLS* result = (TLS*)pthread_getspecific(TLS_Key);
-    if( !result ) {   
-        result = new TLS;
-        result->MyFlags = 0;
-        result->IsMaster = 0;
-        pthread_setspecific(TLS_Key, result);
-    }
-    return *result;
-}
-
-void DeleteTLS( void* p ) {
-    delete (TLS*)p;
-}
-
-#endif /* _WIN32 || _WIN64 */
-
-tbb::atomic<int> EntryCount;
-tbb::atomic<int> ExitCount;
+#include "../tbb/tls.h"
+tbb::internal::tls<State*> LocalState;
 
 void MyObserver::on_scheduler_entry( bool is_worker ) {
-    TLS& tls = GetTLS();
-    ASSERT( is_worker==!tls.IsMaster, NULL );
-    ASSERT( (tls.MyFlags & flags)==0, NULL );
+    State& state = *LocalState;
+    ASSERT( is_worker==!state.IsMaster, NULL );
+    ASSERT( (state.MyFlags & flags)==0, NULL );
     ++EntryCount;
-    tls.MyFlags |= flags;
+    state.MyFlags |= flags;
 }
 
 void MyObserver::on_scheduler_exit( bool is_worker ) {
-    TLS& tls = GetTLS();
-    ASSERT( is_worker==!tls.IsMaster, NULL );
+    State& state = *LocalState;
+    ASSERT( is_worker==!state.IsMaster, NULL );
     ++ExitCount;
-    tls.MyFlags &= ~flags;
+    state.MyFlags &= ~flags;
 }
 
 #include "tbb/task.h"
@@ -102,8 +79,7 @@ class FibTask: public tbb::task {
 public:
     FibTask( int n_, FlagType flags_ ) : n(n_), flags(flags_) {}
     /*override*/ tbb::task* execute() {
-        TLS& tls = GetTLS();
-        ASSERT( !(~tls.MyFlags& flags), NULL );
+        ASSERT( !(~LocalState->MyFlags & flags), NULL );
         if( n>=2 ) {
             set_ref_count(3);
             spawn(*new( tbb::task::allocate_child() ) FibTask(n-1,flags));
@@ -126,8 +102,7 @@ class DoTest {
 public:
     DoTest( int n ) : nthread(n) {}
     void operator()( int i ) const {
-        TLS& tls = GetTLS();
-        tls.IsMaster = true;
+        LocalState->IsMaster = true;
         if( i==0 ) {   
             tbb::task_scheduler_init(nthread);
             DoFib(0);
@@ -147,12 +122,6 @@ void TestObserver( int p, int q ) {
 int main(int argc, char* argv[]) {
     ParseCommandLine( argc, argv );
 
-#if _WIN32 || _WIN64
-#else
-    int status = pthread_key_create(&TLS_Key,DeleteTLS);
-    ASSERT(!status,NULL);
-#endif /* _WIN32 || _WIN64 */
-
     for( int p=MinThread; p<=MaxThread; ++p ) 
         for( int q=MinThread; q<=MaxThread; ++q ) 
             TestObserver(p,q);
diff --git a/src/test/test_tbb_header.cpp b/src/test/test_tbb_header.cpp
new file mode 100644
index 0000000..3edc3af
--- /dev/null
+++ b/src/test/test_tbb_header.cpp
@@ -0,0 +1,119 @@
+/*
+    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.
+*/
+
+/**
+    This test ensures that tbb.h brings in all the public TBB interface definitions.
+
+    The test is compile-time only. Nothing is actually executed except prinitng 
+    the final "done" message.
+**/
+
+#include "tbb/tbb.h"
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
+
+volatile size_t g_sink;
+
+#define TestTypeDefinitionPresence( Type) g_sink = sizeof(tbb::Type);
+#define TestTypeDefinitionPresence2(TypeStart, TypeEnd) g_sink = sizeof(tbb::TypeStart,TypeEnd);
+#define TestFuncDefinitionPresence(Fn, Args, ReturnType) { ReturnType (*pfn)Args = &tbb::Fn; (void)pfn; }
+
+struct Body {
+    void operator() () const {}
+};
+struct Body1 {
+    void operator() ( int ) const {}
+};
+struct Body2 {
+    Body2 () {}
+    Body2 ( const Body2&, tbb::split ) {}
+    void operator() ( const tbb::blocked_range<int>& ) const {}
+    void join( const Body2& ) {}
+};
+struct Body3 {
+    Body3 () {}
+    Body3 ( const Body3&, tbb::split ) {}
+    void operator() ( const tbb::blocked_range2d<int>&, tbb::pre_scan_tag ) const {}
+    void operator() ( const tbb::blocked_range2d<int>&, tbb::final_scan_tag ) const {}
+    void reverse_join( Body3& ) {}
+    void assign( const Body3& ) {}
+};
+
+#if __SUNPRO_CC
+using std::printf;
+#endif
+
+int main(int /*argc*/, char* /*argv*/[]) {
+    TestTypeDefinitionPresence2(aligned_space<int, 1> );
+    TestTypeDefinitionPresence( atomic<int> );
+    TestTypeDefinitionPresence( cache_aligned_allocator<int> );
+    TestTypeDefinitionPresence( tbb_hash_compare<int> );
+    TestTypeDefinitionPresence2(concurrent_hash_map<int, int> );
+    TestTypeDefinitionPresence( concurrent_bounded_queue<int> );
+    TestTypeDefinitionPresence( deprecated::concurrent_queue<int> );
+    TestTypeDefinitionPresence( strict_ppl::concurrent_queue<int> );
+    TestTypeDefinitionPresence( concurrent_vector<int> );
+    TestTypeDefinitionPresence( enumerable_thread_specific<int> );
+    TestTypeDefinitionPresence( mutex );
+    TestTypeDefinitionPresence( null_mutex );
+    TestTypeDefinitionPresence( null_rw_mutex );
+    TestTypeDefinitionPresence( queuing_mutex );
+    TestTypeDefinitionPresence( queuing_rw_mutex );
+    TestTypeDefinitionPresence( recursive_mutex );
+    TestTypeDefinitionPresence( spin_mutex );
+    TestTypeDefinitionPresence( spin_rw_mutex );
+    TestTypeDefinitionPresence( tbb_exception );
+    TestTypeDefinitionPresence( captured_exception );
+    TestTypeDefinitionPresence( movable_exception<int> );
+#if !TBB_USE_CAPTURED_EXCEPTION
+    TestTypeDefinitionPresence( tbb_exception_ptr );
+#endif /* !TBB_USE_CAPTURED_EXCEPTION */
+    TestTypeDefinitionPresence( blocked_range3d<int> );
+    TestFuncDefinitionPresence( parallel_invoke, (Body&, Body&), void );
+    TestFuncDefinitionPresence( parallel_do, (int*, int*, const Body1&), void );
+    TestFuncDefinitionPresence( parallel_for_each, (int*, int*, Body1), Body1 );
+    TestFuncDefinitionPresence( parallel_for, (const tbb::blocked_range<int>&, const Body2&, const tbb::simple_partitioner&), void );
+    TestFuncDefinitionPresence( parallel_reduce, (const tbb::blocked_range<int>&, Body2&, tbb::affinity_partitioner&), void );
+    TestFuncDefinitionPresence( parallel_scan, (const tbb::blocked_range2d<int>&, Body3&, const tbb::auto_partitioner&), void );
+    TestFuncDefinitionPresence( parallel_sort, (int*, int*), void );
+    TestTypeDefinitionPresence( pipeline );
+    TestTypeDefinitionPresence( task );
+    TestTypeDefinitionPresence( empty_task );
+    TestTypeDefinitionPresence( task_list );
+    TestTypeDefinitionPresence( task_group_context );
+    TestTypeDefinitionPresence( task_group );
+    TestTypeDefinitionPresence( task_handle<Body> );
+    TestTypeDefinitionPresence( task_scheduler_init );
+    TestTypeDefinitionPresence( task_scheduler_observer );
+    TestTypeDefinitionPresence( tbb_thread );
+    TestTypeDefinitionPresence( tbb_allocator<int> );
+    TestTypeDefinitionPresence( zero_allocator<int> );
+    TestTypeDefinitionPresence( tick_count );
+    printf("done\n");
+    return 0;
+}
diff --git a/src/test/test_tbb_thread.cpp b/src/test/test_tbb_thread.cpp
index 25cd8e2..7348489 100644
--- a/src/test/test_tbb_thread.cpp
+++ b/src/test/test_tbb_thread.cpp
@@ -32,7 +32,6 @@
 
 static const int THRDS = 3;
 static const int THRDS_DETACH = 2;
-static tbb::atomic<int> ready;
 static tbb::atomic<int> sum;
 static tbb::atomic<int> BaseCount;
 static tbb::tbb_thread::id real_ids[THRDS+THRDS_DETACH];
@@ -63,26 +62,25 @@ public:
     int value;
 };
 
+
+#include "harness_barrier.h"
+
 class ThreadFunc: Base {
     ThreadFunc() {}
 
-    void init() {
-        ++ready;
-        while (ready != THRDS)
-            tbb::this_tbb_thread::yield();
-    }
+    static Harness::SpinBarrier init_barrier;
 
     friend void RunTests();
 public:
     void operator()(){
         real_ids[0] = tbb::this_tbb_thread::get_id();
-        init();
+        init_barrier.wait();
         
         sum.fetch_and_add(1);
     }
     void operator()(int num){
         real_ids[num] = tbb::this_tbb_thread::get_id();
-        init();
+        init_barrier.wait();
 
         sum.fetch_and_add(num);
     }
@@ -96,7 +94,7 @@ public:
         ASSERT( ( WAIT - (t1-t0).seconds() ) < 1e-10 
                 || (t1-t0).seconds() > WAIT, "Should sleep enough.");
 
-        init();
+        init_barrier.wait();
 
         sum.fetch_and_add(num);
         sum.fetch_and_add(dx.value);
@@ -106,6 +104,8 @@ public:
     }
 };
 
+Harness::SpinBarrier ThreadFunc::init_barrier(THRDS);
+
 void CheckRelations( const tbb::tbb_thread::id ids[], int n, bool duplicates_allowed ) {
     for( int i=0; i<n; ++i ) {
         const tbb::tbb_thread::id x = ids[i];
diff --git a/src/test/test_tbb_version.cpp b/src/test/test_tbb_version.cpp
index d6daecd..8a7be77 100644
--- a/src/test/test_tbb_version.cpp
+++ b/src/test/test_tbb_version.cpp
@@ -196,13 +196,15 @@ int main(int argc, char*[] )
 // Fill dictionary with version strings for platforms 
 void initialize_strings_vector(std::vector <string_pair>* vector)
 {
-    vector->push_back(string_pair("TBB: VERSION\t\t2.1", required));          // check TBB_VERSION
-    vector->push_back(string_pair("TBB: INTERFACE VERSION\t3016", required)); // check TBB_INTERFACE_VERSION
+    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: BUILD_DATE", required));
     vector->push_back(string_pair("TBB: BUILD_HOST", required));
     vector->push_back(string_pair("TBB: BUILD_OS", required));
 #if _WIN32||_WIN64
+#if !__MINGW32__
     vector->push_back(string_pair("TBB: BUILD_CL", required));
+#endif
     vector->push_back(string_pair("TBB: BUILD_COMPILER", required));
 #elif __APPLE__
     vector->push_back(string_pair("TBB: BUILD_KERNEL", required));
@@ -226,6 +228,8 @@ void initialize_strings_vector(std::vector <string_pair>* vector)
     vector->push_back(string_pair("TBB: DO_ITT_NOTIFY", required));
     vector->push_back(string_pair("TBB: ITT", not_required)); //#ifdef DO_ITT_NOTIFY
     vector->push_back(string_pair("TBB: ALLOCATOR", required));
+    vector->push_back(string_pair("TBB: RML", not_required));
+    vector->push_back(string_pair("TBB: Intel(R) RML library built:", not_required));
     vector->push_back(string_pair("TBB: SCHEDULER", required));
 
     return;
diff --git a/src/test/test_user_events.cpp b/src/test/test_user_events.cpp
new file mode 100644
index 0000000..33d2ec0
--- /dev/null
+++ b/src/test/test_user_events.cpp
@@ -0,0 +1,210 @@
+/*
+    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 DO_ITT_NOTIFY 1
+#define TBB_USE_ASSERT 1
+#define TBB_DO_ITT_EVENTS 1
+
+/* to do implicite linkage under Windows, but __TBB_BUILD stops it */
+#include "tbb/tbb_stddef.h" 
+
+#if _MSC_VER /* need this to overcome _declspec( dllimport ) for ITT_event */
+#define __TBB_BUILD 1
+#endif
+
+#include "../tbb/itt_notify.cpp"
+
+#undef DO_ITT_NOTIFY
+
+#include <string>
+#include <vector>
+#include <sstream> 
+#include <iostream> 
+#include <tbb/atomic.h>
+#include <tbb/tbb_thread.h>
+#include <tbb/concurrent_hash_map.h>
+#include "harness_assert.h"
+
+namespace tbb {
+namespace internal {
+
+void DoOneTimeInitializations() {}
+bool GetBoolEnvironmentVariable(char const*) { return true; }
+bool FillDynamicLinks(const char*, const DynamicLinkDescriptor [], size_t) {
+    return true;
+}
+void PrintExtraVersionInfo( const char* , const char*  ) {}
+
+struct EvName {
+    int event;
+    char name[100];
+    
+    EvName(int event, const char *n) : event(event) {
+        strcpy(name, n);
+    }
+};
+
+struct Hash_Cmp {
+    static size_t hash(int event) {
+        return event;
+    }
+    static bool equal(int e1, int e2) {
+        return e1==e2;
+    }
+};
+
+typedef concurrent_hash_map<__itt_event,std::string,Hash_Cmp> EvNames;
+
+static EvNames ev_names;
+
+static atomic<int> uniq_itt_event;
+
+__itt_event test_event_create(const char *name, int)
+{
+    __itt_event my_cnt = uniq_itt_event++;
+    EvNames::accessor acc;
+    std::string str(name);
+    
+    ev_names.insert( acc, my_cnt );
+    acc->second = str;
+
+    return my_cnt;
+}
+
+struct IdxStr {
+    itt_event_t h;
+    std::string str;
+};
+
+static ITT_Event_Hnd_to_Event<true> ev;
+static IdxStr *idxs;
+static atomic<int> waiting_threads;
+
+class Pusher
+{
+    int my_num;
+    int events_per_thread;
+    
+    void barrier() {
+        waiting_threads--;
+        while(waiting_threads)
+            ;
+    }
+public:
+    Pusher(int my_num, int events_per_thread) :
+        my_num(my_num), events_per_thread(events_per_thread) {}
+    void operator()(){
+        barrier();
+
+        for (int i=events_per_thread*my_num; 
+             i<events_per_thread*(my_num+1); i++) {
+            IdxStr i_s;
+            char buf[100];
+
+            sprintf(buf, "%d", i);
+            i_s.str = buf;
+            i_s.h = ev.add_event(buf);
+
+            idxs[i] = i_s;
+        }
+    }
+    void operator()(int thread_id){
+        std::vector<itt_event_t> l_idx;
+        barrier();
+        
+        for (int i=0; i<events_per_thread; i++) {
+            char buf[100];
+
+            sprintf(buf, "%d_%d", thread_id, i);
+
+            itt_event_t idx = ev.add_event(buf);
+            int event = ev.get_event_by_handler( idx );
+
+            EvNames::const_accessor acc;
+            bool ok = ev_names.find(acc, event);
+            ASSERT(ok, "itt_event should exists");
+            ASSERT(0==acc->second.compare(buf), "different event names");
+
+            l_idx.push_back(idx);
+        }
+
+        for (int i=0; i<events_per_thread; i++) {
+            ev.get_event_by_handler( l_idx[i] );
+        }
+    }
+};
+
+
+void Test()
+{
+    ITT_Handler_event_create = test_event_create;
+    uniq_itt_event = 77;
+    const int init_num_thr = 8;
+    const int events_per_thread = 1000;
+
+    tbb::tbb_thread threads[init_num_thr];
+    waiting_threads = init_num_thr;
+    idxs = new IdxStr[init_num_thr*events_per_thread];
+    for (int i=0; i<init_num_thr; i++)
+        new(threads+i) tbb::tbb_thread(Pusher(i, events_per_thread));
+
+    for (int i=0; i<init_num_thr; i++)
+        threads[i].join();
+
+    ev.switch_to_event_creation();
+
+    for (int i=0; i<init_num_thr*events_per_thread; i++) {
+        std::ostringstream out;
+        out << i;
+
+        __itt_event e = ev.get_event_by_handler(idxs[i].h);
+
+        EvNames::const_accessor acc;
+        bool ok = ev_names.find(acc, e);
+        ASSERT(ok, "itt_event should exists");
+        ASSERT(0==acc->second.compare(out.str()), "different event names");
+    }
+
+    waiting_threads = init_num_thr;
+    for (int i=0; i<init_num_thr; i++)
+        new(threads+i) tbb::tbb_thread(Pusher(i, events_per_thread), i);
+    for (int i=0; i<init_num_thr; i++)
+        threads[i].join();
+}
+
+}  // namespace internal
+}  // namespace tbb
+
+int main()
+{
+    tbb::internal::Test();
+    std::printf("done\n");
+}
+
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"

-- 
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