[tbb] 09/64: Imported Upstream version 2.1~20080605

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

    Imported Upstream version 2.1~20080605
---
 CHANGES                                            |  368 ++++
 Makefile                                           |   96 +-
 README                                             |   10 +-
 build/FreeBSD.gcc.inc                              |   21 +-
 build/FreeBSD.inc                                  |   22 +-
 build/Makefile.tbb                                 |   46 +-
 build/Makefile.tbbmalloc                           |   63 +-
 build/Makefile.test                                |  124 +-
 build/SunOS.gcc.inc                                |   15 +-
 build/SunOS.inc                                    |   31 +-
 build/{linux.gcc.inc => SunOS.suncc.inc}           |   42 +-
 build/codecov.txt                                  |    1 +
 build/common.inc                                   |  107 +-
 build/common_rules.inc                             |   53 +-
 build/generate_tbbvars.bat                         |   40 +-
 build/generate_tbbvars.sh                          |   43 +-
 build/index.html                                   |   65 +-
 build/linux.gcc.inc                                |   19 +-
 build/linux.icc.inc                                |   25 +-
 build/linux.inc                                    |   30 +-
 build/macos.gcc.inc                                |   12 +-
 build/macos.icc.inc                                |   17 +-
 build/macos.inc                                    |   14 +-
 build/suncc.map.pause                              |    1 +
 .../test_launcher.sh                               |   10 +-
 build/version_info_linux.sh                        |   18 +-
 build/version_info_macos.sh                        |   14 +-
 ...version_info_macos.sh => version_info_sunos.sh} |   12 +-
 build/windows.cl.inc                               |   47 +-
 build/windows.icl.inc                              |   44 +-
 build/windows.inc                                  |   31 +-
 doc/Release_Notes.txt                              |  154 ++
 doc/html/a00001.html                               |   19 +
 doc/html/a00013.html                               |   30 +
 doc/html/a00014.html                               |   26 +
 doc/html/a00015.html                               |   28 +
 doc/html/a00016.html                               |   34 +
 doc/html/a00018.html                               |   20 +
 doc/html/a00020.html                               |   24 +
 doc/html/a00022.html                               |   35 +
 doc/html/a00023.html                               |   32 +
 doc/html/a00024.html                               |   75 +
 doc/html/a00025.html                               |   26 +
 doc/html/a00026.html                               |   24 +
 doc/html/a00030.html                               |   38 +
 doc/html/a00031.html                               |   19 +
 doc/html/a00032.html                               |   26 +
 doc/html/a00033.html                               |   32 +
 doc/html/a00034.html                               |   55 +
 doc/html/a00036.html                               |   48 +
 doc/html/a00038.html                               |   19 +
 doc/html/a00039.html                               |   41 +
 doc/html/a00041.html                               |  104 ++
 doc/html/a00044.html                               |   23 +
 doc/html/a00045.html                               |   24 +
 doc/html/a00046.html                               |   18 +
 doc/html/a00054.html                               |   20 +
 doc/html/a00055.html                               |   18 +
 doc/html/a00056.html                               |   63 +
 doc/html/a00058.html                               |   21 +
 doc/html/a00059.html                               |   63 +
 doc/html/a00061.html                               |   63 +
 doc/html/a00062.html                               |   62 +
 doc/html/a00063.html                               |   63 +
 doc/html/a00064.html                               |   63 +
 doc/html/a00065.html                               |   63 +
 doc/html/a00066.html                               |   63 +
 doc/html/a00067.html                               |   18 +
 doc/html/a00068.html                               |   18 +
 doc/html/a00069.html                               |   66 +
 doc/html/a00070.html                               |   67 +
 doc/html/a00071.html                               |   66 +
 doc/html/a00072.html                               |   65 +
 doc/html/a00073.html                               |   25 +
 doc/html/a00074.html                               |   18 +
 doc/html/a00075.html                               |   64 +
 doc/html/a00076.html                               |   63 +
 doc/html/a00077.html                               |   63 +
 doc/html/a00078.html                               |   23 +
 doc/html/a00079.html                               |   20 +
 doc/html/a00080.html                               |   22 +
 doc/html/a00081.html                               |   21 +
 doc/html/a00083.html                               |   21 +
 doc/html/a00085.html                               |   23 +
 doc/html/a00087.html                               |   27 +
 doc/html/a00088.html                               |   24 +
 doc/html/a00089.html                               |   22 +
 doc/html/a00090.html                               |   24 +
 doc/html/a00091.html                               |   23 +
 doc/html/a00092.html                               |   26 +
 doc/html/a00093.html                               |   23 +
 doc/html/a00094.html                               |   24 +
 doc/html/a00095.html                               |   22 +
 doc/html/a00096.html                               |   24 +
 doc/html/a00097.html                               |   21 +
 doc/html/a00098.html                               |   26 +
 doc/html/a00104.html                               |   24 +
 doc/html/a00105.html                               |   65 +
 doc/html/a00106.html                               |   62 +
 doc/html/a00107.html                               |   25 +
 doc/html/a00108.html                               |   26 +
 doc/html/a00110.html                               |   38 +
 doc/html/a00112.html                               |   20 +
 doc/html/a00114.html                               |   19 +
 doc/html/a00115.html                               |   21 +
 doc/html/a00122.html                               |   18 +
 doc/html/a00126.html                               |   21 +
 doc/html/a00128.html                               |   31 +
 doc/html/a00130.html                               |   20 +
 doc/html/a00131.html                               |   26 +
 doc/html/a00162.html                               |   44 +
 doc/html/a00163.html                               |   42 +
 doc/html/a00164.html                               |   43 +
 doc/html/a00165.html                               |   34 +
 doc/html/a00166.html                               |   42 +
 doc/html/a00167.html                               |   44 +
 doc/html/a00168.html                               |   33 +
 doc/html/a00169.html                               |  257 +++
 doc/html/a00170.html                               |   69 +
 doc/html/a00171.html                               |   76 +
 doc/html/a00172.html                               |   90 +
 doc/html/a00173.html                               |   42 +
 doc/html/a00174.html                               |  649 +++++++
 doc/html/a00175.html                               |   49 +
 doc/html/a00176.html                               |   72 +
 doc/html/a00177.html                               |  328 ++++
 doc/html/a00178.html                               |  138 ++
 doc/html/a00179.html                               |   36 +
 doc/html/a00180.html                               |   95 ++
 doc/html/a00181.html                               |   70 +
 doc/html/a00182.html                               |  423 +++++
 doc/html/a00183.html                               |  156 ++
 doc/html/a00184.html                               |   36 +
 doc/html/a00185.html                               |   43 +
 doc/html/a00186.html                               |   43 +
 doc/html/a00187.html                               |   43 +
 doc/html/a00188.html                               |   31 +
 doc/html/a00189.html                               |  124 ++
 doc/html/a00190.html                               |   36 +
 doc/html/a00191.html                               |   48 +
 doc/html/a00192.html                               |   41 +
 doc/html/a00193.html                               |   41 +
 doc/html/a00194.html                               |   52 +
 doc/html/a00195.html                               |   58 +
 doc/html/a00196.html                               |   96 ++
 doc/html/a00197.html                               |   88 +
 doc/html/a00198.html                               |   50 +
 doc/html/a00199.html                               |   88 +
 doc/html/a00200.html                               |   36 +
 doc/html/a00201.html                               |   52 +
 doc/html/a00202.html                               |   46 +
 doc/html/a00203.html                               |   42 +
 doc/html/a00204.html                               |  147 ++
 doc/html/a00205.html                               |   47 +
 doc/html/a00206.html                               |   60 +
 doc/html/a00207.html                               |   36 +
 doc/html/a00208.html                               |   48 +
 doc/html/a00209.html                               |  116 ++
 doc/html/a00210.html                               |   54 +
 doc/html/a00211.html                               |  162 ++
 doc/html/a00212.html                               |   39 +
 doc/html/a00213.html                               |   64 +
 doc/html/a00214.html                               |   50 +
 doc/html/a00215.html                               |   88 +
 doc/html/a00216.html                               |   44 +
 doc/html/a00217.html                               |   79 +
 doc/html/a00218.html                               |   56 +
 doc/html/a00219.html                               |   44 +
 doc/html/a00220.html                               |  162 ++
 doc/html/a00221.html                               |   34 +
 doc/html/a00222.html                               |   41 +
 doc/html/a00223.html                               |   45 +
 doc/html/a00224.html                               |   45 +
 doc/html/a00225.html                               |   48 +
 doc/html/a00226.html                               |   36 +
 doc/html/a00227.html                               |   54 +
 doc/html/a00228.html                               |  699 ++++++++
 doc/html/a00229.html                               |   62 +
 doc/html/a00230.html                               |   53 +
 doc/html/a00231.html                               |  166 ++
 doc/html/a00232.html                               |  100 ++
 doc/html/a00233.html                               |   42 +
 doc/html/a00234.html                               |   82 +
 doc/html/a00235.html                               |   48 +
 doc/html/a00236.html                               |   44 +
 doc/html/a00237.html                               |   66 +
 doc/html/a00238.html                               |  118 ++
 doc/html/a00239.html                               |   26 +
 doc/html/a00240.html                               |   43 +
 doc/html/a00241.html                               |   46 +
 doc/html/a00242.html                               |   43 +
 doc/html/a00278.html                               |  384 +++++
 doc/html/a00279.html                               |  668 ++++++++
 doc/html/a00281.html                               |  407 +++++
 doc/html/a00282.html                               |   92 +
 doc/html/a00283.html                               |   59 +
 doc/html/a00284.html                               |  429 +++++
 doc/html/a00285.html                               |  113 ++
 doc/html/a00286.html                               |   99 ++
 doc/html/a00287.html                               |  117 ++
 doc/html/a00288.html                               |  127 ++
 doc/html/a00289.html                               |  888 ++++++++++
 doc/html/a00290.html                               |  327 ++++
 doc/html/a00291.html                               |  787 +++++++++
 doc/html/a00292.html                               |  185 ++
 doc/html/a00293.html                               |  409 +++++
 doc/html/a00294.html                               |  161 ++
 doc/html/a00295.html                               |  318 ++++
 doc/html/a00296.html                               |  321 ++++
 doc/html/a00297.html                               |  147 ++
 doc/html/a00298.html                               |  182 ++
 doc/html/a00299.html                               |  209 +++
 doc/html/a00300.html                               |  154 ++
 doc/html/a00301.html                               |  102 ++
 doc/html/a00302.html                               |  149 ++
 doc/html/a00303.html                               |  195 +++
 doc/html/a00304.html                               |  142 ++
 doc/html/a00305.html                               |  131 ++
 doc/html/a00306.html                               |  172 ++
 doc/html/a00307.html                               |  556 ++++++
 doc/html/a00308.html                               |   83 +
 doc/html/a00309.html                               |   76 +
 doc/html/a00310.html                               |  133 ++
 doc/html/a00311.html                               |  207 +++
 doc/html/a00312.html                               |  563 ++++++
 doc/html/a00313.html                               |  198 +++
 doc/html/a00314.html                               |  275 +++
 doc/html/a00315.html                               |  151 ++
 doc/html/annotated.html                            |   99 ++
 doc/html/concepts.html                             |   20 +
 doc/html/doxygen.css                               |  271 +++
 doc/html/files.html                                |   52 +
 doc/html/functions.html                            |  250 +++
 doc/html/functions_enum.html                       |   24 +
 doc/html/functions_eval.html                       |   28 +
 doc/html/functions_func.html                       |  211 +++
 doc/html/functions_rela.html                       |   23 +
 doc/html/functions_type.html                       |   35 +
 doc/html/functions_vars.html                       |   35 +
 doc/html/graph_legend.html                         |   78 +
 doc/html/hierarchy.html                            |  118 ++
 doc/html/index.html                                |   23 +
 doc/html/modules.html                              |   19 +
 doc/html/namespacemembers.html                     |   77 +
 doc/html/namespacemembers_enum.html                |   22 +
 doc/html/namespacemembers_eval.html                |   24 +
 doc/html/namespacemembers_func.html                |   40 +
 doc/html/namespacemembers_type.html                |   28 +
 doc/html/namespacemembers_vars.html                |   22 +
 doc/html/namespaces.html                           |   20 +
 doc/html/pages.html                                |   32 +
 doc/html/parallel_do_body_req.html                 |   31 +
 doc/html/parallel_for_body_req.html                |   21 +
 doc/html/parallel_reduce_body_req.html             |   22 +
 doc/html/parallel_scan_body_req.html               |   23 +
 doc/html/parallel_sort_iter_req.html               |   20 +
 doc/html/range_req.html                            |   23 +
 examples/GettingStarted/sub_string_finder/Makefile |   12 +-
 .../sub_string_finder/Makefile.windows             |   14 +-
 .../sub_string_finder/sub_string_finder.cpp        |    2 +-
 .../sub_string_finder_extended.cpp                 |    2 +-
 .../sub_string_finder/sub_string_finder_pretty.cpp |    2 +-
 .../vc7.1/sub_string_finder.vcproj                 |   12 +-
 .../vc7.1/sub_string_finder_extended.vcproj        |   12 +-
 .../vc7.1/sub_string_finder_pretty.vcproj          |   12 +-
 .../sub_string_finder/vc8/sub_string_finder.vcproj |   24 +-
 .../vc8/sub_string_finder_extended.vcproj          |   24 +-
 .../vc8/sub_string_finder_pretty.vcproj            |   24 +-
 .../sub_string_finder/vc9/sub_string_finder.suo    |  Bin 16384 -> 9728 bytes
 .../sub_string_finder/vc9/sub_string_finder.vcproj |   24 +-
 .../vc9/sub_string_finder_extended.vcproj          |   24 +-
 .../vc9/sub_string_finder_pretty.vcproj            |   24 +-
 .../sub_string_finder.xcodeproj/project.pbxproj    |    8 +-
 examples/Makefile                                  |   31 +-
 examples/common/gui/convideo.cpp                   |   14 +-
 examples/common/gui/gdivideo.cpp                   |    2 +-
 examples/common/index.html                         |    2 +-
 .../concurrent_hash_map/count_strings/Makefile     |   10 +-
 .../count_strings/Makefile.windows                 |   12 +-
 .../count_strings/count_strings.cpp                |  165 +-
 .../count_strings/vc7.1/count_strings.vcproj       |   12 +-
 .../count_strings/vc8/count_strings.vcproj         |   24 +-
 .../count_strings/vc9/count_strings.suo            |  Bin 11776 -> 7680 bytes
 .../count_strings/vc9/count_strings.vcproj         |   34 +-
 .../xcode/count_strings.xcodeproj/project.pbxproj  |    8 +-
 examples/index.html                                |    2 +
 examples/{parallel_for => parallel_do}/index.html  |    8 +-
 .../parallel_preorder/Graph.cpp                    |    5 +-
 .../parallel_do/parallel_preorder/Graph.h          |   80 +-
 .../parallel_preorder/Makefile                     |    4 +-
 .../parallel_preorder/Makefile.windows             |    8 +-
 .../parallel_do/parallel_preorder/Matrix.h         |   56 +-
 examples/parallel_do/parallel_preorder/index.html  |   94 +
 .../parallel_preorder/parallel_preorder.cpp        |   38 +-
 .../parallel_preorder/vc7.1/parallel_preorder.sln  |   21 +
 .../parallel_preorder/vc7.1/parallel_preorder.suo  |  Bin 0 -> 7168 bytes
 .../vc7.1/parallel_preorder.vcproj                 |   12 +-
 .../parallel_preorder/vc8/parallel_preorder.sln    |   25 +
 .../parallel_preorder/vc8/parallel_preorder.suo    |  Bin 0 -> 7680 bytes
 .../parallel_preorder/vc8/parallel_preorder.vcproj |   24 +-
 .../parallel_preorder/vc9/parallel_preorder.sln    |   25 +
 .../parallel_preorder/vc9/parallel_preorder.suo    |  Bin 0 -> 7680 bytes
 .../parallel_preorder/vc9/parallel_preorder.vcproj |   24 +-
 .../parallel_preorder.xcodeproj/project.pbxproj    |    8 +-
 examples/parallel_for/index.html                   |    4 +-
 .../{seismic => polygon_overlay}/Makefile          |   27 +-
 .../{seismic => polygon_overlay}/Makefile.windows  |   10 +-
 examples/parallel_for/polygon_overlay/index.html   |  133 ++
 examples/parallel_for/polygon_overlay/polymain.cpp |  625 +++++++
 .../parallel_for/polygon_overlay/polymain.h        |   30 +-
 examples/parallel_for/polygon_overlay/polyover.cpp |  405 +++++
 .../parallel_for/polygon_overlay/polyover.h        |   24 +-
 .../parallel_for/polygon_overlay/pover_global.h    |  101 ++
 .../parallel_for/polygon_overlay/pover_video.cpp   |  160 ++
 .../parallel_for/polygon_overlay/pover_video.h     |   72 +-
 examples/parallel_for/polygon_overlay/rpolygon.h   |  175 ++
 examples/parallel_for/polygon_overlay/speedup.gif  |  Bin 0 -> 7162 bytes
 .../gui.rc => polygon_overlay/vc7.1/pover.rc}      |   41 +-
 .../parallel_for/polygon_overlay/vc7.1/pover.sln   |   35 +
 .../parallel_for/polygon_overlay/vc7.1/pover.suo   |  Bin 0 -> 10240 bytes
 .../polygon_overlay/vc7.1/pover.vcproj             |  494 ++++++
 .../parallel_for/polygon_overlay/vc7.1/resource.h  |   14 +
 .../vc7.1/gui.rc => polygon_overlay/vc8/pover.rc}  |   41 +-
 .../parallel_for/polygon_overlay/vc8/pover.sln     |   37 +
 .../parallel_for/polygon_overlay/vc8/pover.suo     |  Bin 0 -> 21504 bytes
 .../vc8/pover.vcproj}                              |  122 +-
 .../parallel_for/polygon_overlay/vc8/resource.h    |   14 +
 .../vc7.1/gui.rc => polygon_overlay/vc9/pover.rc}  |   41 +-
 .../parallel_for/polygon_overlay/vc9/pover.sln     |   37 +
 .../parallel_for/polygon_overlay/vc9/pover.suo     |  Bin 0 -> 8192 bytes
 .../vc9/pover.vcproj}                              |  120 +-
 .../parallel_for/polygon_overlay/vc9/resource.h    |   14 +
 .../xcode/English.lproj/InfoPlist.strings          |    0
 .../xcode/English.lproj/main.nib/classes.nib       |    0
 .../xcode/English.lproj/main.nib/info.nib          |    0
 .../xcode/English.lproj/main.nib/objects.xib       |    6 +-
 .../{tacheon => polygon_overlay}/xcode/Info.plist  |    2 +-
 .../polygon_overlay/xcode/PolygonOverlay.pch       |    5 +
 .../PolygonOverlay.xcodeproj}/project.pbxproj      |   72 +-
 examples/parallel_for/seismic/Makefile             |   15 +-
 examples/parallel_for/seismic/Makefile.windows     |    4 +-
 .../parallel_for/seismic/SeismicSimulation.cpp     |  124 +-
 .../seismic/vc7.1/SeismicSimulation.rc             |    4 +-
 .../seismic/vc7.1/SeismicSimulation.vcproj         |   24 +-
 .../parallel_for/seismic/vc8/SeismicSimulation.rc  |    4 +-
 .../seismic/vc8/SeismicSimulation.vcproj           |   48 +-
 .../parallel_for/seismic/vc9/SeismicSimulation.rc  |    4 +-
 .../parallel_for/seismic/vc9/SeismicSimulation.suo |  Bin 9728 -> 8192 bytes
 .../seismic/vc9/SeismicSimulation.vcproj           |   48 +-
 .../SeismicSimulation.xcodeproj/project.pbxproj    |    4 +-
 .../tacheon/vc7.1/tacheon.threads.vcproj           |  239 ---
 .../tacheon/vc8/tacheon.threads.vcproj             |  691 --------
 examples/parallel_for/tacheon/vc9/tacheon.suo      |  Bin 18432 -> 0 bytes
 .../tacheon/vc9/tacheon.threads.vcproj             |  687 --------
 examples/parallel_for/tacheon/xcode/tacheon.pch    |    5 -
 .../parallel_for/{tacheon => tachyon}/Makefile     |   24 +-
 .../{tacheon => tachyon}/Makefile.windows          |   31 +-
 .../{tacheon => tachyon}/dat/820spheres.dat        |    0
 .../{tacheon => tachyon}/dat/balls.dat             |    0
 .../{tacheon => tachyon}/dat/balls3.dat            |    0
 .../{tacheon => tachyon}/dat/lattice.dat           |    0
 .../{tacheon => tachyon}/dat/model2.dat            |    0
 .../{tacheon => tachyon}/dat/teapot.dat            |    0
 .../{tacheon => tachyon}/dat/trypsin4pti.dat       |    0
 .../parallel_for/{tacheon => tachyon}/index.html   |   17 +-
 .../parallel_for/{tacheon => tachyon}/src/api.cpp  |   11 +-
 .../parallel_for/{tacheon => tachyon}/src/api.h    |    9 +-
 .../{tacheon => tachyon}/src/apigeom.cpp           |    7 +-
 .../{tacheon => tachyon}/src/apitrigeom.cpp        |    7 +-
 .../{tacheon => tachyon}/src/apitrigeom.h          |    7 +-
 .../{tacheon => tachyon}/src/bndbox.cpp            |    9 +-
 .../parallel_for/{tacheon => tachyon}/src/bndbox.h |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/box.cpp  |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/box.h    |    7 +-
 .../{tacheon => tachyon}/src/camera.cpp            |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/camera.h |    7 +-
 .../{tacheon => tachyon}/src/coordsys.cpp          |    7 +-
 .../{tacheon => tachyon}/src/coordsys.h            |    7 +-
 .../{tacheon => tachyon}/src/cylinder.cpp          |    7 +-
 .../{tacheon => tachyon}/src/cylinder.h            |    7 +-
 .../{tacheon => tachyon}/src/extvol.cpp            |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/extvol.h |    7 +-
 .../{tacheon => tachyon}/src/getargs.cpp           |    7 +-
 .../{tacheon => tachyon}/src/getargs.h             |    7 +-
 .../{tacheon => tachyon}/src/global.cpp            |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/global.h |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/grid.cpp |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/grid.h   |    7 +-
 .../{tacheon => tachyon}/src/imageio.cpp           |    7 +-
 .../{tacheon => tachyon}/src/imageio.h             |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/imap.cpp |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/imap.h   |    7 +-
 .../{tacheon => tachyon}/src/intersect.cpp         |    7 +-
 .../{tacheon => tachyon}/src/intersect.h           |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/jpeg.cpp |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/jpeg.h   |    7 +-
 .../{tacheon => tachyon}/src/light.cpp             |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/light.h  |    7 +-
 .../{tacheon => tachyon}/src/machine.h             |   11 +-
 .../parallel_for/{tacheon => tachyon}/src/macros.h |    7 +-
 .../{tacheon => tachyon}/src/objbound.cpp          |    7 +-
 .../{tacheon => tachyon}/src/objbound.h            |    7 +-
 .../{tacheon => tachyon}/src/parse.cpp             |   11 +-
 .../parallel_for/{tacheon => tachyon}/src/parse.h  |    9 +-
 .../{tacheon => tachyon}/src/plane.cpp             |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/plane.h  |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/ppm.cpp  |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/ppm.h    |    7 +-
 .../{tacheon => tachyon}/src/pthread.cpp           |    7 +-
 .../{tacheon => tachyon}/src/pthread.h             |    7 +-
 .../{tacheon => tachyon}/src/quadric.cpp           |    7 +-
 .../{tacheon => tachyon}/src/quadric.h             |    7 +-
 .../{tacheon => tachyon}/src/render.cpp            |    9 +-
 .../parallel_for/{tacheon => tachyon}/src/render.h |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/ring.cpp |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/ring.h   |    7 +-
 .../{tacheon => tachyon}/src/shade.cpp             |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/shade.h  |    7 +-
 .../{tacheon => tachyon}/src/sphere.cpp            |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/sphere.h |    7 +-
 .../{tacheon => tachyon}/src/texture.cpp           |   13 +-
 .../{tacheon => tachyon}/src/texture.h             |    7 +-
 .../{tacheon => tachyon}/src/tgafile.cpp           |    7 +-
 .../{tacheon => tachyon}/src/tgafile.h             |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/trace.h  |    7 +-
 .../{tacheon => tachyon}/src/trace.serial.cpp      |   13 +-
 .../{tacheon => tachyon}/src/trace.tbb.cpp         |    7 +-
 .../{tacheon => tachyon}/src/trace.tbb1d.cpp       |    7 +-
 .../{tacheon => tachyon}/src/trace_rest.cpp        |    7 +-
 .../{tacheon => tachyon}/src/triangle.cpp          |    9 +-
 .../{tacheon => tachyon}/src/triangle.h            |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/types.h  |    9 +-
 .../parallel_for/{tacheon => tachyon}/src/ui.cpp   |   13 +-
 .../parallel_for/{tacheon => tachyon}/src/ui.h     |    9 +-
 .../parallel_for/{tacheon => tachyon}/src/util.cpp |   11 +-
 .../parallel_for/{tacheon => tachyon}/src/util.h   |   11 +-
 .../{tacheon => tachyon}/src/vector.cpp            |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/vector.h |    7 +-
 .../{tacheon => tachyon}/src/video.cpp             |   31 +-
 .../parallel_for/{tacheon => tachyon}/src/video.h  |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/vol.cpp  |    7 +-
 .../parallel_for/{tacheon => tachyon}/src/vol.h    |    7 +-
 .../{tacheon => tachyon}/vc7.1/gui.ico             |  Bin
 .../parallel_for/{tacheon => tachyon}/vc7.1/gui.rc |    0
 .../{tacheon => tachyon}/vc7.1/resource.h          |    0
 .../{tacheon => tachyon}/vc7.1/small.ico           |  Bin
 .../vc7.1/tachyon.serial.vcproj}                   |    6 +-
 .../tacheon.sln => tachyon/vc7.1/tachyon.sln}      |    8 +-
 .../tacheon.suo => tachyon/vc7.1/tachyon.suo}      |  Bin
 .../vc7.1/tachyon.tbb.vcproj}                      |   30 +-
 .../vc7.1/tachyon.tbb1d.vcproj}                    |   30 +-
 .../vc7.1/tachyon.vcproj}                          |    4 +-
 .../vc8/tachyon.serial.vcproj}                     |    6 +-
 .../vc8/tacheon.sln => tachyon/vc8/tachyon.sln}    |   10 +-
 .../vc8/tacheon.suo => tachyon/vc8/tachyon.suo}    |  Bin
 .../vc8/tachyon.tbb.vcproj}                        |   54 +-
 .../vc8/tachyon.tbb1d.vcproj}                      |   54 +-
 .../tacheon.vcproj => tachyon/vc8/tachyon.vcproj}  |    4 +-
 .../vc9/tachyon.serial.vcproj}                     |    4 +-
 .../vc9/tacheon.sln => tachyon/vc9/tachyon.sln}    |   10 +-
 examples/parallel_for/tachyon/vc9/tachyon.suo      |  Bin 0 -> 15872 bytes
 .../vc9/tachyon.tbb.vcproj}                        |   52 +-
 .../vc9/tachyon.tbb1d.vcproj}                      |   52 +-
 .../tacheon.vcproj => tachyon/vc9/tachyon.vcproj}  |    4 +-
 .../xcode/English.lproj/InfoPlist.strings          |    0
 .../xcode/English.lproj/main.nib/classes.nib       |    0
 .../xcode/English.lproj/main.nib/info.nib          |    0
 .../xcode/English.lproj/main.nib/objects.xib       |    6 +-
 .../{tacheon => tachyon}/xcode/Info.plist          |    2 +-
 examples/parallel_for/tachyon/xcode/tachyon.pch    |    5 +
 .../xcode/tachyon.xcodeproj}/project.pbxproj       |   98 +-
 examples/parallel_reduce/convex_hull/Makefile      |    8 +-
 .../parallel_reduce/convex_hull/Makefile.windows   |   14 +-
 examples/parallel_reduce/convex_hull/convex_hull.h |   89 +-
 .../convex_hull/vc7.1/convex_hull_bench.vcproj     |   12 +-
 .../convex_hull/vc7.1/convex_hull_sample.vcproj    |   12 +-
 .../convex_hull/vc8/convex_hull_benchmark.vcproj   |   24 +-
 .../convex_hull/vc8/convex_hull_sample.vcproj      |   24 +-
 .../convex_hull/vc9/convex_hull.suo                |  Bin 9728 -> 8704 bytes
 .../convex_hull/vc9/convex_hull_benchmark.vcproj   |   36 +-
 .../convex_hull/vc9/convex_hull_sample.vcproj      |   24 +-
 .../xcode/convex_hull.xcodeproj/project.pbxproj    |    8 +-
 examples/parallel_reduce/primes/Makefile           |    4 +-
 examples/parallel_reduce/primes/Makefile.windows   |    8 +-
 .../parallel_reduce/primes/vc7.1/primes.vcproj     |   12 +-
 examples/parallel_reduce/primes/vc8/primes.vcproj  |   24 +-
 examples/parallel_reduce/primes/vc9/primes.suo     |  Bin 8192 -> 7680 bytes
 examples/parallel_reduce/primes/vc9/primes.vcproj  |   24 +-
 .../primes/xcode/primes.xcodeproj/project.pbxproj  |    8 +-
 .../parallel_while/parallel_preorder/Graph.cpp     |    5 +-
 examples/parallel_while/parallel_preorder/Makefile |    4 +-
 .../parallel_preorder/Makefile.windows             |    8 +-
 .../parallel_preorder/parallel_preorder.cpp        |   11 +-
 .../vc7.1/parallel_preorder.vcproj                 |   12 +-
 .../parallel_preorder/vc8/parallel_preorder.vcproj |   24 +-
 .../parallel_preorder/vc9/parallel_preorder.suo    |  Bin 8704 -> 7680 bytes
 .../parallel_preorder/vc9/parallel_preorder.vcproj |   24 +-
 .../parallel_preorder.xcodeproj/project.pbxproj    |    8 +-
 examples/pipeline/text_filter/Makefile             |   12 +-
 examples/pipeline/text_filter/Makefile.windows     |   15 +-
 examples/pipeline/text_filter/text_filter.cpp      |   32 +-
 .../pipeline/text_filter/vc7.1/text_filter.vcproj  |   16 +-
 .../pipeline/text_filter/vc8/text_filter.vcproj    |   32 +-
 examples/pipeline/text_filter/vc9/text_filter.suo  |  Bin 8192 -> 7680 bytes
 .../pipeline/text_filter/vc9/text_filter.vcproj    |   32 +-
 .../xcode/text_filter.xcodeproj/project.pbxproj    |   10 +-
 examples/task/tree_sum/Makefile                    |    6 +-
 examples/task/tree_sum/Makefile.windows            |    8 +-
 examples/task/tree_sum/vc7.1/tree_sum.vcproj       |   12 +-
 examples/task/tree_sum/vc8/tree_sum.vcproj         |   24 +-
 examples/task/tree_sum/vc9/tree_sum.suo            |  Bin 9216 -> 8704 bytes
 examples/task/tree_sum/vc9/tree_sum.vcproj         |   24 +-
 .../xcode/tree_sum.xcodeproj/project.pbxproj       |    8 +-
 examples/test_all/fibonacci/Fibonacci.cpp          |   54 +-
 examples/test_all/fibonacci/Makefile               |    6 +-
 examples/test_all/fibonacci/Makefile.windows       |   10 +-
 examples/test_all/fibonacci/vc7.1/fibonacci.vcproj |   12 +-
 examples/test_all/fibonacci/vc8/fibonacci.vcproj   |   24 +-
 examples/test_all/fibonacci/vc9/fibonacci.suo      |  Bin 9216 -> 8704 bytes
 examples/test_all/fibonacci/vc9/fibonacci.vcproj   |   24 +-
 .../xcode/fibonacci.xcodeproj/project.pbxproj      |    8 +-
 include/tbb/_tbb_windef.h                          |   31 +-
 include/tbb/aligned_space.h                        |   13 +-
 include/tbb/atomic.h                               |   79 +-
 include/tbb/blocked_range.h                        |   11 +-
 include/tbb/concurrent_hash_map.h                  |  921 ++++++----
 include/tbb/concurrent_queue.h                     |  102 +-
 include/tbb/concurrent_vector.h                    |  669 ++++++--
 .../tbb/machine/ibm_aix51.h                        |   29 +-
 include/tbb/machine/linux_em64t.h                  |   24 +-
 include/tbb/machine/linux_ia32.h                   |   52 +-
 include/tbb/machine/linux_itanium.h                |   23 +-
 include/tbb/machine/mac_ppc.h                      |   40 +-
 include/tbb/machine/windows_em64t.h                |   30 +-
 include/tbb/machine/windows_ia32.h                 |   49 +-
 include/tbb/machine/windows_ia32_inline.h          |   10 +
 include/tbb/mutex.h                                |   13 +-
 include/tbb/parallel_do.h                          |  450 +++++
 include/tbb/parallel_for.h                         |  141 +-
 include/tbb/parallel_reduce.h                      |  304 +++-
 include/tbb/parallel_scan.h                        |  148 +-
 include/tbb/parallel_sort.h                        |   29 +-
 include/tbb/parallel_while.h                       |    3 -
 include/tbb/partitioner.h                          |  175 +-
 include/tbb/pipeline.h                             |   47 +-
 include/tbb/queuing_mutex.h                        |    5 +
 include/tbb/queuing_rw_mutex.h                     |    5 +
 include/tbb/{mutex.h => recursive_mutex.h}         |   77 +-
 include/tbb/scalable_allocator.h                   |   23 +-
 include/tbb/spin_mutex.h                           |   11 +-
 include/tbb/spin_rw_mutex.h                        |   72 +-
 include/tbb/task.h                                 |  277 ++-
 include/tbb/task_scheduler_init.h                  |   27 +-
 .../tbb/task_scheduler_observer.h                  |   43 +-
 .../tbb/{scalable_allocator.h => tbb_allocator.h}  |  120 +-
 include/tbb/tbb_exception.h                        |  242 +++
 include/tbb/tbb_machine.h                          |  252 +--
 include/tbb/tbb_stddef.h                           |  113 +-
 include/tbb/tbb_thread.h                           |  285 ++++
 include/tbb/tick_count.h                           |   19 +
 index.html                                         |    4 +
 src/Makefile                                       |  156 ++
 src/old/concurrent_queue_v2.cpp                    |  383 +++++
 .../old/concurrent_queue_v2.h                      |    2 +-
 .../concurrent_vector_v2.cpp}                      |   13 +-
 .../old/concurrent_vector_v2.h                     |   10 +-
 .../spin_rw_mutex.cpp => old/spin_rw_mutex_v2.cpp} |    6 +-
 .../spin_rw_mutex.h => src/old/spin_rw_mutex_v2.h  |    2 +-
 .../test_concurrent_queue_v2.cpp}                  |    4 +-
 .../test_concurrent_vector_v2.cpp}                 |   38 +-
 src/{test/test_mutex.cpp => old/test_mutex_v2.cpp} |   32 +-
 .../aligned_space.h => src/perf/harness_barrier.h  |   62 +-
 src/perf/perf_util.h                               |  291 ++++
 src/perf/statistics.cpp                            |  411 +++++
 src/perf/statistics.h                              |  188 ++
 src/perf/statistics_xml.h                          |  208 +++
 src/perf/time_base.cpp                             |  260 +++
 src/perf/time_framework.h                          |  280 +++
 src/perf/time_hash_map.cpp                         |  347 ++++
 src/perf/time_unit.cpp                             |  291 ++++
 src/perf/time_vector.cpp                           |  256 +++
 src/tbb/Makefile                                   |   45 -
 src/tbb/cache_aligned_allocator.cpp                |  151 +-
 src/tbb/concurrent_hash_map.cpp                    |    2 +-
 src/tbb/concurrent_queue.cpp                       |  735 ++++----
 src/tbb/concurrent_vector.cpp                      |  385 +++--
 src/tbb/em64t-tbb-mac-export.txt                   |  127 --
 src/tbb/gate.h                                     |  103 +-
 src/tbb/ia32-masm/atomic_support.asm               |   24 +-
 src/tbb/ia32-tbb-mac-export.txt                    |  127 --
 .../atomic_support.c}                              |   30 +-
 src/tbb/itanium-gas/lock_byte.s                    |    2 +-
 src/tbb/itanium-tbb.def                            |  169 --
 src/tbb/itt_notify.cpp                             |   56 +-
 src/tbb/lin32-tbb-export.def                       |  292 ++++
 src/tbb/lin64-tbb-export.def                       |  288 ++++
 src/tbb/lin64ipf-tbb-export.def                    |  332 ++++
 src/tbb/mac32-tbb-export.def                       |  276 +++
 src/tbb/mac64-tbb-export.def                       |  275 +++
 src/tbb/mutex.cpp                                  |   40 +-
 src/tbb/pipeline.cpp                               |  137 +-
 src/tbb/recursive_mutex.cpp                        |  141 ++
 src/tbb/spin_mutex.cpp                             |    2 +-
 src/tbb/spin_rw_mutex.cpp                          |  152 +-
 src/tbb/task.cpp                                   | 1799 +++++++++++++++++---
 src/tbb/tbb_assert_impl.h                          |   93 +
 src/tbb/tbb_misc.cpp                               |  150 +-
 src/tbb/tbb_misc.h                                 |  106 +-
 src/tbb/tbb_thread.cpp                             |  209 +++
 src/tbb/tbb_version.h                              |   16 +-
 src/tbb/{ia32-tbb.def => win32-tbb-export.def}     |   99 +-
 src/tbb/{em64t-tbb.def => win64-tbb-export.def}    |  101 +-
 src/tbbmalloc/Customize.h                          |   32 +-
 src/tbbmalloc/MemoryAllocator.cpp                  |  391 ++---
 src/tbbmalloc/TypeDefinitions.h                    |    4 +-
 .../lin-tbbmalloc-export.def}                      |   20 +-
 ...c-mac-export.txt => mac32-tbbmalloc-export.def} |    0
 ...c-mac-export.txt => mac64-tbbmalloc-export.def} |    0
 src/tbbmalloc/tbbmalloc.cpp                        |   33 +-
 ...em64t-malloc.def => win32-tbbmalloc-export.def} |    0
 ...{ia32-malloc.def => win64-tbbmalloc-export.def} |    0
 src/test/Makefile                                  |   44 -
 src/test/harness.h                                 |   55 +-
 src/test/harness_allocator.h                       |   90 +-
 src/test/harness_assert.h                          |    4 +-
 src/test/harness_bad_expr.h                        |    4 +-
 src/test/harness_cpu.h                             |   49 +-
 ..._cache_aligned_allocator.cpp => harness_m128.h} |   18 +-
 src/test/harness_memory.h                          |    2 +-
 src/test/harness_trace.h                           |  132 ++
 src/test/test_ScalableAllocator.cpp                |   26 +-
 src/test/test_ScalableAllocator_STL.cpp            |   15 +-
 src/test/test_aligned_space.cpp                    |   61 +-
 src/test/test_assembly.cpp                         |   44 +-
 src/test/test_atomic.cpp                           |  166 +-
 src/test/test_blocked_range.cpp                    |   14 +-
 src/test/test_blocked_range2d.cpp                  |    4 +-
 src/test/test_blocked_range3d.cpp                  |    4 +-
 src/test/test_cache_aligned_allocator.cpp          |    3 +
 src/test/test_cache_aligned_allocator_STL.cpp      |   11 +-
 ...aligned_allocator_STL.cpp => test_compiler.cpp} |   58 +-
 src/test/test_concurrent_hash_map.cpp              |  433 ++++-
 src/test/test_concurrent_queue.cpp                 |  162 ++
 src/test/test_concurrent_vector.cpp                |  492 +++++-
 src/test/test_eh_algorithms.cpp                    |  605 +++++++
 src/test/test_eh_tasks.cpp                         |  806 +++++++++
 src/test/test_inits_loop.cpp                       |   16 +-
 src/test/test_malloc_compliance.cpp                |   24 +-
 src/test/test_model_plugin.cpp                     |  116 +-
 src/test/test_mutex.cpp                            |  189 +-
 src/test/test_mutex_native_threads.cpp             |   14 +-
 src/test/test_parallel_do.cpp                      |  278 +++
 src/test/test_parallel_for.cpp                     |   15 +-
 src/test/test_parallel_reduce.cpp                  |   94 +-
 src/test/test_parallel_scan.cpp                    |    6 +-
 src/test/test_parallel_sort.cpp                    |    2 +-
 src/test/test_parallel_while.cpp                   |    2 +-
 src/test/test_pipeline.cpp                         |  154 +-
 src/test/test_task.cpp                             |  224 ++-
 src/test/test_task_assertions.cpp                  |  119 ++
 src/test/test_task_leaks.cpp                       |  114 +-
 src/test/test_task_scheduler_init.cpp              |   18 +-
 src/test/test_task_scheduler_observer.cpp          |  165 ++
 src/test/test_tbb_thread.cpp                       |  268 +++
 src/test/test_tbb_version.cpp                      |  226 +++
 665 files changed, 43439 insertions(+), 7623 deletions(-)

diff --git a/CHANGES b/CHANGES
new file mode 100644
index 0000000..89c0d74
--- /dev/null
+++ b/CHANGES
@@ -0,0 +1,368 @@
+-------------------------------------------------------------------------------
+20080605 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Exported symbols now explicitly controlled with version scripts on Linux
+- Interfaces polished for exception handling & algorithm cancellation
+- Cache behavior improvements in the scalable allocator
+- Improvements in text_filter, polygon_overlay, and other examples
+- A lot of other stability improvements in code, tests, and makefiles
+
+Open-source contributions integrated:
+
+- atomics patch (partially).
+- tick_count warning patch
+
+Bugs fixed:
+
+- 118 - fix for boost compatibility.
+- 123 - fix for tbb_machine.h.
+
+-------------------------------------------------------------------------------
+20080512 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Fixed problem with backward binary compatibility of debug Linux builds
+- Sun* Studio* support added
+- soname support added on Linux via linker script. To restore backward 
+    binary compatibility *.so -> *.so.2 softlinks should be created
+- concurrent_hash_map improvements - added few new forms of insert() 
+    method and fixed precondition and guarantees of erase() methods.   
+    Added runtime warning reporting about bad hash function used for 
+    the container. Various improvements for performance and concurrency.
+- Cancellation mechanism reimplemented so that it does not hurt scalability
+- Algorithm parallel_do reworked. Requirement for Body::argument_type 
+    definition removed, and work item argument type can be arbitrarily 
+    cv-qualified.
+- polygon_overlay example added.
+- A few more improvements to code, tests, examples and Makefiles.
+
+Open-source contributions integrated:
+
+- Soname support patch for Bugzilla #112.
+
+Bugs fixed:
+
+- 112 - fix for soname support.
+
+-------------------------------------------------------------------------------
+TBB 2.0 U3 commercial-aligned release (package 017, April 20, 2008)
+
+Corresponds to commercial 019 (for Linux*, 020; for Mac OS* X, 018)
+packages.
+
+Changes (w.r.t. TBB 2.0 U2 commercial-aligned release):
+
+- Does not contain open-source-release changes below; this release is
+    only a minor update of TBB 2.0 U2.
+- Removed spin-waiting in pipeline and concurrent_queue.
+- A few more small bug fixes from open-source releases below.
+
+-------------------------------------------------------------------------------
+20080408 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- count_strings example reworked: new word generator implemented, hash 
+    function replaced, and tbb_allocator is used with std::string class.
+- Static methods of spin_rw_mutex were replaced by normal member 
+    functions, and the class name was versioned.
+- tacheon example was renamed to tachyon.
+- Improved support for Intel(R) Thread Checker.
+- A few more minor improvements.
+
+Open-source contributions integrated:
+
+- Two sets of Sun patches for IA Solaris support.
+
+-------------------------------------------------------------------------------
+20080402 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Exception handling and cancellation support for tasks and algorithms 
+    fully enabled.  
+- Exception safety guaranties defined and fixed for all concurrent 
+    containers
+- User-defined memory allocator support added to all concurrent 
+    containers
+- Performance improvement of concurrent_hash_map, spin_rw_mutex
+- Critical fix for a rare race condition during scheduler 
+    initialization/de-initialization
+- New methods added for concurrent containers to be closer to STL, as 
+    well as automatic filters removal from pipeline and __TBB_AtomicAND 
+    function
+- The volatile keyword dropped from where it is not really needed.
+- A few more minor improvements.
+
+-------------------------------------------------------------------------------
+20080319 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Support for gcc version 4.3 was added.
+- tbb_thread class, near compatible with std::thread expected in C++0x, 
+    was added.
+
+Bugs fixed:
+
+- 116 - fix for compilation issues with gcc version 4.2.1.
+- 120 - fix for compilation issues with gcc version 4.3.
+ 
+-------------------------------------------------------------------------------
+20080311 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- An enumerator added for pipeline filter types (serial vs. parallel).
+- New task_scheduler_observer class introduced, to observe when
+    threads start and finish interacting with the TBB task scheduler.
+- task_scheduler_init reverted to not use internal versioned class;
+    binary compatibility guaranteed with stable releases only.
+- Various improvements to code, tests, examples and Makefiles.
+ 
+-------------------------------------------------------------------------------
+20080304 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Task-to-thread affinity support, previously kept under a macro,
+    now fully legalized.
+- Work-in-progress on cache_aligned_allocator improvements.
+- Pipeline really supports parallel input stage; it's no more serialized.
+- Various improvements to code, tests, examples and Makefiles.
+ 
+Bugs fixed:
+
+- 119 - fix for scalable_malloc sometimes failing to return a big block.
+- TR575 - fixed a deadlock occurring on Windows in startup/shutdown
+    under some conditions.
+
+-------------------------------------------------------------------------------
+20080226 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Introduced tbb_allocator to select between standard allocator and
+    tbb::scalable_allocator when available.
+- Removed spin-waiting in pipeline and concurrent_queue.
+- Improved performance of concurrent_hash_map by using tbb_allocator.
+- Improved support for Intel(R) Thread Checker.
+- Various improvements to code, tests, examples and Makefiles.
+
+-------------------------------------------------------------------------------
+TBB 2.0 U2 commercial-aligned release (package 017, February 14, 2008)
+
+Corresponds to commercial 017 (for Linux*, 018; for Mac OS* X, 016)
+packages.
+
+Changes (w.r.t. TBB 2.0 U1 commercial-aligned release):
+
+- Does not contain open-source-release changes below; this release is
+    only a minor update of TBB 2.0 U1.
+- Add support for Microsoft* Visual Studio* 2008, including binary
+    libraries and VS2008 projects for examples.
+- Use SwitchToThread() not Sleep() to yield threads on Windows*.
+- Enhancements to Doxygen-readable comments in source code.
+- A few more small bug fixes from open-source releases below.
+
+Bugs fixed:
+
+- TR569 - Memory leak in concurrent_queue.
+
+-------------------------------------------------------------------------------
+20080207 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Improvements and minor fixes in VS2008 projects for examples.
+- Improvements in code for gating worker threads that wait for work,
+  previously consolidated under #if IMPROVED_GATING, now legalized.
+- Cosmetic changes in code, examples, tests.
+
+Bugs fixed:
+
+- 113 - Iterators and ranges should be convertible to their const
+    counterparts.
+- TR569 - Memory leak in concurrent_queue.
+
+-------------------------------------------------------------------------------
+20080122 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Updated examples/parallel_for/seismic to improve the visuals and to
+    use the affinity_partitioner (20071127 and forward) for better
+    performance.
+- Minor improvements to unittests and performance tests.
+
+-------------------------------------------------------------------------------
+20080115 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Cleanup, simplifications and enhancements to the Makefiles for
+    building the libraries (see build/index.html for high-level
+    changes) and the examples.
+- Use SwitchToThread() not Sleep() to yield threads on Windows*.
+- Engineering work-in-progress on exception safety/support.
+- Engineering work-in-progress on affinity_partitioner for
+    parallel_reduce.
+- Engineering work-in-progress on improved gating for worker threads
+    (idle workers now block in the OS instead of spinning).
+- Enhancements to Doxygen-readable comments in source code.
+
+Bugs fixed:
+
+- 102 - Support for parallel build with gmake -j
+- 114 - /Wp64 build warning on Windows*.
+
+-------------------------------------------------------------------------------
+20071218 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Full support for Microsoft* Visual Studio* 2008 in open-source.
+    Binaries for vc9/ will be available in future stable releases.
+- New recursive_mutex class.
+- Full support for 32-bit PowerMac including export files for builds.
+- Improvements to parallel_do.
+
+-------------------------------------------------------------------------------
+20071206 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Support for Microsoft* Visual Studio* 2008 in building libraries
+    from source as well as in vc9/ projects for examples.
+- Small fixes to the affinity_partitioner first introduced in 20071127.
+- Small fixes to the thread-stack size hook first introduced in 20071127.
+- Engineering work in progress on concurrent_vector.
+- Engineering work in progress on exception behavior.
+- Unittest improvements.
+
+-------------------------------------------------------------------------------
+20071127 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- Task-to-thread affinity support (affinity partitioner) first appears.
+- More work on concurrent_vector.
+- New parallel_do algorithm (function-style version of parallel while)
+    and parallel_do/parallel_preorder example.
+- New task_scheduler_init() hooks for getting default_num_threads() and
+    for setting thread stack size.
+- Support for weak memory consistency models in the code base.
+- Futex usage in the task scheduler (Linux).
+- Started adding 32-bit PowerMac support.
+- Intel(R) 9.1 compilers are now the base supported Intel(R) compiler
+    version.
+- TBB libraries added to link line automatically on Microsoft Windows*
+    systems via #pragma comment linker directives.
+
+Open-source contributions integrated:
+
+- FreeBSD platform support patches.
+- AIX weak memory model patch.
+
+Bugs fixed:
+
+- 108 - Removed broken affinity.h reference.
+- 101 - Does not build on Debian Lenny (replaced arch with uname -m).
+
+-------------------------------------------------------------------------------
+20071030 open-source release
+
+Changes (w.r.t. previous open-source release):
+
+- More work on concurrent_vector.
+- Better support for building with -Wall -Werror (or not) as desired.
+- A few fixes to eliminate extraneous warnings.
+- Begin introduction of versioning hooks so that the internal/API
+    version is tracked via TBB_INTERFACE_VERSION.  The newest binary
+    libraries should always work with previously-compiled code when-
+    ever possible.
+- Engineering work in progress on using futex inside the mutexes (Linux).
+- Engineering work in progress on exception behavior.
+- Engineering work in progress on a new parallel_do algorithm.
+- Unittest improvements.
+
+-------------------------------------------------------------------------------
+20070927 open-source release
+
+Changes:
+
+- Minor update to TBB 2.0 U1 below.
+- Begin introduction of new concurrent_vector interfaces not released
+    with TBB 2.0 U1.
+
+-------------------------------------------------------------------------------
+TBB 2.0 U1 commercial-aligned release (package 014, October 1, 2007)
+
+Corresponds to commercial 014 (for Linux*, 016) packages.
+
+Changes (w.r.t. previous commercial-aligned release):
+
+- All open-source-release changes down to, and including, TBB 2.0 GOLD
+    below, were incorporated into this release.
+- Made a number of changes to the officially supported OS list:
+    Added Linux* OSs:
+	Asianux* 3, Debian* 4.0, Fedora Core* 6, Fedora* 7,
+	Turbo Linux* 11, Ubuntu* 7.04
+    Dropped Linux* OSs:
+	Asianux* 2, Fedora Core* 4, Haansoft* Linux 2006 Server,
+	Mandriva/Mandrake* 10.1, Miracle Linux* 4.0,
+	Red Flag* DC Server 5.0
+    Only Mac OS* X 10.4.9 (and forward) and Xcode* tool suite 2.4.1 (and
+	forward) are now supported
+- Commercial installers on Linux* fixed to recommend the correct
+    binaries to use in more cases, with less unnecessary warnings.
+- Changes to eliminate spurious build warnings.
+
+Open-source contributions integrated:
+
+- Two small header guard macro patches; it also fixed bug #94.
+- New blocked_range3d class.
+
+Bugs fixed:
+
+- 93 - Removed misleading comments in task.h.
+- 94 - See above.
+
+-------------------------------------------------------------------------------
+20070815 open-source release
+
+Changes:
+
+- Changes to eliminate spurious build warnings.
+- Engineering work in progress on concurrent_vector allocator behavior.
+- Added hooks to use the Intel(R) compiler code coverage tools.
+
+Open-source contributions integrated:
+
+- Mac OS* X build warning patch.
+
+Bugs fixed:
+
+- 88 - Fixed TBB compilation errors if both VS2005 and Windows SDK are
+    installed.
+
+-------------------------------------------------------------------------------
+20070719 open-source release
+
+Changes:
+
+- Minor update to TBB 2.0 GOLD below.
+- Changes to eliminate spurious build warnings.
+
+-------------------------------------------------------------------------------
+TBB 2.0 GOLD commercial-aligned release (package 010, July 19, 2007)
+
+Corresponds to commercial 010 (for Linux*, 012) packages.
+
+- TBB open-source debut release.
+
+-------------------------------------------------------------------------------
+* Other names and brands may be claimed as the property of others.
diff --git a/Makefile b/Makefile
index 8715fcb..6c442b4 100644
--- a/Makefile
+++ b/Makefile
@@ -26,93 +26,50 @@
 
 tbb_root?=.
 include $(tbb_root)/build/common.inc
-.PHONY: all tbb tbbmalloc test debug examples clean
+.PHONY: default all tbb tbbmalloc test examples
 
-all: release debug examples
+#workaround for non-depend targets tbb and tbbmalloc which both depend on version_string.tmp
+#According to documentation submakes should run in parallel
+.NOTPARALLEL: tbb tbbmalloc
 
-tbb: tbb_release tbb_debug
+default: tbb tbbmalloc
 
-tbbmalloc: tbbmalloc_release tbbmalloc_debug
+all: tbb tbbmalloc test examples
 
-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
-
-release: tbb_release tbbmalloc_release tbbmalloc_test_release test_release
- 
-debug: tbb_debug tbbmalloc_debug tbbmalloc_test_debug test_debug
-
-examples: tbb tbbmalloc examples_debug clean_examples examples_release
-
-clean: clean_release clean_debug clean_examples
-	@echo clean done
-
-
-.PHONY: tbb_release tbb_debug test_release test_debug
-
-# do not delete double-space after -C option
-tbb_release: mkdir_release
-	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbb cfg=release tbb_root=$(tbb_root)
-
-tbb_debug: mkdir_debug
+tbb: mkdir
 	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbb cfg=debug tbb_root=$(tbb_root)
+	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbb cfg=release tbb_root=$(tbb_root)
 
-test_release: mkdir_release tbb_release test_release_no_depends
-test_release_no_depends: 
-	-$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root) 
-
-test_debug: tbb_debug mkdir_debug test_debug_no_depends
-test_debug_no_depends:
-	-$(MAKE) -C "$(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
-
-tbbmalloc_release: mkdir_release
-	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc tbb_root=$(tbb_root)
-
-tbbmalloc_debug: mkdir_debug
+tbbmalloc: mkdir
 	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc tbb_root=$(tbb_root)
+	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc tbb_root=$(tbb_root)
 
-tbbmalloc_test_release: tbb_release tbbmalloc_release mkdir_release tbbmalloc_test_release_no_depends
-tbbmalloc_test_release_no_depends:
-	-$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test tbb_root=$(tbb_root)
-
-tbbmalloc_test_debug: tbb_debug tbbmalloc_debug mkdir_debug tbbmalloc_test_debug_no_depends
-tbbmalloc_test_debug_no_depends:
+test: tbb tbbmalloc
 	-$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test tbb_root=$(tbb_root)
+	-$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root)
+	-$(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) 
 
-.PHONY: examples_release examples_debug
 
-examples_release: tbb_release tbbmalloc_release
+examples: tbb tbbmalloc
 	$(MAKE) -C examples -r -f Makefile tbb_root=.. release test
 
-examples_debug: tbb_debug tbbmalloc_debug
-	$(MAKE) -C examples -r -f Makefile tbb_root=.. debug test
+.PHONY: clean clean_examples mkdir info
 
-.PHONY: clean_release clean_debug clean_examples
-
-clean_%:
-	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root) $@
-	
-clean_release:
-	$(shell $(RM) $(work_dir)_release$(SLASH)*.* $(NUL))
-	$(shell $(RD) $(work_dir)_release $(NUL))
+clean: clean_examples
+	$(shell $(RM) $(work_dir)_release$(SLASH)*.* >$(NUL) 2>$(NUL))
+	$(shell $(RD) $(work_dir)_release >$(NUL) 2>$(NUL))
+	$(shell $(RM) $(work_dir)_debug$(SLASH)*.* >$(NUL) 2>$(NUL))
+	$(shell $(RD) $(work_dir)_debug >$(NUL) 2>$(NUL))
+	@echo clean done
 
-clean_debug:
-	$(shell $(RM) $(work_dir)_debug$(SLASH)*.* $(NUL))
-	$(shell $(RD) $(work_dir)_debug $(NUL))
-	
 clean_examples:
-	$(shell $(MAKE) -s -i -r -C examples -f Makefile tbb_root=.. clean $(NUL))
+	$(shell $(MAKE) -s -i -r -C examples -f Makefile tbb_root=.. clean >$(NUL) 2>$(NUL))
 
-.PHONY: mkdir_release mkdir_debug
-
-mkdir_release:
-	$(shell $(MD) "$(work_dir)_release" $(NUL))
+mkdir:
+	$(shell $(MD) "$(work_dir)_release" >$(NUL) 2>$(NUL))
 	$(if $(subst undefined,,$(origin_build_dir)),,cd "$(work_dir)_release" && $(MAKE_TBBVARS) $(tbb_build_prefix)_release)
-
-mkdir_debug:
-	$(shell $(MD) "$(work_dir)_debug" $(NUL))
+	$(shell $(MD) "$(work_dir)_debug" >$(NUL) 2>$(NUL))
 	$(if $(subst undefined,,$(origin_build_dir)),,cd "$(work_dir)_debug" && $(MAKE_TBBVARS) $(tbb_build_prefix)_debug)
 
 info:
@@ -121,3 +78,4 @@ info:
 	@echo compiler=$(compiler)
 	@echo runtime=$(runtime)
 	@echo tbb_build_prefix=$(tbb_build_prefix)
+
diff --git a/README b/README
index 64a8e83..67ab8ad 100644
--- a/README
+++ b/README
@@ -1,5 +1,11 @@
 Threading Building Blocks - README
 
-To build and test, type 'gmake' in this directory.
-
 See index.html for directions and documentation.
+
+If source is present (./Makefile and src/ directories),
+type 'gmake' in this directory to build and test.
+
+See examples/index.html for runnable examples and directions.
+
+See http://threadingbuildingblocks.org for full documentation
+and software information.
diff --git a/build/FreeBSD.gcc.inc b/build/FreeBSD.gcc.inc
index 893be20..48225e1 100644
--- a/build/FreeBSD.gcc.inc
+++ b/build/FreeBSD.gcc.inc
@@ -25,28 +25,29 @@
 # the GNU General Public License.
 
 COMPILE_ONLY = -c -MMD
-PREPROC_ONLY = -E -MMD
+PREPROC_ONLY = -E -x c
 INCLUDE_KEY = -I
 DEFINE_KEY = -D
 OUTPUT_KEY = -o #
 OUTPUTOBJ_KEY = -o #
 PIC_KEY = -fPIC
+WARNING_AS_ERROR_KEY = -Werror
+WARNING_KEY = -Wall
 DYLIB_KEY = -shared
-LIBDL = -ldl
+#LIBDL = -ldl
 
 TBB_NOSTRICT = 1
 
 CPLUS = g++ 
-INCLUDES += -I$(tbb_root)/src/tbb -I$(tbb_root)/include -I$(tbb_root)/src
 LIB_LINK_FLAGS = -shared
-LIBS = -lpthread
+LIBS = -lpthread 
 C_FLAGS = $(CPLUS_FLAGS) -x c
 
 ifeq ($(cfg), release)
-        CPLUS_FLAGS = -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD -D__linux__ -D__custom_linux__
+        CPLUS_FLAGS = -O2 -DUSE_PTHREAD
 endif
 ifeq ($(cfg), debug)
-        CPLUS_FLAGS = -DTBB_DO_ASSERT -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -D__linux__ -D__custom_linux__
+        CPLUS_FLAGS = -DTBB_DO_ASSERT -g -O0 -DUSE_PTHREAD
 endif
 
 ASM=
@@ -55,9 +56,8 @@ ASM_FLAGS=
 TBB_ASM.OBJ=
 
 ifeq (itanium,$(arch))
-# Position-independent code (PIC) is a must for IA-64
+# Position-independent code (PIC) is a must on IA-64, even for regular (not shared) executables
     CPLUS_FLAGS += $(PIC_KEY)
-    $(PIC_KEY) = 
 endif 
 
 ifeq (em64t,$(arch))
@@ -80,7 +80,7 @@ endif
 
 ASSEMBLY_SOURCE=$(arch)-gas
 ifeq (itanium,$(arch))
-    ASM=ias
+    ASM=as
     TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
 endif 
 #------------------------------------------------------------------------------
@@ -90,8 +90,9 @@ endif
 #------------------------------------------------------------------------------
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
-M_INCLUDES = $(INCLUDES) -I$(MALLOC_ROOT) -I$(MALLOC_SOURCE_ROOT)
+
 M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions -fno-schedule-insns2
+
 #------------------------------------------------------------------------------
 # End of setting tbbmalloc data.
 #------------------------------------------------------------------------------
diff --git a/build/FreeBSD.inc b/build/FreeBSD.inc
index f0f9408..77dc13c 100644
--- a/build/FreeBSD.inc
+++ b/build/FreeBSD.inc
@@ -28,15 +28,18 @@ ifndef arch
         ifeq ($(shell uname -m),i386)
                 export arch:=ia32
         endif
+        ifeq ($(shell uname -m),ia64)
+                export arch:=itanium
+        endif
+        ifeq ($(shell uname -m),amd64)
+                export arch:=em64t
+        endif
 endif
 
 ifndef runtime
         gcc_version:=$(shell gcc -v 2>&1 | grep 'gcc version' | sed -e 's/^gcc version //' | sed -e 's/ .*$$//')
         os_version:=$(shell uname -r)
         os_kernel_version:=$(shell uname -r | sed -e 's/-.*$$//')
-#        export os_glibc_version_full:=$(shell rpm -qa | grep '^glibc-[0-9]' | sort -u | sed -e 's/^glibc-//')
-#        os_glibc_version:=$(shell echo "$(os_glibc_version_full)" | sed -e '2,$$d' -e 's/-.*$$//')
-#        export runtime:=cc$(gcc_version)_libc$(os_glibc_version)_kernel$(os_kernel_version)
         export runtime:=cc$(gcc_version)_kernel$(os_kernel_version)
 endif
 
@@ -44,11 +47,12 @@ native_compiler := gcc
 export compiler ?= gcc
 debugger ?= gdb
 
+CMD=$(SHELL) -c
 CWD=$(shell pwd)
 RM?=rm -f
 RD?=rmdir
 MD?=mkdir -p
-NUL= > /dev/null 2>&1
+NUL= /dev/null
 SLASH=/
 MAKE_VERSIONS=sh $(tbb_root)/build/version_info_linux.sh $(CPLUS) $(CPLUS_FLAGS) $(INCLUDES) >version_string.tmp
 MAKE_TBBVARS=sh $(tbb_root)/build/generate_tbbvars.sh
@@ -64,18 +68,12 @@ endif
 OBJ = o
 DLL = so
 
-ifeq ($(cfg),debug)
-    DEBUG_SUFFIX = _debug
-endif
-
 TBB.DEF = 
 TBB.DLL = libtbb$(DEBUG_SUFFIX).$(DLL)
 TBB.LIB = $(TBB.DLL)
+LINK_TBB.LIB = $(TBB.LIB)
 
-MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).so
+MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
 MALLOC.LIB = $(MALLOC.DLL)
 
 TBB_NOSTRICT=1
-
-
-
diff --git a/build/Makefile.tbb b/build/Makefile.tbb
index a6449bf..c78aabc 100644
--- a/build/Makefile.tbb
+++ b/build/Makefile.tbb
@@ -28,9 +28,10 @@
 # Define rules for making the TBB shared library.
 #------------------------------------------------------------------------------
 
-tbb_root ?= "$(TBB20_INSTALL_DIR)"
+tbb_root ?= "$(TBB21_INSTALL_DIR)"
 BUILDING_PHASE=1
 include $(tbb_root)/build/common.inc
+DEBUG_SUFFIX=$(findstring _debug,_$(cfg))
 
 #------------------------------------------------------------
 # Define static pattern rules dealing with .cpp source files
@@ -41,9 +42,9 @@ default_tbb: $(TBB.DLL)
 .PHONY: default_tbb tbbvars clean
 .PRECIOUS: %.$(OBJ)
 
-VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb
+VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/src/old
 
-CPLUS_FLAGS += $(PIC_KEY) $(WARNING_KEY)
+CPLUS_FLAGS += $(PIC_KEY) $(DEFINE_KEY)__TBB_BUILD=1
 
 ifeq (1,$(TBB_NOSTRICT))
 # GNU 3.2.3 headers have a ISO syntax that is rejected by Intel compiler in -strict_ansi mode.
@@ -51,12 +52,11 @@ ifeq (1,$(TBB_NOSTRICT))
 # The files below need the -strict_ansi flag downgraded to -ansi to compile
 
 KNOWN_NOSTRICT = concurrent_hash_map.o \
+	concurrent_vector_v2.o \
 	concurrent_vector.o
 
 endif
 
-include $(tbb_root)/build/common_rules.inc
-
 # Object files (that were compiled from C++ code) that gmake up TBB
 TBB_CPLUS.OBJ = concurrent_hash_map.$(OBJ) \
 		concurrent_queue.$(OBJ) \
@@ -70,14 +70,42 @@ TBB_CPLUS.OBJ = concurrent_hash_map.$(OBJ) \
 		spin_mutex.$(OBJ) \
 		task.$(OBJ) \
 		tbb_misc.$(OBJ) \
-		mutex.$(OBJ) 
+		mutex.$(OBJ) \
+		recursive_mutex.$(OBJ) \
+		tbb_thread.$(OBJ)
+
+# OLD/Legacy object files for backward binary compatibility
+ifeq (,$(findstring $(DEFINE_KEY)TBB_NO_LEGACY,$(CPLUS_FLAGS)))
+TBB_CPLUS_OLD.OBJ = \
+		concurrent_vector_v2.$(OBJ) \
+		concurrent_queue_v2.$(OBJ) \
+		spin_rw_mutex_v2.$(OBJ)
+endif
 
 # Object files that gmake up TBB (TBB_ASM.OBJ is platform-specific)
-TBB.OBJ = $(TBB_CPLUS.OBJ) $(TBB_ASM.OBJ)
+TBB.OBJ = $(TBB_CPLUS.OBJ) $(TBB_CPLUS_OLD.OBJ) $(TBB_ASM.OBJ)
+
+# Suppress superfluous warnings for TBB compilation
+WARNING_KEY += $(WARNING_SUPPRESS)
+
+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"
 
-$(TBB.DLL): $(TBB.OBJ) $(TBB.DEF) $(TBB.RES) tbbvars
-	$(CPLUS) $(TBB.OBJ) $(TBB.RES) $(LIBS) $(PIC_KEY) $(OUTPUT_KEY)$(TBB.DLL) $(LIB_LINK_FLAGS)
+LIB_LINK_FLAGS += $(EXPORT_KEY)tbb.def
+$(TBB.DLL): tbb.def
+endif
 
+$(TBB.DLL): BUILDING_LIBRARY = $(TBB.DLL)
+$(TBB.DLL): $(TBB.OBJ) $(TBB.RES) tbbvars $(TBB_NO_VERSION.DLL)
+	$(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(TBB.DLL) $(TBB.OBJ) $(TBB.RES) $(LIB_LINK_LIBS) $(LIB_LINK_FLAGS)
+
+ifneq (,$(TBB_NO_VERSION.DLL))
+$(TBB_NO_VERSION.DLL):
+	echo "INPUT ($(TBB.DLL))" > $(TBB_NO_VERSION.DLL)
+endif
 
 #clean:
 #	$(RM) *.$(OBJ) *.$(DLL) *.res *.map *.ilk *.pdb *.exp *.manifest *.tmp *.d core core.*[0-9][0-9]
diff --git a/build/Makefile.tbbmalloc b/build/Makefile.tbbmalloc
index 4f49063..4561451 100644
--- a/build/Makefile.tbbmalloc
+++ b/build/Makefile.tbbmalloc
@@ -24,15 +24,13 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
-#------------------------------------------------------
-# Define rules for making the TBBMalloc shared library.
-#------------------------------------------------------
-
-default_malloc: malloc malloc_test
-
-tbb_root ?= $(TBB20_INSTALL_DIR)
+tbb_root ?= $(TBB21_INSTALL_DIR)
 BUILDING_PHASE=1
 include $(tbb_root)/build/common.inc
+DEBUG_SUFFIX=$(findstring _debug,_$(cfg))
+
+# default target
+default_malloc: malloc malloc_test
 
 MALLOC_ROOT ?= $(tbb_root)/src/tbbmalloc
 MALLOC_SOURCE_ROOT ?= $(MALLOC_ROOT)
@@ -40,16 +38,15 @@ MALLOC_SOURCE_ROOT ?= $(MALLOC_ROOT)
 VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/src/test
 VPATH += $(MALLOC_ROOT) $(MALLOC_SOURCE_ROOT)
 
-# the test lists defined here because they are first used right after
-MALLOC_MAIN_TESTS = test_ScalableAllocator.exe test_ScalableAllocator_STL.exe test_malloc_compliance.exe
-MALLOC_C_TESTS = test_malloc_pure_c.exe
-
-$(MALLOC_MAIN_TESTS) $(MALLOC_C_TESTS): CPLUS_FLAGS += $(WARNING_KEY)
-
-KNOWN_NOSTRICT = test_malloc_compliance.$(OBJ) test_ScalableAllocator_STL.$(OBJ)
+KNOWN_NOSTRICT = test_ScalableAllocator_STL.$(OBJ) #test_malloc_compliance.$(OBJ)
+KNOWN_WARNINGS = test_malloc_compliance.$(OBJ)
 
 include $(tbb_root)/build/common_rules.inc
 
+#------------------------------------------------------
+# Define rules for making the TBBMalloc shared library.
+#------------------------------------------------------
+
 # Object files that gmake up TBBMalloc
 MALLOC_CPLUS.OBJ = tbbmalloc.$(OBJ)
 MALLOC_CUSTOM.OBJ += tbb_misc_malloc.$(OBJ)
@@ -58,7 +55,11 @@ 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_CPLUS.OBJ += MemoryAllocator.$(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)
 
 $(MALLOC_CPLUS.OBJ): %.$(OBJ): %.cpp
 	$(CPLUS) $(COMPILE_ONLY) $(M_CPLUS_FLAGS) $(PIC_KEY) $(M_INCLUDES) $<
@@ -66,10 +67,22 @@ $(MALLOC_CPLUS.OBJ): %.$(OBJ): %.cpp
 tbb_misc_malloc.$(OBJ): tbb_misc.cpp version_string.tmp
 	$(CPLUS) $(COMPILE_ONLY) $(subst -strict_ansi,-ansi,$(M_CPLUS_FLAGS)) $(PIC_KEY) $(OUTPUTOBJ_KEY)$@ $(INCLUDE_KEY). $(INCLUDES) $<
 
+ifneq (,$(MALLOC.DEF))
+tbbmalloc.def: $(MALLOC.DEF)
+	$(CMD) "$(CPLUS) $(PREPROC_ONLY) $(MALLOC.DEF) $(filter $(DEFINE_KEY)%,$(CPLUS_FLAGS)) >tbbmalloc.def 2>$(NUL) || exit 0"
+
+LIB_LINK_FLAGS += $(EXPORT_KEY)tbbmalloc.def
+$(MALLOC.DLL): tbbmalloc.def
+endif
 
-$(MALLOC.DLL): TBB.DEF=$(MALLOC.DEF)
-$(MALLOC.DLL): $(MALLOC.OBJ) $(MALLOC.DEF) $(TBBMALLOC.RES)
-	$(CPLUS) $(MALLOC.OBJ) $(TBBMALLOC.RES) $(LIBS) $(PIC_KEY) $(OUTPUT_KEY)$(MALLOC.DLL) $(LIB_LINK_FLAGS)
+$(MALLOC.DLL): BUILDING_LIBRARY = $(MALLOC.DLL)
+$(MALLOC.DLL): $(MALLOC.OBJ) $(TBBMALLOC.RES) $(MALLOC_NO_VERSION.DLL)
+	$(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(MALLOC.DLL) $(MALLOC.OBJ) $(TBBMALLOC.RES) $(LIB_LINK_LIBS) $(LIB_LINK_FLAGS)
+
+ifneq (,$(MALLOC_NO_VERSION.DLL))
+$(MALLOC_NO_VERSION.DLL):
+	echo "INPUT ($(MALLOC.DLL))" > $(MALLOC_NO_VERSION.DLL)
+endif
 
 malloc: $(MALLOC.DLL)
 
@@ -81,21 +94,29 @@ malloc: $(MALLOC.DLL)
 # Define rules for making the TBBMalloc unit tests
 #------------------------------------------------------
 
+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
 MALLOC_C_TESTS = test_malloc_pure_c.exe
 
-$(MALLOC_MAIN_TESTS): %.exe: %.$(OBJ) $(TBB.LIB) $(MALLOC.LIB)
+$(MALLOC_MAIN_TESTS): %.exe: %.$(OBJ) $(call cross_suffix,$(MALLOC.LIB))
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBS) $(LINK_FLAGS)
-$(MALLOC_C_TESTS): %.exe: %.$(OBJ) $(MALLOC.LIB)
+$(MALLOC_C_TESTS): %.exe: %.$(OBJ) $(call cross_suffix,$(MALLOC.LIB))
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(INCLUDES) $^ $(LIBS) $(LINK_FLAGS)
 
-malloc_test: $(TBB.DLL) $(MALLOC.DLL) $(MALLOC_MAIN_TESTS) $(MALLOC_C_TESTS)
-	./test_malloc_compliance.exe
+malloc_test: $(call cross_suffix,$(MALLOC.DLL)) $(MALLOC_MAIN_TESTS) $(MALLOC_C_TESTS)
+ifndef norun
+malloc_test:
+	$(TEST_LAUNCHER) ./test_malloc_compliance.exe
 	./test_ScalableAllocator.exe
 	./test_ScalableAllocator_STL.exe
 	./test_malloc_pure_c.exe
+endif # norun
 
 #------------------------------------------------------
 # End of rules for making the TBBMalloc unit tests
 #------------------------------------------------------
 
+# Include automatically generated dependences
+-include *.d
diff --git a/build/Makefile.test b/build/Makefile.test
index 73da8f0..6c44596 100644
--- a/build/Makefile.test
+++ b/build/Makefile.test
@@ -27,85 +27,95 @@
 #------------------------------------------------------------------------------
 # Define rules for making the TBB tests.
 #------------------------------------------------------------------------------
-.PHONY: default test_tbb_plain clean
+.PHONY: default test_tbb_plain test_tbb_old clean
 
-tbb_root ?= $(TBB20_INSTALL_DIR)
+tbb_root ?= $(TBB21_INSTALL_DIR)
 BUILDING_PHASE=1
 include $(tbb_root)/build/common.inc
+DEBUG_SUFFIX=$(findstring _debug,$(call cross_cfg,_$(cfg)))
 
-default: test_tbb_plain # test_tbb_alt test_tbb_cross 
+default: test_tbb_plain test_tbb_old
+ifneq (,$(codecov))
+	profmerge
+	codecov $(if $(findstring -,$(codecov)),$(codecov),) -demang -comp $(tbb_root)/build/codecov.txt
+endif
 
 #------------------------------------------------------------
 # Define static pattern rules dealing with .cpp source files
 #------------------------------------------------------------
 
-VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/src/test
-
-CPLUS_FLAGS += $(WARNING_KEY)
+VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/src/old $(tbb_root)/src/test $(tbb_root)/src/perf
 
 ifeq (1,$(TBB_NOSTRICT))
 # GNU 3.2.3 headers have a ISO syntax that is rejected by Intel compiler in -strict_ansi mode.
-# The Mac uses gcc, so the list is empty for that platform.
+# The Mac uses gcc 4.0, so the list is empty for that platform.
 # The files below need the -strict_ansi flag downgraded to -ansi to compile
 
 KNOWN_NOSTRICT += \
 	test_concurrent_hash_map.o	\
-	test_concurrent_vector.o		\
+	test_concurrent_vector.o	\
 	test_handle_perror.o		\
 	test_cache_aligned_allocator_STL.o	\
 	test_task_scheduler_init.o	\
 	test_model_plugin.o	\
-	test_parallel_sort.o
+	test_parallel_do.o	\
+	test_parallel_sort.o    \
+	test_tbb_version.o
 
 endif
 
-include $(tbb_root)/build/common_rules.inc
-
 # KNOWN_WARNINGS is empty now! Kept here as a placeholder
+# KNOWN_WARNINGS = 
 
-$(KNOWN_WARNINGS): %.$(OBJ): %.cpp
-	$(CPLUS) $(COMPILE_ONLY) $(subst $(WARNING_KEY),,$(CPLUS_FLAGS)) $(INCLUDES) $<
+
+include $(tbb_root)/build/common_rules.inc
 
 # Rule for generating executable test
 %.exe: %.$(OBJ) $(TBB.LIB)
-	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(TBB.LIB) $(LIBS) $(LINK_FLAGS)
-
-# Rule for generating test using Windows compiler with different flags
-#%-cross.exe: %.cpp
-#	cl $(OUTPUT_KEY)$@ $(SECURITY_FLAG) $(CPLUS_CROSS_FLAGS) $(INCLUDES) $< $(TBB.LIB) $(LIBS) $(LINK_FLAGS)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS)
 
 # Rules for generating a test DLL
 %.$(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) $< $(TBB.LIB) $(LIBS) $(LINK_FLAGS) $(PIC_KEY) $(DYLIB_KEY)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS) $(PIC_KEY) $(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) $< $(LIBS) $(LINK_FLAGS) $(LIBDL)
+	$(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)
+
+# These executables don't depend on the TBB library, but include task.cpp directly
+TASK_CPP_DIRECTLY_INCLUDED = test_eh_tasks.exe \
+ test_task_leaks.exe \
+ test_task_assertions.exe \
+ test_assembly.exe
 
-test_assembly.exe: test_assembly.$(OBJ) $(TBB_ASM.OBJ) cache_aligned_allocator.$(OBJ) tbb_misc.$(OBJ) itt_notify.$(OBJ) spin_mutex.$(OBJ) mutex.$(OBJ) 
-	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBS) $(TBB.LIB)
+$(TASK_CPP_DIRECTLY_INCLUDED): WARNING_KEY += $(WARNING_SUPPRESS)
 
-test_task_leaks.exe: test_task_leaks.$(OBJ) $(TBB_ASM.OBJ) cache_aligned_allocator.$(OBJ) tbb_misc.$(OBJ) itt_notify.$(OBJ) mutex.$(OBJ) 
-	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBS) $(TBB.LIB)
+$(TASK_CPP_DIRECTLY_INCLUDED): %.exe : %.$(OBJ) $(TASK_CPP_DEPENDENCIES)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBDL) $(LIBS) $(LINK_FLAGS)
 
 test_handle_perror.exe: test_handle_perror.$(OBJ) tbb_misc.$(OBJ) $(TBB_ASM.OBJ)
-	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBS) $(TBB.LIB)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS)
 
 
 # Rules for the tests, which depend on tbbmalloc
 test_concurrent_hash_map_string.exe: test_concurrent_hash_map_string.$(OBJ)
-	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LIBS) $(LINK_FLAGS) $(TBB.LIB) $(MALLOC.LIB)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LINK_TBB.LIB) $(MALLOC.LIB) $(LIBS) $(LINK_FLAGS)
 
 
 # These are in alphabetical order
 TEST_TBB_PLAIN.EXE = test_assembly.exe 	\
 	test_aligned_space.exe		\
+	test_task_assertions.exe 	\
 	test_atomic.exe 		\
 	test_blocked_range.exe 		\
 	test_blocked_range2d.exe 	\
 	test_blocked_range3d.exe 	\
+	test_compiler.exe       	\
 	test_concurrent_queue.exe	\
 	test_concurrent_vector.exe	\
 	test_concurrent_hash_map.exe	\
@@ -122,34 +132,45 @@ TEST_TBB_PLAIN.EXE = test_assembly.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_inits_loop.exe      	\
+	test_yield.exe           	\
+	test_tbb_version.exe           	\
+	test_eh_tasks.exe        \
+	test_eh_algorithms.exe
 
 ifdef OPENMP_FLAG
 	TEST_TBB_PLAIN.EXE += test_tbb_openmp
 test_openmp.exe: test_openmp.cpp 
-	$(CPLUS) $(OPENMP_FLAG) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(INCLUDES) $^ $(LIBS) $(TBB.LIB)
+	$(CPLUS) $(OPENMP_FLAG) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(INCLUDES) $^ $(LIBS) $(LINK_TBB.LIB)
 .PHONY: test_tbb_openmp
 test_tbb_openmp: test_openmp.exe
 	./test_openmp.exe 1:4
 
 endif
 
+test_tbb_plain: $(TEST_TBB_PLAIN.EXE)
 
-# Run tests that are in TEST_PLAIN.EXE
+ifndef norun
+# Run tests that are in TEST_TBB_PLAIN.EXE
 # The test are ordered so that simpler components are tested first.
 # If a component Y uses component X, then tests for Y should come after tests for X.
-test_tbb_plain: $(TEST_TBB_PLAIN.EXE)
+test_tbb_plain:
 	./test_assembly.exe 
+	./test_compiler.exe 
         # Yes, 4:8 is intended on the next line. 
 	./test_yield.exe 4:8
 	./test_handle_perror.exe 
 	./test_task_scheduler_init.exe 1:4
+	./test_task_scheduler_observer.exe 1:4
+	./test_task_assertions.exe
 	./test_task.exe 1:4
 	./test_task_leaks.exe
 	./test_atomic.exe 
@@ -164,6 +185,7 @@ test_tbb_plain: $(TEST_TBB_PLAIN.EXE)
 	./test_parallel_reduce.exe 1:4
 	./test_parallel_scan.exe 1:4
 	./test_parallel_while.exe 1:4
+	./test_parallel_do.exe 1:4
 	./test_inits_loop.exe
 	./test_mutex.exe 1
 	./test_mutex.exe 2
@@ -180,16 +202,46 @@ test_tbb_plain: $(TEST_TBB_PLAIN.EXE)
 	./test_concurrent_vector.exe 1:4
 	./test_concurrent_hash_map.exe 1:4
 	./test_model_plugin.exe 4
-ifeq (true,$(codecov))
+	./test_tbb_version.exe
+	./test_eh_tasks.exe 2:4
+	./test_eh_algorithms.exe 2:4
+	./test_tbb_thread.exe
+endif # norun
+
+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_OLD.OBJ): %.$(OBJ): %.cpp
+	$(CPLUS) $(COMPILE_ONLY) $(subst $(WARNING_KEY),,$(CPLUS_FLAGS_NOSTRICT)) $(WARNING_SUPPRESS) $(INCLUDES) $<
+
+TEST_TBB_OLD.EXE = $(subst .$(OBJ),.exe,$(TEST_TBB_OLD.OBJ))
+
+test_tbb_old: $(TEST_TBB_OLD.EXE)
+
+ifndef norun
+test_tbb_old:
+	./test_concurrent_vector_v2.exe 1:4
+	./test_concurrent_queue_v2.exe 1:4
+	./test_mutex_v2.exe 1
+	./test_mutex_v2.exe 2
+	./test_mutex_v2.exe 4
+endif # norun
+
+debug_%: test_%.exe
+	$(debugger) ./$^ $(args)
+
+test_%: test_%.exe
+	./$^ $(args)
+ifneq (,$(codecov))
 	profmerge
-	codecov -demang -comp $(tbb_root)/build/codecov.txt
+	codecov $(if $(findstring -,$(codecov)),$(codecov),) -demang -comp $(tbb_root)/build/codecov.txt
 endif
 
-debug_%: test_%.exe
-	$(debugger) ./$^ $(debug_args)
+time_%: time_%.exe
+	./$^ $(args)
 
 clean_%: 
-	$(RM) test_$*.$(OBJ) test_$*.exe test_$*.$(DLL) test_$*.$(LIBEXT) test_$*.res test_$*.map test_$*.ilk test_$*.pdb test_$*.exp test_$*.*manifest test_$*.tmp test_$*.d
+	$(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 core core.*[0-9][0-9]
diff --git a/build/SunOS.gcc.inc b/build/SunOS.gcc.inc
index 573d429..aa4efb0 100644
--- a/build/SunOS.gcc.inc
+++ b/build/SunOS.gcc.inc
@@ -24,29 +24,30 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
-COMPILE_ONLY = -c -MMD
-PREPROC_ONLY = -E -MMD
+COMPILE_ONLY = -c -MMD 
+PREPROC_ONLY = -E -x c
 INCLUDE_KEY = -I
 DEFINE_KEY = -D
 OUTPUT_KEY = -o #
 OUTPUTOBJ_KEY = -o #
 PIC_KEY = -fPIC
+WARNING_AS_ERROR_KEY = -Werror
+WARNING_KEY =
 DYLIB_KEY = -shared
 LIBDL = -ldl
 
 TBB_NOSTRICT = 1
 
 CPLUS = g++ 
-INCLUDES += -I$(tbb_root)/src/tbb -I$(tbb_root)/include -I$(tbb_root)/src
 LIB_LINK_FLAGS = -shared
 LIBS = -lpthread -lrt -ldl 
 C_FLAGS = $(CPLUS_FLAGS) -x c
 
 ifeq ($(cfg), release)
-        CPLUS_FLAGS = -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD -D__linux__ -D__custom_linux__
+        CPLUS_FLAGS = -O2 -DUSE_PTHREAD
 endif
 ifeq ($(cfg), debug)
-        CPLUS_FLAGS = -DTBB_DO_ASSERT -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -D__linux__ -D__custom_linux__
+        CPLUS_FLAGS = -DTBB_DO_ASSERT -g -O0 -DUSE_PTHREAD
 endif
 
 ASM=
@@ -57,7 +58,6 @@ TBB_ASM.OBJ=
 ifeq (itanium,$(arch))
 # Position-independent code (PIC) is a must for IA-64
     CPLUS_FLAGS += $(PIC_KEY)
-    $(PIC_KEY) = 
 endif 
 
 ifeq (em64t,$(arch))
@@ -90,8 +90,9 @@ endif
 #------------------------------------------------------------------------------
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
-M_INCLUDES = $(INCLUDES) -I$(MALLOC_ROOT) -I$(MALLOC_SOURCE_ROOT)
+
 M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions -fno-schedule-insns2
+
 #------------------------------------------------------------------------------
 # End of setting tbbmalloc data.
 #------------------------------------------------------------------------------
diff --git a/build/SunOS.inc b/build/SunOS.inc
index d503419..3d22f3d 100644
--- a/build/SunOS.inc
+++ b/build/SunOS.inc
@@ -34,25 +34,28 @@ ifndef runtime
         gcc_version:=$(shell gcc -v 2>&1 | grep 'gcc version' | sed -e 's/^gcc version //' | sed -e 's/ .*$$//')
         os_version:=$(shell uname -r)
         os_kernel_version:=$(shell uname -r | sed -e 's/-.*$$//')
-#        export os_glibc_version_full:=$(shell rpm -qa | grep '^glibc-[0-9]' | sort -u | sed -e 's/^glibc-//')
-#        os_glibc_version:=$(shell echo "$(os_glibc_version_full)" | sed -e '2,$$d' -e 's/-.*$$//')
-#        export runtime:=cc$(gcc_version)_libc$(os_glibc_version)_kernel$(os_kernel_version)
         export runtime:=cc$(gcc_version)_kernel$(os_kernel_version)
 endif
 
-native_compiler := gcc
-export compiler ?= gcc
-debugger ?= gdb
+native_compiler := suncc
+export compiler ?= suncc
+# debugger ?= gdb
 
+CMD=$(SHELL) -c
 CWD=$(shell pwd)
 RM?=rm -f
 RD?=rmdir
 MD?=mkdir -p
-NUL= > /dev/null 2>&1
+NUL= /dev/null
 SLASH=/
-MAKE_VERSIONS=sh $(tbb_root)/build/version_info_linux.sh $(CPLUS) $(CPLUS_FLAGS) $(INCLUDES) >version_string.tmp
-MAKE_TBBVARS=sh $(tbb_root)/build/generate_tbbvars.sh
+MAKE_VERSIONS=bash $(tbb_root)/build/version_info_sunos.sh $(CPLUS) $(CPLUS_FLAGS) $(INCLUDES) >version_string.tmp
+MAKE_TBBVARS=bash $(tbb_root)/build/generate_tbbvars.sh
 
+ifeq ($(compiler),suncc)
+        export TBB_CUSTOM_VARS_SH=CXXFLAGS="-I$(CWD)/include -library=stlport4 $(CXXFLAGS) -M$(CWD)/build/suncc.map.pause"
+        export TBB_CUSTOM_VARS_CSH=CXXFLAGS "-I$(CWD)/include -library=stlport4 $(CXXFLAGS) -M$(CWD)/build/suncc.map.pause"
+endif
+	
 ifdef LD_LIBRARY_PATH
         export LD_LIBRARY_PATH := .:$(LD_LIBRARY_PATH)
 else
@@ -64,18 +67,12 @@ endif
 OBJ = o
 DLL = so
 
-ifeq ($(cfg),debug)
-    DEBUG_SUFFIX = _debug
-endif
-
 TBB.DEF = 
 TBB.DLL = libtbb$(DEBUG_SUFFIX).$(DLL)
 TBB.LIB = $(TBB.DLL)
+LINK_TBB.LIB = $(TBB.LIB)
 
-MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).so
+MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
 MALLOC.LIB = $(MALLOC.DLL)
 
 TBB_NOSTRICT=1
-
-
-
diff --git a/build/linux.gcc.inc b/build/SunOS.suncc.inc
similarity index 77%
copy from build/linux.gcc.inc
copy to build/SunOS.suncc.inc
index 712abcd..4f6829d 100644
--- a/build/linux.gcc.inc
+++ b/build/SunOS.suncc.inc
@@ -24,30 +24,33 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
-COMPILE_ONLY = -c -MMD
+COMPILE_ONLY = -c -MMD -errtags
 PREPROC_ONLY = -E -MMD
 INCLUDE_KEY = -I
 DEFINE_KEY = -D
 OUTPUT_KEY = -o #
 OUTPUTOBJ_KEY = -o #
-PIC_KEY = -fPIC
-WARNING_KEY = 
-DYLIB_KEY = -shared
+PIC_KEY = -KPIC
+DYLIB_KEY = -G
 LIBDL = -ldl
+WARNING_AS_ERROR_KEY = Warning as error
+WARNING_SUPPRESS = -erroff=unassigned,attrskipunsup,badargtype2w,badbinaryopw,wbadasg
+tbb_strict=0
 
 TBB_NOSTRICT = 1
 
-CPLUS = g++ 
-INCLUDES += -I$(tbb_root)/src/tbb -I$(tbb_root)/include -I$(tbb_root)/src
-LIB_LINK_FLAGS = -shared
-LIBS = -lpthread -lrt -ldl 
-C_FLAGS = $(CPLUS_FLAGS) -x c
+CPLUS = CC
+CONLY = cc
+LIB_LINK_FLAGS = -G -R . -M$(tbb_root)/build/suncc.map.pause
+LINK_FLAGS += -M$(tbb_root)/build/suncc.map.pause
+LIBS = -lpthread -lrt -R .
+C_FLAGS = $(CPLUS_FLAGS)
 
 ifeq ($(cfg), release)
-        CPLUS_FLAGS = -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD
+        CPLUS_FLAGS = -xO2 -library=stlport4 -DUSE_PTHREAD 
 endif
 ifeq ($(cfg), debug)
-        CPLUS_FLAGS = -DTBB_DO_ASSERT -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD
+        CPLUS_FLAGS = -DTBB_DO_ASSERT -g -library=stlport4 -DUSE_PTHREAD 
 endif
 
 ASM=
@@ -55,14 +58,9 @@ ASM_FLAGS=
 
 TBB_ASM.OBJ=
 
-ifeq (itanium,$(arch))
-# Position-independent code (PIC) is a must for IA-64
-    CPLUS_FLAGS += $(PIC_KEY)
-    $(PIC_KEY) = 
-endif 
-
 ifeq (em64t,$(arch))
     CPLUS_FLAGS += -m64
+    ASM_FLAGS += -m64
     LIB_LINK_FLAGS += -m64
 endif 
 
@@ -76,14 +74,10 @@ endif
 #------------------------------------------------------------------------------
 %.$(OBJ): %.s
 	cpp $(ASM_FLAGS) <$< | grep -v '^#' >$*.tmp
-	$(ASM) -o $@ $*.tmp
+	$(ASM) $(ASM_FLAGS) -o $@ $*.tmp
 	rm $*.tmp
 
-ASSEMBLY_SOURCE=$(arch)-gas
-ifeq (itanium,$(arch))
-    ASM=ias
-    TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
-endif 
+ASSEMBLY_SOURCE=$(arch)-fbe
 #------------------------------------------------------------------------------
 # End of setting assembler data.
 #------------------------------------------------------------------------------
@@ -92,7 +86,7 @@ endif
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
 M_INCLUDES = $(INCLUDES) -I$(MALLOC_ROOT) -I$(MALLOC_SOURCE_ROOT)
-M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions -fno-schedule-insns2
+M_CPLUS_FLAGS = $(CPLUS_FLAGS)
 #------------------------------------------------------------------------------
 # End of setting tbbmalloc data.
 #------------------------------------------------------------------------------
diff --git a/build/codecov.txt b/build/codecov.txt
index 22d4b17..b22397e 100644
--- a/build/codecov.txt
+++ b/build/codecov.txt
@@ -1,3 +1,4 @@
 src/tbb
 src/tbbmalloc
 include/tbb
+source/malloc
diff --git a/build/common.inc b/build/common.inc
index 27db0fb..f1c57bc 100644
--- a/build/common.inc
+++ b/build/common.inc
@@ -29,61 +29,66 @@ ifndef tbb_os
   export tbb_os=windows
  else
   OS:=$(shell uname)
-  ifneq ($(OS),)
+  ifeq ($(OS),)
+   $(error "$(OS) is not supported")
+  else
    export tbb_os=$(OS)
-  endif
-  ifeq ($(OS), Linux)
-   export tbb_os=linux
-  endif
-  ifeq ($(OS), Darwin)
-   export tbb_os=macos
-  endif
- endif
+   ifeq ($(OS), Linux)
+    export tbb_os=linux
+   endif
+   ifeq ($(OS), Darwin)
+    export tbb_os=macos
+   endif
+  endif # OS successfully detected
+ endif # !Windows
+endif # !tbb_os
+
+ifeq ($(wildcard $(tbb_root)/build/$(tbb_os).inc),)
+  $(error "$(tbb_os)" is not supported. Add build/$(tbb_os).inc file with os-specific settings )
 endif
 
-ifndef tbb_os
- $(error "$(OS) is not supported")
-else
- ifeq ($(wildcard $(tbb_root)/build/$(tbb_os).inc),)
-   $(error "$(tbb_os)" is not supported; add build/$(tbb_os).inc file with os-specific settings )
- endif
- 
- # detect arch and runtime versions, provide common os-specific definitions
- include $(tbb_root)/build/$(tbb_os).inc
+# detect arch and runtime versions, provide common os-specific definitions
+include $(tbb_root)/build/$(tbb_os).inc
 
- ifeq ($(arch),)
-  $(error Architecture not detected)
- endif
- ifeq ($(runtime),)
-  $(error Runtime version not detected)
- endif
- ifeq ($(wildcard $(tbb_root)/build/$(tbb_os).$(compiler).inc),)
-   $(error Compiler "$(compiler)" is not supported on $(tbb_os); add build/$(tbb_os).$(compiler).inc file with compiler-specific settings )
- endif
+ifeq ($(arch),)
+ $(error Architecture not detected)
+endif
+ifeq ($(runtime),)
+ $(error Runtime version not detected)
+endif
+ifeq ($(wildcard $(tbb_root)/build/$(tbb_os).$(compiler).inc),)
+  $(error Compiler "$(compiler)" is not supported on $(tbb_os). Add build/$(tbb_os).$(compiler).inc file with compiler-specific settings )
+endif
 
- ifdef BUILDING_PHASE
-  # Setting default configuration to release
-  cfg?=release
-  # include copmiler-specific build configurations
-  -include $(tbb_root)/build/$(tbb_os).$(compiler).inc
+# Support for running debug tests to release library and vice versa
+flip_cfg=$(subst _flipcfg,_release,$(subst _release,_debug,$(subst _debug,_flipcfg,$(1))))
+cross_cfg = $(if $(crosstest),$(call flip_cfg,$(1)),$(1))
+
+ifdef BUILDING_PHASE
+ # Setting default configuration to release
+ cfg?=release
+  # include compiler-specific build configurations
+ -include $(tbb_root)/build/$(tbb_os).$(compiler).inc
+ ifdef extra_inc
+  -include $(tbb_root)/build/$(extra_inc)
  endif
- ifneq ($(BUILDING_PHASE),1)
-  # definitions for top-level Makefiles
-  origin_build_dir:=$(origin tbb_build_dir)
-  tbb_build_dir?=$(tbb_root)$(SLASH)build
-  tbb_build_prefix?=$(tbb_os)_$(arch)_$(compiler)_$(runtime)
-  work_dir=$(tbb_build_dir)$(SLASH)$(tbb_build_prefix)
-  ifneq ($(BUILDING_PHASE),0)
-   work_dir:=$(work_dir)
-   # assign new value for tbb_root
-   ifneq ($(firstword is_abs_path$(subst /, ,$(tbb_root))),is_abs_path)
-    ifeq ($(origin_build_dir),undefined)
-     override tbb_root:=../..
-    else
-     override tbb_root:=$(CWD)/$(tbb_root)
-    endif
-   endif
-   export tbb_root
-  endif # BUILDING_PHASE != 0
- endif  # BUILDING_PHASE != 1
 endif
+ifneq ($(BUILDING_PHASE),1)
+ # definitions for top-level Makefiles
+ origin_build_dir:=$(origin tbb_build_dir)
+ tbb_build_dir?=$(tbb_root)$(SLASH)build
+ tbb_build_prefix?=$(tbb_os)_$(arch)_$(compiler)_$(runtime)
+ work_dir=$(tbb_build_dir)$(SLASH)$(tbb_build_prefix)
+ ifneq ($(BUILDING_PHASE),0)
+  work_dir:=$(work_dir)
+  # assign new value for tbb_root
+  ifneq ($(firstword is_abs_path$(subst /, ,$(tbb_root))),is_abs_path)
+   ifeq ($(origin_build_dir),undefined)
+    override tbb_root:=../..
+   else
+    override tbb_root:=$(CWD)/$(tbb_root)
+   endif
+  endif
+  export tbb_root
+ endif # BUILDING_PHASE != 0
+endif  # BUILDING_PHASE != 1
diff --git a/build/common_rules.inc b/build/common_rules.inc
index 0427df0..f222ecb 100644
--- a/build/common_rules.inc
+++ b/build/common_rules.inc
@@ -24,31 +24,46 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
-.PRECIOUS: %.$(OBJ) %.$(DLL).$(OBJ)
+.PRECIOUS: %.$(OBJ) %.$(DLL).$(OBJ) %.exe
+
+ifeq ($(tbb_strict),1)
+  ifeq ($(WARNING_AS_ERROR_KEY),)
+    $(error WARNING_AS_ERROR_KEY is empty)
+  endif
+  # Do not remove line below!
+  WARNING_KEY += $(WARNING_AS_ERROR_KEY)
+endif
+
+INCLUDES += $(INCLUDE_KEY)$(tbb_root)/src $(INCLUDE_KEY)$(tbb_root)/include
 
+CPLUS_FLAGS += $(WARNING_KEY) $(CXXFLAGS)
+LINK_FLAGS += $(LDFLAGS)
+LIB_LINK_FLAGS += $(LDFLAGS)
 CPLUS_FLAGS_NOSTRICT:=$(subst -strict_ansi,-ansi,$(CPLUS_FLAGS))
 
+LIB_LINK_CMD ?= $(CPLUS) $(PIC_KEY)
+ifeq ($(origin LIB_OUTPUT_KEY), undefined)
+    LIB_OUTPUT_KEY = $(OUTPUT_KEY)
+endif
+ifeq ($(origin LIB_LINK_LIBS), undefined)
+    LIB_LINK_LIBS = $(LIBDL) $(LIBS)
+endif
+
+CONLY ?= $(CPLUS)
+
+# The most generic rules
 %.$(OBJ): %.cpp
 	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS) $(INCLUDES) $<
 
 %.$(OBJ): %.c
-	$(CPLUS) $(COMPILE_ONLY) $(C_FLAGS) $(INCLUDES) $<
+	$(CONLY) $(COMPILE_ONLY) $(C_FLAGS) $(INCLUDES) $<
 
 %.$(OBJ): %.asm
 	$(ASM) $(ASM_FLAGS) $<
 
-tbb_misc.$(OBJ): tbb_misc.cpp version_string.tmp
-	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS_NOSTRICT) $(INCLUDE_KEY). $(INCLUDES) $<
-
-tbb_misc.E: tbb_misc.cpp version_string.tmp
-	$(CPLUS) $(PREPROC_ONLY) $(CPLUS_FLAGS_NOSTRICT) $(INCLUDE_KEY). $(INCLUDES) $< >$@
-
-%.res: %.rc version_string.tmp
-	rc /Fo$@ $(INCLUDES) $(filter /D%,$(CPLUS_FLAGS)) $<
-
 # Rule for generating .E file if needed for visual inspection
 %.E: %.cpp
-	$(CPLUS) $(PREPROC_ONLY) $(CPLUS_FLAGS) $(INCLUDES) $< >$@
+	$(CPLUS) $(CPLUS_FLAGS) $(INCLUDES) $(PREPROC_ONLY) $< >$@
 
 # TODO Rule for generating .asm file if needed for visual inspection
 %.asm: %.cpp
@@ -58,6 +73,7 @@ tbb_misc.E: tbb_misc.cpp version_string.tmp
 %.s: %.cpp
 	$(CPLUS) -S $(CPLUS_FLAGS) $(INCLUDES) $<
 
+# Customizations
 ifeq (1,$(TBB_NOSTRICT))
 # GNU 3.2.3 headers have a ISO syntax that is rejected by Intel compiler in -strict_ansi mode.
 # The Mac uses gcc, so the list is empty for that platform.
@@ -68,8 +84,21 @@ $(KNOWN_NOSTRICT): %.o: %.cpp
 
 endif
 
+$(KNOWN_WARNINGS): %.$(OBJ): %.cpp
+	$(CPLUS) $(COMPILE_ONLY) $(subst $(WARNING_KEY),,$(CPLUS_FLAGS_NOSTRICT)) $(INCLUDES) $<
+
+tbb_misc.$(OBJ): tbb_misc.cpp version_string.tmp
+	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS_NOSTRICT) $(INCLUDE_KEY). $(INCLUDES) $<
+
+tbb_misc.E: tbb_misc.cpp version_string.tmp
+	$(CPLUS) $(CPLUS_FLAGS_NOSTRICT) $(INCLUDE_KEY). $(INCLUDES) $(PREPROC_ONLY) $< >$@
+
+%.res: %.rc version_string.tmp
+	rc /Fo$@ $(INCLUDES) $(filter /D%,$(CPLUS_FLAGS)) $<
+
 version_string.tmp: 
 	$(MAKE_VERSIONS)
 
 tbbvars:
 	$(MAKE_TBBVARS)
+
diff --git a/build/generate_tbbvars.bat b/build/generate_tbbvars.bat
index b4a7d3a..7d218ed 100644
--- a/build/generate_tbbvars.bat
+++ b/build/generate_tbbvars.bat
@@ -33,58 +33,58 @@ setlocal
 for %%D in ("%tbb_root%") do set actual_root=%%~fD
 if x%1==x goto without
 
-echo IF NOT DEFINED TBB20_INSTALL_DIR SET TBB20_INSTALL_DIR=%actual_root%>>tbbvars.bat
+echo IF NOT DEFINED TBB21_INSTALL_DIR SET TBB21_INSTALL_DIR=%actual_root%>>tbbvars.bat
 echo SET TBB_ARCH_PLATFORM=%arch%\%runtime%>>tbbvars.bat
-echo SET INCLUDE="%%TBB20_INSTALL_DIR%%\include";%%INCLUDE%%>>tbbvars.bat
-echo SET LIB="%%TBB20_INSTALL_DIR%%\build\%1";%%LIB%%>>tbbvars.bat
-echo SET PATH="%%TBB20_INSTALL_DIR%%\build\%1";%%PATH%%>>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
 
 if exist tbbvars.sh goto skipsh
 set fslash_root=%actual_root:\=/%
 echo Generating tbbvars.sh
 echo #!/bin/sh>tbbvars.sh
-echo if [ -z "${TBB20_INSTALL_DIR}" ]; then>>tbbvars.sh
-echo     export TBB20_INSTALL_DIR="%fslash_root%">>tbbvars.sh
+echo if [ -z "${TBB21_INSTALL_DIR}" ]; then>>tbbvars.sh
+echo     export TBB21_INSTALL_DIR="%fslash_root%">>tbbvars.sh
 echo fi>>tbbvars.sh
 echo TBB_ARCH_PLATFORM="%arch%\%runtime%">>tbbvars.sh
 echo if [ -z "${PATH}" ]; then>>tbbvars.sh
-echo     export PATH="${TBB20_INSTALL_DIR}/build/%1">>tbbvars.sh
+echo     export PATH="${TBB21_INSTALL_DIR}/build/%1">>tbbvars.sh
 echo else>>tbbvars.sh
-echo     export PATH="${TBB20_INSTALL_DIR}/build/%1;$PATH">>tbbvars.sh
+echo     export PATH="${TBB21_INSTALL_DIR}/build/%1;$PATH">>tbbvars.sh
 echo fi>>tbbvars.sh
 echo if [ -z "${LIB}" ]; then>>tbbvars.sh
-echo     export LIB="${TBB20_INSTALL_DIR}/build/%1">>tbbvars.sh
+echo     export LIB="${TBB21_INSTALL_DIR}/build/%1">>tbbvars.sh
 echo else>>tbbvars.sh
-echo     export LIB="${TBB20_INSTALL_DIR}/build/%1;$LIB">>tbbvars.sh
+echo     export LIB="${TBB21_INSTALL_DIR}/build/%1;$LIB">>tbbvars.sh
 echo fi>>tbbvars.sh
 echo if [ -z "${INCLUDE}" ]; then>>tbbvars.sh
-echo     export INCLUDE="${TBB20_INSTALL_DIR}/include">>tbbvars.sh
+echo     export INCLUDE="${TBB21_INSTALL_DIR}/include">>tbbvars.sh
 echo else>>tbbvars.sh
-echo     export INCLUDE="${TBB20_INSTALL_DIR}/include;$INCLUDE">>tbbvars.sh
+echo     export INCLUDE="${TBB21_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 if (! $?TBB20_INSTALL_DIR) then>>tbbvars.csh
-echo     setenv TBB20_INSTALL_DIR "%actual_root%">>tbbvars.csh
+echo if (! $?TBB21_INSTALL_DIR) then>>tbbvars.csh
+echo     setenv TBB21_INSTALL_DIR "%actual_root%">>tbbvars.csh
 echo endif>>tbbvars.csh
 echo setenv TBB_ARCH_PLATFORM "%arch%\%runtime%">>tbbvars.csh
 echo if (! $?PATH) then>>tbbvars.csh
-echo     setenv PATH "${TBB20_INSTALL_DIR}\build\%1">>tbbvars.csh
+echo     setenv PATH "${TBB21_INSTALL_DIR}\build\%1">>tbbvars.csh
 echo else>>tbbvars.csh
-echo     setenv PATH "${TBB20_INSTALL_DIR}\build\%1;$PATH">>tbbvars.csh
+echo     setenv PATH "${TBB21_INSTALL_DIR}\build\%1;$PATH">>tbbvars.csh
 echo endif>>tbbvars.csh
 echo if (! $?LIB) then>>tbbvars.csh
-echo     setenv LIB "${TBB20_INSTALL_DIR}\build\%1">>tbbvars.csh
+echo     setenv LIB "${TBB21_INSTALL_DIR}\build\%1">>tbbvars.csh
 echo else>>tbbvars.csh
-echo     setenv LIB "${TBB20_INSTALL_DIR}\build\%1;$LIB">>tbbvars.csh
+echo     setenv LIB "${TBB21_INSTALL_DIR}\build\%1;$LIB">>tbbvars.csh
 echo endif>>tbbvars.csh
 echo if (! $?INCLUDE) then>>tbbvars.csh
-echo     setenv INCLUDE "${TBB20_INSTALL_DIR}\include">>tbbvars.csh
+echo     setenv INCLUDE "${TBB21_INSTALL_DIR}\include">>tbbvars.csh
 echo else>>tbbvars.csh
-echo     setenv INCLUDE "${TBB20_INSTALL_DIR}\include;$INCLUDE">>tbbvars.csh
+echo     setenv INCLUDE "${TBB21_INSTALL_DIR}\include;$INCLUDE">>tbbvars.csh
 echo endif>>tbbvars.csh
 )
 :skipcsh
diff --git a/build/generate_tbbvars.sh b/build/generate_tbbvars.sh
index 60311c4..868fc7c 100644
--- a/build/generate_tbbvars.sh
+++ b/build/generate_tbbvars.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright 2005-2008 Intel Corporation.  All Rights Reserved.
 #
@@ -32,8 +32,19 @@ cd "$tbb_root"  # keep this comments here
 tbb_root="$PWD" # to make it unsensible
 cd "$bin_dir"   # to EOL encoding
 [ "`uname`" = "Darwin" ] && dll_path="DYLD_LIBRARY_PATH" || dll_path="LD_LIBRARY_PATH" #
+custom_exp="$CXXFLAGS" #
+if [ -z "$TBB_CUSTOM_VARS_SH" ]; then #
+custom_exp_sh="" #
+else #
+custom_exp_sh="export $TBB_CUSTOM_VARS_SH" #
+fi #
+if [ -z "$TBB_CUSTOM_VARS_CSH" ]; then #
+custom_exp_csh="" #
+else #
+custom_exp_csh="setenv $TBB_CUSTOM_VARS_CSH" #
+fi #
 if [ -z "$1" ]; then # custom tbb_build_dir, can't make with TBB_INSTALL_DIR
-[ -f tbbvars.sh ] || cat >tbbvars.sh <<EOF
+[ -f ./tbbvars.sh ] || cat >./tbbvars.sh <<EOF
 #!/bin/sh
 tbb_root="${tbb_root}" #
 tbb_bin="${bin_dir}" #
@@ -52,8 +63,9 @@ if [ -z "\$${dll_path}" ]; then #
 else #
     export ${dll_path}="\${tbb_bin}:\$${dll_path}" #
 fi #
+${custom_exp_sh} #
 EOF
-[ -f tbbvars.csh ] || cat >tbbvars.csh <<EOF
+[ -f ./tbbvars.csh ] || cat >./tbbvars.csh <<EOF
 #!/bin/csh
 setenv tbb_root "${tbb_root}" #
 setenv tbb_bin "${bin_dir}" #
@@ -72,16 +84,17 @@ if (! \$?${dll_path}) then #
 else #
     setenv ${dll_path} "\${tbb_bin}:\$${dll_path}" #
 endif #
+${custom_exp_csh} #
 EOF
 else # make with TBB_INSTALL_DIR
-[ -f tbbvars.sh ] || cat >tbbvars.sh <<EOF
+[ -f ./tbbvars.sh ] || cat >./tbbvars.sh <<EOF
 #!/bin/sh
-[ -z "\${TBB20_INSTALL_DIR}" ] && export TBB20_INSTALL_DIR="${tbb_root}" #
-tbb_bin="\${TBB20_INSTALL_DIR}/build/$1" #
+[ -z "\${TBB21_INSTALL_DIR}" ] && export TBB21_INSTALL_DIR="${tbb_root}" #
+tbb_bin="\${TBB21_INSTALL_DIR}/build/$1" #
 if [ -z "\$CPATH" ]; then #
-    export CPATH="\${TBB20_INSTALL_DIR}/include" #
+    export CPATH="\${TBB21_INSTALL_DIR}/include" #
 else #
-    export CPATH="\${TBB20_INSTALL_DIR}/include:\$CPATH" #
+    export CPATH="\${TBB21_INSTALL_DIR}/include:\$CPATH" #
 fi #
 if [ -z "\$LIBRARY_PATH" ]; then #
     export LIBRARY_PATH="\${tbb_bin}" #
@@ -93,17 +106,18 @@ if [ -z "\$${dll_path}" ]; then #
 else #
     export ${dll_path}="\${tbb_bin}:\$${dll_path}" #
 fi #
+${custom_exp_sh} #
 EOF
-[ -f tbbvars.csh ] || cat >tbbvars.csh <<EOF
+[ -f ./tbbvars.csh ] || cat >./tbbvars.csh <<EOF
 #!/bin/csh
-if (! \$?TBB20_INSTALL_DIR) then #
-    setenv TBB20_INSTALL_DIR "${tbb_root}" #
+if (! \$?TBB21_INSTALL_DIR) then #
+    setenv TBB21_INSTALL_DIR "${tbb_root}" #
 endif #
-setenv tbb_bin "\${TBB20_INSTALL_DIR}/build/$1" #
+setenv tbb_bin "\${TBB21_INSTALL_DIR}/build/$1" #
 if (! \$?CPATH) then #
-    setenv CPATH "\${TBB20_INSTALL_DIR}/include" #
+    setenv CPATH "\${TBB21_INSTALL_DIR}/include" #
 else #
-    setenv CPATH "\${TBB20_INSTALL_DIR}/include:\$CPATH" #
+    setenv CPATH "\${TBB21_INSTALL_DIR}/include:\$CPATH" #
 endif #
 if (! \$?LIBRARY_PATH) then #
     setenv LIBRARY_PATH "\${tbb_bin}" #
@@ -115,5 +129,6 @@ if (! \$?${dll_path}) then #
 else #
     setenv ${dll_path} "\${tbb_bin}:\$${dll_path}" #
 endif #
+${custom_exp_csh} #
 EOF
 fi #
diff --git a/build/index.html b/build/index.html
index c75f996..c1e14ce 100644
--- a/build/index.html
+++ b/build/index.html
@@ -13,16 +13,14 @@ to a new platform, operating system or architecture.
 The files here are not intended to be used directly.  See below for usage.
 <DL>
 <DT><A HREF="Makefile.tbb">Makefile.tbb</A>
-<DD>Main Makefile invoked to build the TBB library.
-    Normally invoked via "make tbb" from <A HREF=../Makefile>top-level Makefile</A>.
-    Also invoked via "make" from <A HREF=../src/tbb/Makefile>src/tbb Makefile</A>.
+<DD>Main Makefile to build the TBB library.
+    Invoked via 'make tbb' from <A HREF=../Makefile>top-level Makefile</A>.
 <DT><A HREF="Makefile.tbbmalloc">Makefile.tbbmalloc</A>
-<DD>Main Makefile invoked to build the TBB scalable memory allocator library.
-    Normally invoked via "make tbbmalloc" from <A HREF=../Makefile>top-level Makefile</A>.
+<DD>Main Makefile to build the TBB scalable memory allocator library as well as its tests.
+    Invoked via 'make tbbmalloc' from <A HREF=../Makefile>top-level Makefile</A>.
 <DT><A HREF="Makefile.test">Makefile.test</A>
-<DD>Main Makefile invoked to test the TBB library.
-    Normally invoked via "make test" from <A HREF=../Makefile>top-level Makefile</A>.
-    Also invoked via "make" from <A HREF=../src/test/Makefile>src/test Makefile</A>.
+<DD>Main Makefile to build and run the tests for the TBB library.
+    Invoked via 'make test' from <A HREF=../Makefile>top-level Makefile</A>.
 <DT><A HREF="common.inc">common.inc</A>
 <DD>Main common included Makefile that includes OS-specific and compiler-specific Makefiles.
 <DT><os>.inc
@@ -30,7 +28,7 @@ The files here are not intended to be used directly.  See below for usage.
 <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 related systems.
+<DD>Infrastructure utilities for Linux*, Mac OS* X, and UNIX*-related systems.
 <DT>*.js, *.bat
 <DD>Infrastructure utilities for Windows* systems.
 </DL>
@@ -44,9 +42,9 @@ To port TBB to a new platform, operating system or architecture, see the <A HREF
 <OL>
 <LI>C++ compiler for the platform, operating system and architecture of interest.
     Either the native compiler for your system, or, optionally, the appropriate Intel® C++ compiler, may be used.
-<LI>GNU make.
-<LI>A Bourne or BASH compatible shell.  On Windows*, shell commands issued by GNU make should execute in such a shell.
-<LI>The Intel® assembler, ias (if using Intel® Itanium® processors).
+<LI>GNU make utility. On Windows*, if a UNIX* emulator is used to run GNU make,
+    it should be able to run Windows* utilities and commands. On Linux*, Mac OS* X, etc.,
+    shell commands issued by GNU make should execute in a Bourne or BASH compatible shell.
 </OL>
 
 <P>
@@ -59,7 +57,7 @@ On systems that support both 64-bit and 32-bit libraries, these steps build the
 <LI>Change to the <A HREF=../index.html>top-level directory</A> of the installed software.
 <LI>If using the Intel® C++ compiler, make sure the appropriate compiler is available in your PATH
     (e.g., by sourcing the appropriate iccvars script for the compiler to be used).
-<LI>Invoke GNU make using no arguments, for example, "gmake".
+<LI>Invoke GNU make using no arguments, for example, 'gmake'.
 </OL>
 
 <P>
@@ -70,25 +68,30 @@ or related systems that support both 64-bit and 32-bit libraries), perform the f
 <LI>Change to the <A HREF=../index.html>top-level directory</A> of the installed software.
 <LI>If using the Intel® C++ compiler, make sure the appropriate compiler is available in your PATH
     (e.g., by sourcing the appropriate iccvars script for the compiler to be used).
-<LI>Invoke GNU make as follows, "gmake arch=ia32".
+<LI>Invoke GNU make as follows, 'gmake arch=ia32'.
 </OL>
 
-<P>The default make target will build and unit-test the release and debug versions of the library.
-Unit-testing is performed by running each of the <A HREF=../src/test>unit-tests</A> and each of the
-<A HREF=../examples/index.html>examples</A>.
+<P>The default make target will build the release and debug versions of the TBB library.</P>
+<P>Other targets are available in the top-level Makefile. You might find the following targets useful:
+<UL>
+<LI>'make test' will build and run TBB <A HREF=../src/test>unit-tests</A>;
+<LI>'make examples' will build and run TBB <A HREF=../examples/index.html>examples</A>;
+<LI>'make all' will do all of the above.
+</UL>
+See also the list of other targets below.
 </P>
 
 <P>
 By default, the libraries will be built in sub-directories within the build/ directory.
 The sub-directories are named according to the operating system, architecture, compiler and software environment used
 (the sub-directory names also distinguish release vs. debug libraries).  On Linux*, the software environment comprises
-the GCC, libc and kernel version used.  On Windows*, the software environment comprises the GCC and OS version used.
+the GCC, libc and kernel version used.  On Mac OS* X, the software environment comprises the GCC and OS version used.
 On Windows, the software environment comprises the Microsoft* Visual Studio* version used.
 See below for how to change the default build directory.
 </P>
 
 <P>
-To perform different build and/or test operations, perform the following steps.
+To perform different build and/or test operations, use the following steps.
 </P>
 <OL>
 <LI>Change to the <A HREF=../index.html>top-level directory</A> of the installed software.
@@ -97,33 +100,35 @@ To perform different build and/or test operations, perform the following steps.
 <LI>Invoke GNU make by using one or more of the following commands.
     <DL>
     <DT><TT>make</TT>
-    <DD>Default build and test.  Equivalent to 'make release debug examples'.
-    <DT><TT>make release</TT>
+    <DD>Default build.  Equivalent to 'make tbb tbbmalloc'.
+    <DT><TT>make all</TT>
+    <DD>Equivalent to 'make tbb tbbmalloc test examples'.
+    <DT><TT>cd src;make release</TT>
     <DD>Build and test release libraries only.
-    <DT><TT>make debug</TT>
-    <DD>Build and test debug libraries only.
+    <DT><TT>cd src;make debug</TT>
+    <DD>Build and test debug libraries only. 
     <DT><TT>make tbb</TT>
     <DD>Make TBB release and debug libraries.
-	Also invoked via "make" from <A HREF=../src/tbb/Makefile>src/tbb Makefile</A>.
     <DT><TT>make tbbmalloc</TT>
     <DD>Make TBB scalable memory allocator libraries.
     <DT><TT>make test</TT>
-    <DD>Just run unit-tests.
-	Also invoked via "make" from <A HREF=../src/test/Makefile>src/test Makefile</A>.
+    <DD>Compile and run unit-tests
     <DT><TT>make examples</TT>
-    <DD>Build libraries and run all examples, like doing "make debug clean release" from
-	<A HREF=../examples/Makefile>examples Makefile</A>.
+    <DD>Build libraries and run all examples, like doing 'make debug clean release' from
+	<A HREF=../examples/Makefile>the general example Makefile</A>.
     <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>
     <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>
-    <DD>Build and run as above; for use when invoking "make" from a directory other than
+    <DD>Build and run as above; for use when invoking 'make' from a directory other than
 	the <A HREF=../index.html>top-level directory</A>.
     <DT><TT>make tbb_build_dir=<B>{</B>(build directory)<B>}</B> <B>[</B>(above options or targets)<B>]</B></TT>
     <DD>Build and run as above, but place the built libraries in the specified directory, rather than in the default
-	sub-directory within the build/ directory.
+	sub-directory within the build/ directory. This command might have troubles with the build in case the sources 
+	installed to the directory with spaces in the path.
     <DT><TT>make tbb_build_prefix=<B>{</B>(build sub-directory)<B>}</B> <B>[</B>(above options or targets)<B>]</B></TT>
     <DD>Build and run as above, but place the built libraries in the specified sub-directory within the build/ directory,
 	rather than using the default sub-directory name.
diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
index 712abcd..2a2644a 100644
--- a/build/linux.gcc.inc
+++ b/build/linux.gcc.inc
@@ -25,22 +25,23 @@
 # the GNU General Public License.
 
 COMPILE_ONLY = -c -MMD
-PREPROC_ONLY = -E -MMD
+PREPROC_ONLY = -E -x c
 INCLUDE_KEY = -I
 DEFINE_KEY = -D
 OUTPUT_KEY = -o #
 OUTPUTOBJ_KEY = -o #
 PIC_KEY = -fPIC
-WARNING_KEY = 
+WARNING_AS_ERROR_KEY = -Werror
+WARNING_KEY = -Wall
+WARNING_SUPPRESS = -Wno-parentheses
 DYLIB_KEY = -shared
 LIBDL = -ldl
 
 TBB_NOSTRICT = 1
 
 CPLUS = g++ 
-INCLUDES += -I$(tbb_root)/src/tbb -I$(tbb_root)/include -I$(tbb_root)/src
-LIB_LINK_FLAGS = -shared
-LIBS = -lpthread -lrt -ldl 
+LIB_LINK_FLAGS = -shared -Wl,-soname=$(BUILDING_LIBRARY)
+LIBS = -lpthread -lrt 
 C_FLAGS = $(CPLUS_FLAGS) -x c
 
 ifeq ($(cfg), release)
@@ -56,9 +57,8 @@ ASM_FLAGS=
 TBB_ASM.OBJ=
 
 ifeq (itanium,$(arch))
-# Position-independent code (PIC) is a must for IA-64
+# Position-independent code (PIC) is a must on IA-64, even for regular (not shared) executables
     CPLUS_FLAGS += $(PIC_KEY)
-    $(PIC_KEY) = 
 endif 
 
 ifeq (em64t,$(arch))
@@ -81,7 +81,7 @@ endif
 
 ASSEMBLY_SOURCE=$(arch)-gas
 ifeq (itanium,$(arch))
-    ASM=ias
+    ASM=as
     TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
 endif 
 #------------------------------------------------------------------------------
@@ -91,8 +91,9 @@ endif
 #------------------------------------------------------------------------------
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
-M_INCLUDES = $(INCLUDES) -I$(MALLOC_ROOT) -I$(MALLOC_SOURCE_ROOT)
+
 M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions -fno-schedule-insns2
+
 #------------------------------------------------------------------------------
 # End of setting tbbmalloc data.
 #------------------------------------------------------------------------------
diff --git a/build/linux.icc.inc b/build/linux.icc.inc
index 859bd62..3b0ef89 100644
--- a/build/linux.icc.inc
+++ b/build/linux.icc.inc
@@ -25,35 +25,38 @@
 # the GNU General Public License.
 
 COMPILE_ONLY = -c -MMD
-PREPROC_ONLY = -E -MMD
+PREPROC_ONLY = -E -x c
 INCLUDE_KEY = -I
 DEFINE_KEY = -D
 OUTPUT_KEY = -o #
 OUTPUTOBJ_KEY = -o #
 PIC_KEY = -fPIC
-WARNING_KEY = 
+WARNING_AS_ERROR_KEY = -Werror
+WARNING_KEY = -w1
 DYLIB_KEY = -shared
 LIBDL = -ldl
 export COMPILER_VERSION := ICC: $(shell icc -V </dev/null 2>&1 | grep 'Version')
+#TODO: autodetection of arch from COMPILER_VERSION!!
 
 TBB_NOSTRICT = 1
 
 CPLUS = icpc 
 
 ifeq (release,$(cfg))
-CPLUS_FLAGS = -DDO_ITT_NOTIFY -O2 -strict_ansi -DUSE_PTHREAD
+CPLUS_FLAGS = -O2 -strict_ansi -DUSE_PTHREAD
 else
-CPLUS_FLAGS = -DTBB_DO_ASSERT -DDO_ITT_NOTIFY -O0 -g -strict_ansi -DUSE_PTHREAD
+CPLUS_FLAGS = -O0 -g -strict_ansi -DUSE_PTHREAD -DTBB_DO_ASSERT
 endif
 
-ifeq (true,$(codecov))
+ifneq (,$(codecov))
     CPLUS_FLAGS += -prof-genx
+else
+    CPLUS_FLAGS += -DDO_ITT_NOTIFY
 endif
 
 OPENMP_FLAG = -openmp
-INCLUDES += -I$(tbb_root)/src/tbb -I$(tbb_root)/include -I$(tbb_root)/src -I.
-LIB_LINK_FLAGS = -shared -i-static
-LIBS = -lpthread -lrt -ldl 
+LIB_LINK_FLAGS = -shared -i-static -Wl,-soname=$(BUILDING_LIBRARY)
+LIBS = -lpthread -lrt 
 C_FLAGS = $(CPLUS_FLAGS) -x c
 
 ASM=
@@ -62,9 +65,8 @@ ASM_FLAGS=
 TBB_ASM.OBJ=
 
 ifeq (itanium,$(arch))
-# Position-independent code (PIC) is a must for IA-64
+# Position-independent code (PIC) is a must on IA-64, even for regular (not shared) executables
     CPLUS_FLAGS += $(PIC_KEY)
-    $(PIC_KEY) = 
 endif 
 
 #------------------------------------------------------------------------------
@@ -87,8 +89,9 @@ endif
 #------------------------------------------------------------------------------
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
-M_INCLUDES = $(INCLUDES) -I$(MALLOC_ROOT) -I$(MALLOC_SOURCE_ROOT)
+
 M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
+
 #------------------------------------------------------------------------------
 # End of setting tbbmalloc data.
 #------------------------------------------------------------------------------
diff --git a/build/linux.inc b/build/linux.inc
index f6d4806..e84b192 100644
--- a/build/linux.inc
+++ b/build/linux.inc
@@ -25,13 +25,13 @@
 # the GNU General Public License.
 
 ifndef arch
-        ifeq ($(shell arch),i686)
+        ifeq ($(shell uname -m),i686)
                 export arch:=ia32
         endif
-        ifeq ($(shell arch),ia64)
+        ifeq ($(shell uname -m),ia64)
                 export arch:=itanium
         endif
-        ifeq ($(shell arch),x86_64)
+        ifeq ($(shell uname -m),x86_64)
                 export arch:=em64t
         endif
 endif
@@ -51,11 +51,12 @@ native_compiler := gcc
 export compiler ?= gcc
 debugger ?= gdb
 
+CMD=sh -c
 CWD=$(shell pwd)
 RM?=rm -f
 RD?=rmdir
 MD?=mkdir -p
-NUL= > /dev/null 2>&1
+NUL= /dev/null
 SLASH=/
 MAKE_VERSIONS=sh $(tbb_root)/build/version_info_linux.sh $(CPLUS) $(CPLUS_FLAGS) $(INCLUDES) >version_string.tmp
 MAKE_TBBVARS=sh $(tbb_root)/build/generate_tbbvars.sh
@@ -71,19 +72,22 @@ endif
 OBJ = o
 DLL = so
 LIBEXT = so
+SONAME_SUFFIX =$(shell grep TBB_COMPATIBLE_INTERFACE_VERSION $(tbb_root)/include/tbb/tbb_stddef.h | egrep -o [0-9.]+)
 
-ifeq ($(cfg),debug)
-    DEBUG_SUFFIX = _debug
-endif
+def_prefix = $(if $(findstring 32,$(arch)),lin32,$(if $(findstring 64,$(arch)),lin64,lin64ipf))
+TBB.DEF = $(tbb_root)/src/tbb/$(def_prefix)-tbb-export.def
 
-TBB.DEF = 
-TBB.DLL = libtbb$(DEBUG_SUFFIX).$(DLL)
+EXPORT_KEY = -Wl,--version-script,
+TBB.DLL = $(TBB_NO_VERSION.DLL).$(SONAME_SUFFIX)
 TBB.LIB = $(TBB.DLL)
+TBB_NO_VERSION.DLL=libtbb$(DEBUG_SUFFIX).$(DLL)
+LINK_TBB.LIB = $(TBB_NO_VERSION.DLL)
 
-MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).so
-MALLOC.LIB = $(MALLOC.DLL)
+MALLOC_NO_VERSION.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
+MALLOC.DEF = $(MALLOC_ROOT)/lin-tbbmalloc-export.def
+MALLOC.DLL = $(MALLOC_NO_VERSION.DLL).$(SONAME_SUFFIX)
+MALLOC.LIB = $(MALLOC_NO_VERSION.DLL)
 
 TBB_NOSTRICT=1
 
-
-
+TEST_LAUNCHER=sh $(tbb_root)/build/test_launcher.sh
diff --git a/build/macos.gcc.inc b/build/macos.gcc.inc
index 1a59d67..5f61951 100644
--- a/build/macos.gcc.inc
+++ b/build/macos.gcc.inc
@@ -26,20 +26,21 @@
 
 CPLUS = g++
 COMPILE_ONLY = -c -MMD
-PREPROC_ONLY = -E -MMD
+PREPROC_ONLY = -E -x c
 INCLUDE_KEY = -I
 DEFINE_KEY = -D
 OUTPUT_KEY = -o #
 OUTPUTOBJ_KEY = -o #
 PIC_KEY = -fPIC
-WARNING_KEY = 
+WARNING_AS_ERROR_KEY = -Werror
+WARNING_KEY = -Wall
 DYLIB_KEY = -dynamiclib
+EXPORT_KEY = -Wl,-exported_symbols_list,
 LIBDL = -ldl
 
-INCLUDES += -I$(tbb_root)/src -I$(tbb_root)/include
 LIBS = -lpthread
 LINK_FLAGS = 
-LIB_LINK_FLAGS = -dynamiclib -Wl,-exported_symbols_list,$(TBB.DEF) 
+LIB_LINK_FLAGS = -dynamiclib
 C_FLAGS = $(CPLUS_FLAGS) -x c
 
 ifeq ($(cfg), release)
@@ -65,8 +66,9 @@ endif
 #------------------------------------------------------------------------------
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
-M_INCLUDES = $(INCLUDES) -I$(MALLOC_ROOT) -I$(MALLOC_SOURCE_ROOT)
+
 M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions -fno-schedule-insns2
+
 #------------------------------------------------------------------------------
 # End of setting tbbmalloc data.
 #------------------------------------------------------------------------------
diff --git a/build/macos.icc.inc b/build/macos.icc.inc
index 217a0e5..af0219f 100644
--- a/build/macos.icc.inc
+++ b/build/macos.icc.inc
@@ -26,33 +26,35 @@
 
 CPLUS = icpc
 COMPILE_ONLY = -c -MMD
-PREPROC_ONLY = -E -MMD
+PREPROC_ONLY = -E -x c
 INCLUDE_KEY = -I
 DEFINE_KEY = -D
 OUTPUT_KEY = -o #
 OUTPUTOBJ_KEY = -o #
 PIC_KEY = -fPIC
-WARNING_KEY = 
+WARNING_AS_ERROR_KEY = -Werror
+WARNING_KEY = -w1
 DYLIB_KEY = -dynamiclib
+EXPORT_KEY = -Wl,-exported_symbols_list,
 LIBDL = -ldl
 export COMPILER_VERSION := $(shell icc -V </dev/null 2>&1 | grep 'Version')
+#TODO: autodetection of arch from COMPILER_VERSION!!
 
-INCLUDES += -I$(tbb_root)/src -I$(tbb_root)/include
 OPENMP_FLAG = -openmp
 LIBS = -lpthread
 LINK_FLAGS = 
-LIB_LINK_FLAGS = -dynamiclib -i-static -Wl,-exported_symbols_list,$(TBB.DEF) 
+LIB_LINK_FLAGS = -dynamiclib -i-static
 C_FLAGS = $(CPLUS_FLAGS) -x c
 
 ifeq ($(cfg), release)
-    CPLUS_FLAGS = -O2
+    CPLUS_FLAGS = -O2 -fno-omit-frame-pointer
 else
     CPLUS_FLAGS = -g -O0 -DTBB_DO_ASSERT
 endif
 
 CPLUS_FLAGS += -DUSE_PTHREAD
 
-ifeq (true,$(codecov))
+ifneq (,$(codecov))
     CPLUS_FLAGS += -prof-genx
 endif
 
@@ -64,8 +66,9 @@ endif
 #------------------------------------------------------------------------------
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
-M_INCLUDES = $(INCLUDES) -I$(MALLOC_ROOT) -I$(MALLOC_SOURCE_ROOT)
+
 M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
+
 #------------------------------------------------------------------------------
 # End of setting tbbmalloc data.
 #------------------------------------------------------------------------------
diff --git a/build/macos.inc b/build/macos.inc
index 2a01cd6..46700ef 100644
--- a/build/macos.inc
+++ b/build/macos.inc
@@ -53,11 +53,12 @@ native_compiler := gcc
 export compiler ?= gcc
 debugger ?= gdb
 
+CMD=$(SHELL) -c
 CWD=$(shell pwd)
 RM?=rm -f
 RD?=rmdir
 MD?=mkdir -p
-NUL= > /dev/null 2>&1
+NUL= /dev/null
 SLASH=/
 MAKE_VERSIONS=sh $(tbb_root)/build/version_info_macos.sh $(CPLUS) $(CPLUS_FLAGS) $(INCLUDES) >version_string.tmp
 MAKE_TBBVARS=sh $(tbb_root)/build/generate_tbbvars.sh
@@ -68,16 +69,15 @@ OBJ=o
 DLL=dylib
 LIBEXT=dylib
 
-ifeq ($(cfg),debug)
-    DEBUG_SUFFIX = _debug
-endif
+def_prefix = $(if $(findstring 32,$(arch)),mac32,mac64)
 
-TBB.DEF = $(tbb_root)/src/tbb/$(arch)-tbb-mac-export.txt
+TBB.DEF = $(tbb_root)/src/tbb/$(def_prefix)-tbb-export.def
 TBB.DLL = libtbb$(DEBUG_SUFFIX).$(DLL)
 TBB.LIB = $(TBB.DLL)
+LINK_TBB.LIB = $(TBB.LIB)
 
-MALLOC.DEF = $(MALLOC_ROOT)/$(arch)-malloc-mac-export.txt
-MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).dylib
+MALLOC.DEF = $(MALLOC_ROOT)/$(def_prefix)-tbbmalloc-export.def
+MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
 MALLOC.LIB = $(MALLOC.DLL)
 
 TBB_NOSTRICT=1
diff --git a/build/suncc.map.pause b/build/suncc.map.pause
new file mode 100644
index 0000000..a92d08e
--- /dev/null
+++ b/build/suncc.map.pause
@@ -0,0 +1 @@
+hwcap_1 = OVERRIDE;
\ No newline at end of file
diff --git a/src/tbbmalloc/ia32-malloc-mac-export.txt b/build/test_launcher.sh
similarity index 92%
copy from src/tbbmalloc/ia32-malloc-mac-export.txt
copy to build/test_launcher.sh
index 27b719b..0d7f87b 100644
--- a/src/tbbmalloc/ia32-malloc-mac-export.txt
+++ b/build/test_launcher.sh
@@ -1,3 +1,5 @@
+#!/bin/sh
+#
 # Copyright 2005-2008 Intel Corporation.  All Rights Reserved.
 #
 # This file is part of Threading Building Blocks.
@@ -24,8 +26,6 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
-# MemoryAllocator.cpp
-_scalable_calloc
-_scalable_free
-_scalable_malloc
-_scalable_realloc
+# Set stack limit and run the command line passed via parameters
+ulimit -s 10240 # 
+$* # 
diff --git a/build/version_info_linux.sh b/build/version_info_linux.sh
index 819db1a..8e8d715 100644
--- a/build/version_info_linux.sh
+++ b/build/version_info_linux.sh
@@ -28,14 +28,14 @@
 
 # Script used to generate version info string
 echo "#define __TBB_VERSION_STRINGS \\"
-echo '"TBB: ' "BUILD_HOST\t\t"`hostname -s`" ("`arch`")"'" ENDL \'
-echo '"TBB: ' "BUILD_OS\t\t"`head -1 /etc/issue | sed -e 's/\\\\//g'`'" ENDL \'
-echo '"TBB: ' "BUILD_KERNEL\t"`uname -rv`'" ENDL \'
-echo '"TBB: ' "BUILD_GCC\t\t"`g++ -v </dev/null 2>&1 | grep 'gcc.*version'`'" ENDL \'
-[ -z "$COMPILER_VERSION" ] || echo '"TBB: ' "BUILD_COMPILER\t"$COMPILER_VERSION'" ENDL \'
-echo '"TBB: ' "BUILD_GLIBC\t"`getconf GNU_LIBC_VERSION | grep glibc | sed -e 's/^glibc //'`'" ENDL \'
-echo '"TBB: ' "BUILD_LD\t\t"`ld -v | grep 'version'`'" ENDL \'
-echo '"TBB: ' "BUILD_TARGET\t$arch on $runtime"'" ENDL \'
-echo '"TBB: ' "BUILD_COMMAND\t"$*'" ENDL \'
+echo '"TBB:' "BUILD_HOST\t\t"`hostname -s`" ("`arch`")"'" ENDL \'
+echo '"TBB:' "BUILD_OS\t\t"`head -1 /etc/issue | sed -e 's/\\\\//g'`'" ENDL \'
+echo '"TBB:' "BUILD_KERNEL\t"`uname -rv`'" ENDL \'
+echo '"TBB:' "BUILD_GCC\t\t"`g++ -v </dev/null 2>&1 | grep 'gcc.*version'`'" ENDL \'
+[ -z "$COMPILER_VERSION" ] || echo '"TBB:' "BUILD_COMPILER\t"$COMPILER_VERSION'" ENDL \'
+echo '"TBB:' "BUILD_GLIBC\t"`getconf GNU_LIBC_VERSION | grep glibc | sed -e 's/^glibc //'`'" ENDL \'
+echo '"TBB:' "BUILD_LD\t\t"`ld -v | grep 'version'`'" ENDL \'
+echo '"TBB:' "BUILD_TARGET\t$arch on $runtime"'" ENDL \'
+echo '"TBB:' "BUILD_COMMAND\t"$*'" ENDL \'
 echo ""
 echo "#define __TBB_DATETIME \""`date -u`"\""
diff --git a/build/version_info_macos.sh b/build/version_info_macos.sh
index 29640bf..6a7e385 100644
--- a/build/version_info_macos.sh
+++ b/build/version_info_macos.sh
@@ -28,12 +28,12 @@
 
 # Script used to generate version info string
 echo "#define __TBB_VERSION_STRINGS \\"
-echo '"TBB: ' "BUILD_HOST\t\t"`hostname -s`" ("`arch`")"'" ENDL \'
-echo '"TBB: ' "BUILD_KERNEL\t"`uname -rv`'" ENDL \'
-echo '"TBB: ' "BUILD_GCC\t\t"`gcc -v </dev/null 2>&1 | grep 'version'`'" ENDL \'
-[ -z "$COMPILER_VERSION" ] || echo '"TBB: ' "BUILD_COMPILER\t"$COMPILER_VERSION'" ENDL \'
-echo '"TBB: ' "BUILD_LD\t\t"`ld -v | grep 'version'`'" ENDL \'
-echo '"TBB: ' "BUILD_TARGET\t$arch on $runtime"'" ENDL \'
-echo '"TBB: ' "BUILD_COMMAND\t"$*'" ENDL \'
+echo '"TBB:' "BUILD_HOST\t\t"`hostname -s`" ("`arch`")"'" ENDL \'
+echo '"TBB:' "BUILD_KERNEL\t"`uname -rv`'" ENDL \'
+echo '"TBB:' "BUILD_GCC\t\t"`gcc -v </dev/null 2>&1 | grep 'version'`'" ENDL \'
+[ -z "$COMPILER_VERSION" ] || echo '"TBB:' "BUILD_COMPILER\t"$COMPILER_VERSION'" ENDL \'
+echo '"TBB:' "BUILD_LD\t\t"`ld -v | grep 'version'`'" ENDL \'
+echo '"TBB:' "BUILD_TARGET\t$arch on $runtime"'" ENDL \'
+echo '"TBB:' "BUILD_COMMAND\t"$*'" ENDL \'
 echo ""
 echo "#define __TBB_DATETIME \""`date -u`"\""
diff --git a/build/version_info_macos.sh b/build/version_info_sunos.sh
similarity index 81%
copy from build/version_info_macos.sh
copy to build/version_info_sunos.sh
index 29640bf..daa1701 100644
--- a/build/version_info_macos.sh
+++ b/build/version_info_sunos.sh
@@ -28,12 +28,12 @@
 
 # Script used to generate version info string
 echo "#define __TBB_VERSION_STRINGS \\"
-echo '"TBB: ' "BUILD_HOST\t\t"`hostname -s`" ("`arch`")"'" ENDL \'
-echo '"TBB: ' "BUILD_KERNEL\t"`uname -rv`'" ENDL \'
-echo '"TBB: ' "BUILD_GCC\t\t"`gcc -v </dev/null 2>&1 | grep 'version'`'" ENDL \'
+echo '"TBB:' "BUILD_HOST\t"`hostname`" ("`arch`")"'" ENDL \'
+echo '"TBB:' "BUILD_OS\t\t"`uname`'" ENDL \'
+echo '"TBB:' "BUILD_KERNEL\t"`uname -rv`'" ENDL \'
+echo '"TBB:' "BUILD_SUNCC\t"`CC -V </dev/null 2>&1 | grep 'C++'`'" ENDL \'
 [ -z "$COMPILER_VERSION" ] || echo '"TBB: ' "BUILD_COMPILER\t"$COMPILER_VERSION'" ENDL \'
-echo '"TBB: ' "BUILD_LD\t\t"`ld -v | grep 'version'`'" ENDL \'
-echo '"TBB: ' "BUILD_TARGET\t$arch on $runtime"'" ENDL \'
-echo '"TBB: ' "BUILD_COMMAND\t"$*'" ENDL \'
+echo '"TBB:' "BUILD_TARGET\t$arch on $runtime"'" ENDL \'
+echo '"TBB:' "BUILD_COMMAND\t"$*'" ENDL \'
 echo ""
 echo "#define __TBB_DATETIME \""`date -u`"\""
diff --git a/build/windows.cl.inc b/build/windows.cl.inc
index fbecc75..4fdbea2 100644
--- a/build/windows.cl.inc
+++ b/build/windows.cl.inc
@@ -30,59 +30,54 @@
 
 
 #------------------------------------------------------------------------------
-# Setting default configuration to release.
-#------------------------------------------------------------------------------
-cfg ?= release
-#------------------------------------------------------------------------------
-# End of setting default configuration to release.
-#------------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------------
 # Setting compiler flags.
 #------------------------------------------------------------------------------
-CPLUS = cl
+CPLUS = cl /nologo
 LINK_FLAGS = /link /nologo
-LIB_LINK_FLAGS=/link /nologo /DLL \
-               /DEF:"$(TBB.DEF)" /MAP /DEBUG /fixed:no
-
+LIB_LINK_FLAGS=/link /nologo /DLL /MAP /DEBUG /fixed:no
+MS_CRT_KEY = /MD$(if $(findstring debug,$(cfg)),d)
+EH_FLAGS = /EHsc /GR
+               
 ifeq ($(cfg), release)
-        CPLUS_FLAGS = /nologo /MD /O2 /Zi /EHsc /Zc:forScope /DDO_ITT_NOTIFY \
-        /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE
+        CPLUS_FLAGS = $(MS_CRT_KEY) /O2 /Zi $(EH_FLAGS) /Zc:forScope
         ASM_FLAGS =
 ifeq (ia32,$(arch))
         CPLUS_FLAGS += /Oy
 endif
 endif
 ifeq ($(cfg), debug)
-        CPLUS_FLAGS = /nologo /MDd /Od /Ob0 /Zi /EHsc /Zc:forScope \
-                      /DTBB_DO_ASSERT /DDO_ITT_NOTIFY
+        CPLUS_FLAGS = $(MS_CRT_KEY) /Od /Ob0 /Zi $(EH_FLAGS) /Zc:forScope \
+                      /DTBB_DO_ASSERT
         ASM_FLAGS = /DUSE_FRAME_POINTER
 endif
 
 
 COMPILE_ONLY = /c
-PREPROC_ONLY = /E
+PREPROC_ONLY = /TC /EP
 INCLUDE_KEY = /I
 DEFINE_KEY = /D
 OUTPUT_KEY = /Fe
 OUTPUTOBJ_KEY = /Fo
-WARNING_KEY = 
+WARNING_AS_ERROR_KEY = /WX
+WARNING_KEY = /W3
 DYLIB_KEY = /DLL
+EXPORT_KEY = /DEF:
+
 ifeq ($(runtime),vc8)
         OPENMP_FLAG = /openmp
 endif
+ifeq ($(runtime),vc9)
+        OPENMP_FLAG = /openmp
+endif
 
 ifeq (em64t,$(arch))
-        ASM_FLAGS += /DEM64T=1
         CPLUS_FLAGS += /GS-
 endif
 
 
 
-TARGET_VERSION = 0x0400
-CPLUS_FLAGS += /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE \
-        /D_WIN32_WINNT=$(TARGET_VERSION)
+CPLUS_FLAGS += /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE \
+        /D_WIN32_WINNT=$(_WIN32_WINNT)
 C_FLAGS = $(CPLUS_FLAGS) /TC
 #------------------------------------------------------------------------------
 # End of setting compiler flags.
@@ -95,7 +90,7 @@ C_FLAGS = $(CPLUS_FLAGS) /TC
 ASSEMBLY_SOURCE=$(arch)-masm
 ifeq (em64t,$(arch))
     ASM=ml64
-    ASM_FLAGS += /c /Zi
+    ASM_FLAGS += /DEM64T=1 /c /Zi
     TBB_ASM.OBJ = atomic_support.obj
 else
     ASM=ml
@@ -110,9 +105,7 @@ endif
 #------------------------------------------------------------------------------
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
-M_CPLUS_FLAGS = $(subst EHsc,EHs-,$(CPLUS_FLAGS))
-M_INCLUDES = $(INCLUDES) /I$(MALLOC_ROOT) /I$(MALLOC_SOURCE_ROOT)
-M_CPLUS_FLAGS += /EHs- /GR-
+M_CPLUS_FLAGS = $(subst $(EH_FLAGS),/EHs-,$(CPLUS_FLAGS))
 #------------------------------------------------------------------------------
 # End of setting tbbmalloc data.
 #------------------------------------------------------------------------------
diff --git a/build/windows.icl.inc b/build/windows.icl.inc
index 96c762f..71014e1 100644
--- a/build/windows.icl.inc
+++ b/build/windows.icl.inc
@@ -41,48 +41,51 @@ cfg ?= release
 #------------------------------------------------------------------------------
 # Setting compiler flags.
 #------------------------------------------------------------------------------
-CPLUS = icl $(VCCOMPAT_FLAG)
+CPLUS = icl /nologo $(VCCOMPAT_FLAG)
 LINK_FLAGS = /link /nologo
-LIB_LINK_FLAGS=/nologo /link /nologo /DLL \
-               /DEF:"$(TBB.DEF)" /MAP /DEBUG /fixed:no
+LIB_LINK_FLAGS= /link /nologo /DLL /MAP /DEBUG /fixed:no
+MS_CRT_KEY = /MD$(if $(findstring debug,$(cfg)),d)
+EH_FLAGS = /EHsc /GR
 
 ifeq ($(cfg), release)
-        CPLUS_FLAGS = /nologo /MD /O2 /Zi /EHsc /Zc:forScope /DDO_ITT_NOTIFY
-        ASM_FLAGS =
+    CPLUS_FLAGS = $(MS_CRT_KEY) /O2 /Zi $(EH_FLAGS) /Zc:forScope
+    ASM_FLAGS =
 ifeq (ia32,$(arch))
-        CPLUS_FLAGS += /Oy
+    CPLUS_FLAGS += /Oy
 endif
 endif
 ifeq ($(cfg), debug)
-        CPLUS_FLAGS = /nologo /MDd /Od /Ob0 /Zi /EHsc /Zc:forScope \
-                      /DTBB_DO_ASSERT /DDO_ITT_NOTIFY
-        LINK_FLAGS += libmmds.lib /NODEFAULTLIB:libmmdd.lib
-        ASM_FLAGS = /DUSE_FRAME_POINTER
+    CPLUS_FLAGS = $(MS_CRT_KEY) /Od /Ob0 /Zi $(EH_FLAGS) /Zc:forScope \
+                      /DTBB_DO_ASSERT
+    LINK_FLAGS += libmmds.lib /NODEFAULTLIB:libmmdd.lib
+    ASM_FLAGS = /DUSE_FRAME_POINTER
 endif
 
 
 COMPILE_ONLY = /c /QMMD
-PREPROC_ONLY = /E
+PREPROC_ONLY = /EP /Tc
 INCLUDE_KEY = /I
 DEFINE_KEY = /D
 OUTPUT_KEY = /Fe
 OUTPUTOBJ_KEY = /Fo
-WARNING_KEY =
+WARNING_AS_ERROR_KEY = /WX
+WARNING_KEY = /W3
 DYLIB_KEY = /DLL
+EXPORT_KEY = /DEF:
 
 ifeq (em64t,$(arch))
-        ASM_FLAGS += /DEM64T=1
-        CPLUS_FLAGS += /GS-
+    CPLUS_FLAGS += /GS-
 endif
 
-ifeq (true,$(codecov))
+ifneq (,$(codecov))
     CPLUS_FLAGS += /Qprof-genx
+else
+    CPLUS_FLAGS += /DDO_ITT_NOTIFY
 endif
 
-TARGET_VERSION = 0x0400
 OPENMP_FLAG = /Qopenmp
 CPLUS_FLAGS += /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE \
-        /D_WIN32_WINNT=$(TARGET_VERSION)
+               /D_WIN32_WINNT=$(_WIN32_WINNT)
 C_FLAGS = $(CPLUS_FLAGS) /TC
 
 VCVERSION:=$(runtime)
@@ -108,7 +111,7 @@ export VCCOMPAT_FLAG
 ASSEMBLY_SOURCE=$(arch)-masm
 ifeq (em64t,$(arch))
     ASM=ml64
-    ASM_FLAGS += /c /Zi
+    ASM_FLAGS += /DEM64T=1 /c /Zi
     TBB_ASM.OBJ = atomic_support.obj
 else
     ASM=ml
@@ -123,14 +126,11 @@ endif
 #------------------------------------------------------------------------------
 # Setting tbbmalloc data.
 #------------------------------------------------------------------------------
-M_CPLUS_FLAGS = $(subst EHsc,EHs-,$(CPLUS_FLAGS))
-M_INCLUDES = $(INCLUDES) /I$(MALLOC_ROOT) /I$(MALLOC_SOURCE_ROOT)
-M_CPLUS_FLAGS += /EHs- /GR-
+M_CPLUS_FLAGS = $(subst $(EH_FLAGS),/EHs-,$(CPLUS_FLAGS))
 #------------------------------------------------------------------------------
 # End of setting tbbmalloc data.
 #------------------------------------------------------------------------------
 
-
 #------------------------------------------------------------------------------
 # End of define compiler-specific variables.
 #------------------------------------------------------------------------------
diff --git a/build/windows.inc b/build/windows.inc
index 9d6f6c5..d2508ba 100644
--- a/build/windows.inc
+++ b/build/windows.inc
@@ -30,6 +30,7 @@ else
   test_dir:=.
 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")
 endif
@@ -42,32 +43,36 @@ native_compiler := cl
 export compiler ?= cl
 debugger ?= devenv /debugexe
 
+CMD=cmd /C
 CWD=$(shell cmd /C echo %CD%)
 RM=cmd /C del /Q /F
 RD=cmd /C rmdir
 MD=cmd /c mkdir
 SLASH=\\
-NUL = >nul 2>&1
+NUL = nul
 
-INCLUDES += /I$(tbb_root)/src /I$(tbb_root)/include
 OBJ = obj
 DLL = dll
 LIBEXT = lib
 
-ifeq ($(cfg),debug)
-    DEBUG_SUFFIX = _debug
-endif
+def_prefix = $(if $(findstring ia32,$(arch)),win32,win64)
+
+# Target Windows version. Do not increase beyond 0x0500 without prior discussion!
+# Used as the value for macro definition opiton in windows.cl.inc etc.
+_WIN32_WINNT=0x0400
 
-TBB.DEF = $(tbb_root)/src/tbb/$(arch)-tbb.def
-TBB.DLL = tbb$(DEBUG_SUFFIX).dll
-TBB.LIB = tbb$(DEBUG_SUFFIX).lib
+TBB.DEF = $(tbb_root)/src/tbb/$(def_prefix)-tbb-export.def
+TBB.DLL = tbb$(DEBUG_SUFFIX).$(DLL)
+TBB.LIB = tbb$(DEBUG_SUFFIX).$(LIBEXT)
 TBB.RES = tbb_resource.res
+#On Windows we specify appropriate tbb library using #pragma comment
+LINK_TBB.LIB =
 
-MALLOC.DEF = $(MALLOC_ROOT)/$(arch)-malloc.def
-MALLOC.DLL = tbbmalloc$(DEBUG_SUFFIX).dll
-MALLOC.LIB = tbbmalloc$(DEBUG_SUFFIX).lib
+MALLOC.DEF = $(MALLOC_ROOT)/$(def_prefix)-tbbmalloc-export.def
+MALLOC.DLL = tbbmalloc$(DEBUG_SUFFIX).$(DLL)
+MALLOC.LIB = tbbmalloc$(DEBUG_SUFFIX).$(LIBEXT)
 MALLOC.RES = tbbmalloc.res
 
-
-MAKE_VERSIONS = cmd /C cscript /nologo /E:jscript $(tbb_root)/build/version_info_windows.js $(compiler) $(arch) "$(CPLUS) $(CPLUS_FLAGS) $(INCLUDES)" > version_string.tmp
+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
new file mode 100644
index 0000000..216356a
--- /dev/null
+++ b/doc/Release_Notes.txt
@@ -0,0 +1,154 @@
+------------------------------------------------------------------------
+Intel(R) Threading Building Blocks - Release Notes
+		  Version 2.1
+------------------------------------------------------------------------
+
+
+System Requirements
+-------------------
+
+Intel(R) Threading Building Blocks (Intel(R) TBB) is available
+commercially (see http://www.intel.com/software/products/threading) as a
+binary distribution, and in open source, in both source and binary
+forms (see http://threadingbuildingblocks.org).
+
+When built from source, Intel(R) TBB is intended to be highly portable
+and so supports a wide variety of operating systems and platforms (see
+http://threadingbuildingblocks.org for more details).
+
+Binary distributions, including commercial distributions, are validated
+and officially supported for the hardware, software, operating systems
+and compilers listed here.
+
+Hardware - Recommended
+
+    Microsoft* Windows* Systems
+	Intel(R) Core(TM) 2 Duo processor or Intel(R) Xeon(R) processor
+	    or higher
+    Linux* Systems
+	Intel(R) Core(TM) 2 Duo processor or Intel(R) Xeon(R) processor
+	    or Intel(R) Itanium(R) processor or higher
+    Mac OS* X Systems
+	Intel(R) Core(TM) 2 Duo processor or higher
+
+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) Itanium(R) processor family (Linux* systems only)
+    Non Intel(R) processors compatible with the above processors
+
+Software - Minimum Requirements
+
+    Supported operating system (see below)
+    Supported compiler (see below)
+    Xcode* tool suite 2.4.1 or higher (Mac OS* X systems only)
+    Microsoft* Internet Explorer* 6.0, or other compatible web browser
+    Adobe(R) Reader(R)* 6.0 or higher
+
+Software - Recommended
+
+    Intel(R) C++ Compiler 10.0 or higher
+    Intel(R) Thread Checker 3.1 or higher
+    Intel(R) Thread Profiler 3.1 or higher
+
+Software - Supported Operating Systems
+
+    Microsoft* Windows* Systems
+	Microsoft* Windows* XP Professional
+	Microsoft* Windows* Server 2003
+	Microsoft* Windows* Vista
+    Linux* Systems
+	Red Hat* Enterprise Linux* 3, 4, 5
+	    (when using Red Hat* Enterprise Linux* 4 with Intel(R)
+	    Itanium(R) processors, operating system Update 2 or higher
+	    is recommended)
+	Red Hat* Fedora* Core 5, Core 6, 7, 8
+	    (not with Intel(R) Itanium(R) processors)
+	Asianux* 3.0
+	Debian* GNU/Linux* 4.0
+	Ubuntu* 7.04, 7.10
+	SuSE* Linux* Enterprise Server (SLES) 9, 10
+	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)
+    Mac OS* X Systems
+	Mac OS* X 10.4.9 or higher
+
+Software - Supported Compilers
+
+    Microsoft* Visual C++* 7.1 (Microsoft* Visual Studio* .NET 2003,
+	Windows* systems only)
+    Microsoft* Visual C++ 8.0 (Microsoft* Visual Studio* 2005,
+	Windows* systems only)
+    Microsoft* Visual C++ 9.0 (Microsoft* Visual Studio* 2008,
+	Windows* systems only)
+    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: 3.2, 3.3, 3.4, 4.0, 4.1
+    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)
+
+
+Known Issues
+------------
+
+Please note the following with respect to this particular release of
+Intel(R) Threading Building Blocks.
+
+Library Issues
+
+    - The atomic<long long> and atomic<unsigned long long> templates are
+	not supported when using the Microsoft* Visual C++* 7.1
+	(Microsoft* Visual Studio* .NET 2003) compiler.
+
+    - Unhandled exceptions in the user code executed in the context of
+	TBB algorithms or containers may lead to segmentation faults when
+	Intel(R) C++ Compiler 10.x is used with glibc 2.3.2, 2.3.3, or 2.3.4.
+
+    - To allow more accurate results to be obtained with Intel(R) Thread
+	Checker or Intel(R) Thread Profiler, download the latest update
+	releases of these products before using them with Intel(R)
+	Threading Building Blocks.
+
+    - If you are using Intel(R) Threading Building Blocks and OpenMP*
+	constructs mixed together in rapid succession in the same
+	program, and you are using Intel(R) compilers for your OpenMP*
+	code, set KMP_BLOCKTIME to a small value (e.g., 20 milliseconds)
+	to improve performance.  This setting can also be made within
+	your OpenMP* code via the kmp_set_blocktime() library call.  See
+	the Intel(R) compiler OpenMP* documentation for more details on
+	KMP_BLOCKTIME and kmp_set_blocktime().
+
+    - In general, non-debug ("release") builds of applications or
+	examples should link against the non-debug versions of the
+	Intel(R) Threading Building Blocks libraries, and debug builds
+	should link against the debug versions of these libraries.  On
+	Windows* systems, compile with /MD and use Intel(R) Threading
+	Building Blocks release libraries, or compile with /MDd and use
+	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
+
+
+------------------------------------------------------------------------
+Copyright (C) 2005-2008 Intel Corporation.  All Rights Reserved.
+
+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.
+
+* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00001.html b/doc/html/a00001.html
new file mode 100644
index 0000000..97ab900
--- /dev/null
+++ b/doc/html/a00001.html
@@ -0,0 +1,19 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::aligned_space< T, N > Member List</h1>This is the complete list of members for <a class="el" href="a00164.html">tbb::aligned_space< T, N ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00164.html#a0">begin</a>()</td><td><a class="el" href="a00164.html">tbb::aligned_space< T, N ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00164.html#a1">end</a>()</td><td><a class="el" href="a00164.html">tbb::aligned_space< T, N ></a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00013.html b/doc/html/a00013.html
new file mode 100644
index 0000000..5bb736f
--- /dev/null
+++ b/doc/html/a00013.html
@@ -0,0 +1,30 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::blocked_range< Value > Member List</h1>This is the complete list of members for <a class="el" href="a00169.html">tbb::blocked_range< Value ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00169.html#a2">begin</a>() const </td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#a0">blocked_range</a>()</td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#a1">blocked_range</a>(Value begin_, Value end_, size_type grainsize_=1)</td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#a8">blocked_range</a>(blocked_range &r, split)</td><td><a class="el" href="a00169.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="a00169.html">tbb::blocked_range< Value ></a>)</td><td><a class="el" href="a00169.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="a00169.html">tbb::blocked_range< Value ></a>)</td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#w0">const_iterator</a> typedef</td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#a6">empty</a>() const </td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#a3">end</a>() const </td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#a5">grainsize</a>() const </td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#a7">is_divisible</a>() const </td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#a4">size</a>() const </td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#w1">size_type</a> typedef</td><td><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00014.html b/doc/html/a00014.html
new file mode 100644
index 0000000..4c81707
--- /dev/null
+++ b/doc/html/a00014.html
@@ -0,0 +1,26 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::blocked_range2d< RowValue, ColValue > Member List</h1>This is the complete list of members for <a class="el" href="a00170.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="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00170.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="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00170.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="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00170.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="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a>)</td><td><a class="el" href="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#a6">cols</a>() const </td><td><a class="el" href="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#a2">empty</a>() const </td><td><a class="el" href="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#a3">is_divisible</a>() const </td><td><a class="el" href="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#w0">row_range_type</a> typedef</td><td><a class="el" href="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#a5">rows</a>() const </td><td><a class="el" href="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..c03f681
--- /dev/null
+++ b/doc/html/a00015.html
@@ -0,0 +1,28 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::blocked_range3d< PageValue, RowValue, ColValue > Member List</h1>This is the complete list of members for <a class="el" href="a00171.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="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00171.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="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00171.html">tbb::blocked_range3d [...]
+  <tr bgcolor="#f0f0f0"><td><b>blocked_range3d</b>(blocked_range3d &r, split) (defined in <a class="el" href="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00171.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="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00171.html#a7">cols</a>() const </td><td><a class="el" href="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00171.html#a2">empty</a>() const </td><td><a class="el" href="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00171.html#a3">is_divisible</a>() const </td><td><a class="el" href="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00171.html#w0">page_range_type</a> typedef</td><td><a class="el" href="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00171.html#a5">pages</a>() const </td><td><a class="el" href="a00171.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="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>)</td><td><a class="el" href="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00171.html#a6">rows</a>() const </td><td><a class="el" href="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00016.html b/doc/html/a00016.html
new file mode 100644
index 0000000..fa374e6
--- /dev/null
+++ b/doc/html/a00016.html
@@ -0,0 +1,34 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::cache_aligned_allocator< T > Member List</h1>This is the complete list of members for <a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#a5">allocate</a>(size_type n, const void *hint=0)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#a8">construct</a>(pointer p, const T &value)</td><td><a class="el" href="a00172.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#a6">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00172.html">tbb::cache_aligned_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#a9">destroy</a>(pointer p)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#a7">max_size</a>() const </td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.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="a00172.html">tbb::cache_aligned_allocator< T ></a>)</td><td><a class="el" href="a00172.html">tbb::cache_aligned_allocator< T ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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..a70d90f
--- /dev/null
+++ b/doc/html/a00018.html
@@ -0,0 +1,20 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::cache_aligned_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00173.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="a00173.html">tbb::cache_aligned_allocator< void ></a>)</td><td><a class="el" href="a00173.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="a00173.html">tbb::cache_aligned_allocator< void ></a>)</td><td><a class="el" href="a00173.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="a00173.html">tbb::cache_aligned_allocator< void ></a>)</td><td><a class="el" href="a00173.html">tbb::cache_aligned_allocator< void ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00020.html b/doc/html/a00020.html
new file mode 100644
index 0000000..69d63d9
--- /dev/null
+++ b/doc/html/a00020.html
@@ -0,0 +1,24 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::hash_map_base Member List</h1>This is the complete list of members for <a class="el" href="a00195.html">tbb::internal::hash_map_base</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>chain_mutex_t</b> typedef (defined in <a class="el" href="a00195.html">tbb::internal::hash_map_base</a>)</td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00195.html#w3">hashcode_t</a> typedef</td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00195.html#s2">max_physical_size</a></td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00195.html#s1">n_segment</a></td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00195.html#s0">n_segment_bits</a></td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>node_mutex_t</b> typedef (defined in <a class="el" href="a00195.html">tbb::internal::hash_map_base</a>)</td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_mutex_t</b> typedef (defined in <a class="el" href="a00195.html">tbb::internal::hash_map_base</a>)</td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00022.html b/doc/html/a00022.html
new file mode 100644
index 0000000..7ef9489
--- /dev/null
+++ b/doc/html/a00022.html
@@ -0,0 +1,35 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::hash_map_iterator< Container, Value > Member List</h1>This is the complete list of members for <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00196.html#a0">hash_map_iterator</a>()</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>hash_map_iterator</b>(const hash_map_iterator< Container, typename Container::value_type > &other) (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::hash_map_iterator</b> (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::hash_map_range</b> (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>iterator_category</b> typedef (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator *</b>() const  (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator!=</b> (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator++</b>() (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00196.html#a5">operator++</a>(int)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator-</b> (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator-></b>() const  (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator==</b> (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::concurrent_hash_map</b> (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>)</td><td><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00023.html b/doc/html/a00023.html
new file mode 100644
index 0000000..e78b26c
--- /dev/null
+++ b/doc/html/a00023.html
@@ -0,0 +1,32 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::hash_map_range< Iterator > Member List</h1>This is the complete list of members for <a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>begin</b>() const  (defined in <a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00197.html#a0">empty</a>() const </td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>end</b>() const  (defined in <a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00197.html#a7">grainsize</a>() const </td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>hash_map_range</b> (defined in <a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00197.html#a2">hash_map_range</a>(hash_map_range &r, split)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00197.html#a3">hash_map_range</a>(hash_map_range< U > &r)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00197.html#a4">hash_map_range</a>(const Iterator &begin_, const Iterator &end_, size_type grainsize=1)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00197.html#a1">is_divisible</a>() const </td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00197.html#w0">size_type</a> typedef</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>)</td><td><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00024.html b/doc/html/a00024.html
new file mode 100644
index 0000000..b1f97a9
--- /dev/null
+++ b/doc/html/a00024.html
@@ -0,0 +1,75 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::concurrent_hash_map< Key, T, HashCompare, A > Member List</h1>This is the complete list of members for <a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>chain_mutex_t</b> typedef (defined in <a class="el" href="a00195.html">tbb::internal::hash_map_base</a>)</td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a4">clear</a>()</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a0">concurrent_hash_map</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00174.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="a00174.html#a1">concurrent_hash_map</a>(const concurrent_hash_map &table, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00174.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="a00174.html#a2">concurrent_hash_map</a>(I first, I last, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a19">count</a>(const Key &key) const </td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a15">empty</a>() const </td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html#a28">erase</a>(const Key &key)</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a29">erase</a>(const_accessor &item_accessor)</td><td><a class="el" href="a00174.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="a00174.html#a30">erase</a>(accessor &item_accessor)</td><td><a class="el" href="a00174.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="a00174.html#a20">find</a>(const_accessor &result, const Key &key) const </td><td><a class="el" href="a00174.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="a00174.html#a21">find</a>(accessor &result, const Key &key)</td><td><a class="el" href="a00174.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="a00174.html#a17">get_allocator</a>() const </td><td><a class="el" href="a00174.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="a00195.html#w3">hashcode_t</a> typedef</td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a22">insert</a>(const_accessor &result, const Key &key)</td><td><a class="el" href="a00174.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="a00174.html#a23">insert</a>(accessor &result, const Key &key)</td><td><a class="el" href="a00174.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="a00174.html#a24">insert</a>(const_accessor &result, const value_type &value)</td><td><a class="el" href="a00174.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="a00174.html#a25">insert</a>(accessor &result, const value_type &value)</td><td><a class="el" href="a00174.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="a00174.html#a26">insert</a>(const value_type &value)</td><td><a class="el" href="a00174.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="a00174.html#a27">insert</a>(I first, I last)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00195.html#s2">max_physical_size</a></td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [protected, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a16">max_size</a>() const </td><td><a class="el" href="a00174.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="a00195.html#s1">n_segment</a></td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [protected, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00195.html#s0">n_segment_bits</a></td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [protected, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>node</b> (defined in <a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>node_mutex_t</b> typedef (defined in <a class="el" href="a00195.html">tbb::internal::hash_map_base</a>)</td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a3">operator=</a>(const concurrent_hash_map &table)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_mutex_t</b> typedef (defined in <a class="el" href="a00195.html">tbb::internal::hash_map_base</a>)</td><td><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a14">size</a>() const </td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a18">swap</a>(concurrent_hash_map &table)</td><td><a class="el" href="a00174.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="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>)</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00174.html#a5">~concurrent_hash_map</a>()</td><td><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..d2c1532
--- /dev/null
+++ b/doc/html/a00025.html
@@ -0,0 +1,26 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<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="a00176.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="a00176.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>)</td><td><a class="el" href="a00176.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</b> (defined in <a class="el" href="a00176.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>)</td><td><a class="el" href="a00176.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="a00176.html#a4">const_accessor</a>()</td><td><a class="el" href="a00176.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="a00176.html#a0">empty</a>() const </td><td><a class="el" href="a00176.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="a00176.html#a2">operator *</a>() const </td><td><a class="el" href="a00176.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="a00176.html#a3">operator-></a>() const </td><td><a class="el" href="a00176.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="a00176.html#a1">release</a>()</td><td><a class="el" href="a00176.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="a00176.html#w0">value_type</a> typedef</td><td><a class="el" href="a00176.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00176.html#a5">~const_accessor</a>()</td><td><a class="el" href="a00176.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-2008 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/a00026.html b/doc/html/a00026.html
new file mode 100644
index 0000000..a5c19a5
--- /dev/null
+++ b/doc/html/a00026.html
@@ -0,0 +1,24 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<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="a00175.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="a00176.html#a4">const_accessor</a>()</td><td><a class="el" href="a00176.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="a00176.html#a0">empty</a>() const </td><td><a class="el" href="a00176.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="a00175.html#a0">operator *</a>() const </td><td><a class="el" href="a00175.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="a00175.html#a1">operator-></a>() const </td><td><a class="el" href="a00175.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="a00176.html#a1">release</a>()</td><td><a class="el" href="a00176.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="a00175.html#w0">value_type</a> typedef</td><td><a class="el" href="a00175.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00176.html#a5">~const_accessor</a>()</td><td><a class="el" href="a00176.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-2008 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/a00030.html
new file mode 100644
index 0000000..563b2c6
--- /dev/null
+++ b/doc/html/a00030.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_queue_base_v3 Member List</h1>This is the complete list of members for <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b8">allocate_page</a>()=0</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected, pure virtual]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_queue_base_v3</b>(size_t item_size) (defined in <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_queue_iterator_base_v3</b> (defined in <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_queue_iterator_rep</b> (defined in <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_queue_rep</b> (defined in <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b9">deallocate_page</a>(page *p)=0</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected, pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b10">internal_finish_clear</a>()</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b3">internal_pop</a>(void *dst)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b5">internal_pop_if_present</a>(void *dst)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b2">internal_push</a>(const void *src)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b4">internal_push_if_not_full</a>(const void *src)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b7">internal_set_capacity</a>(ptrdiff_t capacity, size_t element_size)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b6">internal_size</a>() const </td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b11">internal_throw_exception</a>() const </td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#p2">item_size</a></td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#p1">items_per_page</a></td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>micro_queue</b> (defined in <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>micro_queue_pop_finalizer</b> (defined in <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#p0">my_capacity</a></td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~concurrent_queue_base_v3</b>() (defined in <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00031.html b/doc/html/a00031.html
new file mode 100644
index 0000000..fa2b7cd
--- /dev/null
+++ b/doc/html/a00031.html
@@ -0,0 +1,19 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_queue_base_v3::page Member List</h1>This is the complete list of members for <a class="el" href="a00179.html">tbb::internal::concurrent_queue_base_v3::page</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>mask</b> (defined in <a class="el" href="a00179.html">tbb::internal::concurrent_queue_base_v3::page</a>)</td><td><a class="el" href="a00179.html">tbb::internal::concurrent_queue_base_v3::page</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>next</b> (defined in <a class="el" href="a00179.html">tbb::internal::concurrent_queue_base_v3::page</a>)</td><td><a class="el" href="a00179.html">tbb::internal::concurrent_queue_base_v3::page</a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00032.html b/doc/html/a00032.html
new file mode 100644
index 0000000..1a9c04a
--- /dev/null
+++ b/doc/html/a00032.html
@@ -0,0 +1,26 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_queue_iterator_base_v3 Member List</h1>This is the complete list of members for <a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b4">advance</a>()</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b3">assign</a>(const concurrent_queue_iterator_base_v3 &i)</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b0">concurrent_queue_iterator_base_v3</a>()</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b1">concurrent_queue_iterator_base_v3</a>(const concurrent_queue_iterator_base_v3 &i)</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b2">concurrent_queue_iterator_base_v3</a>(const concurrent_queue_base &queue)</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#p0">my_item</a></td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [mutable, protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator!=</b> (defined in <a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a>)</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator==</b> (defined in <a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a>)</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b5">~concurrent_queue_iterator_base_v3</a>()</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [protected]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00033.html b/doc/html/a00033.html
new file mode 100644
index 0000000..6a478a7
--- /dev/null
+++ b/doc/html/a00033.html
@@ -0,0 +1,32 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_queue_iterator< Container, Value > Member List</h1>This is the complete list of members for <a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>::tbb::concurrent_queue</b> (defined in <a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a>)</td><td><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b4">advance</a>()</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b3">assign</a>(const concurrent_queue_iterator_base_v3 &i)</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_queue_iterator</b>() (defined in <a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a>)</td><td><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00180.html#a1">concurrent_queue_iterator</a>(const concurrent_queue_iterator< Container, typename Container::value_type > &other)</td><td><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b0">concurrent_queue_iterator_base_v3</a>()</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b1">concurrent_queue_iterator_base_v3</a>(const concurrent_queue_iterator_base_v3 &i)</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b2">concurrent_queue_iterator_base_v3</a>(const concurrent_queue_base &queue)</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#p0">my_item</a></td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [mutable, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00180.html#a3">operator *</a>() const </td><td><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00180.html#a5">operator++</a>()</td><td><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00180.html#a6">operator++</a>(int)</td><td><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator-></b>() const  (defined in <a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a>)</td><td><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00180.html#a2">operator=</a>(const concurrent_queue_iterator &other)</td><td><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00181.html#b5">~concurrent_queue_iterator_base_v3</a>()</td><td><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td><code> [protected]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..7fbea09
--- /dev/null
+++ b/doc/html/a00034.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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::concurrent_queue< T, A > Member List</h1>This is the complete list of members for <a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00177.html#w1">allocator_type</a> typedef</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>begin</b>() (defined in <a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00177.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="a00177.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a8">capacity</a>() const </td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a11">clear</a>()</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a0">concurrent_queue</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_queue_base_v3</b>(size_t item_size) (defined in <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#w3">const_reference</a> typedef</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#w5">difference_type</a> typedef</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a7">empty</a>() const </td><td><a class="el" href="a00177.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="a00177.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00177.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="a00177.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a10">get_allocator</a>() const </td><td><a class="el" href="a00177.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="a00177.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b10">internal_finish_clear</a>()</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b3">internal_pop</a>(void *dst)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b5">internal_pop_if_present</a>(void *dst)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b2">internal_push</a>(const void *src)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b4">internal_push_if_not_full</a>(const void *src)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b7">internal_set_capacity</a>(ptrdiff_t capacity, size_t element_size)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b6">internal_size</a>() const </td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#b11">internal_throw_exception</a>() const </td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#p2">item_size</a></td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#p1">items_per_page</a></td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a>)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00178.html#p0">my_capacity</a></td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a3">pop</a>(T &destination)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a5">pop_if_present</a>(T &destination)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a2">push</a>(const T &source)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a4">push_if_not_full</a>(const T &source)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#w2">reference</a> typedef</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a9">set_capacity</a>(size_type capacity)</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a6">size</a>() const </td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#w4">size_type</a> typedef</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#w0">value_type</a> typedef</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#a1">~concurrent_queue</a>()</td><td><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~concurrent_queue_base_v3</b>() (defined in <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>)</td><td><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td><code> [protected, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00036.html b/doc/html/a00036.html
new file mode 100644
index 0000000..73f6048
--- /dev/null
+++ b/doc/html/a00036.html
@@ -0,0 +1,48 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_vector_base_v3 Member List</h1>This is the complete list of members for <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_vector_base_v3</b>() (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>default_initial_segments</b> enum value (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>helper</b> (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#x2">internal_array_op1</a> typedef</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#x3">internal_array_op2</a> typedef</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_assign</b>(const concurrent_vector_base_v3 &src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_capacity</b>() const  (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_clear</b>(internal_array_op1 destroy) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_compact</b>(size_type element_size, void *table, internal_array_op1 destroy, internal_array_op2 copy) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_copy</b>(const concurrent_vector_base_v3 &src, size_type element_size, internal_array_op2 copy) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_grow</b>(size_type start, size_type finish, size_type element_size, internal_array_op2 init, const void *src) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_grow_by</b>(size_type delta, size_type element_size, internal_array_op2 init, const void *src) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_grow_to_at_least</b>(size_type new_size, size_type element_size, internal_array_op2 init, const void *src) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_push_back</b>(size_type element_size, size_type &index) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_reserve</b>(size_type n, size_type element_size, size_type max_size) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_swap</b>(concurrent_vector_base_v3 &v) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_throw_exception</b>(size_type) const  (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p2">my_early_size</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p1">my_first_block</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p3">my_segment</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p4">my_storage</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointers_per_long_table</b> enum value (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#x7x5">pointers_per_short_table</a> enum value</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_base</b>(segment_index_t k) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, protected, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_base_index_of</b>(segment_index_t &index) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, protected, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_index_of</b>(size_type index) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, protected, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_index_t</b> typedef (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_size</b>(segment_index_t k) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, protected, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p0">vector_allocator_ptr</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~concurrent_vector_base_v3</b>() (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [protected]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00038.html b/doc/html/a00038.html
new file mode 100644
index 0000000..9cad933
--- /dev/null
+++ b/doc/html/a00038.html
@@ -0,0 +1,19 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_vector_base_v3::internal_segments_table Member List</h1>This is the complete list of members for <a class="el" href="a00184.html">tbb::internal::concurrent_vector_base_v3::internal_segments_table</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>first_block</b> (defined in <a class="el" href="a00184.html">tbb::internal::concurrent_vector_base_v3::internal_segments_table</a>)</td><td><a class="el" href="a00184.html">tbb::internal::concurrent_vector_base_v3::internal_segments_table</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>table</b> (defined in <a class="el" href="a00184.html">tbb::internal::concurrent_vector_base_v3::internal_segments_table</a>)</td><td><a class="el" href="a00184.html">tbb::internal::concurrent_vector_base_v3::internal_segments_table</a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00039.html b/doc/html/a00039.html
new file mode 100644
index 0000000..d7228b2
--- /dev/null
+++ b/doc/html/a00039.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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::vector_iterator< Container, Value > Member List</h1>This is the complete list of members for <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::vector_iterator</b> (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>iterator_category</b> typedef (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator *</b>() const  (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator+</b> (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator+</b>(ptrdiff_t offset) const  (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00238.html#a9">operator++</a>()</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00238.html#a11">operator++</a>(int)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator+=</b>(ptrdiff_t offset) (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator-</b> (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator-</b>(ptrdiff_t offset) const  (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00238.html#a10">operator--</a>()</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00238.html#a12">operator--</a>(int)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator-=</b>(ptrdiff_t offset) (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator-></b>() const  (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator<</b> (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator==</b> (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>operator[]</b>(ptrdiff_t k) const  (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::concurrent_vector</b> (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00238.html#a0">vector_iterator</a>()</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>vector_iterator</b>(const vector_iterator< Container, typename Container::value_type > &other) (defined in <a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>)</td><td><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..7c03f52
--- /dev/null
+++ b/doc/html/a00041.html
@@ -0,0 +1,104 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::concurrent_vector< T, A > Member List</h1>This is the complete list of members for <a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a37">assign</a>(size_type n, const_reference t)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a38">assign</a>(I first, I last)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a14">at</a>(size_type index)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a15">at</a>(size_type index) const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a34">back</a>()</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a35">back</a>() const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a24">begin</a>()</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a26">begin</a>() const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a20">capacity</a>() const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a40">clear</a>()</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a22">compact</a>()</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a0">concurrent_vector</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a1">concurrent_vector</a>(const concurrent_vector &vector, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a2">concurrent_vector</a>(const concurrent_vector< T, M > &vector, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a3">concurrent_vector</a>(size_type n)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a4">concurrent_vector</a>(size_type n, const_reference t, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a5">concurrent_vector</a>(I first, I last, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_vector_base_v3</b>() (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_iterator</b> typedef (defined in <a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>default_initial_segments</b> enum value (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a19">empty</a>() const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a25">end</a>()</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a27">end</a>() const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a32">front</a>()</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a33">front</a>() const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a36">get_allocator</a>() const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a8">grow_by</a>(size_type delta)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a9">grow_by</a>(size_type delta, const_reference t)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a10">grow_to_at_least</a>(size_type n)</td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#x2">internal_array_op1</a> typedef</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#x3">internal_array_op2</a> typedef</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_assign</b>(const concurrent_vector_base_v3 &src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_capacity</b>() const  (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_clear</b>(internal_array_op1 destroy) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_compact</b>(size_type element_size, void *table, internal_array_op1 destroy, internal_array_op2 copy) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_copy</b>(const concurrent_vector_base_v3 &src, size_type element_size, internal_array_op2 copy) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_grow</b>(size_type start, size_type finish, size_type element_size, internal_array_op2 init, const void *src) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_grow_by</b>(size_type delta, size_type element_size, internal_array_op2 init, const void *src) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_grow_to_at_least</b>(size_type new_size, size_type element_size, internal_array_op2 init, const void *src) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_push_back</b>(size_type element_size, size_type &index) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_reserve</b>(size_type n, size_type element_size, size_type max_size) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_swap</b>(concurrent_vector_base_v3 &v) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_throw_exception</b>(size_type) const  (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal_vector_base</b>() const  (defined in <a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a23">max_size</a>() const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p2">my_early_size</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p1">my_first_block</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p3">my_segment</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p4">my_storage</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a6">operator=</a>(const concurrent_vector &vector)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a7">operator=</a>(const concurrent_vector< T, M > &vector)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a12">operator[]</a>(size_type index)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a13">operator[]</a>(size_type index) const </td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointers_per_long_table</b> enum value (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#x7x5">pointers_per_short_table</a> enum value</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a11">push_back</a>(const_reference item)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a16">range</a>(size_t grainsize=1)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a17">range</a>(size_t grainsize=1) const </td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a28">rbegin</a>()</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a30">rbegin</a>() const </td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a29">rend</a>()</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a31">rend</a>() const </td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a21">reserve</a>(size_type n)</td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_base</b>(segment_index_t k) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, private, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_base_index_of</b>(segment_index_t &index) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, private, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_index_of</b>(size_type index) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, private, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_index_t</b> typedef (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>segment_size</b>(segment_index_t k) (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [inline, private, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a18">size</a>() const </td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a39">swap</a>(concurrent_vector &vector)</td><td><a class="el" href="a00182.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="a00182.html">tbb::concurrent_vector< T, A ></a>)</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00183.html#p0">vector_allocator_ptr</a></td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00182.html#a41">~concurrent_vector</a>()</td><td><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~concurrent_vector_base_v3</b>() (defined in <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>)</td><td><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td><code> [private]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00044.html b/doc/html/a00044.html
new file mode 100644
index 0000000..4272639
--- /dev/null
+++ b/doc/html/a00044.html
@@ -0,0 +1,23 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::mutex Member List</h1>This is the complete list of members for <a class="el" href="a00198.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="a00198.html">tbb::mutex</a>)</td><td><a class="el" href="a00198.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="a00198.html">tbb::mutex</a>)</td><td><a class="el" href="a00198.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="a00198.html">tbb::mutex</a>)</td><td><a class="el" href="a00198.html">tbb::mutex</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00198.html#a0">mutex</a>()</td><td><a class="el" href="a00198.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="a00198.html">tbb::mutex</a>)</td><td><a class="el" href="a00198.html">tbb::mutex</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~mutex</b>() (defined in <a class="el" href="a00198.html">tbb::mutex</a>)</td><td><a class="el" href="a00198.html">tbb::mutex</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00045.html b/doc/html/a00045.html
new file mode 100644
index 0000000..4f54e8b
--- /dev/null
+++ b/doc/html/a00045.html
@@ -0,0 +1,24 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00199.html">tbb::mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00199.html#a3">acquire</a>(mutex &mutex)</td><td><a class="el" href="a00199.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00199.html#a5">release</a>()</td><td><a class="el" href="a00199.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00199.html#a0">scoped_lock</a>()</td><td><a class="el" href="a00199.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00199.html#a1">scoped_lock</a>(mutex &mutex)</td><td><a class="el" href="a00199.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00199.html#a4">try_acquire</a>(mutex &mutex)</td><td><a class="el" href="a00199.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00199.html#a2">~scoped_lock</a>()</td><td><a class="el" href="a00199.html">tbb::mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00046.html b/doc/html/a00046.html
new file mode 100644
index 0000000..5a61b54
--- /dev/null
+++ b/doc/html/a00046.html
@@ -0,0 +1,18 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::strip< T > Member List</h1>This is the complete list of members for <a class="el" href="a00226.html">tbb::internal::strip< T ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>type</b> typedef (defined in <a class="el" href="a00226.html">tbb::internal::strip< T ></a>)</td><td><a class="el" href="a00226.html">tbb::internal::strip< T ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00054.html b/doc/html/a00054.html
new file mode 100644
index 0000000..2562cfd
--- /dev/null
+++ b/doc/html/a00054.html
@@ -0,0 +1,20 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::parallel_do_feeder< Item > Member List</h1>This is the complete list of members for <a class="el" href="a00201.html">tbb::parallel_do_feeder< Item ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00201.html#a0">add</a>(const Item &item)</td><td><a class="el" href="a00201.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="a00201.html">tbb::parallel_do_feeder< Item ></a>)</td><td><a class="el" href="a00201.html">tbb::parallel_do_feeder< Item ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..ed14e9f
--- /dev/null
+++ b/doc/html/a00055.html
@@ -0,0 +1,18 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::parallel_do_operator_selector< Body, Item > Member List</h1>This is the complete list of members for <a class="el" href="a00203.html">tbb::internal::parallel_do_operator_selector< Body, Item ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>call</b>(const Body &obj, A1 &arg1, A2 &arg2) (defined in <a class="el" href="a00203.html">tbb::internal::parallel_do_operator_selector< Body, Item ></a>)</td><td><a class="el" href="a00203.html">tbb::internal::parallel_do_operator_selector< Body, Item ></a></td><td><code> [inline, static]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00056.html b/doc/html/a00056.html
new file mode 100644
index 0000000..57e118e
--- /dev/null
+++ b/doc/html/a00056.html
@@ -0,0 +1,63 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::do_iteration_task< Body, Item > Member List</h1>This is the complete list of members for <a class="el" href="a00186.html">tbb::internal::do_iteration_task< Body, Item ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>parallel_do_feeder_impl</b> (defined in <a class="el" href="a00186.html">tbb::internal::do_iteration_task< Body, Item ></a>)</td><td><a class="el" href="a00186.html">tbb::internal::do_iteration_task< Body, Item ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00058.html b/doc/html/a00058.html
new file mode 100644
index 0000000..394d3d1
--- /dev/null
+++ b/doc/html/a00058.html
@@ -0,0 +1,21 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::parallel_do_feeder_impl< Body, Item > Member List</h1>This is the complete list of members for <a class="el" href="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00201.html#a0">add</a>(const Item &item)</td><td><a class="el" href="a00201.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="a00201.html">tbb::parallel_do_feeder< Item ></a>)</td><td><a class="el" href="a00201.html">tbb::parallel_do_feeder< Item ></a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>my_barrier</b> (defined in <a class="el" href="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a>)</td><td><a class="el" href="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>my_body</b> (defined in <a class="el" href="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a>)</td><td><a class="el" href="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00059.html b/doc/html/a00059.html
new file mode 100644
index 0000000..c52a598
--- /dev/null
+++ b/doc/html/a00059.html
@@ -0,0 +1,63 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::do_group_task_forward< Iterator, Body, Item > Member List</h1>This is the complete list of members for <a class="el" href="a00185.html">tbb::internal::do_group_task_forward< Iterator, Body, Item ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>do_task_iter</b> (defined in <a class="el" href="a00185.html">tbb::internal::do_group_task_forward< Iterator, Body, Item ></a>)</td><td><a class="el" href="a00185.html">tbb::internal::do_group_task_forward< Iterator, Body, Item ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00061.html b/doc/html/a00061.html
new file mode 100644
index 0000000..8fbe34c
--- /dev/null
+++ b/doc/html/a00061.html
@@ -0,0 +1,63 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::do_task_iter< Iterator, Body, Item > Member List</h1>This is the complete list of members for <a class="el" href="a00187.html">tbb::internal::do_task_iter< Iterator, Body, Item ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>do_task_iter</b>(Iterator first, Iterator last, feeder_type &feeder) (defined in <a class="el" href="a00187.html">tbb::internal::do_task_iter< Iterator, Body, Item ></a>)</td><td><a class="el" href="a00187.html">tbb::internal::do_task_iter< Iterator, Body, Item ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00062.html b/doc/html/a00062.html
new file mode 100644
index 0000000..5d7125b
--- /dev/null
+++ b/doc/html/a00062.html
@@ -0,0 +1,62 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::start_for< Range, Body, Partitioner > Member List</h1>This is the complete list of members for <a class="el" href="a00222.html">tbb::internal::start_for< Range, Body, Partitioner ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>run</b>(const Range &range, const Body &body, const Partitioner &partitioner) (defined in <a class="el" href="a00222.html">tbb::internal::start_for< Range, Body, Partitioner ></a>)</td><td><a class="el" href="a00222.html">tbb::internal::start_for< Range, Body, Partitioner ></a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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..d2a5f40
--- /dev/null
+++ b/doc/html/a00063.html
@@ -0,0 +1,63 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::finish_reduce< Body > Member List</h1>This is the complete list of members for <a class="el" href="a00192.html">tbb::internal::finish_reduce< Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>start_reduce</b> (defined in <a class="el" href="a00192.html">tbb::internal::finish_reduce< Body ></a>)</td><td><a class="el" href="a00192.html">tbb::internal::finish_reduce< Body ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..0a6f02b
--- /dev/null
+++ b/doc/html/a00064.html
@@ -0,0 +1,63 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::start_reduce< Range, Body, Partitioner > Member List</h1>This is the complete list of members for <a class="el" href="a00223.html">tbb::internal::start_reduce< Range, Body, Partitioner ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>finish_reduce</b> (defined in <a class="el" href="a00223.html">tbb::internal::start_reduce< Range, Body, Partitioner ></a>)</td><td><a class="el" href="a00223.html">tbb::internal::start_reduce< Range, Body, Partitioner ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>run</b>(const Range &range, Body &body, const Partitioner &partitioner) (defined in <a class="el" href="a00223.html">tbb::internal::start_reduce< Range, Body, Partitioner ></a>)</td><td><a class="el" href="a00223.html">tbb::internal::start_reduce< Range, Body, Partitioner ></a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00065.html b/doc/html/a00065.html
new file mode 100644
index 0000000..54d6f0a
--- /dev/null
+++ b/doc/html/a00065.html
@@ -0,0 +1,63 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::finish_reduce_with_affinity< Body > Member List</h1>This is the complete list of members for <a class="el" href="a00193.html">tbb::internal::finish_reduce_with_affinity< Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>start_reduce_with_affinity</b> (defined in <a class="el" href="a00193.html">tbb::internal::finish_reduce_with_affinity< Body ></a>)</td><td><a class="el" href="a00193.html">tbb::internal::finish_reduce_with_affinity< Body ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00066.html b/doc/html/a00066.html
new file mode 100644
index 0000000..40a7c5d
--- /dev/null
+++ b/doc/html/a00066.html
@@ -0,0 +1,63 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::start_reduce_with_affinity< Range, Body > Member List</h1>This is the complete list of members for <a class="el" href="a00224.html">tbb::internal::start_reduce_with_affinity< Range, Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>finish_reduce_with_affinity</b> (defined in <a class="el" href="a00224.html">tbb::internal::start_reduce_with_affinity< Range, Body ></a>)</td><td><a class="el" href="a00224.html">tbb::internal::start_reduce_with_affinity< Range, Body ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>run</b>(const Range &range, Body &body, affinity_partitioner &partitioner) (defined in <a class="el" href="a00224.html">tbb::internal::start_reduce_with_affinity< Range, Body ></a>)</td><td><a class="el" href="a00224.html">tbb::internal::start_reduce_with_affinity< Range, Body ></a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00067.html b/doc/html/a00067.html
new file mode 100644
index 0000000..f073941
--- /dev/null
+++ b/doc/html/a00067.html
@@ -0,0 +1,18 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::pre_scan_tag Member List</h1>This is the complete list of members for <a class="el" href="a00207.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="a00207.html">tbb::pre_scan_tag</a>)</td><td><a class="el" href="a00207.html">tbb::pre_scan_tag</a></td><td><code> [inline, static]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00068.html b/doc/html/a00068.html
new file mode 100644
index 0000000..3e74c1f
--- /dev/null
+++ b/doc/html/a00068.html
@@ -0,0 +1,18 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::final_scan_tag Member List</h1>This is the complete list of members for <a class="el" href="a00190.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="a00190.html">tbb::final_scan_tag</a>)</td><td><a class="el" href="a00190.html">tbb::final_scan_tag</a></td><td><code> [inline, static]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00069.html b/doc/html/a00069.html
new file mode 100644
index 0000000..55e97b6
--- /dev/null
+++ b/doc/html/a00069.html
@@ -0,0 +1,66 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::final_sum< Range, Body > Member List</h1>This is the complete list of members for <a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>body</b> (defined in <a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a>)</td><td><a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>final_sum</b>(Body &body_) (defined in <a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a>)</td><td><a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>finish_construction</b>(const Range &range_, Body *stuff_last_) (defined in <a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a>)</td><td><a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~final_sum</b>() (defined in <a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a>)</td><td><a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00070.html
new file mode 100644
index 0000000..e13882b
--- /dev/null
+++ b/doc/html/a00070.html
@@ -0,0 +1,67 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::sum_node< Range, Body > Member List</h1>This is the complete list of members for <a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>body</b> (defined in <a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a>)</td><td><a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>finish_scan</b> (defined in <a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a>)</td><td><a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>incoming</b> (defined in <a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a>)</td><td><a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_additional_child_of_proxy</b> (defined in <a class="el" href="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>start_scan</b> (defined in <a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a>)</td><td><a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>stuff_last</b> (defined in <a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a>)</td><td><a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00071.html b/doc/html/a00071.html
new file mode 100644
index 0000000..8a6521c
--- /dev/null
+++ b/doc/html/a00071.html
@@ -0,0 +1,66 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::finish_scan< Range, Body > Member List</h1>This is the complete list of members for <a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00194.html#a0">execute</a>()</td><td><a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>finish_scan</b>(sum_node_type *&return_slot_, final_sum_type **sum_, sum_node_type &result_) (defined in <a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a>)</td><td><a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>result</b> (defined in <a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a>)</td><td><a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>right_zombie</b> (defined in <a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a>)</td><td><a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00072.html b/doc/html/a00072.html
new file mode 100644
index 0000000..d6dc831
--- /dev/null
+++ b/doc/html/a00072.html
@@ -0,0 +1,65 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::start_scan< Range, Body, Partitioner > Member List</h1>This is the complete list of members for <a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>run</b>(const Range &range, Body &body, const Partitioner &partitioner) (defined in <a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a>)</td><td><a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>start_scan</b>(sum_node_type *&return_slot_, start_scan &parent, sum_node_type *parent_sum_) (defined in <a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a>)</td><td><a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>start_scan</b>(sum_node_type *&return_slot_, const Range &range_, final_sum_type &body_, const Partitioner &partitioner_) (defined in <a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a>)</td><td><a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00073.html b/doc/html/a00073.html
new file mode 100644
index 0000000..5ec29d7
--- /dev/null
+++ b/doc/html/a00073.html
@@ -0,0 +1,25 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::quick_sort_range< RandomAccessIterator, Compare > Member List</h1>This is the complete list of members for <a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>begin</b> (defined in <a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>)</td><td><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>comp</b> (defined in <a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>)</td><td><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>empty</b>() const  (defined in <a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>)</td><td><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>grainsize</b> (defined in <a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>)</td><td><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_divisible</b>() const  (defined in <a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>)</td><td><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>quick_sort_range</b>(RandomAccessIterator begin_, size_t size_, const Compare &comp_) (defined in <a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>)</td><td><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>quick_sort_range</b>(quick_sort_range &range, split) (defined in <a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>)</td><td><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>size</b> (defined in <a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>)</td><td><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00074.html b/doc/html/a00074.html
new file mode 100644
index 0000000..e3bf3af
--- /dev/null
+++ b/doc/html/a00074.html
@@ -0,0 +1,18 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::quick_sort_body< RandomAccessIterator, Compare > Member List</h1>This is the complete list of members for <a class="el" href="a00212.html">tbb::internal::quick_sort_body< RandomAccessIterator, Compare ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>operator()</b>(const quick_sort_range< RandomAccessIterator, Compare > &range) const  (defined in <a class="el" href="a00212.html">tbb::internal::quick_sort_body< RandomAccessIterator, Compare ></a>)</td><td><a class="el" href="a00212.html">tbb::internal::quick_sort_body< RandomAccessIterator, Compare ></a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00075.html b/doc/html/a00075.html
new file mode 100644
index 0000000..3f3c0ef
--- /dev/null
+++ b/doc/html/a00075.html
@@ -0,0 +1,64 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::while_iteration_task< Body > Member List</h1>This is the complete list of members for <a class="el" href="a00241.html">tbb::internal::while_iteration_task< Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::parallel_while<Body></b> (defined in <a class="el" href="a00241.html">tbb::internal::while_iteration_task< Body ></a>)</td><td><a class="el" href="a00241.html">tbb::internal::while_iteration_task< Body ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>while_group_task</b> (defined in <a class="el" href="a00241.html">tbb::internal::while_iteration_task< Body ></a>)</td><td><a class="el" href="a00241.html">tbb::internal::while_iteration_task< Body ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00076.html b/doc/html/a00076.html
new file mode 100644
index 0000000..676c4b6
--- /dev/null
+++ b/doc/html/a00076.html
@@ -0,0 +1,63 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::while_group_task< Body > Member List</h1>This is the complete list of members for <a class="el" href="a00240.html">tbb::internal::while_group_task< Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>while_task</b> (defined in <a class="el" href="a00240.html">tbb::internal::while_group_task< Body ></a>)</td><td><a class="el" href="a00240.html">tbb::internal::while_group_task< Body ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00077.html b/doc/html/a00077.html
new file mode 100644
index 0000000..e485c4e
--- /dev/null
+++ b/doc/html/a00077.html
@@ -0,0 +1,63 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::while_task< Stream, Body > Member List</h1>This is the complete list of members for <a class="el" href="a00242.html">tbb::internal::while_task< Stream, Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::parallel_while<Body></b> (defined in <a class="el" href="a00242.html">tbb::internal::while_task< Stream, Body ></a>)</td><td><a class="el" href="a00242.html">tbb::internal::while_task< Stream, Body ></a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00078.html b/doc/html/a00078.html
new file mode 100644
index 0000000..a3f8cf9
--- /dev/null
+++ b/doc/html/a00078.html
@@ -0,0 +1,23 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::parallel_while< Body > Member List</h1>This is the complete list of members for <a class="el" href="a00204.html">tbb::parallel_while< Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00204.html#a3">add</a>(const value_type &item)</td><td><a class="el" href="a00204.html">tbb::parallel_while< Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00204.html#a0">parallel_while</a>()</td><td><a class="el" href="a00204.html">tbb::parallel_while< Body ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00204.html#a2">run</a>(Stream &stream, const Body &body)</td><td><a class="el" href="a00204.html">tbb::parallel_while< Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00204.html#w0">value_type</a> typedef</td><td><a class="el" href="a00204.html">tbb::parallel_while< Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00204.html#a1">~parallel_while</a>()</td><td><a class="el" href="a00204.html">tbb::parallel_while< Body ></a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00079.html b/doc/html/a00079.html
new file mode 100644
index 0000000..4ef8640
--- /dev/null
+++ b/doc/html/a00079.html
@@ -0,0 +1,20 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::affinity_partitioner_base_v3 Member List</h1>This is the complete list of members for <a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>affinity_partition_type</b> (defined in <a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a>)</td><td><a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::affinity_partitioner</b> (defined in <a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a>)</td><td><a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a></td><td><code> [friend]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00080.html b/doc/html/a00080.html
new file mode 100644
index 0000000..729ecb5
--- /dev/null
+++ b/doc/html/a00080.html
@@ -0,0 +1,22 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::partition_type_base Member List</h1>This is the complete list of members for <a class="el" href="a00205.html">tbb::internal::partition_type_base</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>continue_after_execute_range</b>(task &t) (defined in <a class="el" href="a00205.html">tbb::internal::partition_type_base</a>)</td><td><a class="el" href="a00205.html">tbb::internal::partition_type_base</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>decide_whether_to_delay</b>() (defined in <a class="el" href="a00205.html">tbb::internal::partition_type_base</a>)</td><td><a class="el" href="a00205.html">tbb::internal::partition_type_base</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>note_affinity</b>(task::affinity_id id) (defined in <a class="el" href="a00205.html">tbb::internal::partition_type_base</a>)</td><td><a class="el" href="a00205.html">tbb::internal::partition_type_base</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>set_affinity</b>(task &t) (defined in <a class="el" href="a00205.html">tbb::internal::partition_type_base</a>)</td><td><a class="el" href="a00205.html">tbb::internal::partition_type_base</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>spawn_or_delay</b>(bool, task &a, task &b) (defined in <a class="el" href="a00205.html">tbb::internal::partition_type_base</a>)</td><td><a class="el" href="a00205.html">tbb::internal::partition_type_base</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00081.html b/doc/html/a00081.html
new file mode 100644
index 0000000..a8a2a64
--- /dev/null
+++ b/doc/html/a00081.html
@@ -0,0 +1,21 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::simple_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00216.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="a00216.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00216.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="a00216.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00216.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="a00216.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00216.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="a00216.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00216.html">tbb::simple_partitioner</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00083.html b/doc/html/a00083.html
new file mode 100644
index 0000000..28d2010
--- /dev/null
+++ b/doc/html/a00083.html
@@ -0,0 +1,21 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::auto_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00167.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="a00167.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00167.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="a00167.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00167.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="a00167.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00167.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="a00167.html">tbb::auto_partitioner</a>)</td><td><a class="el" href="a00167.html">tbb::auto_partitioner</a></td><td><code> [friend]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00085.html b/doc/html/a00085.html
new file mode 100644
index 0000000..45ab397
--- /dev/null
+++ b/doc/html/a00085.html
@@ -0,0 +1,23 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::affinity_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00162.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="a00162.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00162.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="a00162.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00162.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="a00162.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00162.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="a00162.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00162.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="a00162.html">tbb::affinity_partitioner</a>)</td><td><a class="el" href="a00162.html">tbb::affinity_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::affinity_partitioner</b> (defined in <a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a>)</td><td><a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a></td><td><code> [friend]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00087.html b/doc/html/a00087.html
new file mode 100644
index 0000000..fc9cb2f
--- /dev/null
+++ b/doc/html/a00087.html
@@ -0,0 +1,27 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::filter Member List</h1>This is the complete list of members for <a class="el" href="a00189.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="a00189.html">tbb::filter</a>)</td><td><a class="el" href="a00189.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="a00189.html">tbb::filter</a>)</td><td><a class="el" href="a00189.html">tbb::filter</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::stage_task</b> (defined in <a class="el" href="a00189.html">tbb::filter</a>)</td><td><a class="el" href="a00189.html">tbb::filter</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00189.html#a0">is_serial</a>() const </td><td><a class="el" href="a00189.html">tbb::filter</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00189.html#x2">mode</a> enum name</td><td><a class="el" href="a00189.html">tbb::filter</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00189.html#a1">operator()</a>(void *item)=0</td><td><a class="el" href="a00189.html">tbb::filter</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>parallel</b> enum value (defined in <a class="el" href="a00189.html">tbb::filter</a>)</td><td><a class="el" href="a00189.html">tbb::filter</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pipeline</b> (defined in <a class="el" href="a00189.html">tbb::filter</a>)</td><td><a class="el" href="a00189.html">tbb::filter</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>serial</b> enum value (defined in <a class="el" href="a00189.html">tbb::filter</a>)</td><td><a class="el" href="a00189.html">tbb::filter</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00189.html#a2">~filter</a>()</td><td><a class="el" href="a00189.html">tbb::filter</a></td><td><code> [virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00088.html b/doc/html/a00088.html
new file mode 100644
index 0000000..dfb7c10
--- /dev/null
+++ b/doc/html/a00088.html
@@ -0,0 +1,24 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::pipeline Member List</h1>This is the complete list of members for <a class="el" href="a00206.html">tbb::pipeline</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00206.html#a2">add_filter</a>(filter &filter_)</td><td><a class="el" href="a00206.html">tbb::pipeline</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00206.html#a4">clear</a>()</td><td><a class="el" href="a00206.html">tbb::pipeline</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>filter</b> (defined in <a class="el" href="a00206.html">tbb::pipeline</a>)</td><td><a class="el" href="a00206.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="a00206.html">tbb::pipeline</a>)</td><td><a class="el" href="a00206.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00206.html#a0">pipeline</a>()</td><td><a class="el" href="a00206.html">tbb::pipeline</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00206.html#a3">run</a>(size_t max_number_of_live_tokens)</td><td><a class="el" href="a00206.html">tbb::pipeline</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00206.html#a1">~pipeline</a>()</td><td><a class="el" href="a00206.html">tbb::pipeline</a></td><td><code> [virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00089.html b/doc/html/a00089.html
new file mode 100644
index 0000000..28c4507
--- /dev/null
+++ b/doc/html/a00089.html
@@ -0,0 +1,22 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::queuing_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00208.html">tbb::queuing_mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00208.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00208.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="a00208.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00208.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="a00208.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00208.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00208.html#a0">queuing_mutex</a>()</td><td><a class="el" href="a00208.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="a00208.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00208.html">tbb::queuing_mutex</a></td><td><code> [friend]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00090.html b/doc/html/a00090.html
new file mode 100644
index 0000000..4a82510
--- /dev/null
+++ b/doc/html/a00090.html
@@ -0,0 +1,24 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::queuing_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00209.html">tbb::queuing_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00209.html#a3">acquire</a>(queuing_mutex &m)</td><td><a class="el" href="a00209.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00209.html#a5">release</a>()</td><td><a class="el" href="a00209.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00209.html#a0">scoped_lock</a>()</td><td><a class="el" href="a00209.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00209.html#a1">scoped_lock</a>(queuing_mutex &m)</td><td><a class="el" href="a00209.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00209.html#a4">try_acquire</a>(queuing_mutex &m)</td><td><a class="el" href="a00209.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00209.html#a2">~scoped_lock</a>()</td><td><a class="el" href="a00209.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00091.html b/doc/html/a00091.html
new file mode 100644
index 0000000..e7a78d9
--- /dev/null
+++ b/doc/html/a00091.html
@@ -0,0 +1,23 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::queuing_rw_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00210.html">tbb::queuing_rw_mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00210.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00210.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="a00210.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00210.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="a00210.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00210.html">tbb::queuing_rw_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00210.html#a0">queuing_rw_mutex</a>()</td><td><a class="el" href="a00210.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="a00210.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00210.html">tbb::queuing_rw_mutex</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00210.html#a1">~queuing_rw_mutex</a>()</td><td><a class="el" href="a00210.html">tbb::queuing_rw_mutex</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00092.html b/doc/html/a00092.html
new file mode 100644
index 0000000..0f22532
--- /dev/null
+++ b/doc/html/a00092.html
@@ -0,0 +1,26 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::queuing_rw_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00211.html#a3">acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00211.html#a7">downgrade_to_reader</a>()</td><td><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00211.html#a5">release</a>()</td><td><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00211.html#a0">scoped_lock</a>()</td><td><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00211.html#a1">scoped_lock</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00211.html#a4">try_acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00211.html#a6">upgrade_to_writer</a>()</td><td><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00211.html#a2">~scoped_lock</a>()</td><td><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00093.html b/doc/html/a00093.html
new file mode 100644
index 0000000..0f8dc52
--- /dev/null
+++ b/doc/html/a00093.html
@@ -0,0 +1,23 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::recursive_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00214.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="a00214.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00214.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="a00214.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00214.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="a00214.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00214.html">tbb::recursive_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00214.html#a0">recursive_mutex</a>()</td><td><a class="el" href="a00214.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="a00214.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00214.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="a00214.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00214.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..66167e7
--- /dev/null
+++ b/doc/html/a00094.html
@@ -0,0 +1,24 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::recursive_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00215.html">tbb::recursive_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00215.html#a3">acquire</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00215.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00215.html#a5">release</a>()</td><td><a class="el" href="a00215.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00215.html#a0">scoped_lock</a>()</td><td><a class="el" href="a00215.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00215.html#a1">scoped_lock</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00215.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00215.html#a4">try_acquire</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00215.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00215.html#a2">~scoped_lock</a>()</td><td><a class="el" href="a00215.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..5fed527
--- /dev/null
+++ b/doc/html/a00095.html
@@ -0,0 +1,22 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::spin_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00217.html">tbb::spin_mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00217.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00217.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="a00217.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00217.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="a00217.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00217.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="a00217.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00217.html">tbb::spin_mutex</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00217.html#a0">spin_mutex</a>()</td><td><a class="el" href="a00217.html">tbb::spin_mutex</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00096.html b/doc/html/a00096.html
new file mode 100644
index 0000000..f81c189
--- /dev/null
+++ b/doc/html/a00096.html
@@ -0,0 +1,24 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::spin_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00218.html">tbb::spin_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00218.html#a2">acquire</a>(spin_mutex &m)</td><td><a class="el" href="a00218.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00218.html#a4">release</a>()</td><td><a class="el" href="a00218.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00218.html#a0">scoped_lock</a>()</td><td><a class="el" href="a00218.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00218.html#a1">scoped_lock</a>(spin_mutex &m)</td><td><a class="el" href="a00218.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00218.html#a3">try_acquire</a>(spin_mutex &m)</td><td><a class="el" href="a00218.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00218.html#a5">~scoped_lock</a>()</td><td><a class="el" href="a00218.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..b916ffd
--- /dev/null
+++ b/doc/html/a00097.html
@@ -0,0 +1,21 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::spin_rw_mutex_v3 Member List</h1>This is the complete list of members for <a class="el" href="a00219.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="a00219.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00219.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="a00219.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00219.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="a00219.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00219.html">tbb::spin_rw_mutex_v3</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00219.html#a0">spin_rw_mutex_v3</a>()</td><td><a class="el" href="a00219.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..9fff28b
--- /dev/null
+++ b/doc/html/a00098.html
@@ -0,0 +1,26 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::spin_rw_mutex_v3::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00220.html#a3">acquire</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00220.html#a6">downgrade_to_reader</a>()</td><td><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00220.html#a5">release</a>()</td><td><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00220.html#a0">scoped_lock</a>()</td><td><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00220.html#a1">scoped_lock</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00220.html#a7">try_acquire</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00220.html#a4">upgrade_to_writer</a>()</td><td><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00220.html#a2">~scoped_lock</a>()</td><td><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..9df4637
--- /dev/null
+++ b/doc/html/a00104.html
@@ -0,0 +1,24 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::task_prefix Member List</h1>This is the complete list of members for <a class="el" href="a00230.html">tbb::internal::task_prefix</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_additional_child_of_proxy</b> (defined in <a class="el" href="a00230.html">tbb::internal::task_prefix</a>)</td><td><a class="el" href="a00230.html">tbb::internal::task_prefix</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_child_proxy</b> (defined in <a class="el" href="a00230.html">tbb::internal::task_prefix</a>)</td><td><a class="el" href="a00230.html">tbb::internal::task_prefix</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_continuation_proxy</b> (defined in <a class="el" href="a00230.html">tbb::internal::task_prefix</a>)</td><td><a class="el" href="a00230.html">tbb::internal::task_prefix</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_proxy</b> (defined in <a class="el" href="a00230.html">tbb::internal::task_prefix</a>)</td><td><a class="el" href="a00230.html">tbb::internal::task_prefix</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::scheduler</b> (defined in <a class="el" href="a00230.html">tbb::internal::task_prefix</a>)</td><td><a class="el" href="a00230.html">tbb::internal::task_prefix</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::task</b> (defined in <a class="el" href="a00230.html">tbb::internal::task_prefix</a>)</td><td><a class="el" href="a00230.html">tbb::internal::task_prefix</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::task_list</b> (defined in <a class="el" href="a00230.html">tbb::internal::task_prefix</a>)</td><td><a class="el" href="a00230.html">tbb::internal::task_prefix</a></td><td><code> [friend]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..e7354be
--- /dev/null
+++ b/doc/html/a00105.html
@@ -0,0 +1,65 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::task Member List</h1>This is the complete list of members for <a class="el" href="a00228.html">tbb::task</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a1">execute</a>()=0</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..ddb4cbc
--- /dev/null
+++ b/doc/html/a00106.html
@@ -0,0 +1,62 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::empty_task Member List</h1>This is the complete list of members for <a class="el" href="a00188.html">tbb::empty_task</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a12">add_to_depth</a>(int delta)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a25">affinity</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w1">affinity_id</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a4">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a3">allocate_child</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a2">allocate_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e0">allocate_root</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w5">allocated</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a10">depth</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w0">depth_type</a> typedef</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a5">destroy</a>(task &victim)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w2">executing</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w6">freed</a> enum value</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.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="a00228.html">tbb::task</a>)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a23">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a20">is_stolen_task</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a26">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a19">parent</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w4">ready</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w7">recycle</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a8">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a6">recycle_as_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a7">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a9">recycle_to_reexecute</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8w3">reexecute</a> enum value</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a22">ref_count</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e3">self</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a24">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a11">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a13">set_ref_count</a>(int count)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a14">spawn</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a15">spawn</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e1">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#e2">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a21">state</a>() const </td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#w8">state_type</a> enum name</td><td><a class="el" href="a00228.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#b0">task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a18">wait_for_all</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00228.html#a0">~task</a>()</td><td><a class="el" href="a00228.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..bbf944e
--- /dev/null
+++ b/doc/html/a00107.html
@@ -0,0 +1,25 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::task_list Member List</h1>This is the complete list of members for <a class="el" href="a00229.html">tbb::task_list</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00229.html#a5">clear</a>()</td><td><a class="el" href="a00229.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00229.html#a2">empty</a>() const </td><td><a class="el" href="a00229.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00229.html#a4">pop_front</a>()</td><td><a class="el" href="a00229.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00229.html#a3">push_back</a>(task &task)</td><td><a class="el" href="a00229.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="a00229.html">tbb::task_list</a>)</td><td><a class="el" href="a00229.html">tbb::task_list</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00229.html#a0">task_list</a>()</td><td><a class="el" href="a00229.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00229.html#a1">~task_list</a>()</td><td><a class="el" href="a00229.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..3e12cd2
--- /dev/null
+++ b/doc/html/a00108.html
@@ -0,0 +1,26 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::task_scheduler_init Member List</h1>This is the complete list of members for <a class="el" href="a00231.html">tbb::task_scheduler_init</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00231.html#s0">automatic</a></td><td><a class="el" href="a00231.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00231.html#e0">default_num_threads</a>()</td><td><a class="el" href="a00231.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00231.html#s1">deferred</a></td><td><a class="el" href="a00231.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00231.html#a0">initialize</a>(int number_of_threads=automatic)</td><td><a class="el" href="a00231.html">tbb::task_scheduler_init</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00231.html#a1">initialize</a>(int number_of_threads, stack_size_type thread_stack_size)</td><td><a class="el" href="a00231.html">tbb::task_scheduler_init</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline, private]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00231.html#a3">task_scheduler_init</a>(int number_of_threads=automatic, stack_size_type thread_stack_size=0)</td><td><a class="el" href="a00231.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00231.html#a2">terminate</a>()</td><td><a class="el" href="a00231.html">tbb::task_scheduler_init</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00231.html#a4">~task_scheduler_init</a>()</td><td><a class="el" href="a00231.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00110.html b/doc/html/a00110.html
new file mode 100644
index 0000000..99907fe
--- /dev/null
+++ b/doc/html/a00110.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::tbb_allocator< T > Member List</h1>This is the complete list of members for <a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00232.html#a5">allocate</a>(size_type n, const void *=0)</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00232.html#e0">allocator_type</a>()</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00232.html#a8">construct</a>(pointer p, const T &value)</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00232.html#a6">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00232.html#a9">destroy</a>(pointer p)</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00232.html#w9">malloc_type</a> enum name</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00232.html#a7">max_size</a>() const </td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb_allocator</b>() (defined in <a class="el" href="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.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="a00232.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00112.html b/doc/html/a00112.html
new file mode 100644
index 0000000..c28170c
--- /dev/null
+++ b/doc/html/a00112.html
@@ -0,0 +1,20 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::tbb_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00233.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="a00233.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00233.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00233.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00233.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="a00233.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00233.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00114.html b/doc/html/a00114.html
new file mode 100644
index 0000000..fdc41ee
--- /dev/null
+++ b/doc/html/a00114.html
@@ -0,0 +1,19 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::bad_last_alloc Member List</h1>This is the complete list of members for <a class="el" href="a00168.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="a00168.html">tbb::bad_last_alloc</a>)</td><td><a class="el" href="a00168.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="a00168.html">tbb::bad_last_alloc</a>)</td><td><a class="el" href="a00168.html">tbb::bad_last_alloc</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..3afc6ce
--- /dev/null
+++ b/doc/html/a00115.html
@@ -0,0 +1,21 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::AtomicBackoff Member List</h1>This is the complete list of members for <a class="el" href="a00166.html">tbb::internal::AtomicBackoff</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>AtomicBackoff</b>() (defined in <a class="el" href="a00166.html">tbb::internal::AtomicBackoff</a>)</td><td><a class="el" href="a00166.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="a00166.html">tbb::internal::AtomicBackoff</a>)</td><td><a class="el" href="a00166.html">tbb::internal::AtomicBackoff</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#a1">pause</a>()</td><td><a class="el" href="a00166.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="a00166.html">tbb::internal::AtomicBackoff</a>)</td><td><a class="el" href="a00166.html">tbb::internal::AtomicBackoff</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00122.html b/doc/html/a00122.html
new file mode 100644
index 0000000..b1b079c
--- /dev/null
+++ b/doc/html/a00122.html
@@ -0,0 +1,18 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::no_copy Member List</h1>This is the complete list of members for <a class="el" href="a00200.html">tbb::internal::no_copy</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00200.html#a0">no_copy</a>()</td><td><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00126.html b/doc/html/a00126.html
new file mode 100644
index 0000000..1036ccc
--- /dev/null
+++ b/doc/html/a00126.html
@@ -0,0 +1,21 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::thread_closure_1< F, X > Member List</h1>This is the complete list of members for <a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>arg1</b> (defined in <a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a>)</td><td><a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>function</b> (defined in <a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a>)</td><td><a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00235.html#e0">start_routine</a>(void *c)</td><td><a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a></td><td><code> [inline, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>thread_closure_1</b>(const F &f, const X &x) (defined in <a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a>)</td><td><a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00128.html b/doc/html/a00128.html
new file mode 100644
index 0000000..05cb5d9
--- /dev/null
+++ b/doc/html/a00128.html
@@ -0,0 +1,31 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::tbb_thread_v3 Member List</h1>This is the complete list of members for <a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00234.html#a6">detach</a>()</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>get_id</b>() const  (defined in <a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a>)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00234.html#e0">hardware_concurrency</a>()</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00234.html#a5">join</a>()</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>joinable</b>() const  (defined in <a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a>)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>move_v3</b> (defined in <a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a>)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>native_handle</b>() (defined in <a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a>)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>native_handle_type</b> typedef (defined in <a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a>)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::swap</b> (defined in <a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a>)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00234.html#a0">tbb_thread_v3</a>()</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00234.html#a1">tbb_thread_v3</a>(F f)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00234.html#a2">tbb_thread_v3</a>(F f, X x)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00234.html#a3">tbb_thread_v3</a>(F f, X x, Y y)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~tbb_thread_v3</b>() (defined in <a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a>)</td><td><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00130.html b/doc/html/a00130.html
new file mode 100644
index 0000000..1af26df
--- /dev/null
+++ b/doc/html/a00130.html
@@ -0,0 +1,20 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::tick_count Member List</h1>This is the complete list of members for <a class="el" href="a00236.html">tbb::tick_count</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00236.html#e0">now</a>()</td><td><a class="el" href="a00236.html">tbb::tick_count</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00236.html#n0">operator-</a>(const tick_count &t1, const tick_count &t0)</td><td><a class="el" href="a00236.html">tbb::tick_count</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00236.html#a0">tick_count</a>()</td><td><a class="el" href="a00236.html">tbb::tick_count</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00131.html b/doc/html/a00131.html
new file mode 100644
index 0000000..9d4b242
--- /dev/null
+++ b/doc/html/a00131.html
@@ -0,0 +1,26 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::tick_count::interval_t Member List</h1>This is the complete list of members for <a class="el" href="a00237.html">tbb::tick_count::interval_t</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00237.html#a0">interval_t</a>()</td><td><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00237.html#a1">interval_t</a>(double sec)</td><td><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00237.html#n2">operator+</a>(const interval_t &i, const interval_t &j)</td><td><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00237.html#a3">operator+=</a>(const interval_t &i)</td><td><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00237.html#n1">operator-</a>(const tick_count &t1, const tick_count &t0)</td><td><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00237.html#n3">operator-</a>(const interval_t &i, const interval_t &j)</td><td><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00237.html#a4">operator-=</a>(const interval_t &i)</td><td><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00237.html#a2">seconds</a>() const </td><td><a class="el" href="a00237.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="a00237.html">tbb::tick_count::interval_t</a>)</td><td><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2008 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/a00162.html b/doc/html/a00162.html
new file mode 100644
index 0000000..da740ff
--- /dev/null
+++ b/doc/html/a00162.html
@@ -0,0 +1,44 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::affinity_partitioner Class Reference</h1>An affinity partitioner.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00299.html">partitioner.h</a>></code>
+<p>
+Inherits <a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a>.
+<p>
+Inheritance diagram for tbb::affinity_partitioner:<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>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::affinity_partitioner::internal::start_for"></a>
+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="n1" doxytag="tbb::affinity_partitioner::internal::start_reduce_with_affinity"></a>
+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="n2" doxytag="tbb::affinity_partitioner::internal::start_scan"></a>
+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="n3" doxytag="tbb::affinity_partitioner::internal::affinity_partition_type"></a>
+class </td><td class="memItemRight" valign="bottom"><b>internal::affinity_partition_type</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+An affinity partitioner. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00299.html">partitioner.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00163.html b/doc/html/a00163.html
new file mode 100644
index 0000000..2a7016f
--- /dev/null
+++ b/doc/html/a00163.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>tbb::internal::affinity_partitioner_base_v3 Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::affinity_partitioner_base_v3 Class Reference</h1>Defines entry points into tbb run-time library;.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00299.html">partitioner.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inherited by <a class="el" href="a00162.html">tbb::affinity_partitioner</a><code> [private]</code>.
+<p>
+Inheritance diagram for tbb::internal::affinity_partitioner_base_v3:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::internal::affinity_partitioner_base_v3::tbb::affinity_partitioner"></a>
+class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#n0">tbb::affinity_partitioner</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1" doxytag="tbb::internal::affinity_partitioner_base_v3::affinity_partition_type"></a>
+class </td><td class="memItemRight" valign="bottom"><b>affinity_partition_type</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Defines entry points into tbb run-time library;. 
+<p>
+The entry points are the constructor and destructor. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00299.html">partitioner.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00164.html b/doc/html/a00164.html
new file mode 100644
index 0000000..4afd690
--- /dev/null
+++ b/doc/html/a00164.html
@@ -0,0 +1,43 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::aligned_space< T, N > Class Template Reference</h1>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="a00283.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="a0" doxytag="tbb::aligned_space::begin"></a>
+T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#a0">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="a1" doxytag="tbb::aligned_space::end"></a>
+T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#a1">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="a00283.html">aligned_space.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00165.html b/doc/html/a00165.html
new file mode 100644
index 0000000..559cbeb
--- /dev/null
+++ b/doc/html/a00165.html
@@ -0,0 +1,34 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::atomic< T > Struct Template Reference</h1>Primary template for atomic.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00284.html">atomic.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. 
+<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="a00284.html">atomic.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00166.html b/doc/html/a00166.html
new file mode 100644
index 0000000..af963b7
--- /dev/null
+++ b/doc/html/a00166.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>tbb::internal::AtomicBackoff Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::AtomicBackoff Class Reference</h1>Class that implements exponential backoff.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00312.html">tbb_machine.h</a>></code>
+<p>
+<a href="a00115.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="a1" doxytag="tbb::internal::AtomicBackoff::pause"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#a1">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="a2" doxytag="tbb::internal::AtomicBackoff::bounded_pause"></a>
+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="a3" doxytag="tbb::internal::AtomicBackoff::reset"></a>
+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="a00312.html">tbb_machine.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00167.html
new file mode 100644
index 0000000..68021a8
--- /dev/null
+++ b/doc/html/a00167.html
@@ -0,0 +1,44 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::auto_partitioner Class Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>An auto partitioner.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00299.html">partitioner.h</a>></code>
+<p>
+<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>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::auto_partitioner::internal::start_for"></a>
+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="n1" doxytag="tbb::auto_partitioner::internal::start_reduce"></a>
+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="n2" doxytag="tbb::auto_partitioner::internal::start_scan"></a>
+class </td><td class="memItemRight" valign="bottom"><b>internal::start_scan</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="a00299.html">partitioner.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00168.html b/doc/html/a00168.html
new file mode 100644
index 0000000..6d97b21
--- /dev/null
+++ b/doc/html/a00168.html
@@ -0,0 +1,33 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::bad_last_alloc Class Reference</h1>Exception for concurrent containers.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00311.html">tbb_exception.h</a>></code>
+<p>
+<a href="a00114.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="a0" doxytag="tbb::bad_last_alloc::what"></a>
+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="a00311.html">tbb_exception.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00169.html b/doc/html/a00169.html
new file mode 100644
index 0000000..15c1f4d
--- /dev/null
+++ b/doc/html/a00169.html
@@ -0,0 +1,257 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::blocked_range< Value > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>A range over which to iterate.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00285.html">blocked_range.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">typedef Value </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#w0">const_iterator</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of a value.  <a href="#w0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w1" doxytag="tbb::blocked_range::size_type"></a>
+typedef std::size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#w1">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="a00169.html#a0">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="#a0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="tbb::blocked_range::blocked_range"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#a1">blocked_range</a> (Value begin_, Value end_, <a class="el" href="a00169.html#w1">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="a2" doxytag="tbb::blocked_range::begin"></a>
+<a class="el" href="a00169.html#w0">const_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#a2">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="a3" doxytag="tbb::blocked_range::end"></a>
+<a class="el" href="a00169.html#w0">const_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#a3">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="a00169.html#w1">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#a4">size</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Size of the range.  <a href="#a4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::blocked_range::grainsize"></a>
+<a class="el" href="a00169.html#w1">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#a5">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="a6" doxytag="tbb::blocked_range::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#a6">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="a00169.html#a7">is_divisible</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if range is divisible.  <a href="#a7"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#a8">blocked_range</a> (<a class="el" href="a00169.html">blocked_range</a> &r, <a class="el" href="a00221.html">split</a>)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Split range.  <a href="#a8"></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="n0" doxytag="tbb::blocked_range::blocked_range2d"></a>
+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="n1" doxytag="tbb::blocked_range::blocked_range3d"></a>
+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="w0" doxytag="tbb::blocked_range::const_iterator"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Value> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">typedef Value <a class="el" href="a00169.html">tbb::blocked_range</a>< Value >::<a class="el" href="a00169.html#w0">const_iterator</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Type of a value. 
+<p>
+Called a const_iterator for sake of algorithms that need to treat a <a class="el" href="a00169.html">blocked_range</a> as an STL container.     </td>
+  </tr>
+</table>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="a0" doxytag="tbb::blocked_range::blocked_range"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Value> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top"><a class="el" href="a00169.html">tbb::blocked_range</a>< Value >::<a class="el" href="a00169.html">blocked_range</a>           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Construct range with default-constructed values for begin and end. 
+<p>
+Requires that Value have a default constructor.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a8" doxytag="tbb::blocked_range::blocked_range"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Value> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top"><a class="el" href="a00169.html">tbb::blocked_range</a>< Value >::<a class="el" href="a00169.html">blocked_range</a>           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00169.html">blocked_range</a>< Value > & </td>
+          <td class="mdname" nowrap> <em>r</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap><a class="el" href="a00221.html">split</a> </td>
+          <td class="mdname" nowrap></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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="a00169.html#a3">end()</a><<a class="el" href="a00169.html#a2">begin()</a> or !is_divisible().     </td>
+  </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="a7" doxytag="tbb::blocked_range::is_divisible"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Value> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00169.html">tbb::blocked_range</a>< Value >::is_divisible           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap> const<code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+True if range is divisible. 
+<p>
+Unspecified if <a class="el" href="a00169.html#a3">end()</a><<a class="el" href="a00169.html#a2">begin()</a>.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a4" doxytag="tbb::blocked_range::size"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Value> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top"><a class="el" href="a00169.html#w1">size_type</a> <a class="el" href="a00169.html">tbb::blocked_range</a>< Value >::size           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap> const<code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Size of the range. 
+<p>
+Unspecified if <a class="el" href="a00169.html#a3">end()</a><<a class="el" href="a00169.html#a2">begin()</a>.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00285.html">blocked_range.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00170.html b/doc/html/a00170.html
new file mode 100644
index 0000000..2ac8404
--- /dev/null
+++ b/doc/html/a00170.html
@@ -0,0 +1,69 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::blocked_range2d< RowValue, ColValue > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>A 2-dimensional range that models the Range concept.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00286.html">blocked_range2d.h</a>></code>
+<p>
+<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="w0" doxytag="tbb::blocked_range2d::row_range_type"></a>
+typedef <a class="el" href="a00169.html">blocked_range</a>< RowValue > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#w0">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="w1" doxytag="tbb::blocked_range2d::col_range_type"></a>
+typedef <a class="el" href="a00169.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="a0" doxytag="tbb::blocked_range2d::blocked_range2d"></a>
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</b> (RowValue row_begin, RowValue row_end, typename <a class="el" href="a00169.html#w1">row_range_type::size_type</a> row_grainsize, ColValue col_begin, ColValue col_end, typename <a class="el" href="a00169.html#w1">col_range_type::size_type</a> col_grainsize)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="tbb::blocked_range2d::blocked_range2d"></a>
+ </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="a2" doxytag="tbb::blocked_range2d::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#a2">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="a3" doxytag="tbb::blocked_range2d::is_divisible"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#a3">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="a4" doxytag="tbb::blocked_range2d::blocked_range2d"></a>
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</b> (<a class="el" href="a00170.html">blocked_range2d</a> &r, <a class="el" href="a00221.html">split</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::blocked_range2d::rows"></a>
+const <a class="el" href="a00169.html">row_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#a5">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="a6" doxytag="tbb::blocked_range2d::cols"></a>
+const <a class="el" href="a00169.html">col_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#a6">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="a00286.html">blocked_range2d.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00171.html b/doc/html/a00171.html
new file mode 100644
index 0000000..d89b3d5
--- /dev/null
+++ b/doc/html/a00171.html
@@ -0,0 +1,76 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::blocked_range3d< PageValue, RowValue, ColValue > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>A 3-dimensional range that models the Range concept.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00287.html">blocked_range3d.h</a>></code>
+<p>
+<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="w0" doxytag="tbb::blocked_range3d::page_range_type"></a>
+typedef <a class="el" href="a00169.html">blocked_range</a>< PageValue > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html#w0">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="w1" doxytag="tbb::blocked_range3d::row_range_type"></a>
+typedef <a class="el" href="a00169.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="w2" doxytag="tbb::blocked_range3d::col_range_type"></a>
+typedef <a class="el" href="a00169.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="a0" doxytag="tbb::blocked_range3d::blocked_range3d"></a>
+ </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="a1" doxytag="tbb::blocked_range3d::blocked_range3d"></a>
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b> (PageValue page_begin, PageValue page_end, typename <a class="el" href="a00169.html#w1">page_range_type::size_type</a> page_grainsize, RowValue row_begin, RowValue row_end, typename <a class="el" href="a00169.html#w1">row_range_type::size_type</a> row_grainsize, ColValue col_begin, ColValue col_end, typename <a class="el" href="a00169.html#w1">col_range_type::size_type</a> col_grainsize)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::blocked_range3d::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html#a2">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="a3" doxytag="tbb::blocked_range3d::is_divisible"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html#a3">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="a4" doxytag="tbb::blocked_range3d::blocked_range3d"></a>
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b> (<a class="el" href="a00171.html">blocked_range3d</a> &r, <a class="el" href="a00221.html">split</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::blocked_range3d::pages"></a>
+const <a class="el" href="a00169.html">page_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html#a5">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="a6" doxytag="tbb::blocked_range3d::rows"></a>
+const <a class="el" href="a00169.html">row_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html#a6">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="a7" doxytag="tbb::blocked_range3d::cols"></a>
+const <a class="el" href="a00169.html">col_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html#a7">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="a00287.html">blocked_range3d.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00172.html b/doc/html/a00172.html
new file mode 100644
index 0000000..dbb4e06
--- /dev/null
+++ b/doc/html/a00172.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>tbb::cache_aligned_allocator< T > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::cache_aligned_allocator< T > Class Template Reference</h1>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">cache_aligned_allocator.h</a>></code>
+<p>
+<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="w0" doxytag="tbb::cache_aligned_allocator::pointer"></a>
+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="w1" doxytag="tbb::cache_aligned_allocator::const_pointer"></a>
+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="w2" doxytag="tbb::cache_aligned_allocator::reference"></a>
+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="w3" doxytag="tbb::cache_aligned_allocator::const_reference"></a>
+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="w4" doxytag="tbb::cache_aligned_allocator::value_type"></a>
+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="w5" doxytag="tbb::cache_aligned_allocator::size_type"></a>
+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="w6" doxytag="tbb::cache_aligned_allocator::difference_type"></a>
+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="a1" doxytag="tbb::cache_aligned_allocator::cache_aligned_allocator"></a>
+ </td><td class="memItemRight" valign="bottom"><b>cache_aligned_allocator</b> (const <a class="el" href="a00172.html">cache_aligned_allocator</a> &)  throw ()</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a2" doxytag="tbb::cache_aligned_allocator::cache_aligned_allocator"></a>
+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="a00172.html">cache_aligned_allocator</a>< U > &)  throw ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="tbb::cache_aligned_allocator::address"></a>
+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="a4" doxytag="tbb::cache_aligned_allocator::address"></a>
+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="a5" doxytag="tbb::cache_aligned_allocator::allocate"></a>
+pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#a5">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="a6" doxytag="tbb::cache_aligned_allocator::deallocate"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#a6">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="a7" doxytag="tbb::cache_aligned_allocator::max_size"></a>
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#a7">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="a8" doxytag="tbb::cache_aligned_allocator::construct"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#a8">construct</a> (pointer p, const T &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="a9" doxytag="tbb::cache_aligned_allocator::destroy"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#a9">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>
+</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="a00288.html">cache_aligned_allocator.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00173.html b/doc/html/a00173.html
new file mode 100644
index 0000000..3a975d8
--- /dev/null
+++ b/doc/html/a00173.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>tbb::cache_aligned_allocator< void > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::cache_aligned_allocator< void > Class Template Reference</h1>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">cache_aligned_allocator.h</a>></code>
+<p>
+<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="w0" doxytag="tbb::cache_aligned_allocator< void >::pointer"></a>
+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="w1" doxytag="tbb::cache_aligned_allocator< void >::const_pointer"></a>
+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="w2" doxytag="tbb::cache_aligned_allocator< void >::value_type"></a>
+typedef void </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<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="a00288.html">cache_aligned_allocator.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00174.html b/doc/html/a00174.html
new file mode 100644
index 0000000..f470489
--- /dev/null
+++ b/doc/html/a00174.html
@@ -0,0 +1,649 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::concurrent_hash_map< Key, T, HashCompare, A > Class Template Reference</h1>Unordered map from Key to T.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00289.html">concurrent_hash_map.h</a>></code>
+<p>
+Inherits <a class="el" href="a00195.html">tbb::internal::hash_map_base</a>.
+<p>
+Inheritance diagram for tbb::concurrent_hash_map< Key, T, HashCompare, A >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00024.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="w0" doxytag="tbb::concurrent_hash_map::key_type"></a>
+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="w1" doxytag="tbb::concurrent_hash_map::mapped_type"></a>
+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="w2" doxytag="tbb::concurrent_hash_map::value_type"></a>
+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="w3" doxytag="tbb::concurrent_hash_map::size_type"></a>
+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="w4" doxytag="tbb::concurrent_hash_map::difference_type"></a>
+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="w5" doxytag="tbb::concurrent_hash_map::pointer"></a>
+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="w6" doxytag="tbb::concurrent_hash_map::const_pointer"></a>
+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="w7" doxytag="tbb::concurrent_hash_map::reference"></a>
+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="w8" doxytag="tbb::concurrent_hash_map::const_reference"></a>
+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="w9" doxytag="tbb::concurrent_hash_map::iterator"></a>
+typedef <a class="el" href="a00196.html">internal::hash_map_iterator</a><<br>
+ <a class="el" href="a00174.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="w10" doxytag="tbb::concurrent_hash_map::const_iterator"></a>
+typedef <a class="el" href="a00196.html">internal::hash_map_iterator</a><<br>
+ <a class="el" href="a00174.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="w11" doxytag="tbb::concurrent_hash_map::range_type"></a>
+typedef <a class="el" href="a00197.html">internal::hash_map_range</a><<br>
+ <a class="el" href="a00196.html">iterator</a> > </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="w12" doxytag="tbb::concurrent_hash_map::const_range_type"></a>
+typedef <a class="el" href="a00197.html">internal::hash_map_range</a><<br>
+ <a class="el" href="a00196.html">const_iterator</a> > </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="w13" doxytag="tbb::concurrent_hash_map::allocator_type"></a>
+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="a0" doxytag="tbb::concurrent_hash_map::concurrent_hash_map"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a0">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="a1" doxytag="tbb::concurrent_hash_map::concurrent_hash_map"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a1">concurrent_hash_map</a> (const <a class="el" href="a00174.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="a2" doxytag="tbb::concurrent_hash_map::concurrent_hash_map"></a>
+template<typename I> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00174.html#a2">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="a3" doxytag="tbb::concurrent_hash_map::operator="></a>
+<a class="el" href="a00174.html">concurrent_hash_map</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a3">operator=</a> (const <a class="el" href="a00174.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="a4" doxytag="tbb::concurrent_hash_map::clear"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a4">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="a5" doxytag="tbb::concurrent_hash_map::~concurrent_hash_map"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a5">~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="a6" doxytag="tbb::concurrent_hash_map::range"></a>
+<a class="el" href="a00197.html">range_type</a> </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="a7" doxytag="tbb::concurrent_hash_map::range"></a>
+<a class="el" href="a00197.html">const_range_type</a> </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="a8" doxytag="tbb::concurrent_hash_map::begin"></a>
+<a class="el" href="a00196.html">iterator</a> </td><td class="memItemRight" valign="bottom"><b>begin</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9" doxytag="tbb::concurrent_hash_map::end"></a>
+<a class="el" href="a00196.html">iterator</a> </td><td class="memItemRight" valign="bottom"><b>end</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10" doxytag="tbb::concurrent_hash_map::begin"></a>
+<a class="el" href="a00196.html">const_iterator</a> </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="a11" doxytag="tbb::concurrent_hash_map::end"></a>
+<a class="el" href="a00196.html">const_iterator</a> </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="a12" doxytag="tbb::concurrent_hash_map::equal_range"></a>
+std::pair< <a class="el" href="a00196.html">iterator</a>, <a class="el" href="a00196.html">iterator</a> > </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="a13" doxytag="tbb::concurrent_hash_map::equal_range"></a>
+std::pair< <a class="el" href="a00196.html">const_iterator</a>,<br>
+ <a class="el" href="a00196.html">const_iterator</a> > </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="a00174.html#a14">size</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Number of items in table.  <a href="#a14"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a15" doxytag="tbb::concurrent_hash_map::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a15">empty</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if <a class="el" href="a00174.html#a14">size()</a>==0. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a16" doxytag="tbb::concurrent_hash_map::max_size"></a>
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a16">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="a17" doxytag="tbb::concurrent_hash_map::get_allocator"></a>
+allocator_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a17">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="a18" doxytag="tbb::concurrent_hash_map::swap"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a18">swap</a> (<a class="el" href="a00174.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="a19" doxytag="tbb::concurrent_hash_map::count"></a>
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a19">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="a00174.html#a20">find</a> (<a class="el" href="a00176.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="#a20"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a21">find</a> (<a class="el" href="a00175.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="#a21"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a22">insert</a> (<a class="el" href="a00176.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="#a22"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a23">insert</a> (<a class="el" href="a00175.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="#a23"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a24">insert</a> (<a class="el" href="a00176.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="#a24"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a25">insert</a> (<a class="el" href="a00175.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="#a25"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a26">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="#a26"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a27" doxytag="tbb::concurrent_hash_map::insert"></a>
+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="a00174.html#a27">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="a00174.html#a28">erase</a> (const Key &key)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Erase item.  <a href="#a28"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a29">erase</a> (<a class="el" href="a00176.html">const_accessor</a> &item_accessor)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Erase item by <a class="el" href="a00176.html">const_accessor</a>.  <a href="#a29"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html#a30">erase</a> (<a class="el" href="a00175.html">accessor</a> &item_accessor)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Erase item by accessor.  <a href="#a30"></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="n0" doxytag="tbb::concurrent_hash_map::internal::hash_map_iterator"></a>
+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="n1" doxytag="tbb::concurrent_hash_map::internal::hash_map_range"></a>
+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="n2" doxytag="tbb::concurrent_hash_map::node"></a>
+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="n3" doxytag="tbb::concurrent_hash_map::const_accessor"></a>
+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="n4" doxytag="tbb::concurrent_hash_map::chain"></a>
+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="n5" doxytag="tbb::concurrent_hash_map::segment"></a>
+struct </td><td class="memItemRight" valign="bottom"><b>segment</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 ></h3>
+
+Unordered map from Key to T. 
+<p>
+<a class="el" href="a00174.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="a00174.html#a22">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="a00174.html#a3">operator=()</a> operation, the container can have a part of source items, and meth [...]
+</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="a00174.html#a22">insert()</a> methods</li><li>Added <a class="el" href="a00174.html#a17">get_allocator()</a></li><li>Added <a class="el" href="a00174.html#a18">swap()</a></li><li>Added <a class="el" href="a00174.html#a19">count()</a></li><li>Added overloaded <a [...]
+</dd></dl>
+
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="a30" doxytag="tbb::concurrent_hash_map::erase"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::erase           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00175.html">accessor</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>item_accessor</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Erase item by accessor. 
+<p>
+Return true if item was erased by particularly this call.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a29" doxytag="tbb::concurrent_hash_map::erase"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::erase           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00176.html">const_accessor</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>item_accessor</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Erase item by <a class="el" href="a00176.html">const_accessor</a>. 
+<p>
+Return true if item was erased by particularly this call.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a28" doxytag="tbb::concurrent_hash_map::erase"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::erase           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">const Key & </td>
+          <td class="mdname1" valign="top" nowrap> <em>key</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Erase item. 
+<p>
+Return true if item was erased by particularly this call.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a21" doxytag="tbb::concurrent_hash_map::find"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::find           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00175.html">accessor</a> & </td>
+          <td class="mdname" nowrap> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const Key & </td>
+          <td class="mdname" nowrap> <em>key</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Find item and acquire a write lock on the item. 
+<p>
+Return true if item is found, false otherwise.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a20" doxytag="tbb::concurrent_hash_map::find"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::find           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00176.html">const_accessor</a> & </td>
+          <td class="mdname" nowrap> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const Key & </td>
+          <td class="mdname" nowrap> <em>key</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Find item and acquire a read lock on the item. 
+<p>
+Return true if item is found, false otherwise.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a26" doxytag="tbb::concurrent_hash_map::insert"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">const value_type & </td>
+          <td class="mdname1" valign="top" nowrap> <em>value</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Insert item by copying if there is no such key present already. 
+<p>
+Returns true if item is inserted.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a25" doxytag="tbb::concurrent_hash_map::insert"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00175.html">accessor</a> & </td>
+          <td class="mdname" nowrap> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const value_type & </td>
+          <td class="mdname" nowrap> <em>value</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a24" doxytag="tbb::concurrent_hash_map::insert"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00176.html">const_accessor</a> & </td>
+          <td class="mdname" nowrap> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const value_type & </td>
+          <td class="mdname" nowrap> <em>value</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a23" doxytag="tbb::concurrent_hash_map::insert"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00175.html">accessor</a> & </td>
+          <td class="mdname" nowrap> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const Key & </td>
+          <td class="mdname" nowrap> <em>key</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Insert item (if not already present) and acquire a write lock on the item. 
+<p>
+Returns true if item is new.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a22" doxytag="tbb::concurrent_hash_map::insert"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::insert           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00176.html">const_accessor</a> & </td>
+          <td class="mdname" nowrap> <em>result</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const Key & </td>
+          <td class="mdname" nowrap> <em>key</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Insert item (if not already present) and acquire a read lock on the item. 
+<p>
+Returns true if item is new.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a14" doxytag="tbb::concurrent_hash_map::size"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Key, typename T, typename HashCompare, typename A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top"><a class="el" href="a00174.html">concurrent_hash_map</a>< Key, T, HashCompare, A >::size_type <a class="el" href="a00174.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, A >::size           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap> const</td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Number of items in table. 
+<p>
+Be aware that this method is relatively slow compared to the typical <a class="el" href="a00174.html#a14">size()</a> method for an STL container.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00289.html">concurrent_hash_map.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00175.html b/doc/html/a00175.html
new file mode 100644
index 0000000..6380b99
--- /dev/null
+++ b/doc/html/a00175.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>tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor Class Reference</h1>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="a00289.html">concurrent_hash_map.h</a>></code>
+<p>
+Inherits <a class="el" href="a00176.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="a00026.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="w0" doxytag="tbb::concurrent_hash_map::accessor::value_type"></a>
+typedef std::pair< const Key,<br>
+ T > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00175.html#w0">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="a0" doxytag="tbb::concurrent_hash_map::accessor::operator *"></a>
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00175.html#a0">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="a1" doxytag="tbb::concurrent_hash_map::accessor::operator->"></a>
+pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00175.html#a1">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="a00289.html">concurrent_hash_map.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00176.html b/doc/html/a00176.html
new file mode 100644
index 0000000..2888a8b
--- /dev/null
+++ b/doc/html/a00176.html
@@ -0,0 +1,72 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor Class Reference</h1>Combines data access, locking, and garbage collection.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00289.html">concurrent_hash_map.h</a>></code>
+<p>
+Inherited by <a class="el" href="a00175.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="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="w0" doxytag="tbb::concurrent_hash_map::const_accessor::value_type"></a>
+typedef const std::pair< const <br>
+Key, T > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#w0">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="a0" doxytag="tbb::concurrent_hash_map::const_accessor::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a0">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="a1" doxytag="tbb::concurrent_hash_map::const_accessor::release"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a1">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="a2" doxytag="tbb::concurrent_hash_map::const_accessor::operator *"></a>
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a2">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="a3" doxytag="tbb::concurrent_hash_map::const_accessor::operator->"></a>
+const_pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a3">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="a4" doxytag="tbb::concurrent_hash_map::const_accessor::const_accessor"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a4">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="a5" doxytag="tbb::concurrent_hash_map::const_accessor::~const_accessor"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#a5">~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="n0" doxytag="tbb::concurrent_hash_map::const_accessor::concurrent_hash_map"></a>
+class </td><td class="memItemRight" valign="bottom"><b>concurrent_hash_map</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1" doxytag="tbb::concurrent_hash_map::const_accessor::accessor"></a>
+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="a00289.html">concurrent_hash_map.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00177.html b/doc/html/a00177.html
new file mode 100644
index 0000000..515986c
--- /dev/null
+++ b/doc/html/a00177.html
@@ -0,0 +1,328 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::concurrent_queue< T, A > Class Template Reference</h1>A high-performance thread-safe queue.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00290.html">concurrent_queue.h</a>></code>
+<p>
+Inherits <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>.
+<p>
+Inheritance diagram for tbb::concurrent_queue< T, A >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00034.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w0" doxytag="tbb::concurrent_queue::value_type"></a>
+typedef T </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#w0">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="w1" doxytag="tbb::concurrent_queue::allocator_type"></a>
+typedef A </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#w1">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="w2" doxytag="tbb::concurrent_queue::reference"></a>
+typedef T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#w2">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="w3" doxytag="tbb::concurrent_queue::const_reference"></a>
+typedef const T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#w3">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="a00177.html#w4">size_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Integral type for representing size of the queue.  <a href="#w4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w5" doxytag="tbb::concurrent_queue::difference_type"></a>
+typedef std::ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#w5">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="w6" doxytag="tbb::concurrent_queue::iterator"></a>
+typedef <a class="el" href="a00180.html">internal::concurrent_queue_iterator</a><<br>
+ <a class="el" href="a00177.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="w7" doxytag="tbb::concurrent_queue::const_iterator"></a>
+typedef <a class="el" href="a00180.html">internal::concurrent_queue_iterator</a><<br>
+ <a class="el" href="a00177.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="a0" doxytag="tbb::concurrent_queue::concurrent_queue"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a0">concurrent_queue</a> (const <a class="el" href="a00177.html#w1">allocator_type</a> &a=<a class="el" href="a00177.html#w1">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="a1" doxytag="tbb::concurrent_queue::~concurrent_queue"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a1">~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="a2" doxytag="tbb::concurrent_queue::push"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a2">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="a00177.html#a3">pop</a> (T &destination)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Dequeue item from head of queue.  <a href="#a3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a4">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="#a4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a5">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="#a5"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00177.html#w4">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a6">size</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return number of pushes minus number of pops.  <a href="#a6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a7" doxytag="tbb::concurrent_queue::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a7">empty</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Equivalent to <a class="el" href="a00177.html#a6">size()</a><=0. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8" doxytag="tbb::concurrent_queue::capacity"></a>
+<a class="el" href="a00177.html#w4">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a8">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="a00177.html#a9">set_capacity</a> (<a class="el" href="a00177.html#w4">size_type</a> capacity)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the capacity.  <a href="#a9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10" doxytag="tbb::concurrent_queue::get_allocator"></a>
+<a class="el" href="a00177.html#w1">allocator_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a10">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="a11" doxytag="tbb::concurrent_queue::clear"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#a11">clear</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">clear the queue and release all resources (i.e., pages) <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12" doxytag="tbb::concurrent_queue::begin"></a>
+<a class="el" href="a00180.html">iterator</a> </td><td class="memItemRight" valign="bottom"><b>begin</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a13" doxytag="tbb::concurrent_queue::end"></a>
+<a class="el" href="a00180.html">iterator</a> </td><td class="memItemRight" valign="bottom"><b>end</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a14" doxytag="tbb::concurrent_queue::begin"></a>
+<a class="el" href="a00180.html">const_iterator</a> </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="a15" doxytag="tbb::concurrent_queue::end"></a>
+<a class="el" href="a00180.html">const_iterator</a> </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="n0" doxytag="tbb::concurrent_queue::internal::concurrent_queue_iterator"></a>
+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>
+<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 and copy construction are not allowed. 
+<p>
+<hr><h2>Member Typedef Documentation</h2>
+<a class="anchor" name="w4" doxytag="tbb::concurrent_queue::size_type"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">typedef std::ptrdiff_t <a class="el" href="a00177.html">tbb::concurrent_queue</a>< T, A >::<a class="el" href="a00177.html#w4">size_type</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="a3" doxytag="tbb::concurrent_queue::pop"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">void <a class="el" href="a00177.html">tbb::concurrent_queue</a>< T, A >::pop           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">T & </td>
+          <td class="mdname1" valign="top" nowrap> <em>destination</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Dequeue item from head of queue. 
+<p>
+Block until an item becomes available, and then dequeue it.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a5" doxytag="tbb::concurrent_queue::pop_if_present"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00177.html">tbb::concurrent_queue</a>< T, A >::pop_if_present           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">T & </td>
+          <td class="mdname1" valign="top" nowrap> <em>destination</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a4" doxytag="tbb::concurrent_queue::push_if_not_full"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">bool <a class="el" href="a00177.html">tbb::concurrent_queue</a>< T, A >::push_if_not_full           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">const T & </td>
+          <td class="mdname1" valign="top" nowrap> <em>source</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a9" doxytag="tbb::concurrent_queue::set_capacity"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">void <a class="el" href="a00177.html">tbb::concurrent_queue</a>< T, A >::set_capacity           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00177.html#w4">size_type</a> </td>
+          <td class="mdname1" valign="top" nowrap> <em>capacity</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a6" doxytag="tbb::concurrent_queue::size"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top"><a class="el" href="a00177.html#w4">size_type</a> <a class="el" href="a00177.html">tbb::concurrent_queue</a>< T, A >::size           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap> const<code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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="a00177.html#a8">capacity()</a> if there are push operations in flight.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00290.html">concurrent_queue.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00178.html b/doc/html/a00178.html
new file mode 100644
index 0000000..040b646
--- /dev/null
+++ b/doc/html/a00178.html
@@ -0,0 +1,138 @@
+<!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::concurrent_queue_base_v3 Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_queue_base_v3 Class Reference</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00290.html">concurrent_queue.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inherited by <a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a>.
+<p>
+Inheritance diagram for tbb::internal::concurrent_queue_base_v3:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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>Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0" doxytag="tbb::internal::concurrent_queue_base_v3::concurrent_queue_base_v3"></a>
+ </td><td class="memItemRight" valign="bottom"><b>concurrent_queue_base_v3</b> (size_t <a class="el" href="a00178.html#p2">item_size</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2" doxytag="tbb::internal::concurrent_queue_base_v3::internal_push"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b2">internal_push</a> (const void *src)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Enqueue item at tail of queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b3" doxytag="tbb::internal::concurrent_queue_base_v3::internal_pop"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b3">internal_pop</a> (void *dst)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Dequeue item from head of queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b4" doxytag="tbb::internal::concurrent_queue_base_v3::internal_push_if_not_full"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b4">internal_push_if_not_full</a> (const void *src)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Attempt to enqueue item onto queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b5">internal_pop_if_present</a> (void *dst)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Attempt to dequeue item from queue.  <a href="#b5"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6" doxytag="tbb::internal::concurrent_queue_base_v3::internal_size"></a>
+ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b6">internal_size</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get size of queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b7" doxytag="tbb::internal::concurrent_queue_base_v3::internal_set_capacity"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b7">internal_set_capacity</a> (ptrdiff_t capacity, size_t element_size)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">set the queue capacity <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8" doxytag="tbb::internal::concurrent_queue_base_v3::allocate_page"></a>
+virtual <a class="el" href="a00179.html">page</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b8">allocate_page</a> ()=0</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">custom allocator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b9" doxytag="tbb::internal::concurrent_queue_base_v3::deallocate_page"></a>
+virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b9">deallocate_page</a> (<a class="el" href="a00179.html">page</a> *p)=0</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">custom de-allocator <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b10" doxytag="tbb::internal::concurrent_queue_base_v3::internal_finish_clear"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b10">internal_finish_clear</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">free any remaining pages <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b11" doxytag="tbb::internal::concurrent_queue_base_v3::internal_throw_exception"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#b11">internal_throw_exception</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">throw an exception <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="p0" doxytag="tbb::internal::concurrent_queue_base_v3::my_capacity"></a>
+ptrdiff_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#p0">my_capacity</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Capacity of the queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1" doxytag="tbb::internal::concurrent_queue_base_v3::items_per_page"></a>
+size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#p1">items_per_page</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Always a power of 2. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p2" doxytag="tbb::internal::concurrent_queue_base_v3::item_size"></a>
+size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html#p2">item_size</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Size of an item. <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="n0" doxytag="tbb::internal::concurrent_queue_base_v3::concurrent_queue_rep"></a>
+class </td><td class="memItemRight" valign="bottom"><b>concurrent_queue_rep</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1" doxytag="tbb::internal::concurrent_queue_base_v3::micro_queue"></a>
+struct </td><td class="memItemRight" valign="bottom"><b>micro_queue</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n2" doxytag="tbb::internal::concurrent_queue_base_v3::micro_queue_pop_finalizer"></a>
+class </td><td class="memItemRight" valign="bottom"><b>micro_queue_pop_finalizer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n3" doxytag="tbb::internal::concurrent_queue_base_v3::concurrent_queue_iterator_rep"></a>
+class </td><td class="memItemRight" valign="bottom"><b>concurrent_queue_iterator_rep</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n4" doxytag="tbb::internal::concurrent_queue_base_v3::concurrent_queue_iterator_base_v3"></a>
+class </td><td class="memItemRight" valign="bottom"><b>concurrent_queue_iterator_base_v3</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+For internal use only. 
+<p>
+Type-independent portion of <a class="el" href="a00177.html">concurrent_queue</a>. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="b5" doxytag="tbb::internal::concurrent_queue_base_v3::internal_pop_if_present"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">bool tbb::internal::concurrent_queue_base_v3::internal_pop_if_present           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">void * </td>
+          <td class="mdname1" valign="top" nowrap> <em>dst</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [protected]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Attempt to dequeue item from queue. 
+<p>
+NULL if there was no item to dequeue.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00290.html">concurrent_queue.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00179.html b/doc/html/a00179.html
new file mode 100644
index 0000000..2b88379
--- /dev/null
+++ b/doc/html/a00179.html
@@ -0,0 +1,36 @@
+<!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::concurrent_queue_base_v3::page Struct Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_queue_base_v3::page Struct Reference</h1>Prefix on a page.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00290.html">concurrent_queue.h</a>></code>
+<p>
+<a href="a00031.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o0" doxytag="tbb::internal::concurrent_queue_base_v3::page::next"></a>
+<a class="el" href="a00179.html">page</a> * </td><td class="memItemRight" valign="bottom"><b>next</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o1" doxytag="tbb::internal::concurrent_queue_base_v3::page::mask"></a>
+<a class="el" href="a00279.html#a13">uintptr</a> </td><td class="memItemRight" valign="bottom"><b>mask</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Prefix on a page. 
+<p>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00290.html">concurrent_queue.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00180.html b/doc/html/a00180.html
new file mode 100644
index 0000000..dafc153
--- /dev/null
+++ b/doc/html/a00180.html
@@ -0,0 +1,95 @@
+<!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::concurrent_queue_iterator< Container, Value > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_queue_iterator< Container, Value > Class Template Reference</h1>Meets requirements of a forward iterator for STL.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00290.html">concurrent_queue.h</a>></code>
+<p>
+Inherits <a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a>.
+<p>
+Inheritance diagram for tbb::internal::concurrent_queue_iterator< Container, Value >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00033.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00180.html#a1">concurrent_queue_iterator</a> (const <a class="el" href="a00180.html">concurrent_queue_iterator</a>< Container, typename Container::value_type > &other)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::internal::concurrent_queue_iterator::operator="></a>
+<a class="el" href="a00180.html">concurrent_queue_iterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00180.html#a2">operator=</a> (const <a class="el" href="a00180.html">concurrent_queue_iterator</a> &other)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Iterator assignment. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="tbb::internal::concurrent_queue_iterator::operator *"></a>
+Value & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00180.html#a3">operator *</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Reference to current item. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="tbb::internal::concurrent_queue_iterator::operator->"></a>
+Value * </td><td class="memItemRight" valign="bottom"><b>operator-></b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::internal::concurrent_queue_iterator::operator++"></a>
+<a class="el" href="a00180.html">concurrent_queue_iterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00180.html#a5">operator++</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Advance to next item in queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6" doxytag="tbb::internal::concurrent_queue_iterator::operator++"></a>
+Value * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00180.html#a6">operator++</a> (int)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Post increment. <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="n0" doxytag="tbb::internal::concurrent_queue_iterator::::tbb::concurrent_queue"></a>
+class </td><td class="memItemRight" valign="bottom"><b>::tbb::concurrent_queue</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Container, typename Value><br>
+ class tbb::internal::concurrent_queue_iterator< Container, Value ></h3>
+
+Meets requirements of a forward iterator for STL. 
+<p>
+Value is either the T or const T type of the container. 
+<p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="a1" doxytag="tbb::internal::concurrent_queue_iterator::concurrent_queue_iterator"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Container, typename Value> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top"><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator</a>< Container, Value >::<a class="el" href="a00180.html">concurrent_queue_iterator</a>           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">const <a class="el" href="a00180.html">concurrent_queue_iterator</a>< Container, typename Container::value_type > & </td>
+          <td class="mdname1" valign="top" nowrap> <em>other</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+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.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00290.html">concurrent_queue.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00181.html
new file mode 100644
index 0000000..79a7848
--- /dev/null
+++ b/doc/html/a00181.html
@@ -0,0 +1,70 @@
+<!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::concurrent_queue_iterator_base_v3 Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_queue_iterator_base_v3 Class Reference</h1>Type-independent portion of <a class="el" href="a00180.html">concurrent_queue_iterator</a>.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00290.html">concurrent_queue.h</a>></code>
+<p>
+Inherited by <a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a>.
+<p>
+Inheritance diagram for tbb::internal::concurrent_queue_iterator_base_v3:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00032.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0" doxytag="tbb::internal::concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.html#b0">concurrent_queue_iterator_base_v3</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b1" doxytag="tbb::internal::concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.html#b1">concurrent_queue_iterator_base_v3</a> (const <a class="el" href="a00181.html">concurrent_queue_iterator_base_v3</a> &i)</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="b2" doxytag="tbb::internal::concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.html#b2">concurrent_queue_iterator_base_v3</a> (const <a class="el" href="a00178.html">concurrent_queue_base</a> &queue)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct iterator pointing to head of queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b3" doxytag="tbb::internal::concurrent_queue_iterator_base_v3::assign"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.html#b3">assign</a> (const <a class="el" href="a00181.html">concurrent_queue_iterator_base_v3</a> &i)</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="b4" doxytag="tbb::internal::concurrent_queue_iterator_base_v3::advance"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.html#b4">advance</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Advance iterator one step towards tail of queue. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b5" doxytag="tbb::internal::concurrent_queue_iterator_base_v3::~concurrent_queue_iterator_base_v3"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.html#b5">~concurrent_queue_iterator_base_v3</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <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="p0" doxytag="tbb::internal::concurrent_queue_iterator_base_v3::my_item"></a>
+void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.html#p0">my_item</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Pointer to current item. <br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="n0" doxytag="tbb::internal::concurrent_queue_iterator_base_v3::operator=="></a>
+template<typename C, 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="a00180.html">concurrent_queue_iterator</a>< C, T > &i, const <a class="el" href="a00180.html">concurrent_queue_iterator</a>< C, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="n1" doxytag="tbb::internal::concurrent_queue_iterator_base_v3::operator!="></a>
+template<typename C, 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="a00180.html">concurrent_queue_iterator</a>< C, T > &i, const <a class="el" href="a00180.html">concurrent_queue_iterator</a>< C, U > &j)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Type-independent portion of <a class="el" href="a00180.html">concurrent_queue_iterator</a>. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00290.html">concurrent_queue.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00182.html b/doc/html/a00182.html
new file mode 100644
index 0000000..cbb71e7
--- /dev/null
+++ b/doc/html/a00182.html
@@ -0,0 +1,423 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::concurrent_vector< T, A > Class Template Reference</h1>Concurrent vector container  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00291.html">concurrent_vector.h</a>></code>
+<p>
+Inherits <a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>.
+<p>
+Inheritance diagram for tbb::concurrent_vector< T, A >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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 Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w0" doxytag="tbb::concurrent_vector::size_type"></a>
+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="w1" doxytag="tbb::concurrent_vector::allocator_type"></a>
+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="w2" doxytag="tbb::concurrent_vector::value_type"></a>
+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="w3" doxytag="tbb::concurrent_vector::difference_type"></a>
+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="w4" doxytag="tbb::concurrent_vector::reference"></a>
+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="w5" doxytag="tbb::concurrent_vector::const_reference"></a>
+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="w6" doxytag="tbb::concurrent_vector::pointer"></a>
+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="w7" doxytag="tbb::concurrent_vector::const_pointer"></a>
+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="w8" doxytag="tbb::concurrent_vector::iterator"></a>
+typedef <a class="el" href="a00238.html">internal::vector_iterator</a><<br>
+ <a class="el" href="a00182.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="w9" doxytag="tbb::concurrent_vector::const_iterator"></a>
+typedef <a class="el" href="a00238.html">internal::vector_iterator</a><<br>
+ <a class="el" href="a00182.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="w10" doxytag="tbb::concurrent_vector::reverse_iterator"></a>
+typedef std::reverse_iterator<<br>
+ <a class="el" href="a00238.html">iterator</a> > </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="w11" doxytag="tbb::concurrent_vector::const_reverse_iterator"></a>
+typedef std::reverse_iterator<<br>
+ <a class="el" href="a00238.html">const_iterator</a> > </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="w12" doxytag="tbb::concurrent_vector::range_type"></a>
+typedef generic_range_type<<br>
+ <a class="el" href="a00238.html">iterator</a> > </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="w13" doxytag="tbb::concurrent_vector::const_range_type"></a>
+typedef generic_range_type<<br>
+ <a class="el" href="a00238.html">const_iterator</a> > </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="a0" doxytag="tbb::concurrent_vector::concurrent_vector"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a0">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="a1" doxytag="tbb::concurrent_vector::concurrent_vector"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a1">concurrent_vector</a> (const <a class="el" href="a00182.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="a2" doxytag="tbb::concurrent_vector::concurrent_vector"></a>
+template<class M> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00182.html#a2">concurrent_vector</a> (const <a class="el" href="a00182.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="a3" doxytag="tbb::concurrent_vector::concurrent_vector"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a3">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="a4" doxytag="tbb::concurrent_vector::concurrent_vector"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a4">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="a5" doxytag="tbb::concurrent_vector::concurrent_vector"></a>
+template<class I> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00182.html#a5">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="a6" doxytag="tbb::concurrent_vector::operator="></a>
+<a class="el" href="a00182.html">concurrent_vector</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a6">operator=</a> (const <a class="el" href="a00182.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="a7" doxytag="tbb::concurrent_vector::operator="></a>
+template<class M> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00182.html">concurrent_vector</a> & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00182.html#a7">operator=</a> (const <a class="el" href="a00182.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="a00182.html#a8">grow_by</a> (size_type delta)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Grow by "delta" elements.  <a href="#a8"></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="a00182.html#a9">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="#a9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10" doxytag="tbb::concurrent_vector::grow_to_at_least"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a10">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="a11" doxytag="tbb::concurrent_vector::push_back"></a>
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a11">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="a00182.html#a12">operator[]</a> (size_type index)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Get reference to element at given index.  <a href="#a12"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a13" doxytag="tbb::concurrent_vector::operator[]"></a>
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a13">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="a14" doxytag="tbb::concurrent_vector::at"></a>
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a14">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="a15" doxytag="tbb::concurrent_vector::at"></a>
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a15">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="a16" doxytag="tbb::concurrent_vector::range"></a>
+range_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a16">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="a17" doxytag="tbb::concurrent_vector::range"></a>
+const_range_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a17">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="a18" doxytag="tbb::concurrent_vector::size"></a>
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a18">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="a19" doxytag="tbb::concurrent_vector::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a19">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="a20" doxytag="tbb::concurrent_vector::capacity"></a>
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a20">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="a00182.html#a21">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="#a21"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a22" doxytag="tbb::concurrent_vector::compact"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a22">compact</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Optimize memory usage and fragmentation. Returns true if optimization occurred. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a23" doxytag="tbb::concurrent_vector::max_size"></a>
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a23">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="a24" doxytag="tbb::concurrent_vector::begin"></a>
+<a class="el" href="a00238.html">iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a24">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="a25" doxytag="tbb::concurrent_vector::end"></a>
+<a class="el" href="a00238.html">iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a25">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="a26" doxytag="tbb::concurrent_vector::begin"></a>
+<a class="el" href="a00238.html">const_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a26">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="a27" doxytag="tbb::concurrent_vector::end"></a>
+<a class="el" href="a00238.html">const_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a27">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="a28" doxytag="tbb::concurrent_vector::rbegin"></a>
+reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a28">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="a29" doxytag="tbb::concurrent_vector::rend"></a>
+reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a29">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="a30" doxytag="tbb::concurrent_vector::rbegin"></a>
+const_reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a30">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="a31" doxytag="tbb::concurrent_vector::rend"></a>
+const_reverse_iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a31">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="a32" doxytag="tbb::concurrent_vector::front"></a>
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a32">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="a33" doxytag="tbb::concurrent_vector::front"></a>
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a33">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="a34" doxytag="tbb::concurrent_vector::back"></a>
+reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a34">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="a35" doxytag="tbb::concurrent_vector::back"></a>
+const_reference </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a35">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="a36" doxytag="tbb::concurrent_vector::get_allocator"></a>
+allocator_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a36">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="a37" doxytag="tbb::concurrent_vector::assign"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a37">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="a38" doxytag="tbb::concurrent_vector::assign"></a>
+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="a00182.html#a38">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="a39" doxytag="tbb::concurrent_vector::swap"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a39">swap</a> (<a class="el" href="a00182.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"><a class="anchor" name="a40" doxytag="tbb::concurrent_vector::clear"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a40">clear</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear container. Not thread safe. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a41" doxytag="tbb::concurrent_vector::~concurrent_vector"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html#a41">~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="a42" doxytag="tbb::concurrent_vector::internal_vector_base"></a>
+const <a class="el" href="a00183.html">internal::concurrent_vector_base_v3</a> & </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="n0" doxytag="tbb::concurrent_vector::internal::vector_iterator"></a>
+class </td><td class="memItemRight" valign="bottom"><b>internal::vector_iterator</b></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="a00182.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="a00182.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="a00182.html#a9">grow_by(size_type n, const_reference t)</a> growth using copying constructor to init new items.</li> [...]
+</dd></dl>
+
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="a9" doxytag="tbb::concurrent_vector::grow_by"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">size_type <a class="el" href="a00182.html">tbb::concurrent_vector</a>< T, A >::grow_by           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">size_type </td>
+          <td class="mdname" nowrap> <em>delta</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const_reference </td>
+          <td class="mdname" nowrap> <em>t</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Grow by "delta" elements using copying constuctor. 
+<p>
+Returns old size.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a8" doxytag="tbb::concurrent_vector::grow_by"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">size_type <a class="el" href="a00182.html">tbb::concurrent_vector</a>< T, A >::grow_by           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">size_type </td>
+          <td class="mdname1" valign="top" nowrap> <em>delta</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Grow by "delta" elements. 
+<p>
+Returns old size.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a12" doxytag="tbb::concurrent_vector::operator[]"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">reference <a class="el" href="a00182.html">tbb::concurrent_vector</a>< T, A >::operator[]           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">size_type </td>
+          <td class="mdname1" valign="top" nowrap> <em>index</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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="a00182.html#a18">size()</a>.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a21" doxytag="tbb::concurrent_vector::reserve"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename T, class A> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">void <a class="el" href="a00182.html">tbb::concurrent_vector</a>< T, A >::reserve           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">size_type </td>
+          <td class="mdname1" valign="top" nowrap> <em>n</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00291.html">concurrent_vector.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00183.html b/doc/html/a00183.html
new file mode 100644
index 0000000..d91029a
--- /dev/null
+++ b/doc/html/a00183.html
@@ -0,0 +1,156 @@
+<!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::concurrent_vector_base_v3 Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_vector_base_v3 Class Reference</h1>Base class of concurrent vector implementation.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00291.html">concurrent_vector.h</a>></code>
+<p>
+Inherited by <a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a><code> [private]</code>.
+<p>
+Inheritance diagram for tbb::internal::concurrent_vector_base_v3:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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>Protected Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="x0" doxytag="tbb::internal::concurrent_vector_base_v3::segment_index_t"></a>
+typedef size_t </td><td class="memItemRight" valign="bottom"><b>segment_index_t</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="x1" doxytag="tbb::internal::concurrent_vector_base_v3::size_type"></a>
+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="x2" doxytag="tbb::internal::concurrent_vector_base_v3::internal_array_op1"></a>
+typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#x2">internal_array_op1</a> )(void *begin, size_type n)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An operation on an n-element array starting at begin. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="x3" doxytag="tbb::internal::concurrent_vector_base_v3::internal_array_op2"></a>
+typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#x3">internal_array_op2</a> )(void *dst, const void *src, size_type n)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An operation on n-element destination array and n-element source array. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <b>default_initial_segments</b> =  1, 
+<a class="el" href="a00183.html#x7x5">pointers_per_short_table</a> =  3, 
+<b>pointers_per_long_table</b> =  sizeof(segment_index_t) * 8
+ }</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="b2" doxytag="tbb::internal::concurrent_vector_base_v3::internal_reserve"></a>
+void </td><td class="memItemRight" valign="bottom"><b>internal_reserve</b> (size_type n, size_type element_size, size_type max_size)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b3" doxytag="tbb::internal::concurrent_vector_base_v3::internal_capacity"></a>
+size_type </td><td class="memItemRight" valign="bottom"><b>internal_capacity</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b4" doxytag="tbb::internal::concurrent_vector_base_v3::internal_grow_to_at_least"></a>
+void </td><td class="memItemRight" valign="bottom"><b>internal_grow_to_at_least</b> (size_type new_size, size_type element_size, <a class="el" href="a00183.html#x3">internal_array_op2</a> init, const void *src)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b5" doxytag="tbb::internal::concurrent_vector_base_v3::internal_grow"></a>
+void </td><td class="memItemRight" valign="bottom"><b>internal_grow</b> (size_type start, size_type finish, size_type element_size, <a class="el" href="a00183.html#x3">internal_array_op2</a> init, const void *src)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6" doxytag="tbb::internal::concurrent_vector_base_v3::internal_grow_by"></a>
+size_type </td><td class="memItemRight" valign="bottom"><b>internal_grow_by</b> (size_type delta, size_type element_size, <a class="el" href="a00183.html#x3">internal_array_op2</a> init, const void *src)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b7" doxytag="tbb::internal::concurrent_vector_base_v3::internal_push_back"></a>
+void * </td><td class="memItemRight" valign="bottom"><b>internal_push_back</b> (size_type element_size, size_type &index)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8" doxytag="tbb::internal::concurrent_vector_base_v3::internal_clear"></a>
+segment_index_t </td><td class="memItemRight" valign="bottom"><b>internal_clear</b> (<a class="el" href="a00183.html#x2">internal_array_op1</a> destroy)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b9" doxytag="tbb::internal::concurrent_vector_base_v3::internal_compact"></a>
+void * </td><td class="memItemRight" valign="bottom"><b>internal_compact</b> (size_type element_size, void *table, <a class="el" href="a00183.html#x2">internal_array_op1</a> destroy, <a class="el" href="a00183.html#x3">internal_array_op2</a> copy)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b10" doxytag="tbb::internal::concurrent_vector_base_v3::internal_copy"></a>
+void </td><td class="memItemRight" valign="bottom"><b>internal_copy</b> (const <a class="el" href="a00183.html">concurrent_vector_base_v3</a> &src, size_type element_size, <a class="el" href="a00183.html#x3">internal_array_op2</a> copy)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b11" doxytag="tbb::internal::concurrent_vector_base_v3::internal_assign"></a>
+void </td><td class="memItemRight" valign="bottom"><b>internal_assign</b> (const <a class="el" href="a00183.html">concurrent_vector_base_v3</a> &src, size_type element_size, <a class="el" href="a00183.html#x2">internal_array_op1</a> destroy, <a class="el" href="a00183.html#x3">internal_array_op2</a> assign, <a class="el" href="a00183.html#x3">internal_array_op2</a> copy)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b12" doxytag="tbb::internal::concurrent_vector_base_v3::internal_throw_exception"></a>
+void </td><td class="memItemRight" valign="bottom"><b>internal_throw_exception</b> (size_type) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b13" doxytag="tbb::internal::concurrent_vector_base_v3::internal_swap"></a>
+void </td><td class="memItemRight" valign="bottom"><b>internal_swap</b> (<a class="el" href="a00183.html">concurrent_vector_base_v3</a> &v)</td></tr>
+
+<tr><td colspan="2"><br><h2>Static Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f0" doxytag="tbb::internal::concurrent_vector_base_v3::segment_index_of"></a>
+segment_index_t </td><td class="memItemRight" valign="bottom"><b>segment_index_of</b> (size_type index)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f1" doxytag="tbb::internal::concurrent_vector_base_v3::segment_base"></a>
+segment_index_t </td><td class="memItemRight" valign="bottom"><b>segment_base</b> (segment_index_t k)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f2" doxytag="tbb::internal::concurrent_vector_base_v3::segment_base_index_of"></a>
+segment_index_t </td><td class="memItemRight" valign="bottom"><b>segment_base_index_of</b> (segment_index_t &index)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3" doxytag="tbb::internal::concurrent_vector_base_v3::segment_size"></a>
+size_type </td><td class="memItemRight" valign="bottom"><b>segment_size</b> (segment_index_t k)</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="p0" doxytag="tbb::internal::concurrent_vector_base_v3::vector_allocator_ptr"></a>
+void *(* </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#p0">vector_allocator_ptr</a> )(<a class="el" href="a00183.html">concurrent_vector_base_v3</a> &, size_t)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">allocator function pointer <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1" doxytag="tbb::internal::concurrent_vector_base_v3::my_first_block"></a>
+<a class="el" href="a00165.html">atomic</a>< size_type > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#p1">my_first_block</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">count of segments in the first block <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p2" doxytag="tbb::internal::concurrent_vector_base_v3::my_early_size"></a>
+<a class="el" href="a00165.html">atomic</a>< size_type > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#p2">my_early_size</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Requested size of vector. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p3" doxytag="tbb::internal::concurrent_vector_base_v3::my_segment"></a>
+<a class="el" href="a00165.html">atomic</a>< segment_t * > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#p3">my_segment</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Pointer to the segments table. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p4" doxytag="tbb::internal::concurrent_vector_base_v3::my_storage"></a>
+segment_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html#p4">my_storage</a> [pointers_per_short_table]</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">embedded storage of segment pointers <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="n0" doxytag="tbb::internal::concurrent_vector_base_v3::helper"></a>
+class </td><td class="memItemRight" valign="bottom"><b>helper</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Base class of concurrent vector implementation. 
+<p>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="x7" doxytag="tbb::internal::concurrent_vector_base_v3::@0"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">anonymous enum<code> [protected]</code>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" name="x7x5" doxytag="pointers_per_short_table"></a>pointers_per_short_table</em> </td><td>
+Number of slots for segment's pointers inside the class. </td></tr>
+</table>
+</dl>
+    </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00291.html">concurrent_vector.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..194fb27
--- /dev/null
+++ b/doc/html/a00184.html
@@ -0,0 +1,36 @@
+<!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::concurrent_vector_base_v3::internal_segments_table Struct Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::concurrent_vector_base_v3::internal_segments_table Struct Reference</h1>Internal structure for compact().  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00291.html">concurrent_vector.h</a>></code>
+<p>
+<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 Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o0" doxytag="tbb::internal::concurrent_vector_base_v3::internal_segments_table::first_block"></a>
+segment_index_t </td><td class="memItemRight" valign="bottom"><b>first_block</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o1" doxytag="tbb::internal::concurrent_vector_base_v3::internal_segments_table::table"></a>
+void * </td><td class="memItemRight" valign="bottom"><b>table</b> [pointers_per_long_table]</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Internal structure for compact(). 
+<p>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00291.html">concurrent_vector.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00185.html b/doc/html/a00185.html
new file mode 100644
index 0000000..9ff48db
--- /dev/null
+++ b/doc/html/a00185.html
@@ -0,0 +1,43 @@
+<!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::do_group_task_forward< Iterator, Body, Item > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::do_group_task_forward< Iterator, Body, Item > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00293.html">parallel_do.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::do_group_task_forward< Iterator, Body, Item >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::internal::do_group_task_forward::do_task_iter"></a>
+class </td><td class="memItemRight" valign="bottom"><b>do_task_iter</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Iterator, typename Body, typename Item><br>
+ class tbb::internal::do_group_task_forward< Iterator, Body, Item ></h3>
+
+For internal use only. 
+<p>
+Unpacks a block of iterations. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00293.html">parallel_do.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00186.html b/doc/html/a00186.html
new file mode 100644
index 0000000..6e544f7
--- /dev/null
+++ b/doc/html/a00186.html
@@ -0,0 +1,43 @@
+<!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::do_iteration_task< Body, Item > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::do_iteration_task< Body, Item > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00293.html">parallel_do.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::do_iteration_task< Body, Item >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00056.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="n0" doxytag="tbb::internal::do_iteration_task::parallel_do_feeder_impl"></a>
+class </td><td class="memItemRight" valign="bottom"><b>parallel_do_feeder_impl</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Body, typename Item><br>
+ class tbb::internal::do_iteration_task< Body, Item ></h3>
+
+For internal use only. 
+<p>
+Executes one iteration of a do. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00293.html">parallel_do.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..ee7cb94
--- /dev/null
+++ b/doc/html/a00187.html
@@ -0,0 +1,43 @@
+<!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::do_task_iter< Iterator, Body, Item > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::do_task_iter< Iterator, Body, Item > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00293.html">parallel_do.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::do_task_iter< Iterator, Body, Item >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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 Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0" doxytag="tbb::internal::do_task_iter::do_task_iter"></a>
+ </td><td class="memItemRight" valign="bottom"><b>do_task_iter</b> (Iterator first, Iterator last, <a class="el" href="a00202.html">feeder_type</a> &feeder)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Iterator, typename Body, typename Item><br>
+ class tbb::internal::do_task_iter< Iterator, Body, Item ></h3>
+
+For internal use only. 
+<p>
+Gets block of iterations and packages them into a do_group_task. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00293.html">parallel_do.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00188.html b/doc/html/a00188.html
new file mode 100644
index 0000000..dddf580
--- /dev/null
+++ b/doc/html/a00188.html
@@ -0,0 +1,31 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::empty_task Class Reference</h1>task that does nothing. Useful for synchronization.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00307.html">task.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.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="a00106.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="a00307.html">task.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00189.html
new file mode 100644
index 0000000..b91cc50
--- /dev/null
+++ b/doc/html/a00189.html
@@ -0,0 +1,124 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::filter Class Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>A stage in a pipeline.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00300.html">pipeline.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"><a class="anchor" name="a0" doxytag="tbb::filter::is_serial"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00189.html#a0">is_serial</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">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00189.html#a1">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="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00189.html#a2">~filter</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy filter.  <a href="#a2"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Protected Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00189.html#x2">mode</a> { <b>parallel</b> =  internal::CURRENT_VERSION, 
+<b>serial</b> =  internal::CURRENT_VERSION | internal::IS_SERIAL
+ }</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For pipeline version 2 and earlier 0 is parallel and 1 is serial mode. <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="b0" doxytag="tbb::filter::filter"></a>
+ </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="b1" doxytag="tbb::filter::filter"></a>
+ </td><td class="memItemRight" valign="bottom"><b>filter</b> (<a class="el" href="a00189.html#x2">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="n0" doxytag="tbb::filter::internal::stage_task"></a>
+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="n1" doxytag="tbb::filter::pipeline"></a>
+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>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="a2" doxytag="tbb::filter::~filter"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">virtual tbb::filter::~<a class="el" href="a00189.html">filter</a>           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [virtual]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Destroy filter. 
+<p>
+If the filter was added to a pipeline, the pipeline must be destroyed first.     </td>
+  </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="a1" doxytag="tbb::filter::operator()"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">virtual void* tbb::filter::operator()           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">void * </td>
+          <td class="mdname1" valign="top" nowrap> <em>item</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [pure virtual]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Operate on an item from the input stream, and return item for output stream. 
+<p>
+Returns NULL if filter is a sink.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00300.html">pipeline.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00190.html b/doc/html/a00190.html
new file mode 100644
index 0000000..0a09e7b
--- /dev/null
+++ b/doc/html/a00190.html
@@ -0,0 +1,36 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::final_scan_tag Struct Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Used to indicate that the final scan is being performed.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00296.html">parallel_scan.h</a>></code>
+<p>
+<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>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0" doxytag="tbb::final_scan_tag::is_final_scan"></a>
+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. 
+<p>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00296.html">parallel_scan.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00191.html b/doc/html/a00191.html
new file mode 100644
index 0000000..f19bd9e
--- /dev/null
+++ b/doc/html/a00191.html
@@ -0,0 +1,48 @@
+<!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::final_sum< Range, Body > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::final_sum< Range, Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Performs final scan for a leaf.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00296.html">parallel_scan.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::final_sum< Range, Body >:<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="a0" doxytag="tbb::internal::final_sum::final_sum"></a>
+ </td><td class="memItemRight" valign="bottom"><b>final_sum</b> (Body &body_)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::internal::final_sum::finish_construction"></a>
+void </td><td class="memItemRight" valign="bottom"><b>finish_construction</b> (const Range &range_, Body *stuff_last_)</td></tr>
+
+<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o0" doxytag="tbb::internal::final_sum::body"></a>
+Body </td><td class="memItemRight" valign="bottom"><b>body</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Range, typename Body><br>
+ class tbb::internal::final_sum< Range, Body ></h3>
+
+Performs final scan for a leaf. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00296.html">parallel_scan.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00192.html b/doc/html/a00192.html
new file mode 100644
index 0000000..768e8f3
--- /dev/null
+++ b/doc/html/a00192.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>tbb::internal::finish_reduce< Body > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::finish_reduce< Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Task type use to combine the partial results of parallel_reduce.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00295.html">parallel_reduce.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::finish_reduce< Body >:<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>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::internal::finish_reduce::start_reduce"></a>
+class </td><td class="memItemRight" valign="bottom"><b>start_reduce</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Body><br>
+ class tbb::internal::finish_reduce< Body ></h3>
+
+Task type use to combine the partial results of parallel_reduce. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00295.html">parallel_reduce.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..e8d4071
--- /dev/null
+++ b/doc/html/a00193.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>tbb::internal::finish_reduce_with_affinity< Body > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::finish_reduce_with_affinity< Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Task type use to combine the partial results of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a>.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00295.html">parallel_reduce.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::finish_reduce_with_affinity< Body >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::internal::finish_reduce_with_affinity::start_reduce_with_affinity"></a>
+class </td><td class="memItemRight" valign="bottom"><b>start_reduce_with_affinity</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Body><br>
+ class tbb::internal::finish_reduce_with_affinity< Body ></h3>
+
+Task type use to combine the partial results of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a>. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00295.html">parallel_reduce.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00194.html b/doc/html/a00194.html
new file mode 100644
index 0000000..e43fa10
--- /dev/null
+++ b/doc/html/a00194.html
@@ -0,0 +1,52 @@
+<!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::finish_scan< Range, Body > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::finish_scan< Range, Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Combine partial results.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00296.html">parallel_scan.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::finish_scan< Range, Body >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00071.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="a0" doxytag="tbb::internal::finish_scan::execute"></a>
+<a class="el" href="a00228.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00194.html#a0">execute</a> ()</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"><a class="anchor" name="a1" doxytag="tbb::internal::finish_scan::finish_scan"></a>
+ </td><td class="memItemRight" valign="bottom"><b>finish_scan</b> (<a class="el" href="a00227.html">sum_node_type</a> *&return_slot_, <a class="el" href="a00191.html">final_sum_type</a> **sum_, <a class="el" href="a00227.html">sum_node_type</a> &result_)</td></tr>
+
+<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o0" doxytag="tbb::internal::finish_scan::right_zombie"></a>
+<a class="el" href="a00191.html">final_sum_type</a> * </td><td class="memItemRight" valign="bottom"><b>right_zombie</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o1" doxytag="tbb::internal::finish_scan::result"></a>
+<a class="el" href="a00227.html">sum_node_type</a> & </td><td class="memItemRight" valign="bottom"><b>result</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Range, typename Body><br>
+ class tbb::internal::finish_scan< Range, Body ></h3>
+
+Combine partial results. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00296.html">parallel_scan.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00195.html b/doc/html/a00195.html
new file mode 100644
index 0000000..b4e353f
--- /dev/null
+++ b/doc/html/a00195.html
@@ -0,0 +1,58 @@
+<!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::hash_map_base Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::hash_map_base Class Reference</h1>base class of <a class="el" href="a00174.html">concurrent_hash_map</a>  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00289.html">concurrent_hash_map.h</a>></code>
+<p>
+Inherited by <a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><code> [protected]</code>.
+<p>
+Inheritance diagram for tbb::internal::hash_map_base:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00020.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="w0" doxytag="tbb::internal::hash_map_base::node_mutex_t"></a>
+typedef <a class="el" href="a00219.html">spin_rw_mutex</a> </td><td class="memItemRight" valign="bottom"><b>node_mutex_t</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w1" doxytag="tbb::internal::hash_map_base::chain_mutex_t"></a>
+typedef <a class="el" href="a00219.html">spin_rw_mutex</a> </td><td class="memItemRight" valign="bottom"><b>chain_mutex_t</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w2" doxytag="tbb::internal::hash_map_base::segment_mutex_t"></a>
+typedef <a class="el" href="a00219.html">spin_rw_mutex</a> </td><td class="memItemRight" valign="bottom"><b>segment_mutex_t</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w3" doxytag="tbb::internal::hash_map_base::hashcode_t"></a>
+typedef size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#w3">hashcode_t</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of a hash code. <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="s0" doxytag="tbb::internal::hash_map_base::n_segment_bits"></a>
+const size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#s0">n_segment_bits</a> = 6</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Log2 of n_segment. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="s1" doxytag="tbb::internal::hash_map_base::n_segment"></a>
+const size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#s1">n_segment</a> = size_t(1)<<<a class="el" href="a00195.html#s0">n_segment_bits</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Number of segments. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="s2" doxytag="tbb::internal::hash_map_base::max_physical_size"></a>
+const size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html#s2">max_physical_size</a> = size_t(1)<<(8*sizeof(<a class="el" href="a00195.html#w3">hashcode_t</a>)-<a class="el" href="a00195.html#s0">n_segment_bits</a>)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum size of array of chains. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+base class of <a class="el" href="a00174.html">concurrent_hash_map</a> 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00289.html">concurrent_hash_map.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00196.html b/doc/html/a00196.html
new file mode 100644
index 0000000..262e95a
--- /dev/null
+++ b/doc/html/a00196.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>tbb::internal::hash_map_iterator< Container, Value > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::hash_map_iterator< Container, Value > Class Template Reference</h1>Meets requirements of a forward iterator for STL */.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00289.html">concurrent_hash_map.h</a>></code>
+<p>
+<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="w0" doxytag="tbb::internal::hash_map_iterator::difference_type"></a>
+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="w1" doxytag="tbb::internal::hash_map_iterator::value_type"></a>
+typedef Value </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="w2" doxytag="tbb::internal::hash_map_iterator::pointer"></a>
+typedef Value * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w3" doxytag="tbb::internal::hash_map_iterator::reference"></a>
+typedef Value & </td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w4" doxytag="tbb::internal::hash_map_iterator::const_reference"></a>
+typedef const Value & </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="w5" doxytag="tbb::internal::hash_map_iterator::iterator_category"></a>
+typedef std::forward_iterator_tag </td><td class="memItemRight" valign="bottom"><b>iterator_category</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="a0" doxytag="tbb::internal::hash_map_iterator::hash_map_iterator"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00196.html#a0">hash_map_iterator</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct undefined iterator. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="tbb::internal::hash_map_iterator::hash_map_iterator"></a>
+ </td><td class="memItemRight" valign="bottom"><b>hash_map_iterator</b> (const <a class="el" href="a00196.html">hash_map_iterator</a>< Container, typename Container::value_type > &other)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::internal::hash_map_iterator::operator *"></a>
+Value & </td><td class="memItemRight" valign="bottom"><b>operator *</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="tbb::internal::hash_map_iterator::operator->"></a>
+Value * </td><td class="memItemRight" valign="bottom"><b>operator-></b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="tbb::internal::hash_map_iterator::operator++"></a>
+<a class="el" href="a00196.html">hash_map_iterator</a> & </td><td class="memItemRight" valign="bottom"><b>operator++</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::internal::hash_map_iterator::operator++"></a>
+Value * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00196.html#a5">operator++</a> (int)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Post increment. <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="n0" doxytag="tbb::internal::hash_map_iterator::internal::hash_map_iterator"></a>
+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="n1" doxytag="tbb::internal::hash_map_iterator::internal::hash_map_range"></a>
+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="n2" doxytag="tbb::internal::hash_map_iterator::tbb::concurrent_hash_map"></a>
+class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00196.html#n2">tbb::concurrent_hash_map</a></td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="n3" doxytag="tbb::internal::hash_map_iterator::operator=="></a>
+template<typename C, 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="a00196.html">hash_map_iterator</a>< C, T > &i, const <a class="el" href="a00196.html">hash_map_iterator</a>< C, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="n4" doxytag="tbb::internal::hash_map_iterator::operator!="></a>
+template<typename C, 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="a00196.html">hash_map_iterator</a>< C, T > &i, const <a class="el" href="a00196.html">hash_map_iterator</a>< C, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="n5" doxytag="tbb::internal::hash_map_iterator::operator-"></a>
+template<typename C, typename T, typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">ptrdiff_t </td><td class="memTemplItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="a00196.html">hash_map_iterator</a>< C, T > &i, const <a class="el" href="a00196.html">hash_map_iterator</a>< C, U > &j)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Container, typename Value><br>
+ class tbb::internal::hash_map_iterator< Container, Value ></h3>
+
+Meets requirements of a forward iterator for STL */. 
+<p>
+Value is either the T or const T type of the container. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00289.html">concurrent_hash_map.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00197.html b/doc/html/a00197.html
new file mode 100644
index 0000000..d4c4929
--- /dev/null
+++ b/doc/html/a00197.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::hash_map_range< Iterator > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::hash_map_range< Iterator > Class Template Reference</h1>Range class used with <a class="el" href="a00174.html">concurrent_hash_map</a>.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00289.html">concurrent_hash_map.h</a>></code>
+<p>
+<a href="a00023.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="w0" doxytag="tbb::internal::hash_map_range::size_type"></a>
+typedef std::size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#w0">size_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type for size of a range. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w1" doxytag="tbb::internal::hash_map_range::value_type"></a>
+typedef Iterator::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="w2" doxytag="tbb::internal::hash_map_range::reference"></a>
+typedef Iterator::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="w3" doxytag="tbb::internal::hash_map_range::const_reference"></a>
+typedef Iterator::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="w4" doxytag="tbb::internal::hash_map_range::difference_type"></a>
+typedef Iterator::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="w5" doxytag="tbb::internal::hash_map_range::iterator"></a>
+typedef Iterator </td><td class="memItemRight" valign="bottom"><b>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="a0" doxytag="tbb::internal::hash_map_range::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a0">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="a1" doxytag="tbb::internal::hash_map_range::is_divisible"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a1">is_divisible</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if range can be partitioned into two subranges. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::internal::hash_map_range::hash_map_range"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a2">hash_map_range</a> (<a class="el" href="a00197.html">hash_map_range</a> &r, <a class="el" href="a00221.html">split</a>)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Split range. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a3" doxytag="tbb::internal::hash_map_range::hash_map_range"></a>
+template<typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00197.html#a3">hash_map_range</a> (<a class="el" href="a00197.html">hash_map_range</a>< U > &r)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">type conversion <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="tbb::internal::hash_map_range::hash_map_range"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a4">hash_map_range</a> (const Iterator &begin_, const Iterator &end_, <a class="el" href="a00197.html#w0">size_type</a> grainsize=1)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Init range with iterators and grainsize specified. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::internal::hash_map_range::begin"></a>
+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="a6" doxytag="tbb::internal::hash_map_range::end"></a>
+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="a7" doxytag="tbb::internal::hash_map_range::grainsize"></a>
+<a class="el" href="a00197.html#w0">size_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a7">grainsize</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The grain size for this range. <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="n0" doxytag="tbb::internal::hash_map_range::hash_map_range"></a>
+class </td><td class="memItemRight" valign="bottom"><b>hash_map_range</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Iterator><br>
+ class tbb::internal::hash_map_range< Iterator ></h3>
+
+Range class used with <a class="el" href="a00174.html">concurrent_hash_map</a>. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00289.html">concurrent_hash_map.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00198.html b/doc/html/a00198.html
new file mode 100644
index 0000000..1e0caf2
--- /dev/null
+++ b/doc/html/a00198.html
@@ -0,0 +1,50 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::mutex Class Reference</h1>Wrapper around the platform's native reader-writer lock.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00292.html">mutex.h</a>></code>
+<p>
+<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>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0" doxytag="tbb::mutex::mutex"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00198.html#a0">mutex</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <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="s0" doxytag="tbb::mutex::is_rw_mutex"></a>
+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="s1" doxytag="tbb::mutex::is_recursive_mutex"></a>
+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="s2" doxytag="tbb::mutex::is_fair_mutex"></a>
+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="n0" doxytag="tbb::mutex::scoped_lock"></a>
+class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></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. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00292.html">mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00199.html b/doc/html/a00199.html
new file mode 100644
index 0000000..f340a30
--- /dev/null
+++ b/doc/html/a00199.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::mutex::scoped_lock Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::mutex::scoped_lock Class Reference</h1>The scoped locking pattern.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00292.html">mutex.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inheritance diagram for tbb::mutex::scoped_lock:<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 Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0" doxytag="tbb::mutex::scoped_lock::scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00199.html#a0">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="a00199.html#a1">scoped_lock</a> (<a class="el" href="a00198.html">mutex</a> &<a class="el" href="a00198.html">mutex</a>)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::mutex::scoped_lock::~scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00199.html#a2">~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="a3" doxytag="tbb::mutex::scoped_lock::acquire"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00199.html#a3">acquire</a> (<a class="el" href="a00198.html">mutex</a> &<a class="el" href="a00198.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="a4" doxytag="tbb::mutex::scoped_lock::try_acquire"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00199.html#a4">try_acquire</a> (<a class="el" href="a00198.html">mutex</a> &<a class="el" href="a00198.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="a5" doxytag="tbb::mutex::scoped_lock::release"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00199.html#a5">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="a1" doxytag="tbb::mutex::scoped_lock::scoped_lock"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">tbb::mutex::scoped_lock::scoped_lock           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00198.html">mutex</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>mutex</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Acquire lock on given mutex. 
+<p>
+Upon entry, *this should not be in the "have acquired a mutex" state.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00292.html">mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00200.html
new file mode 100644
index 0000000..b0c2129
--- /dev/null
+++ b/doc/html/a00200.html
@@ -0,0 +1,36 @@
+<!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::no_copy Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::no_copy Class Reference</h1>Base class for types that should not be copied or assigned.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00313.html">tbb_stddef.h</a>></code>
+<p>
+Inherited by tbb::internal::affinity_partition_type, <a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a><code> [private]</code>, <a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a><code> [private]</code>, <a class="el" href="a00199.html">tbb::mutex::scoped_lock</a><code> [private]</code>, <a class="el" href="a00201.html">tbb::parallel_do_feeder< Item ></a><code> [private]</code>, <a class="el" href="a00204.html">tbb::parallel_wh [...]
+<p>
+Inheritance diagram for tbb::internal::no_copy:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00122.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="a0" doxytag="tbb::internal::no_copy::no_copy"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00200.html#a0">no_copy</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allow default construction. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Base class for types that should not be copied or assigned. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00313.html">tbb_stddef.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00201.html b/doc/html/a00201.html
new file mode 100644
index 0000000..252c373
--- /dev/null
+++ b/doc/html/a00201.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>tbb::parallel_do_feeder< Item > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::parallel_do_feeder< Item > Class Template Reference</h1>Class the user supplied algorithm body uses to add new tasks  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00293.html">parallel_do.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inherited by <a class="el" href="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a>.
+<p>
+Inheritance diagram for tbb::parallel_do_feeder< Item >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00054.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="a0" doxytag="tbb::parallel_do_feeder::add"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html#a0">add</a> (const Item &item)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a work item to a running parallel_do. <br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::parallel_do_feeder::internal::parallel_do_feeder_impl"></a>
+class </td><td class="memItemRight" valign="bottom"><b>internal::parallel_do_feeder_impl</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Item><br>
+ class tbb::parallel_do_feeder< Item ></h3>
+
+Class the user supplied algorithm body uses to add new tasks 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"></td><td valign="top"><em>Item</em> </td><td>Work item type * </td></tr>
+  </table>
+</dl>
+
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00293.html">parallel_do.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00202.html b/doc/html/a00202.html
new file mode 100644
index 0000000..fdc88ed
--- /dev/null
+++ b/doc/html/a00202.html
@@ -0,0 +1,46 @@
+<!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::parallel_do_feeder_impl< Body, Item > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::parallel_do_feeder_impl< Body, Item > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00293.html">parallel_do.h</a>></code>
+<p>
+Inherits <a class="el" href="a00201.html">tbb::parallel_do_feeder< Item >< Item ></a>.
+<p>
+Inheritance diagram for tbb::internal::parallel_do_feeder_impl< Body, Item >:<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>
+<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o0" doxytag="tbb::internal::parallel_do_feeder_impl::my_body"></a>
+const Body * </td><td class="memItemRight" valign="bottom"><b>my_body</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o1" doxytag="tbb::internal::parallel_do_feeder_impl::my_barrier"></a>
+<a class="el" href="a00188.html">empty_task</a> * </td><td class="memItemRight" valign="bottom"><b>my_barrier</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<class Body, typename Item><br>
+ class tbb::internal::parallel_do_feeder_impl< Body, Item ></h3>
+
+For internal use only. 
+<p>
+Implements new task adding procedure. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00293.html">parallel_do.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..a3d983a
--- /dev/null
+++ b/doc/html/a00203.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>tbb::internal::parallel_do_operator_selector< Body, Item > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::parallel_do_operator_selector< Body, Item > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00293.html">parallel_do.h</a>></code>
+<p>
+<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>Static Public Member Functions</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="e0" doxytag="tbb::internal::parallel_do_operator_selector::call"></a>
+template<typename A1, typename A2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>call</b> (const Body &obj, A1 &arg1, A2 &arg2)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<class Body, typename Item><br>
+ class tbb::internal::parallel_do_operator_selector< Body, Item ></h3>
+
+For internal use only. 
+<p>
+Selects one of the two possible forms of function call member operator. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00293.html">parallel_do.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00204.html b/doc/html/a00204.html
new file mode 100644
index 0000000..bbe3fdf
--- /dev/null
+++ b/doc/html/a00204.html
@@ -0,0 +1,147 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::parallel_while< Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Parallel iteration over a stream, with optional addition of more work.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00298.html">parallel_while.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inheritance diagram for tbb::parallel_while< Body >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00078.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="w0" doxytag="tbb::parallel_while::value_type"></a>
+typedef Body::argument_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00204.html#w0">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="a0" doxytag="tbb::parallel_while::parallel_while"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00204.html#a0">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="a1" doxytag="tbb::parallel_while::~parallel_while"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00204.html#a1">~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="a00204.html#a2">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="#a2"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00204.html#a3">add</a> (const <a class="el" href="a00204.html#w0">value_type</a> &item)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a work item while running.  <a href="#a3"></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="a3" doxytag="tbb::parallel_while::add"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Body> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">void <a class="el" href="a00204.html">tbb::parallel_while</a>< Body >::add           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">const <a class="el" href="a00204.html#w0">value_type</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>item</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Add a work item while running. 
+<p>
+Should be executed only by body.apply or a thread spawned therefrom.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a2" doxytag="tbb::parallel_while::run"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Body> </td>
+        </tr>
+        <tr>
+          <td class="md" colspan="4">
+template<typename Stream> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">void <a class="el" href="a00204.html">tbb::parallel_while</a>< Body >::run           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">Stream & </td>
+          <td class="mdname" nowrap> <em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const Body & </td>
+          <td class="mdname" nowrap> <em>body</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Apply body.apply to each item in the stream. 
+<p>
+A Stream s has the requirements <br>
+ "S::value_type" <br>
+ "s.pop_if_present(value) is convertible to bool     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00298.html">parallel_while.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..597633f
--- /dev/null
+++ b/doc/html/a00205.html
@@ -0,0 +1,47 @@
+<!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::partition_type_base Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::partition_type_base Class Reference</h1>Provides default methods for partition objects without affinity.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00299.html">partitioner.h</a>></code>
+<p>
+Inherited by tbb::auto_partitioner::partition_type, and tbb::simple_partitioner::partition_type.
+<p>
+Inheritance diagram for tbb::internal::partition_type_base:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00080.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="a0" doxytag="tbb::internal::partition_type_base::set_affinity"></a>
+void </td><td class="memItemRight" valign="bottom"><b>set_affinity</b> (<a class="el" href="a00228.html">task</a> &t)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="tbb::internal::partition_type_base::note_affinity"></a>
+void </td><td class="memItemRight" valign="bottom"><b>note_affinity</b> (<a class="el" href="a00228.html#w1">task::affinity_id</a> id)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::internal::partition_type_base::continue_after_execute_range"></a>
+<a class="el" href="a00228.html">task</a> * </td><td class="memItemRight" valign="bottom"><b>continue_after_execute_range</b> (<a class="el" href="a00228.html">task</a> &t)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="tbb::internal::partition_type_base::decide_whether_to_delay"></a>
+bool </td><td class="memItemRight" valign="bottom"><b>decide_whether_to_delay</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="tbb::internal::partition_type_base::spawn_or_delay"></a>
+void </td><td class="memItemRight" valign="bottom"><b>spawn_or_delay</b> (bool, <a class="el" href="a00228.html">task</a> &a, <a class="el" href="a00228.html">task</a> &b)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Provides default methods for partition objects without affinity. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00299.html">partitioner.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00206.html b/doc/html/a00206.html
new file mode 100644
index 0000000..c5457b1
--- /dev/null
+++ b/doc/html/a00206.html
@@ -0,0 +1,60 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::pipeline Class Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>A processing pipeling that applies filters to items.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00300.html">pipeline.h</a>></code>
+<p>
+<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"><a class="anchor" name="a0" doxytag="tbb::pipeline::pipeline"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00206.html#a0">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"><a class="anchor" name="a1" doxytag="tbb::pipeline::~pipeline"></a>
+virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00206.html#a1">~pipeline</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy pipeline. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::pipeline::add_filter"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00206.html#a2">add_filter</a> (<a class="el" href="a00189.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="a3" doxytag="tbb::pipeline::run"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00206.html#a3">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="a4" doxytag="tbb::pipeline::clear"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00206.html#a4">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="n0" doxytag="tbb::pipeline::internal::stage_task"></a>
+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="n1" doxytag="tbb::pipeline::filter"></a>
+class </td><td class="memItemRight" valign="bottom"><b>filter</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A processing pipeling that applies filters to items. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00300.html">pipeline.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00207.html b/doc/html/a00207.html
new file mode 100644
index 0000000..cf71361
--- /dev/null
+++ b/doc/html/a00207.html
@@ -0,0 +1,36 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::pre_scan_tag Struct Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Used to indicate that the initial scan is being performed.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00296.html">parallel_scan.h</a>></code>
+<p>
+<a href="a00067.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="e0" doxytag="tbb::pre_scan_tag::is_final_scan"></a>
+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 initial scan is being performed. 
+<p>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00296.html">parallel_scan.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00208.html b/doc/html/a00208.html
new file mode 100644
index 0000000..f61a62a
--- /dev/null
+++ b/doc/html/a00208.html
@@ -0,0 +1,48 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::queuing_mutex Class Reference</h1>Queuing lock with local-only spinning.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00301.html">queuing_mutex.h</a>></code>
+<p>
+<a href="a00089.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="a0" doxytag="tbb::queuing_mutex::queuing_mutex"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a0">queuing_mutex</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <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="s0" doxytag="tbb::queuing_mutex::is_rw_mutex"></a>
+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="s1" doxytag="tbb::queuing_mutex::is_recursive_mutex"></a>
+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="s2" doxytag="tbb::queuing_mutex::is_fair_mutex"></a>
+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="n0" doxytag="tbb::queuing_mutex::scoped_lock"></a>
+class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+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="a00301.html">queuing_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00209.html b/doc/html/a00209.html
new file mode 100644
index 0000000..6f33089
--- /dev/null
+++ b/doc/html/a00209.html
@@ -0,0 +1,116 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::queuing_mutex::scoped_lock Class Reference</h1>The scoped locking pattern.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00301.html">queuing_mutex.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inheritance diagram for tbb::queuing_mutex::scoped_lock:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00090.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="a00209.html#a0">scoped_lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex.  <a href="#a0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00209.html#a1">scoped_lock</a> (<a class="el" href="a00208.html">queuing_mutex</a> &m)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::queuing_mutex::scoped_lock::~scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00209.html#a2">~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="a3" doxytag="tbb::queuing_mutex::scoped_lock::acquire"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00209.html#a3">acquire</a> (<a class="el" href="a00208.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="a4" doxytag="tbb::queuing_mutex::scoped_lock::try_acquire"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00209.html#a4">try_acquire</a> (<a class="el" href="a00208.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="a5" doxytag="tbb::queuing_mutex::scoped_lock::release"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00209.html#a5">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="a0" doxytag="tbb::queuing_mutex::scoped_lock::scoped_lock"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">tbb::queuing_mutex::scoped_lock::scoped_lock           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Construct lock that has not acquired a mutex. 
+<p>
+Equivalent to zero-initialization of *this.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a1" doxytag="tbb::queuing_mutex::scoped_lock::scoped_lock"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">tbb::queuing_mutex::scoped_lock::scoped_lock           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00208.html">queuing_mutex</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>m</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Acquire lock on given mutex. 
+<p>
+Upon entry, *this should not be in the "have acquired a mutex" state.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00301.html">queuing_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00210.html b/doc/html/a00210.html
new file mode 100644
index 0000000..59db09a
--- /dev/null
+++ b/doc/html/a00210.html
@@ -0,0 +1,54 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::queuing_rw_mutex Class Reference</h1>Reader-writer lock with local-only spinning.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00302.html">queuing_rw_mutex.h</a>></code>
+<p>
+<a href="a00091.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="a0" doxytag="tbb::queuing_rw_mutex::queuing_rw_mutex"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00210.html#a0">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="a1" doxytag="tbb::queuing_rw_mutex::~queuing_rw_mutex"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00210.html#a1">~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 colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="s0" doxytag="tbb::queuing_rw_mutex::is_rw_mutex"></a>
+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="s1" doxytag="tbb::queuing_rw_mutex::is_recursive_mutex"></a>
+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="s2" doxytag="tbb::queuing_rw_mutex::is_fair_mutex"></a>
+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="n0" doxytag="tbb::queuing_rw_mutex::scoped_lock"></a>
+class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Reader-writer lock with local-only spinning. 
+<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> 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00302.html">queuing_rw_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00211.html b/doc/html/a00211.html
new file mode 100644
index 0000000..aae89f7
--- /dev/null
+++ b/doc/html/a00211.html
@@ -0,0 +1,162 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::queuing_rw_mutex::scoped_lock Class Reference</h1>The scoped locking pattern.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00302.html">queuing_rw_mutex.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inheritance diagram for tbb::queuing_rw_mutex::scoped_lock:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00092.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="a00211.html#a0">scoped_lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex.  <a href="#a0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00211.html#a1">scoped_lock</a> (<a class="el" href="a00210.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="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::queuing_rw_mutex::scoped_lock::~scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00211.html#a2">~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="a3" doxytag="tbb::queuing_rw_mutex::scoped_lock::acquire"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00211.html#a3">acquire</a> (<a class="el" href="a00210.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="a4" doxytag="tbb::queuing_rw_mutex::scoped_lock::try_acquire"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00211.html#a4">try_acquire</a> (<a class="el" href="a00210.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="a5" doxytag="tbb::queuing_rw_mutex::scoped_lock::release"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00211.html#a5">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="a00211.html#a6">upgrade_to_writer</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Upgrade reader to become a writer.  <a href="#a6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a7" doxytag="tbb::queuing_rw_mutex::scoped_lock::downgrade_to_reader"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00211.html#a7">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="a0" doxytag="tbb::queuing_rw_mutex::scoped_lock::scoped_lock"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">tbb::queuing_rw_mutex::scoped_lock::scoped_lock           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Construct lock that has not acquired a mutex. 
+<p>
+Equivalent to zero-initialization of *this.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a1" doxytag="tbb::queuing_rw_mutex::scoped_lock::scoped_lock"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">tbb::queuing_rw_mutex::scoped_lock::scoped_lock           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00210.html">queuing_rw_mutex</a> & </td>
+          <td class="mdname" nowrap> <em>m</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>bool </td>
+          <td class="mdname" nowrap> <em>write</em> = <code>true</code></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Acquire lock on given mutex. 
+<p>
+Upon entry, *this should not be in the "have acquired a mutex" state.     </td>
+  </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="a6" doxytag="tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">bool tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Upgrade reader to become a writer. 
+<p>
+Returns true if the upgrade happened without re-acquiring the lock and false if opposite     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00302.html">queuing_rw_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00212.html b/doc/html/a00212.html
new file mode 100644
index 0000000..ac7a0ea
--- /dev/null
+++ b/doc/html/a00212.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>tbb::internal::quick_sort_body< RandomAccessIterator, Compare > Struct Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::quick_sort_body< RandomAccessIterator, Compare > Struct Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Body class used to sort elements in a range that is smaller than the grainsize.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00297.html">parallel_sort.h</a>></code>
+<p>
+<a href="a00074.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="a0" doxytag="tbb::internal::quick_sort_body::operator()"></a>
+void </td><td class="memItemRight" valign="bottom"><b>operator()</b> (const <a class="el" href="a00213.html">quick_sort_range</a>< RandomAccessIterator, Compare > &range) const </td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename RandomAccessIterator, typename Compare><br>
+ struct tbb::internal::quick_sort_body< RandomAccessIterator, Compare ></h3>
+
+Body class used to sort elements in a range that is smaller than the grainsize. 
+<p>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00297.html">parallel_sort.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00213.html b/doc/html/a00213.html
new file mode 100644
index 0000000..075e584
--- /dev/null
+++ b/doc/html/a00213.html
@@ -0,0 +1,64 @@
+<!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::quick_sort_range< RandomAccessIterator, Compare > Struct Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::quick_sort_range< RandomAccessIterator, Compare > Struct Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Range used in quicksort to split elements into subranges based on a value.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00297.html">parallel_sort.h</a>></code>
+<p>
+<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"><a class="anchor" name="a0" doxytag="tbb::internal::quick_sort_range::quick_sort_range"></a>
+ </td><td class="memItemRight" valign="bottom"><b>quick_sort_range</b> (RandomAccessIterator begin_, size_t size_, const Compare &comp_)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="tbb::internal::quick_sort_range::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><b>empty</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::internal::quick_sort_range::is_divisible"></a>
+bool </td><td class="memItemRight" valign="bottom"><b>is_divisible</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="tbb::internal::quick_sort_range::quick_sort_range"></a>
+ </td><td class="memItemRight" valign="bottom"><b>quick_sort_range</b> (<a class="el" href="a00213.html">quick_sort_range</a> &range, <a class="el" href="a00221.html">split</a>)</td></tr>
+
+<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o0" doxytag="tbb::internal::quick_sort_range::comp"></a>
+const Compare & </td><td class="memItemRight" valign="bottom"><b>comp</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o1" doxytag="tbb::internal::quick_sort_range::begin"></a>
+RandomAccessIterator </td><td class="memItemRight" valign="bottom"><b>begin</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o2" doxytag="tbb::internal::quick_sort_range::size"></a>
+size_t </td><td class="memItemRight" valign="bottom"><b>size</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="s0" doxytag="tbb::internal::quick_sort_range::grainsize"></a>
+const size_t </td><td class="memItemRight" valign="bottom"><b>grainsize</b> = 500</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename RandomAccessIterator, typename Compare><br>
+ struct tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></h3>
+
+Range used in quicksort to split elements into subranges based on a value. 
+<p>
+The split operation selects a splitter and places all elements less than or equal to the value in the first range and the remaining elements in the second range. 
+<p>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00297.html">parallel_sort.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00214.html b/doc/html/a00214.html
new file mode 100644
index 0000000..cb3e22f
--- /dev/null
+++ b/doc/html/a00214.html
@@ -0,0 +1,50 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::recursive_mutex Class Reference</h1>Mutex that allows recursive mutex acquisition.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00303.html">recursive_mutex.h</a>></code>
+<p>
+<a href="a00093.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="a0" doxytag="tbb::recursive_mutex::recursive_mutex"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00214.html#a0">recursive_mutex</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired <a class="el" href="a00214.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="s0" doxytag="tbb::recursive_mutex::is_rw_mutex"></a>
+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="s1" doxytag="tbb::recursive_mutex::is_recursive_mutex"></a>
+const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = true</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="s2" doxytag="tbb::recursive_mutex::is_fair_mutex"></a>
+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="n0" doxytag="tbb::recursive_mutex::scoped_lock"></a>
+class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></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>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00303.html">recursive_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00215.html b/doc/html/a00215.html
new file mode 100644
index 0000000..775cf41
--- /dev/null
+++ b/doc/html/a00215.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::recursive_mutex::scoped_lock Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::recursive_mutex::scoped_lock Class Reference</h1>The scoped locking pattern.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00303.html">recursive_mutex.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inheritance diagram for tbb::recursive_mutex::scoped_lock:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00094.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="a0" doxytag="tbb::recursive_mutex::scoped_lock::scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00215.html#a0">scoped_lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a <a class="el" href="a00214.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="a00215.html#a1">scoped_lock</a> (<a class="el" href="a00214.html">recursive_mutex</a> &<a class="el" href="a00198.html">mutex</a>)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::recursive_mutex::scoped_lock::~scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00215.html#a2">~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="a3" doxytag="tbb::recursive_mutex::scoped_lock::acquire"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00215.html#a3">acquire</a> (<a class="el" href="a00214.html">recursive_mutex</a> &<a class="el" href="a00198.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="a4" doxytag="tbb::recursive_mutex::scoped_lock::try_acquire"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00215.html#a4">try_acquire</a> (<a class="el" href="a00214.html">recursive_mutex</a> &<a class="el" href="a00198.html">mutex</a>)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given <a class="el" href="a00214.html">recursive_mutex</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::recursive_mutex::scoped_lock::release"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00215.html#a5">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="a1" doxytag="tbb::recursive_mutex::scoped_lock::scoped_lock"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">tbb::recursive_mutex::scoped_lock::scoped_lock           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00214.html">recursive_mutex</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>mutex</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Acquire lock on given mutex. 
+<p>
+Upon entry, *this should not be in the "have acquired a mutex" state.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00303.html">recursive_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00216.html b/doc/html/a00216.html
new file mode 100644
index 0000000..e9adc8c
--- /dev/null
+++ b/doc/html/a00216.html
@@ -0,0 +1,44 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::simple_partitioner Class Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>A simple partitioner  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00299.html">partitioner.h</a>></code>
+<p>
+<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>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::simple_partitioner::internal::start_for"></a>
+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="n1" doxytag="tbb::simple_partitioner::internal::start_reduce"></a>
+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="n2" doxytag="tbb::simple_partitioner::internal::start_scan"></a>
+class </td><td class="memItemRight" valign="bottom"><b>internal::start_scan</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. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00299.html">partitioner.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00217.html b/doc/html/a00217.html
new file mode 100644
index 0000000..360db11
--- /dev/null
+++ b/doc/html/a00217.html
@@ -0,0 +1,79 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::spin_mutex Class Reference</h1>A lock that occupies a single byte.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00305.html">spin_mutex.h</a>></code>
+<p>
+<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>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="a00217.html#a0">spin_mutex</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired lock.  <a href="#a0"></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="s0" doxytag="tbb::spin_mutex::is_rw_mutex"></a>
+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="s1" doxytag="tbb::spin_mutex::is_recursive_mutex"></a>
+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="s2" doxytag="tbb::spin_mutex::is_fair_mutex"></a>
+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="n0" doxytag="tbb::spin_mutex::scoped_lock"></a>
+class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></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="a00217.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="a0" doxytag="tbb::spin_mutex::spin_mutex"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">tbb::spin_mutex::spin_mutex           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Construct unacquired lock. 
+<p>
+Equivalent to zero-initialization of *this.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00305.html">spin_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00218.html b/doc/html/a00218.html
new file mode 100644
index 0000000..f0b6233
--- /dev/null
+++ b/doc/html/a00218.html
@@ -0,0 +1,56 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::spin_mutex::scoped_lock Class Reference</h1>Represents acquisition of a mutex.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00305.html">spin_mutex.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inheritance diagram for tbb::spin_mutex::scoped_lock:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00096.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="a0" doxytag="tbb::spin_mutex::scoped_lock::scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#a0">scoped_lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct without without acquiring a mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="tbb::spin_mutex::scoped_lock::scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#a1">scoped_lock</a> (<a class="el" href="a00217.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="a2" doxytag="tbb::spin_mutex::scoped_lock::acquire"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#a2">acquire</a> (<a class="el" href="a00217.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="a3" doxytag="tbb::spin_mutex::scoped_lock::try_acquire"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#a3">try_acquire</a> (<a class="el" href="a00217.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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="tbb::spin_mutex::scoped_lock::release"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#a4">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="a5" doxytag="tbb::spin_mutex::scoped_lock::~scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#a5">~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>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Represents acquisition of a mutex. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00305.html">spin_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..edccf4c
--- /dev/null
+++ b/doc/html/a00219.html
@@ -0,0 +1,44 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::spin_rw_mutex_v3 Class Reference</h1>Fast, unfair, spinning reader-writer lock with backoff and writer-preference.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00306.html">spin_rw_mutex.h</a>></code>
+<p>
+<a href="a00097.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="a0" doxytag="tbb::spin_rw_mutex_v3::spin_rw_mutex_v3"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00219.html#a0">spin_rw_mutex_v3</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <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="s0" doxytag="tbb::spin_rw_mutex_v3::is_rw_mutex"></a>
+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="s1" doxytag="tbb::spin_rw_mutex_v3::is_recursive_mutex"></a>
+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="s2" doxytag="tbb::spin_rw_mutex_v3::is_fair_mutex"></a>
+const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = false</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>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00306.html">spin_rw_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00220.html b/doc/html/a00220.html
new file mode 100644
index 0000000..db9e34a
--- /dev/null
+++ b/doc/html/a00220.html
@@ -0,0 +1,162 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::spin_rw_mutex_v3::scoped_lock Class Reference</h1>The scoped locking pattern.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00306.html">spin_rw_mutex.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inheritance diagram for tbb::spin_rw_mutex_v3::scoped_lock:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00220.html#a0">scoped_lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex.  <a href="#a0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00220.html#a1">scoped_lock</a> (<a class="el" href="a00219.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="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::spin_rw_mutex_v3::scoped_lock::~scoped_lock"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00220.html#a2">~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="a3" doxytag="tbb::spin_rw_mutex_v3::scoped_lock::acquire"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00220.html#a3">acquire</a> (<a class="el" href="a00219.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="a00220.html#a4">upgrade_to_writer</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Upgrade reader to become a writer.  <a href="#a4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::spin_rw_mutex_v3::scoped_lock::release"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00220.html#a5">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="a6" doxytag="tbb::spin_rw_mutex_v3::scoped_lock::downgrade_to_reader"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00220.html#a6">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="a7" doxytag="tbb::spin_rw_mutex_v3::scoped_lock::try_acquire"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00220.html#a7">try_acquire</a> (<a class="el" href="a00219.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given mutex. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+The scoped locking pattern. 
+<p>
+It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. 
+<p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="a0" doxytag="tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Construct lock that has not acquired a mutex. 
+<p>
+Equivalent to zero-initialization of *this.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a1" doxytag="tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00219.html">spin_rw_mutex</a> & </td>
+          <td class="mdname" nowrap> <em>m</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>bool </td>
+          <td class="mdname" nowrap> <em>write</em> = <code>true</code></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Acquire lock on given mutex. 
+<p>
+Upon entry, *this should not be in the "have acquired a mutex" state.     </td>
+  </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="a4" doxytag="tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">bool tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Upgrade reader to become a writer. 
+<p>
+Returns true if the upgrade happened without re-acquiring the lock and false if opposite     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00306.html">spin_rw_mutex.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00221.html b/doc/html/a00221.html
new file mode 100644
index 0000000..d933a39
--- /dev/null
+++ b/doc/html/a00221.html
@@ -0,0 +1,34 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::split Class Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Dummy type that distinguishes splitting constructor from copy constructor.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00313.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>
+Dummy type that distinguishes splitting constructor from copy constructor. 
+<p>
+See description of parallel_for and parallel_reduce for example usages. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00313.html">tbb_stddef.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00222.html b/doc/html/a00222.html
new file mode 100644
index 0000000..40a08cb
--- /dev/null
+++ b/doc/html/a00222.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>tbb::internal::start_for< Range, Body, Partitioner > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::start_for< Range, Body, Partitioner > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Task type used in parallel_for.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00294.html">parallel_for.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::start_for< Range, Body, Partitioner >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00062.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="e0" doxytag="tbb::internal::start_for::run"></a>
+void </td><td class="memItemRight" valign="bottom"><b>run</b> (const Range &range, const Body &body, const Partitioner &partitioner)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Range, typename Body, typename Partitioner><br>
+ class tbb::internal::start_for< Range, Body, Partitioner ></h3>
+
+Task type used in parallel_for. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00294.html">parallel_for.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00223.html b/doc/html/a00223.html
new file mode 100644
index 0000000..acd7449
--- /dev/null
+++ b/doc/html/a00223.html
@@ -0,0 +1,45 @@
+<!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::start_reduce< Range, Body, Partitioner > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::start_reduce< Range, Body, Partitioner > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Task type used to split the work of parallel_reduce.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00295.html">parallel_reduce.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::start_reduce< Range, Body, Partitioner >:<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>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0" doxytag="tbb::internal::start_reduce::run"></a>
+void </td><td class="memItemRight" valign="bottom"><b>run</b> (const Range &range, Body &body, const Partitioner &partitioner)</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="n0" doxytag="tbb::internal::start_reduce::finish_reduce"></a>
+class </td><td class="memItemRight" valign="bottom"><b>finish_reduce</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Range, typename Body, typename Partitioner><br>
+ class tbb::internal::start_reduce< Range, Body, Partitioner ></h3>
+
+Task type used to split the work of parallel_reduce. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00295.html">parallel_reduce.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00224.html b/doc/html/a00224.html
new file mode 100644
index 0000000..70feef5
--- /dev/null
+++ b/doc/html/a00224.html
@@ -0,0 +1,45 @@
+<!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::start_reduce_with_affinity< Range, Body > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::start_reduce_with_affinity< Range, Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Task type used to split the work of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a>.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00295.html">parallel_reduce.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::start_reduce_with_affinity< Range, Body >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0" doxytag="tbb::internal::start_reduce_with_affinity::run"></a>
+void </td><td class="memItemRight" valign="bottom"><b>run</b> (const Range &range, Body &body, <a class="el" href="a00162.html">affinity_partitioner</a> &partitioner)</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="n0" doxytag="tbb::internal::start_reduce_with_affinity::finish_reduce_with_affinity"></a>
+class </td><td class="memItemRight" valign="bottom"><b>finish_reduce_with_affinity</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Range, typename Body><br>
+ class tbb::internal::start_reduce_with_affinity< Range, Body ></h3>
+
+Task type used to split the work of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a>. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00295.html">parallel_reduce.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00225.html b/doc/html/a00225.html
new file mode 100644
index 0000000..3834933
--- /dev/null
+++ b/doc/html/a00225.html
@@ -0,0 +1,48 @@
+<!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::start_scan< Range, Body, Partitioner > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::start_scan< Range, Body, Partitioner > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Initial task to split the work.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00296.html">parallel_scan.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::start_scan< Range, Body, Partitioner >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00072.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="a0" doxytag="tbb::internal::start_scan::start_scan"></a>
+ </td><td class="memItemRight" valign="bottom"><b>start_scan</b> (<a class="el" href="a00227.html">sum_node_type</a> *&return_slot_, <a class="el" href="a00225.html">start_scan</a> &parent, <a class="el" href="a00227.html">sum_node_type</a> *parent_sum_)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="tbb::internal::start_scan::start_scan"></a>
+ </td><td class="memItemRight" valign="bottom"><b>start_scan</b> (<a class="el" href="a00227.html">sum_node_type</a> *&return_slot_, const Range &range_, <a class="el" href="a00191.html">final_sum_type</a> &body_, const Partitioner &partitioner_)</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="e0" doxytag="tbb::internal::start_scan::run"></a>
+void </td><td class="memItemRight" valign="bottom"><b>run</b> (const Range &range, Body &body, const Partitioner &partitioner)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Range, typename Body, typename Partitioner = simple_partitioner><br>
+ class tbb::internal::start_scan< Range, Body, Partitioner ></h3>
+
+Initial task to split the work. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00296.html">parallel_scan.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00226.html b/doc/html/a00226.html
new file mode 100644
index 0000000..acb6111
--- /dev/null
+++ b/doc/html/a00226.html
@@ -0,0 +1,36 @@
+<!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::strip< T > Struct Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::strip< T > Struct Template Reference</h1>Strips its template type argument from 'cv' and '&' qualifiers.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00293.html">parallel_do.h</a>></code>
+<p>
+<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 Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w0" doxytag="tbb::internal::strip::type"></a>
+typedef T </td><td class="memItemRight" valign="bottom"><b>type</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename T><br>
+ struct tbb::internal::strip< T ></h3>
+
+Strips its template type argument from 'cv' and '&' qualifiers. 
+<p>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00293.html">parallel_do.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00227.html b/doc/html/a00227.html
new file mode 100644
index 0000000..75c7a73
--- /dev/null
+++ b/doc/html/a00227.html
@@ -0,0 +1,54 @@
+<!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::sum_node< Range, Body > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::sum_node< Range, Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>Split work to be done in the scan.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00296.html">parallel_scan.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::sum_node< Range, Body >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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 Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o0" doxytag="tbb::internal::sum_node::incoming"></a>
+<a class="el" href="a00191.html">final_sum_type</a> * </td><td class="memItemRight" valign="bottom"><b>incoming</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o1" doxytag="tbb::internal::sum_node::body"></a>
+<a class="el" href="a00191.html">final_sum_type</a> * </td><td class="memItemRight" valign="bottom"><b>body</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o2" doxytag="tbb::internal::sum_node::stuff_last"></a>
+Body * </td><td class="memItemRight" valign="bottom"><b>stuff_last</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="n0" doxytag="tbb::internal::sum_node::start_scan"></a>
+class </td><td class="memItemRight" valign="bottom"><b>start_scan</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1" doxytag="tbb::internal::sum_node::finish_scan"></a>
+class </td><td class="memItemRight" valign="bottom"><b>finish_scan</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Range, typename Body><br>
+ class tbb::internal::sum_node< Range, Body ></h3>
+
+Split work to be done in the scan. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00296.html">parallel_scan.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 Intel Corporation.  All Rights Reserved.
+<p></p>
+Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
+registered trademarks or trademarks of Intel Corporation or its
+subsidiaries in the United States and other countries.
+<p></p>
+* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00228.html b/doc/html/a00228.html
new file mode 100644
index 0000000..09a33aa
--- /dev/null
+++ b/doc/html/a00228.html
@@ -0,0 +1,699 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::task Class Reference</h1>Base class for user-defined tasks.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00307.html">task.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inherited by <a class="el" href="a00188.html">tbb::empty_task</a>, <a class="el" href="a00185.html">tbb::internal::do_group_task_forward< Iterator, Body, Item ></a>, tbb::internal::do_group_task_input< Body, Item >, <a class="el" href="a00186.html">tbb::internal::do_iteration_task< Body, Item ></a>, tbb::internal::do_iteration_task_iter< Iterator, Body, Item >, <a class="el" href="a00187.html">tbb::internal::do_task_iter< Iterator, Body, Item ></a>, <a class [...]
+<p>
+Inheritance diagram for tbb::task:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00105.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 <a class="el" href="a00279.html#a14">internal::intptr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#w0">depth_type</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A scheduling depth.  <a href="#w0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="a00279.html#a12">internal::affinity_id</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#w1">affinity_id</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An id as used for specifying affinity.  <a href="#w1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#w8">state_type</a> { <br>
+  <a class="el" href="a00228.html#w8w2">executing</a>, 
+<a class="el" href="a00228.html#w8w3">reexecute</a>, 
+<a class="el" href="a00228.html#w8w4">ready</a>, 
+<a class="el" href="a00228.html#w8w5">allocated</a>, 
+<br>
+  <a class="el" href="a00228.html#w8w6">freed</a>, 
+<a class="el" href="a00228.html#w8w7">recycle</a>
+<br>
+ }</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Enumeration of task states that the scheduler considers.  <a href="#w8">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="a0" doxytag="tbb::task::~task"></a>
+virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a0">~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="a1" doxytag="tbb::task::execute"></a>
+virtual <a class="el" href="a00228.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a1">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="a00228.html#a2">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="#a2"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="tbb::task::allocate_child"></a>
+internal::allocate_child_proxy & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a3">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="a00228.html#a4">allocate_additional_child_of</a> (<a class="el" href="a00228.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="#a4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a5">destroy</a> (<a class="el" href="a00228.html">task</a> &victim)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a task.  <a href="#a5"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a6">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="#a6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a7">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="#a7"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8" doxytag="tbb::task::recycle_as_child_of"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a8">recycle_as_child_of</a> (<a class="el" href="a00228.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="a00228.html#a9">recycle_to_reexecute</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Schedule this for reexecution after current <a class="el" href="a00228.html#a1">execute()</a> returns.  <a href="#a9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10" doxytag="tbb::task::depth"></a>
+<a class="el" href="a00228.html#w0">depth_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a10">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="a00228.html#a11">set_depth</a> (<a class="el" href="a00228.html#w0">depth_type</a> new_depth)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Set scheduling depth to given value.  <a href="#a11"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a12">add_to_depth</a> (int delta)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Change scheduling depth by given amount.  <a href="#a12"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a13" doxytag="tbb::task::set_ref_count"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a13">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="a00228.html#a14">spawn</a> (<a class="el" href="a00228.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="#a14"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a15">spawn</a> (<a class="el" href="a00229.html">task_list</a> &list)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Spawn multiple tasks and clear list.  <a href="#a15"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a16" doxytag="tbb::task::spawn_and_wait_for_all"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a16">spawn_and_wait_for_all</a> (<a class="el" href="a00228.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="a17" doxytag="tbb::task::spawn_and_wait_for_all"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a17">spawn_and_wait_for_all</a> (<a class="el" href="a00229.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="a00228.html#a18">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="#a18"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a19" doxytag="tbb::task::parent"></a>
+<a class="el" href="a00228.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a19">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="a20" doxytag="tbb::task::is_stolen_task"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a20">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="a21" doxytag="tbb::task::state"></a>
+<a class="el" href="a00228.html#w8">state_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a21">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="a22" doxytag="tbb::task::ref_count"></a>
+int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a22">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="a23" doxytag="tbb::task::is_owned_by_current_thread"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a23">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="a24" doxytag="tbb::task::set_affinity"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a24">set_affinity</a> (<a class="el" href="a00228.html#w1">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="a25" doxytag="tbb::task::affinity"></a>
+<a class="el" href="a00228.html#w1">affinity_id</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a25">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 </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#a26">note_affinity</a> (<a class="el" href="a00228.html#w1">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="#a26"></a><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="e0" doxytag="tbb::task::allocate_root"></a>
+internal::allocate_root_proxy </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#e0">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">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#e1">spawn_root_and_wait</a> (<a class="el" href="a00228.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="#e1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#e2">spawn_root_and_wait</a> (<a class="el" href="a00229.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="#e2"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e3" doxytag="tbb::task::self"></a>
+<a class="el" href="a00228.html">task</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#e3">self</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The <a class="el" href="a00228.html#b0">task()</a> currently being run by this thread. <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="b0" doxytag="tbb::task::task"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html#b0">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="n0" doxytag="tbb::task::task_list"></a>
+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="n1" doxytag="tbb::task::internal::scheduler"></a>
+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="n2" doxytag="tbb::task::internal::allocate_root_proxy"></a>
+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="n3" doxytag="tbb::task::internal::allocate_continuation_proxy"></a>
+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="n4" doxytag="tbb::task::internal::allocate_child_proxy"></a>
+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="n5" doxytag="tbb::task::internal::allocate_additional_child_of_proxy"></a>
+class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_additional_child_of_proxy</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="w1" doxytag="tbb::task::affinity_id"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">typedef <a class="el" href="a00279.html#a12">internal::affinity_id</a> <a class="el" href="a00228.html#w1">tbb::task::affinity_id</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+An id as used for specifying affinity. 
+<p>
+Guaranteed to be integral type. Value of 0 means no affinity.     </td>
+  </tr>
+</table>
+<a class="anchor" name="w0" doxytag="tbb::task::depth_type"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">typedef <a class="el" href="a00279.html#a14">internal::intptr</a> <a class="el" href="a00228.html#w0">tbb::task::depth_type</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+A scheduling depth. 
+<p>
+Guaranteed to be a signed integral type.     </td>
+  </tr>
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="w8" doxytag="tbb::task::state_type"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">enum <a class="el" href="a00228.html#w8">tbb::task::state_type</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Enumeration of task states that the scheduler considers. 
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" name="w8w2" doxytag="executing"></a>executing</em> </td><td>
+task is running, and will be destroyed after method <a class="el" href="a00228.html#a1">execute()</a> completes. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w3" doxytag="reexecute"></a>reexecute</em> </td><td>
+task to be rescheduled. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w4" doxytag="ready"></a>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="w8w5" doxytag="allocated"></a>allocated</em> </td><td>
+task object is freshly allocated or recycled. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w6" doxytag="freed"></a>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="w8w7" doxytag="recycle"></a>recycle</em> </td><td>
+task to be recycled as continuation </td></tr>
+</table>
+</dl>
+    </td>
+  </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="a12" doxytag="tbb::task::add_to_depth"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::add_to_depth           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">int </td>
+          <td class="mdname1" valign="top" nowrap> <em>delta</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Change scheduling depth by given amount. 
+<p>
+The resulting depth must be non-negative.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a4" doxytag="tbb::task::allocate_additional_child_of"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">internal::allocate_additional_child_of_proxy tbb::task::allocate_additional_child_of           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00228.html">task</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>t</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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()     </td>
+  </tr>
+</table>
+<a class="anchor" name="a2" doxytag="tbb::task::allocate_continuation"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">internal::allocate_continuation_proxy& tbb::task::allocate_continuation           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Returns proxy for overloaded new that allocates a continuation task of *this. 
+<p>
+The continuation's parent becomes the parent of *this.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a5" doxytag="tbb::task::destroy"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::destroy           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00228.html">task</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>victim</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Destroy a task. 
+<p>
+Usually, calling this method is unnecessary, because a task is implicitly deleted after its <a class="el" href="a00228.html#a1">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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a26" doxytag="tbb::task::note_affinity"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">virtual void tbb::task::note_affinity           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00228.html#w1">affinity_id</a> </td>
+          <td class="mdname1" valign="top" nowrap> <em>id</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [virtual]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Invoked by scheduler to notify task that it ran on unexpected thread. 
+<p>
+Invoked before method <a class="el" href="a00228.html#a1">execute()</a> runs, if task is stolen, or task has affinity but will be executed on another thread.<p>
+The default action does nothing.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a6" doxytag="tbb::task::recycle_as_continuation"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::recycle_as_continuation           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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="a00228.html#a1">execute()</a> returns. Typically, this is done by having method <a class="el" href="a00228.html#a1">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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a7" doxytag="tbb::task::recycle_as_safe_continuation"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::recycle_as_safe_continuation           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Recommended to use, safe variant of recycle_as_continuation. 
+<p>
+For safety, it requires additional increment of ref_count.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a9" doxytag="tbb::task::recycle_to_reexecute"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::recycle_to_reexecute           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Schedule this for reexecution after current <a class="el" href="a00228.html#a1">execute()</a> returns. 
+<p>
+Requires that this.execute() be running.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a11" doxytag="tbb::task::set_depth"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::set_depth           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00228.html#w0">depth_type</a> </td>
+          <td class="mdname1" valign="top" nowrap> <em>new_depth</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Set scheduling depth to given value. 
+<p>
+The depth must be non-negative     </td>
+  </tr>
+</table>
+<a class="anchor" name="a15" doxytag="tbb::task::spawn"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::spawn           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00229.html">task_list</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>list</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Spawn multiple tasks and clear list. 
+<p>
+All of the tasks must be at the same depth.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a14" doxytag="tbb::task::spawn"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::spawn           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00228.html">task</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>child</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Schedule task for execution when a worker becomes available. 
+<p>
+After all children spawned so far finish their method <a class="el" href="a00228.html#a1">task::execute</a>, their parent's method <a class="el" href="a00228.html#a1">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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="e2" doxytag="tbb::task::spawn_root_and_wait"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::spawn_root_and_wait           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00229.html">task_list</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>root_list</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline, static]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="e1" doxytag="tbb::task::spawn_root_and_wait"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::spawn_root_and_wait           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top"><a class="el" href="a00228.html">task</a> & </td>
+          <td class="mdname1" valign="top" nowrap> <em>root</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline, static]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a18" doxytag="tbb::task::wait_for_all"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task::wait_for_all           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [inline]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Wait for reference count to become one, and set reference count to zero. 
+<p>
+Works on tasks while waiting.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00307.html">task.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 Intel Corporation.  All Rights Reserved.
+<p></p>
+Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
+registered trademarks or trademarks of Intel Corporation or its
+subsidiaries in the United States and other countries.
+<p></p>
+* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00229.html b/doc/html/a00229.html
new file mode 100644
index 0000000..55544ac
--- /dev/null
+++ b/doc/html/a00229.html
@@ -0,0 +1,62 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::task_list Class Reference</h1>A list of children.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00307.html">task.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inheritance diagram for tbb::task_list:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00107.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="a0" doxytag="tbb::task_list::task_list"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#a0">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="a1" doxytag="tbb::task_list::~task_list"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#a1">~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="a2" doxytag="tbb::task_list::empty"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#a2">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="a3" doxytag="tbb::task_list::push_back"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#a3">push_back</a> (<a class="el" href="a00228.html">task</a> &<a class="el" href="a00228.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="a4" doxytag="tbb::task_list::pop_front"></a>
+<a class="el" href="a00228.html">task</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#a4">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="a5" doxytag="tbb::task_list::clear"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#a5">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>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::task_list::task"></a>
+class </td><td class="memItemRight" valign="bottom"><b>task</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A list of children. 
+<p>
+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="a00307.html">task.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00230.html b/doc/html/a00230.html
new file mode 100644
index 0000000..f7084c5
--- /dev/null
+++ b/doc/html/a00230.html
@@ -0,0 +1,53 @@
+<!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::task_prefix Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::task_prefix Class Reference</h1>Memory prefix to a task object.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00307.html">task.h</a>></code>
+<p>
+<a href="a00104.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="n0" doxytag="tbb::internal::task_prefix::tbb::task"></a>
+class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#n0">tbb::task</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1" doxytag="tbb::internal::task_prefix::tbb::task_list"></a>
+class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#n1">tbb::task_list</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n2" doxytag="tbb::internal::task_prefix::internal::scheduler"></a>
+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="n3" doxytag="tbb::internal::task_prefix::internal::allocate_root_proxy"></a>
+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="n4" doxytag="tbb::internal::task_prefix::internal::allocate_child_proxy"></a>
+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="n5" doxytag="tbb::internal::task_prefix::internal::allocate_continuation_proxy"></a>
+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="n6" doxytag="tbb::internal::task_prefix::internal::allocate_additional_child_of_proxy"></a>
+class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_additional_child_of_proxy</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Memory prefix to a task object. 
+<p>
+This class is internal to the library. Do not reference it directly, except within the library itself. Fields are ordered in way that preserves backwards compatibility and yields good packing on typical 32-bit and 64-bit platforms. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00307.html">task.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00231.html b/doc/html/a00231.html
new file mode 100644
index 0000000..111fb80
--- /dev/null
+++ b/doc/html/a00231.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::task_scheduler_init Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::task_scheduler_init Class Reference</h1>Class representing reference to tbb scheduler.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00308.html">task_scheduler_init.h</a>></code>
+<p>
+Inherits <a class="el" href="a00200.html">tbb::internal::no_copy</a>.
+<p>
+Inheritance diagram for tbb::task_scheduler_init:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00108.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="a00231.html#a0">initialize</a> (int number_of_threads=<a class="el" href="a00231.html#s0">automatic</a>)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Ensure that scheduler exists for this thread.  <a href="#a0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00231.html#a1">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="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::task_scheduler_init::terminate"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00231.html#a2">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="a3" doxytag="tbb::task_scheduler_init::task_scheduler_init"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00231.html#a3">task_scheduler_init</a> (int number_of_threads=<a class="el" href="a00231.html#s0">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="a4" doxytag="tbb::task_scheduler_init::~task_scheduler_init"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00231.html#a4">~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 colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00231.html#e0">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="#e0"></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="s0" doxytag="tbb::task_scheduler_init::automatic"></a>
+const int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00231.html#s0">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="s1" doxytag="tbb::task_scheduler_init::deferred"></a>
+const int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00231.html#s1">deferred</a> = -2</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Argument to <a class="el" href="a00231.html#a0">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="a00231.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="e0" doxytag="tbb::task_scheduler_init::default_num_threads"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">int tbb::task_scheduler_init::default_num_threads           </td>
+          <td class="md" valign="top">( </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap><code> [static]</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Returns the number of threads tbb scheduler would create if initialized by default. 
+<p>
+Result returned by this method does not depend on whether the scheduler has already been initialized.<p>
+Because tbb 2.0 does not support blocking tasks yet, you may use this method to boost the number of threads in the tbb's internal pool, if your tasks are doing I/O operations. The optimal number of additional threads depends on how much time your tasks spend in the blocked state.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a1" doxytag="tbb::task_scheduler_init::initialize"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task_scheduler_init::initialize           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">int </td>
+          <td class="mdname" nowrap> <em>number_of_threads</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>stack_size_type </td>
+          <td class="mdname" nowrap> <em>thread_stack_size</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+The overloaded method with stack size parameter. 
+<p>
+Overloading is necessary to preserve ABI compatibility     </td>
+  </tr>
+</table>
+<a class="anchor" name="a0" doxytag="tbb::task_scheduler_init::initialize"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void tbb::task_scheduler_init::initialize           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">int </td>
+          <td class="mdname1" valign="top" nowrap> <em>number_of_threads</em> = <code><a class="el" href="a00231.html#s0">automatic</a></code>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Ensure that scheduler exists for this thread. 
+<p>
+A value of -1 lets tbb decide on the number of threads, which is typically the number of hardware threads. For production code, the default value of -1 should be used, particularly if the client code is mixed with third party clients that might also use tbb.<p>
+The number_of_threads is ignored if any other task_scheduler_inits currently exist. A thread may construct multiple task_scheduler_inits. Doing so does no harm because the underlying scheduler is reference counted.     </td>
+  </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00308.html">task_scheduler_init.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00232.html b/doc/html/a00232.html
new file mode 100644
index 0000000..0a9b0cc
--- /dev/null
+++ b/doc/html/a00232.html
@@ -0,0 +1,100 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::tbb_allocator< T > Class Template Reference</h1>Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00310.html">tbb_allocator.h</a>></code>
+<p>
+<a href="a00110.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="w0" doxytag="tbb::tbb_allocator::pointer"></a>
+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="w1" doxytag="tbb::tbb_allocator::const_pointer"></a>
+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="w2" doxytag="tbb::tbb_allocator::reference"></a>
+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="w3" doxytag="tbb::tbb_allocator::const_reference"></a>
+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="w4" doxytag="tbb::tbb_allocator::value_type"></a>
+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="w5" doxytag="tbb::tbb_allocator::size_type"></a>
+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="w6" doxytag="tbb::tbb_allocator::difference_type"></a>
+typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><b>difference_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00232.html#w9">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="a1" doxytag="tbb::tbb_allocator::tbb_allocator"></a>
+ </td><td class="memItemRight" valign="bottom"><b>tbb_allocator</b> (const <a class="el" href="a00232.html">tbb_allocator</a> &)  throw ()</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a2" doxytag="tbb::tbb_allocator::tbb_allocator"></a>
+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="a00232.html">tbb_allocator</a>< U > &)  throw ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="tbb::tbb_allocator::address"></a>
+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="a4" doxytag="tbb::tbb_allocator::address"></a>
+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="a5" doxytag="tbb::tbb_allocator::allocate"></a>
+pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00232.html#a5">allocate</a> (size_type n, const void *=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="a6" doxytag="tbb::tbb_allocator::deallocate"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00232.html#a6">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="a7" doxytag="tbb::tbb_allocator::max_size"></a>
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00232.html#a7">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="a8" doxytag="tbb::tbb_allocator::construct"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00232.html#a8">construct</a> (pointer p, const T &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="a9" doxytag="tbb::tbb_allocator::destroy"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00232.html#a9">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="e0" doxytag="tbb::tbb_allocator::allocator_type"></a>
+<a class="el" href="a00232.html#w9">malloc_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00232.html#e0">allocator_type</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns current allocator. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename T><br>
+ class tbb::tbb_allocator< T ></h3>
+
+Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 
+<p>
+The class selects the best memory allocation mechanism available from scalable_malloc and standard malloc. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00310.html">tbb_allocator.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00233.html b/doc/html/a00233.html
new file mode 100644
index 0000000..535d1d5
--- /dev/null
+++ b/doc/html/a00233.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>tbb::tbb_allocator< void > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::tbb_allocator< void > Class Template Reference</h1>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="a00310.html">tbb_allocator.h</a>></code>
+<p>
+<a href="a00112.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="w0" doxytag="tbb::tbb_allocator< void >::pointer"></a>
+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="w1" doxytag="tbb::tbb_allocator< void >::const_pointer"></a>
+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="w2" doxytag="tbb::tbb_allocator< void >::value_type"></a>
+typedef void </td><td class="memItemRight" valign="bottom"><b>value_type</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="a00310.html">tbb_allocator.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00234.html b/doc/html/a00234.html
new file mode 100644
index 0000000..2ab1f9b
--- /dev/null
+++ b/doc/html/a00234.html
@@ -0,0 +1,82 @@
+<!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_thread_v3 Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::tbb_thread_v3 Class Reference</h1>Versioned thread class.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00314.html">tbb_thread.h</a>></code>
+<p>
+<a href="a00128.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="w0" doxytag="tbb::internal::tbb_thread_v3::native_handle_type"></a>
+typedef pthread_t </td><td class="memItemRight" valign="bottom"><b>native_handle_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="a0" doxytag="tbb::internal::tbb_thread_v3::tbb_thread_v3"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00234.html#a0">tbb_thread_v3</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs a thread object that does not represent a thread of execution. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a1" doxytag="tbb::internal::tbb_thread_v3::tbb_thread_v3"></a>
+template<class F> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00234.html#a1">tbb_thread_v3</a> (F f)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs an object and executes f() in a new thread. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a2" doxytag="tbb::internal::tbb_thread_v3::tbb_thread_v3"></a>
+template<class F, class X> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00234.html#a2">tbb_thread_v3</a> (F f, X x)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs an object and executes f(x) in a new thread. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a3" doxytag="tbb::internal::tbb_thread_v3::tbb_thread_v3"></a>
+template<class F, class X, class Y> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00234.html#a3">tbb_thread_v3</a> (F f, X x, Y y)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs an object and executes f(x,y) in a new thread. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="tbb::internal::tbb_thread_v3::joinable"></a>
+bool </td><td class="memItemRight" valign="bottom"><b>joinable</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::internal::tbb_thread_v3::join"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00234.html#a5">join</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The completion of the thread represented by *this happens before <a class="el" href="a00234.html#a5">join()</a> returns. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6" doxytag="tbb::internal::tbb_thread_v3::detach"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00234.html#a6">detach</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">When <a class="el" href="a00234.html#a6">detach()</a> returns, *this no longer represents the possibly continuing thread of execution. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8" doxytag="tbb::internal::tbb_thread_v3::get_id"></a>
+id </td><td class="memItemRight" valign="bottom"><b>get_id</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9" doxytag="tbb::internal::tbb_thread_v3::native_handle"></a>
+native_handle_type </td><td class="memItemRight" valign="bottom"><b>native_handle</b> ()</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="e0" doxytag="tbb::internal::tbb_thread_v3::hardware_concurrency"></a>
+unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="a00234.html#e0">hardware_concurrency</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The number of hardware thread contexts. <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="n0" doxytag="tbb::internal::tbb_thread_v3::move_v3"></a>
+void </td><td class="memItemRight" valign="bottom"><b>move_v3</b> (<a class="el" href="a00234.html">tbb_thread_v3</a> &t1, <a class="el" href="a00234.html">tbb_thread_v3</a> &t2)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1" doxytag="tbb::internal::tbb_thread_v3::tbb::swap"></a>
+void </td><td class="memItemRight" valign="bottom"><b>tbb::swap</b> (<a class="el" href="a00234.html">tbb_thread_v3</a> &t1, <a class="el" href="a00234.html">tbb_thread_v3</a> &t2)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Versioned thread class. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00314.html">tbb_thread.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00235.html b/doc/html/a00235.html
new file mode 100644
index 0000000..81f50ca
--- /dev/null
+++ b/doc/html/a00235.html
@@ -0,0 +1,48 @@
+<!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::thread_closure_1< F, X > Struct Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::thread_closure_1< F, X > Struct Template Reference</h1>Structure used to pass user function with 1 argument to thread.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00314.html">tbb_thread.h</a>></code>
+<p>
+<a href="a00126.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="a0" doxytag="tbb::internal::thread_closure_1::thread_closure_1"></a>
+ </td><td class="memItemRight" valign="bottom"><b>thread_closure_1</b> (const F &f, const X &x)</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="e0" doxytag="tbb::internal::thread_closure_1::start_routine"></a>
+__TBB_NATIVE_THREAD_ROUTINE </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#e0">start_routine</a> (void *c)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll. <br></td></tr>
+<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o0" doxytag="tbb::internal::thread_closure_1::function"></a>
+F </td><td class="memItemRight" valign="bottom"><b>function</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="o1" doxytag="tbb::internal::thread_closure_1::arg1"></a>
+X </td><td class="memItemRight" valign="bottom"><b>arg1</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<class F, class X><br>
+ struct tbb::internal::thread_closure_1< F, X ></h3>
+
+Structure used to pass user function with 1 argument to thread. 
+<p>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00314.html">tbb_thread.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00236.html b/doc/html/a00236.html
new file mode 100644
index 0000000..ff70d2e
--- /dev/null
+++ b/doc/html/a00236.html
@@ -0,0 +1,44 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::tick_count Class Reference</h1>Absolute timestamp.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00315.html">tick_count.h</a>></code>
+<p>
+<a href="a00130.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="a0" doxytag="tbb::tick_count::tick_count"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#a0">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="e0" doxytag="tbb::tick_count::now"></a>
+<a class="el" href="a00236.html">tick_count</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#e0">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="n0" doxytag="tbb::tick_count::operator-"></a>
+<a class="el" href="a00237.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#n0">operator-</a> (const <a class="el" href="a00236.html">tick_count</a> &t1, const <a class="el" href="a00236.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>
+</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="a00315.html">tick_count.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00237.html b/doc/html/a00237.html
new file mode 100644
index 0000000..ebb972e
--- /dev/null
+++ b/doc/html/a00237.html
@@ -0,0 +1,66 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::tick_count::interval_t Class Reference</h1>Relative time interval.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00315.html">tick_count.h</a>></code>
+<p>
+<a href="a00131.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="a0" doxytag="tbb::tick_count::interval_t::interval_t"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html#a0">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="a1" doxytag="tbb::tick_count::interval_t::interval_t"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html#a1">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="a2" doxytag="tbb::tick_count::interval_t::seconds"></a>
+double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html#a2">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="a3" doxytag="tbb::tick_count::interval_t::operator+="></a>
+<a class="el" href="a00237.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html#a3">operator+=</a> (const <a class="el" href="a00237.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="a4" doxytag="tbb::tick_count::interval_t::operator-="></a>
+<a class="el" href="a00237.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html#a4">operator-=</a> (const <a class="el" href="a00237.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="n0" doxytag="tbb::tick_count::interval_t::tbb::tick_count"></a>
+class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html#n0">tbb::tick_count</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1" doxytag="tbb::tick_count::interval_t::operator-"></a>
+<a class="el" href="a00237.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html#n1">operator-</a> (const <a class="el" href="a00236.html">tick_count</a> &t1, const <a class="el" href="a00236.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="n2" doxytag="tbb::tick_count::interval_t::operator+"></a>
+<a class="el" href="a00237.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html#n2">operator+</a> (const <a class="el" href="a00237.html">interval_t</a> &i, const <a class="el" href="a00237.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="n3" doxytag="tbb::tick_count::interval_t::operator-"></a>
+<a class="el" href="a00237.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html#n3">operator-</a> (const <a class="el" href="a00237.html">interval_t</a> &i, const <a class="el" href="a00237.html">interval_t</a> &j)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract two intervals. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Relative time interval. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00315.html">tick_count.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00238.html b/doc/html/a00238.html
new file mode 100644
index 0000000..9b74ef3
--- /dev/null
+++ b/doc/html/a00238.html
@@ -0,0 +1,118 @@
+<!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::vector_iterator< Container, Value > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::vector_iterator< Container, Value > Class Template Reference</h1>Meets requirements of a forward iterator for STL and a Value for a <a class="el" href="a00169.html">blocked_range</a>.*/.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00291.html">concurrent_vector.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"><a class="anchor" name="w0" doxytag="tbb::internal::vector_iterator::difference_type"></a>
+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="w1" doxytag="tbb::internal::vector_iterator::value_type"></a>
+typedef Value </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="w2" doxytag="tbb::internal::vector_iterator::pointer"></a>
+typedef Value * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w3" doxytag="tbb::internal::vector_iterator::reference"></a>
+typedef Value & </td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w4" doxytag="tbb::internal::vector_iterator::iterator_category"></a>
+typedef std::random_access_iterator_tag </td><td class="memItemRight" valign="bottom"><b>iterator_category</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="a0" doxytag="tbb::internal::vector_iterator::vector_iterator"></a>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00238.html#a0">vector_iterator</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="tbb::internal::vector_iterator::vector_iterator"></a>
+ </td><td class="memItemRight" valign="bottom"><b>vector_iterator</b> (const <a class="el" href="a00238.html">vector_iterator</a>< Container, typename Container::value_type > &other)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::internal::vector_iterator::operator+"></a>
+<a class="el" href="a00238.html">vector_iterator</a> </td><td class="memItemRight" valign="bottom"><b>operator+</b> (ptrdiff_t offset) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="tbb::internal::vector_iterator::operator+="></a>
+<a class="el" href="a00238.html">vector_iterator</a> </td><td class="memItemRight" valign="bottom"><b>operator+=</b> (ptrdiff_t offset)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="tbb::internal::vector_iterator::operator-"></a>
+<a class="el" href="a00238.html">vector_iterator</a> </td><td class="memItemRight" valign="bottom"><b>operator-</b> (ptrdiff_t offset) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::internal::vector_iterator::operator-="></a>
+<a class="el" href="a00238.html">vector_iterator</a> </td><td class="memItemRight" valign="bottom"><b>operator-=</b> (ptrdiff_t offset)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6" doxytag="tbb::internal::vector_iterator::operator *"></a>
+Value & </td><td class="memItemRight" valign="bottom"><b>operator *</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a7" doxytag="tbb::internal::vector_iterator::operator[]"></a>
+Value & </td><td class="memItemRight" valign="bottom"><b>operator[]</b> (ptrdiff_t k) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8" doxytag="tbb::internal::vector_iterator::operator->"></a>
+Value * </td><td class="memItemRight" valign="bottom"><b>operator-></b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9" doxytag="tbb::internal::vector_iterator::operator++"></a>
+<a class="el" href="a00238.html">vector_iterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00238.html#a9">operator++</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Pre increment. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10" doxytag="tbb::internal::vector_iterator::operator--"></a>
+<a class="el" href="a00238.html">vector_iterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00238.html#a10">operator--</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Pre decrement. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a11" doxytag="tbb::internal::vector_iterator::operator++"></a>
+<a class="el" href="a00238.html">vector_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00238.html#a11">operator++</a> (int)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Post increment. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12" doxytag="tbb::internal::vector_iterator::operator--"></a>
+<a class="el" href="a00238.html">vector_iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00238.html#a12">operator--</a> (int)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Post decrement. <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="n0" doxytag="tbb::internal::vector_iterator::internal::vector_iterator"></a>
+class </td><td class="memItemRight" valign="bottom"><b>internal::vector_iterator</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1" doxytag="tbb::internal::vector_iterator::tbb::concurrent_vector"></a>
+class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00238.html#n1">tbb::concurrent_vector</a></td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="n2" doxytag="tbb::internal::vector_iterator::operator+"></a>
+template<typename C, typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00238.html">vector_iterator</a>< C, T > </td><td class="memTemplItemRight" valign="bottom"><b>operator+</b> (ptrdiff_t offset, const <a class="el" href="a00238.html">vector_iterator</a>< C, T > &v)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="n3" doxytag="tbb::internal::vector_iterator::operator=="></a>
+template<typename C, 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="a00238.html">vector_iterator</a>< C, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< C, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="n4" doxytag="tbb::internal::vector_iterator::operator<"></a>
+template<typename C, 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="a00238.html">vector_iterator</a>< C, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< C, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="n5" doxytag="tbb::internal::vector_iterator::operator-"></a>
+template<typename C, typename T, typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">ptrdiff_t </td><td class="memTemplItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="a00238.html">vector_iterator</a>< C, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< C, U > &j)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Container, typename Value><br>
+ class tbb::internal::vector_iterator< Container, Value ></h3>
+
+Meets requirements of a forward iterator for STL and a Value for a <a class="el" href="a00169.html">blocked_range</a>.*/. 
+<p>
+Value is either the T or const T type of the container. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00291.html">concurrent_vector.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00239.html b/doc/html/a00239.html
new file mode 100644
index 0000000..fdc79e8
--- /dev/null
+++ b/doc/html/a00239.html
@@ -0,0 +1,26 @@
+<!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::version_tag_v3 Struct Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::version_tag_v3 Struct Reference</h1><code>#include <<a class="el" href="a00313.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>
+Version tag can be necessary to prevent loader on Linux from using the wrong symbol in debug builds (when inline functions are compiled as out-of-line). * 
+<p>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00313.html">tbb_stddef.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00240.html b/doc/html/a00240.html
new file mode 100644
index 0000000..49e0e5f
--- /dev/null
+++ b/doc/html/a00240.html
@@ -0,0 +1,43 @@
+<!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::while_group_task< Body > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::while_group_task< Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00298.html">parallel_while.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::while_group_task< Body >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00076.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="n0" doxytag="tbb::internal::while_group_task::while_task"></a>
+class </td><td class="memItemRight" valign="bottom"><b>while_task</b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Body><br>
+ class tbb::internal::while_group_task< Body ></h3>
+
+For internal use only. 
+<p>
+Unpacks a block of iterations. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00298.html">parallel_while.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00241.html b/doc/html/a00241.html
new file mode 100644
index 0000000..91b3c3c
--- /dev/null
+++ b/doc/html/a00241.html
@@ -0,0 +1,46 @@
+<!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::while_iteration_task< Body > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::while_iteration_task< Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00298.html">parallel_while.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::while_iteration_task< Body >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::internal::while_iteration_task::while_group_task"></a>
+class </td><td class="memItemRight" valign="bottom"><b>while_group_task</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1" doxytag="tbb::internal::while_iteration_task::tbb::parallel_while<Body>"></a>
+class </td><td class="memItemRight" valign="bottom"><b>tbb::parallel_while<Body></b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Body><br>
+ class tbb::internal::while_iteration_task< Body ></h3>
+
+For internal use only. 
+<p>
+Executes one iteration of a while. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00298.html">parallel_while.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00242.html b/doc/html/a00242.html
new file mode 100644
index 0000000..ff3453d
--- /dev/null
+++ b/doc/html/a00242.html
@@ -0,0 +1,43 @@
+<!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::while_task< Stream, Body > Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal::while_task< Stream, Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00281.html">Algorithms</a>]</small>
+</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<code>#include <<a class="el" href="a00298.html">parallel_while.h</a>></code>
+<p>
+Inherits <a class="el" href="a00228.html">tbb::task</a>.
+<p>
+Inheritance diagram for tbb::internal::while_task< Stream, Body >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0" doxytag="tbb::internal::while_task::tbb::parallel_while<Body>"></a>
+class </td><td class="memItemRight" valign="bottom"><b>tbb::parallel_while<Body></b></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template<typename Stream, typename Body><br>
+ class tbb::internal::while_task< Stream, Body ></h3>
+
+For internal use only. 
+<p>
+Gets block of iterations from a stream and packages them into a <a class="el" href="a00240.html">while_group_task</a>. 
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00298.html">parallel_while.h</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00278.html b/doc/html/a00278.html
new file mode 100644
index 0000000..5053625
--- /dev/null
+++ b/doc/html/a00278.html
@@ -0,0 +1,384 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>tbb Namespace Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb Namespace Reference</h1>The namespace tbb contains all components of the library.  
+<a href="#_details">More...</a>
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.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="a00164.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="a00165.html">tbb::atomic< T ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Primary template for atomic.  <a href="a00165.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::atomic< T * ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::atomic< void * ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::atomic< bool ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html">tbb::blocked_range< Value ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A range over which to iterate.  <a href="a00169.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html">tbb::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="a00170.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html">tbb::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="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="a00172.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="a00172.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::cache_aligned_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="a00173.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="a00173.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::cache_aligned_allocator< void >::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="a00174.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="a00174.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Combines data access, locking, and garbage collection.  <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="a00175.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::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="a00175.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::concurrent_hash_map< Key, T, HashCompare, A >::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>tbb::concurrent_hash_map< Key, T, HashCompare, A >::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">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::concurrent_hash_map< Key, T, HashCompare, A >::segment</b></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Segment of the table. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.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="a00177.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::concurrent_queue< T, A >::destroyer</b></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Class used to ensure exception-safety of method "pop". <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Concurrent vector container  <a href="a00182.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::concurrent_vector< T, A >::generic_range_type< I ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::concurrent_vector< T, A >::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>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00198.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="a00198.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00199.html">tbb::mutex::scoped_lock</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00199.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00201.html">tbb::parallel_do_feeder< Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Class the user supplied algorithm body uses to add new tasks  <a href="a00201.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="a00207.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="a00207.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="a00190.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="a00190.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00204.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="a00204.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00216.html">tbb::simple_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A simple partitioner  <a href="a00216.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::simple_partitioner::partition_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html">tbb::auto_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An auto partitioner.  <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"><b>tbb::auto_partitioner::partition_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html">tbb::affinity_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An affinity partitioner.  <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="a00189.html">tbb::filter</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline.  <a href="a00189.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00206.html">tbb::pipeline</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A processing pipeling that applies filters to items.  <a href="a00206.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html">tbb::queuing_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Queuing lock with local-only spinning.  <a href="a00208.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00209.html">tbb::queuing_mutex::scoped_lock</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00209.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00210.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="a00210.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00211.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00214.html">tbb::recursive_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Mutex that allows recursive mutex acquisition.  <a href="a00214.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00215.html">tbb::recursive_mutex::scoped_lock</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00215.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00217.html">tbb::spin_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A lock that occupies a single byte.  <a href="a00217.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html">tbb::spin_mutex::scoped_lock</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Represents acquisition of a mutex.  <a href="a00218.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00219.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="a00219.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00220.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00228.html">tbb::task</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Base class for user-defined tasks.  <a href="a00228.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00188.html">tbb::empty_task</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">task that does nothing. Useful for synchronization.  <a href="a00188.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html">tbb::task_list</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A list of children.  <a href="a00229.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00231.html">tbb::task_scheduler_init</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Class representing reference to tbb scheduler.  <a href="a00231.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00232.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="a00232.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::tbb_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="a00233.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="a00233.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::tbb_allocator< void >::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="a00168.html">tbb::bad_last_alloc</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Exception for concurrent containers.  <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="a00221.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="a00221.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html">tbb::tick_count</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Absolute timestamp.  <a href="a00236.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Relative time interval.  <a href="a00237.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="ga3" doxytag="tbb::parallel_do"></a>
+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="a00281.html#ga3">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 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="ga4" doxytag="tbb::parallel_for"></a>
+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="a00281.html#ga4">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00216.html">simple_partitioner</a> &partitioner=<a class="el" href="a00216.html">simple_partitioner</a>())</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="ga5" doxytag="tbb::parallel_for"></a>
+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="a00281.html#ga5">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00167.html">auto_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00167.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga6" doxytag="tbb::parallel_for"></a>
+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="a00281.html#ga6">parallel_for</a> (const Range &range, const Body &body, <a class="el" href="a00162.html">affinity_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00162.html">affinity_partitioner</a>. <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="ga7" doxytag="tbb::parallel_reduce"></a>
+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="a00281.html#ga7">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00216.html">simple_partitioner</a> &partitioner=<a class="el" href="a00216.html">simple_partitioner</a>())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00216.html">simple_partitioner</a>, or default partitioner if no partitioner is specified. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga8" doxytag="tbb::parallel_reduce"></a>
+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="a00281.html#ga8">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00167.html">auto_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00167.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga9" doxytag="tbb::parallel_reduce"></a>
+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="a00281.html#ga9">parallel_reduce</a> (const Range &range, Body &body, <a class="el" href="a00162.html">affinity_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00167.html">auto_partitioner</a>. <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="ga10" doxytag="tbb::parallel_scan"></a>
+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="a00281.html#ga10">parallel_scan</a> (const Range &range, Body &body, const <a class="el" href="a00216.html">simple_partitioner</a> &partitioner=<a class="el" href="a00216.html">simple_partitioner</a>())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00216.html">simple_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga11" doxytag="tbb::parallel_scan"></a>
+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="a00281.html#ga11">parallel_scan</a> (const Range &range, Body &body, const <a class="el" href="a00167.html">auto_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00167.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="a00281.html#ga13">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="a00281.html#ga13"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga14" doxytag="tbb::parallel_sort"></a>
+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="a00281.html#ga14">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="ga15" doxytag="tbb::parallel_sort"></a>
+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="a00281.html#ga15">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="a3" doxytag="tbb::spin_rw_mutex"></a>
+typedef <a class="el" href="a00219.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="a4" doxytag="tbb::stack_size_type"></a>
+typedef std::size_t </td><td class="memItemRight" valign="bottom"><b>stack_size_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::task_scheduler_observer"></a>
+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="a6" doxytag="tbb::assertion_handler_type"></a>
+typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="a00278.html#a6">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 class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a7" doxytag="tbb::tbb_thread"></a>
+typedef <a class="el" href="a00234.html">internal::tbb_thread_v3</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00278.html#a7">tbb_thread</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Users reference thread class by name tbb_thread. <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="a00278.html#a37">memory_semantics</a> { <a class="el" href="a00278.html#a37a0">__TBB_full_fence</a>, 
+<a class="el" href="a00278.html#a37a1">acquire</a>, 
+<a class="el" href="a00278.html#a37a2">release</a>
+ }</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Specifies memory fencing.  <a href="#a37">More...</a><br></td></tr>
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a8" doxytag="tbb::operator=="></a>
+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="a00172.html">cache_aligned_allocator</a>< T > &, const <a class="el" href="a00172.html">cache_aligned_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a9" doxytag="tbb::operator!="></a>
+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="a00172.html">cache_aligned_allocator</a>< T > &, const <a class="el" href="a00172.html">cache_aligned_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a10" doxytag="tbb::operator=="></a>
+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="a00174.html">concurrent_hash_map</a>< Key, T, HashCompare, A1 > &a, const <a class="el" href="a00174.html">concurrent_hash_map</a>< Key, T, HashCompare, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a11" doxytag="tbb::operator!="></a>
+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="a00174.html">concurrent_hash_map</a>< Key, T, HashCompare, A1 > &a, const <a class="el" href="a00174.html">concurrent_hash_map</a>< Key, T, HashCompare, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a12" doxytag="tbb::swap"></a>
+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="a00174.html">concurrent_hash_map</a>< Key, T, HashCompare, A > &a, <a class="el" href="a00174.html">concurrent_hash_map</a>< Key, T, HashCompare, A > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a13" doxytag="tbb::operator=="></a>
+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="a00182.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00182.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a14" doxytag="tbb::operator!="></a>
+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="a00182.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00182.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a15" doxytag="tbb::operator<"></a>
+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="a00182.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00182.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a16" doxytag="tbb::operator>"></a>
+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="a00182.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00182.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a17" doxytag="tbb::operator<="></a>
+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="a00182.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00182.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a18" doxytag="tbb::operator>="></a>
+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="a00182.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00182.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a19" doxytag="tbb::swap"></a>
+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="a00182.html">concurrent_vector</a>< T, A > &a, <a class="el" href="a00182.html">concurrent_vector</a>< T, A > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a32" doxytag="tbb::operator=="></a>
+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="a00232.html">tbb_allocator</a>< T > &, const <a class="el" href="a00232.html">tbb_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a33" doxytag="tbb::operator!="></a>
+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="a00232.html">tbb_allocator</a>< T > &, const <a class="el" href="a00232.html">tbb_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a34" doxytag="tbb::swap"></a>
+void </td><td class="memItemRight" valign="bottom"><b>swap</b> (<a class="el" href="a00234.html">internal::tbb_thread_v3</a> &t1, <a class="el" href="a00234.html">internal::tbb_thread_v3</a> &t2)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a35" doxytag="tbb::move"></a>
+void </td><td class="memItemRight" valign="bottom"><b>move</b> (<a class="el" href="a00234.html">tbb_thread</a> &t1, <a class="el" href="a00234.html">tbb_thread</a> &t2)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36" doxytag="tbb::operator-"></a>
+<a class="el" href="a00237.html">tick_count::interval_t</a> </td><td class="memItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="a00236.html">tick_count</a> &t1, const <a class="el" href="a00236.html">tick_count</a> &t0)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+The namespace tbb contains all components of the library. <hr><h2>Enumeration Type Documentation</h2>
+<a class="anchor" name="a37" doxytag="tbb::memory_semantics"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">enum <a class="el" href="a00278.html#a37">memory_semantics</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Specifies memory fencing. 
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" name="a37a0" doxytag="__TBB_full_fence"></a>__TBB_full_fence</em> </td><td>
+For internal use only. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="a37a1" doxytag="acquire"></a>acquire</em> </td><td>
+Acquire fence. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="a37a2" doxytag="release"></a>release</em> </td><td>
+Release fence. </td></tr>
+</table>
+</dl>
+    </td>
+  </tr>
+</table>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00279.html b/doc/html/a00279.html
new file mode 100644
index 0000000..45a8957
--- /dev/null
+++ b/doc/html/a00279.html
@@ -0,0 +1,668 @@
+<!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 Namespace Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb::internal Namespace Reference</h1>INTERNAL  
+<a href="#_details">More...</a>
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::atomic_traits< Size, M ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::atomic_word< Size ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::atomic_base< I ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::atomic_word< 8 ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::atomic_base< uint64_t ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::atomic_base< int64_t ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::atomic_impl< I, D, Step ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">base class of <a class="el" href="a00174.html">concurrent_hash_map</a>  <a href="a00195.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::internal::hash_map_segment_base</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets requirements of a forward iterator for STL */.  <a href="a00196.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Range class used with <a class="el" href="a00174.html">concurrent_hash_map</a>.  <a href="a00197.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00178.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="a00179.html">tbb::internal::concurrent_queue_base_v3::page</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Prefix on a page.  <a href="a00179.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type-independent portion of <a class="el" href="a00180.html">concurrent_queue_iterator</a>.  <a href="a00181.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets requirements of a forward iterator for STL.  <a href="a00180.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Base class of concurrent vector implementation.  <a href="a00183.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::internal::concurrent_vector_base_v3::segment_t</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html">tbb::internal::concurrent_vector_base_v3::internal_segments_table</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Internal structure for compact().  <a href="a00184.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets requirements of a forward iterator for STL and a Value for a <a class="el" href="a00169.html">blocked_range</a>.*/.  <a href="a00238.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::allocator_base< T, A ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00226.html">tbb::internal::strip< T ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Strips its template type argument from 'cv' and '&' qualifiers.  <a href="a00226.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::internal::strip< T & ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::strip< const T & ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::strip< volatile T & ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::strip< const volatile T & ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::strip< const T ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::strip< volatile T ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::strip< const volatile T ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00203.html">tbb::internal::parallel_do_operator_selector< Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00203.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html">tbb::internal::do_iteration_task< Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00186.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::do_iteration_task_iter< Iterator, Body, Item ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00202.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00185.html">tbb::internal::do_group_task_forward< Iterator, Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00185.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::do_group_task_input< Body, Item ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00187.html">tbb::internal::do_task_iter< Iterator, Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00187.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00222.html">tbb::internal::start_for< Range, Body, Partitioner ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type used in parallel_for.  <a href="a00222.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00192.html">tbb::internal::finish_reduce< Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type use to combine the partial results of parallel_reduce.  <a href="a00192.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00223.html">tbb::internal::start_reduce< Range, Body, Partitioner ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type used to split the work of parallel_reduce.  <a href="a00223.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00193.html">tbb::internal::finish_reduce_with_affinity< Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type use to combine the partial results of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a>.  <a href="a00193.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html">tbb::internal::start_reduce_with_affinity< Range, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type used to split the work of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a>.  <a href="a00224.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Performs final scan for a leaf.  <a href="a00191.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Split work to be done in the scan.  <a href="a00227.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Combine partial results.  <a href="a00194.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Initial task to split the work.  <a href="a00225.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="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Range used in quicksort to split elements into subranges based on a value.  <a href="a00213.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="a00212.html">tbb::internal::quick_sort_body< RandomAccessIterator, Compare ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Body class used to sort elements in a range that is smaller than the grainsize.  <a href="a00212.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00241.html">tbb::internal::while_iteration_task< Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00241.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00240.html">tbb::internal::while_group_task< Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00240.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00242.html">tbb::internal::while_task< Stream, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00242.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Defines entry points into tbb run-time library;.  <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="a00205.html">tbb::internal::partition_type_base</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides default methods for partition objects without affinity.  <a href="a00205.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::affinity_partition_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::scheduler</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::allocate_root_proxy</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::allocate_continuation_proxy</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::allocate_child_proxy</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::allocate_additional_child_of_proxy</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html">tbb::internal::task_prefix</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Memory prefix to a task object.  <a href="a00230.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::task_scheduler_observer_v3</b></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::internal::AtomicBackoff</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Class that implements exponential backoff.  <a href="a00166.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::internal::type_with_alignment< N ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::type_with_alignment< 1 ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::type_with_alignment< 2 ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::type_with_alignment< 4 ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::type_with_alignment< 8 ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00200.html">tbb::internal::no_copy</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Base class for types that should not be copied or assigned.  <a href="a00200.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="a00239.html">tbb::internal::version_tag_v3</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::thread_closure_base</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::thread_closure_0< F ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Structure used to pass user function with 1 argument to thread.  <a href="a00235.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::internal::thread_closure_2< F, X, Y ></b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Versioned thread class.  <a href="a00234.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>tbb::internal::tbb_thread_v3::id</b></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="a1" doxytag="tbb::internal::concurrent_queue_base"></a>
+typedef <a class="el" href="a00178.html">concurrent_queue_base_v3</a> </td><td class="memItemRight" valign="bottom"><b>concurrent_queue_base</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="tbb::internal::concurrent_queue_iterator_base"></a>
+typedef <a class="el" href="a00181.html">concurrent_queue_iterator_base_v3</a> </td><td class="memItemRight" valign="bottom"><b>concurrent_queue_iterator_base</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="tbb::internal::concurrent_vector_base"></a>
+typedef <a class="el" href="a00183.html">concurrent_vector_base_v3</a> </td><td class="memItemRight" valign="bottom"><b>concurrent_vector_base</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef char </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a4">reduction_context</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">0 if root, 1 if a left child, 2 if a right child.  <a href="#a4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9" doxytag="tbb::internal::Token"></a>
+typedef unsigned long </td><td class="memItemRight" valign="bottom"><b>Token</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10" doxytag="tbb::internal::tokendiff_t"></a>
+typedef long </td><td class="memItemRight" valign="bottom"><b>tokendiff_t</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="a00279.html#a14">intptr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a11">reference_count</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A reference count.  <a href="#a11"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12" doxytag="tbb::internal::affinity_id"></a>
+typedef unsigned short </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a12">affinity_id</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An id as used for specifying affinity. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a13">uintptr</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An unsigned integral type big enough to hold a pointer.  <a href="#a13"></a><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="a00279.html#a14">intptr</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A signed integral type big enough to hold a pointer.  <a href="#a14"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a15" doxytag="tbb::internal::version_tag"></a>
+typedef <a class="el" href="a00239.html">version_tag_v3</a> </td><td class="memItemRight" valign="bottom"><b>version_tag</b></td></tr>
+
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a16" doxytag="tbb::internal::NFS_GetLineSize"></a>
+size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a16">NFS_GetLineSize</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Cache/sector line size. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a17" doxytag="tbb::internal::NFS_Allocate"></a>
+void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a17">NFS_Allocate</a> (size_t n_element, size_t element_size, void *hint)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate memory on cache/sector line boundary. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a18">NFS_Free</a> (void *)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Free memory allocated by NFS_Allocate.  <a href="#a18"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a19" doxytag="tbb::internal::operator=="></a>
+template<typename Container, 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="a00196.html">hash_map_iterator</a>< Container, T > &i, const <a class="el" href="a00196.html">hash_map_iterator</a>< Container, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a20" doxytag="tbb::internal::operator!="></a>
+template<typename Container, 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="a00196.html">hash_map_iterator</a>< Container, T > &i, const <a class="el" href="a00196.html">hash_map_iterator</a>< Container, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a21" doxytag="tbb::internal::operator=="></a>
+template<typename C, 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="a00180.html">concurrent_queue_iterator</a>< C, T > &i, const <a class="el" href="a00180.html">concurrent_queue_iterator</a>< C, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a22" doxytag="tbb::internal::operator!="></a>
+template<typename C, 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="a00180.html">concurrent_queue_iterator</a>< C, T > &i, const <a class="el" href="a00180.html">concurrent_queue_iterator</a>< C, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a23" doxytag="tbb::internal::operator+"></a>
+template<typename Container, typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00238.html">vector_iterator</a>< Container,<br>
+ T > </td><td class="memTemplItemRight" valign="bottom"><b>operator+</b> (ptrdiff_t offset, const <a class="el" href="a00238.html">vector_iterator</a>< Container, T > &v)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a24" doxytag="tbb::internal::operator=="></a>
+template<typename Container, 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="a00238.html">vector_iterator</a>< Container, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< Container, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a25" doxytag="tbb::internal::operator!="></a>
+template<typename Container, 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="a00238.html">vector_iterator</a>< Container, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< Container, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a26" doxytag="tbb::internal::operator<"></a>
+template<typename Container, 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="a00238.html">vector_iterator</a>< Container, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< Container, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a27" doxytag="tbb::internal::operator>"></a>
+template<typename Container, 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="a00238.html">vector_iterator</a>< Container, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< Container, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a28" doxytag="tbb::internal::operator>="></a>
+template<typename Container, 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="a00238.html">vector_iterator</a>< Container, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< Container, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a29" doxytag="tbb::internal::operator<="></a>
+template<typename Container, 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="a00238.html">vector_iterator</a>< Container, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< Container, U > &j)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a30" doxytag="tbb::internal::operator-"></a>
+template<typename Container, typename T, typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">ptrdiff_t </td><td class="memTemplItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="a00238.html">vector_iterator</a>< Container, T > &i, const <a class="el" href="a00238.html">vector_iterator</a>< Container, U > &j)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a31" doxytag="tbb::internal::handle_perror"></a>
+void </td><td class="memItemRight" valign="bottom"><b>handle_perror</b> (int error_code, const char *what)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2">template<typename Iterator, typename Body, typename Item> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00281.html#ga0">run_parallel_do</a> (Iterator first, Iterator last, const Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00281.html#ga0"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template<typename Iterator, typename Body, typename Item> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00281.html#ga1">select_parallel_do</a> (Iterator first, Iterator last, const Body &body, void(Body::*)(Item) const )</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00281.html#ga1"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template<typename Iterator, typename Body, typename Item, typename _Item> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00281.html#ga2">select_parallel_do</a> (Iterator first, Iterator last, const Body &body, void(Body::*)(Item, <a class="el" href="a00201.html">parallel_do_feeder</a>< _Item > &) const )</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00281.html#ga2"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a35" doxytag="tbb::internal::itt_store_pointer_with_release_v3"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a35">itt_store_pointer_with_release_v3</a> (void *dst, void *src)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">ITT instrumented routine that stores src into location pointed to by dst. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36" doxytag="tbb::internal::itt_load_pointer_with_acquire_v3"></a>
+void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a36">itt_load_pointer_with_acquire_v3</a> (const void *src)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">ITT instrumented routine that loads pointer from location pointed to by src. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a37" doxytag="tbb::internal::parallel_reduce_store_body"></a>
+template<typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_reduce_store_body</b> (T *&dst, T *src)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a38" doxytag="tbb::internal::parallel_reduce_load_body"></a>
+template<typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T * </td><td class="memTemplItemRight" valign="bottom"><b>parallel_reduce_load_body</b> (T *&src)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga12" doxytag="tbb::internal::parallel_quick_sort"></a>
+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="a00281.html#ga12">parallel_quick_sort</a> (RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper method to initiate the sort by calling parallel_for. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a40" doxytag="tbb::internal::get_initial_auto_partitioner_divisor"></a>
+size_t </td><td class="memItemRight" valign="bottom"><b>get_initial_auto_partitioner_divisor</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a41">deallocate_via_handler_v3</a> (void *p)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Deallocates memory using FreeHandler.  <a href="#a41"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a42">allocate_via_handler_v3</a> (size_t n)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocates memory using MallocHandler.  <a href="#a42"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a43" doxytag="tbb::internal::is_malloc_used_v3"></a>
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a43">is_malloc_used_v3</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if standard malloc/free are used to work with memory. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a44" doxytag="tbb::internal::__TBB_MaskedCompareAndSwap"></a>
+template<size_t S, typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">intptr_t </td><td class="memTemplItemRight" valign="bottom"><b>__TBB_MaskedCompareAndSwap</b> (volatile int32_t *ptr, T value, T comparand)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a45" doxytag="tbb::internal::__TBB_CompareAndSwapGeneric"></a>
+template<size_t S, typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>__TBB_CompareAndSwapGeneric</b> (volatile void *ptr, T value, T comparand)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a46" doxytag="tbb::internal::__TBB_CompareAndSwapGeneric< 1, uint8_t >"></a>
+template<> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">uint8_t </td><td class="memTemplItemRight" valign="bottom"><b>__TBB_CompareAndSwapGeneric< 1, uint8_t ></b> (volatile void *ptr, uint8_t value, uint8_t comparand)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a47" doxytag="tbb::internal::__TBB_CompareAndSwapGeneric< 2, uint16_t >"></a>
+template<> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">uint16_t </td><td class="memTemplItemRight" valign="bottom"><b>__TBB_CompareAndSwapGeneric< 2, uint16_t ></b> (volatile void *ptr, uint16_t value, uint16_t comparand)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a48" doxytag="tbb::internal::__TBB_CompareAndSwapGeneric< 4, uint32_t >"></a>
+template<> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">uint32_t </td><td class="memTemplItemRight" valign="bottom"><b>__TBB_CompareAndSwapGeneric< 4, uint32_t ></b> (volatile void *ptr, uint32_t value, uint32_t comparand)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a49" doxytag="tbb::internal::__TBB_CompareAndSwapGeneric< 8, uint64_t >"></a>
+template<> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">uint64_t </td><td class="memTemplItemRight" valign="bottom"><b>__TBB_CompareAndSwapGeneric< 8, uint64_t ></b> (volatile void *ptr, uint64_t value, uint64_t comparand)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a50" doxytag="tbb::internal::__TBB_FetchAndAddGeneric"></a>
+template<size_t S, typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>__TBB_FetchAndAddGeneric</b> (volatile void *ptr, T addend)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a51" doxytag="tbb::internal::__TBB_FetchAndStoreGeneric"></a>
+template<size_t S, typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>__TBB_FetchAndStoreGeneric</b> (volatile void *ptr, T value)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a52" doxytag="tbb::internal::runtime_warning"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a52">runtime_warning</a> (const char *format,...)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Report a runtime warning. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a53" doxytag="tbb::internal::poison_pointer"></a>
+template<typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>poison_pointer</b> (T *)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a54" doxytag="tbb::internal::allocate_closure_v3"></a>
+void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a54">allocate_closure_v3</a> (size_t size)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate a closure. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a55" doxytag="tbb::internal::free_closure_v3"></a>
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a55">free_closure_v3</a> (void *)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Free a closure allocated by allocate_closure_v3. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a56" doxytag="tbb::internal::move_v3"></a>
+void </td><td class="memItemRight" valign="bottom"><b>move_v3</b> (<a class="el" href="a00234.html">tbb_thread_v3</a> &t1, <a class="el" href="a00234.html">tbb_thread_v3</a> &t2)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a57" doxytag="tbb::internal::thread_get_id_v3"></a>
+tbb_thread_v3::id </td><td class="memItemRight" valign="bottom"><b>thread_get_id_v3</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a58" doxytag="tbb::internal::thread_yield_v3"></a>
+void </td><td class="memItemRight" valign="bottom"><b>thread_yield_v3</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a59" doxytag="tbb::internal::thread_sleep_v3"></a>
+void </td><td class="memItemRight" valign="bottom"><b>thread_sleep_v3</b> (const <a class="el" href="a00237.html">tick_count::interval_t</a> &i)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a60" doxytag="tbb::internal::operator=="></a>
+bool </td><td class="memItemRight" valign="bottom"><b>operator==</b> (tbb_thread_v3::id x, tbb_thread_v3::id y)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a61" doxytag="tbb::internal::operator!="></a>
+bool </td><td class="memItemRight" valign="bottom"><b>operator!=</b> (tbb_thread_v3::id x, tbb_thread_v3::id y)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a62" doxytag="tbb::internal::operator<"></a>
+bool </td><td class="memItemRight" valign="bottom"><b>operator<</b> (tbb_thread_v3::id x, tbb_thread_v3::id y)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a63" doxytag="tbb::internal::operator<="></a>
+bool </td><td class="memItemRight" valign="bottom"><b>operator<=</b> (tbb_thread_v3::id x, tbb_thread_v3::id y)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a64" doxytag="tbb::internal::operator>"></a>
+bool </td><td class="memItemRight" valign="bottom"><b>operator></b> (tbb_thread_v3::id x, tbb_thread_v3::id y)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a65" doxytag="tbb::internal::operator>="></a>
+bool </td><td class="memItemRight" valign="bottom"><b>operator>=</b> (tbb_thread_v3::id x, tbb_thread_v3::id y)</td></tr>
+
+<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00279.html#a0">NFS_MaxLineSize</a> = 128</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Compile-time constant that is upper bound on cache line/sector size.  <a href="#a0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="tbb::internal::IS_SERIAL"></a>
+const unsigned char </td><td class="memItemRight" valign="bottom"><b>IS_SERIAL</b> = 0x1</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6" doxytag="tbb::internal::SERIAL_MODE_MASK"></a>
+const unsigned char </td><td class="memItemRight" valign="bottom"><b>SERIAL_MODE_MASK</b> = 0x1</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a7" doxytag="tbb::internal::VERSION_MASK"></a>
+const unsigned char </td><td class="memItemRight" valign="bottom"><b>VERSION_MASK</b> = 0x7<<1</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8" doxytag="tbb::internal::CURRENT_VERSION"></a>
+const unsigned char </td><td class="memItemRight" valign="bottom"><b>CURRENT_VERSION</b> = __TBB_PIPELINE_VERSION(3)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+INTERNAL 
+<p>
+INTERNAL 
+<p>
+<hr><h2>Typedef Documentation</h2>
+<a class="anchor" name="a14" doxytag="tbb::internal::intptr"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">typedef std::ptrdiff_t <a class="el" href="a00279.html#a14">tbb::internal::intptr</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+A signed integral type big enough to hold a pointer. 
+<p>
+There's no guarantee by the C++ standard that a ptrdiff_t is really big enough, but it happens to be for all platforms of interest.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a4" doxytag="tbb::internal::reduction_context"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">typedef char <a class="el" href="a00279.html#a4">tbb::internal::reduction_context</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+0 if root, 1 if a left child, 2 if a right child. 
+<p>
+Represented as a char, not enum, for compactness.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a11" doxytag="tbb::internal::reference_count"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">typedef <a class="el" href="a00279.html#a14">intptr</a> <a class="el" href="a00279.html#a11">tbb::internal::reference_count</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+A reference count. 
+<p>
+Should always be non-negative. A signed type is used so that underflow can be detected.     </td>
+  </tr>
+</table>
+<a class="anchor" name="a13" doxytag="tbb::internal::uintptr"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">typedef size_t <a class="el" href="a00279.html#a13">tbb::internal::uintptr</a>          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+An unsigned integral type big enough to hold a pointer. 
+<p>
+There's no guarantee by the C++ standard that a size_t is really big enough, but it happens to be for all platforms of interest.     </td>
+  </tr>
+</table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="a42" doxytag="tbb::internal::allocate_via_handler_v3"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void* allocate_via_handler_v3           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">size_t </td>
+          <td class="mdname1" valign="top" nowrap> <em>n</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Allocates memory using MallocHandler. 
+<p>
+The function uses scalable_malloc if scalable allocator is available and malloc if not     </td>
+  </tr>
+</table>
+<a class="anchor" name="a41" doxytag="tbb::internal::deallocate_via_handler_v3"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void deallocate_via_handler_v3           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">void * </td>
+          <td class="mdname1" valign="top" nowrap> <em>p</em>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Deallocates memory using FreeHandler. 
+<p>
+The function uses scalable_free if scalable allocator is available and free if not     </td>
+  </tr>
+</table>
+<a class="anchor" name="a18" doxytag="tbb::internal::NFS_Free"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">void NFS_Free           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">void * </td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top"> ) </td>
+          <td class="md" nowrap></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Free memory allocated by NFS_Allocate. 
+<p>
+Freeing a NULL pointer is allowed, but has no effect.     </td>
+  </tr>
+</table>
+<hr><h2>Variable Documentation</h2>
+<a class="anchor" name="a0" doxytag="tbb::internal::NFS_MaxLineSize"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" nowrap valign="top">const size_t <a class="el" href="a00279.html#a0">tbb::internal::NFS_MaxLineSize</a> = 128          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+Compile-time constant that is upper bound on cache line/sector size. 
+<p>
+It should be used only in situations where having a compile-time upper bound is more useful than a run-time exact answer.     </td>
+  </tr>
+</table>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00281.html b/doc/html/a00281.html
new file mode 100644
index 0000000..cc74550
--- /dev/null
+++ b/doc/html/a00281.html
@@ -0,0 +1,407 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<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="a00169.html">tbb::blocked_range< Value ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A range over which to iterate.  <a href="a00169.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html">tbb::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="a00170.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html">tbb::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="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="a00203.html">tbb::internal::parallel_do_operator_selector< Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00203.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html">tbb::internal::do_iteration_task< Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00186.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00202.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00185.html">tbb::internal::do_group_task_forward< Iterator, Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00185.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00187.html">tbb::internal::do_task_iter< Iterator, Body, Item ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00187.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00222.html">tbb::internal::start_for< Range, Body, Partitioner ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type used in parallel_for.  <a href="a00222.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00192.html">tbb::internal::finish_reduce< Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type use to combine the partial results of parallel_reduce.  <a href="a00192.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00223.html">tbb::internal::start_reduce< Range, Body, Partitioner ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type used to split the work of parallel_reduce.  <a href="a00223.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00193.html">tbb::internal::finish_reduce_with_affinity< Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type use to combine the partial results of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a>.  <a href="a00193.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html">tbb::internal::start_reduce_with_affinity< Range, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Task type used to split the work of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a>.  <a href="a00224.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="a00207.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="a00207.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="a00190.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="a00190.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Performs final scan for a leaf.  <a href="a00191.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Split work to be done in the scan.  <a href="a00227.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Combine partial results.  <a href="a00194.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Initial task to split the work.  <a href="a00225.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="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Range used in quicksort to split elements into subranges based on a value.  <a href="a00213.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="a00212.html">tbb::internal::quick_sort_body< RandomAccessIterator, Compare ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Body class used to sort elements in a range that is smaller than the grainsize.  <a href="a00212.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00241.html">tbb::internal::while_iteration_task< Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00241.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00240.html">tbb::internal::while_group_task< Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00240.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00242.html">tbb::internal::while_task< Stream, Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="a00242.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00204.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="a00204.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00216.html">tbb::simple_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A simple partitioner  <a href="a00216.html#_details">More...</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::auto_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An auto partitioner.  <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="a00189.html">tbb::filter</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline.  <a href="a00189.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00206.html">tbb::pipeline</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A processing pipeling that applies filters to items.  <a href="a00206.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00221.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="a00221.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="ga3" doxytag="algorithms::parallel_do"></a>
+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="a00281.html#ga3">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 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="ga4" doxytag="algorithms::parallel_for"></a>
+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="a00281.html#ga4">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="ga5" doxytag="algorithms::parallel_for"></a>
+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="a00281.html#ga5">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="a00167.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga6" doxytag="algorithms::parallel_for"></a>
+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="a00281.html#ga6">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="a00162.html">affinity_partitioner</a>. <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="ga7" doxytag="algorithms::parallel_reduce"></a>
+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="a00281.html#ga7">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="a00216.html">simple_partitioner</a>, or default partitioner if no partitioner is specified. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga8" doxytag="algorithms::parallel_reduce"></a>
+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="a00281.html#ga8">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="a00167.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga9" doxytag="algorithms::parallel_reduce"></a>
+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="a00281.html#ga9">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="a00167.html">auto_partitioner</a>. <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="ga10" doxytag="algorithms::parallel_scan"></a>
+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="a00281.html#ga10">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="a00216.html">simple_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga11" doxytag="algorithms::parallel_scan"></a>
+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="a00281.html#ga11">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="a00167.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="a00281.html#ga13">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="#ga13"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga14" doxytag="algorithms::parallel_sort"></a>
+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="a00281.html#ga14">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="ga15" doxytag="algorithms::parallel_sort"></a>
+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="a00281.html#ga15">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>
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template<typename Iterator, typename Body, typename Item> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00281.html#ga0">tbb::internal::run_parallel_do</a> (Iterator first, Iterator last, const Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="#ga0"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template<typename Iterator, typename Body, typename Item> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00281.html#ga1">tbb::internal::select_parallel_do</a> (Iterator first, Iterator last, const Body &body, void(Body::*)(Item) const )</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="#ga1"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template<typename Iterator, typename Body, typename Item, typename _Item> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00281.html#ga2">tbb::internal::select_parallel_do</a> (Iterator first, Iterator last, const Body &body, void(Body::*)(Item, parallel_do_feeder< _Item > &) const )</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only.  <a href="#ga2"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga12" doxytag="algorithms::parallel_quick_sort"></a>
+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="a00281.html#ga12">tbb::internal::parallel_quick_sort</a> (RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper method to initiate the sort by calling parallel_for. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+containers Containers  memory_allocation Memory Allocation  synchronization Synchronization  timing Timing  task_scheduling Task Scheduling <hr><h2>Function Documentation</h2>
+<a class="anchor" name="ga13" doxytag="tbb::parallel_sort"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename RandomAccessIterator, typename Compare> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">void parallel_sort           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">RandomAccessIterator </td>
+          <td class="mdname" nowrap> <em>begin</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>RandomAccessIterator </td>
+          <td class="mdname" nowrap> <em>end</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const Compare & </td>
+          <td class="mdname" nowrap> <em>comp</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<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.     </td>
+  </tr>
+</table>
+<a class="anchor" name="ga0" doxytag="tbb::internal::run_parallel_do"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Iterator, typename Body, typename Item> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">void run_parallel_do           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">Iterator </td>
+          <td class="mdname" nowrap> <em>first</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>Iterator </td>
+          <td class="mdname" nowrap> <em>last</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const Body & </td>
+          <td class="mdname" nowrap> <em>body</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+For internal use only. 
+<p>
+Implements parallel iteration over a range.     </td>
+  </tr>
+</table>
+<a class="anchor" name="ga2" doxytag="tbb::internal::select_parallel_do"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Iterator, typename Body, typename Item, typename _Item> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">void select_parallel_do           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">Iterator </td>
+          <td class="mdname" nowrap> <em>first</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>Iterator </td>
+          <td class="mdname" nowrap> <em>last</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const Body & </td>
+          <td class="mdname" nowrap> <em>body</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void(Body::*)(Item, parallel_do_feeder< _Item > &) </td>
+          <td class="mdname" nowrap> <em>const</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+For internal use only. 
+<p>
+Detects types of Body's operator function arguments.     </td>
+  </tr>
+</table>
+<a class="anchor" name="ga1" doxytag="tbb::internal::select_parallel_do"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+  <tr>
+    <td class="mdRow">
+      <table cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td class="md" colspan="4">
+template<typename Iterator, typename Body, typename Item> </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap valign="top">void select_parallel_do           </td>
+          <td class="md" valign="top">( </td>
+          <td class="md" nowrap valign="top">Iterator </td>
+          <td class="mdname" nowrap> <em>first</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>Iterator </td>
+          <td class="mdname" nowrap> <em>last</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>const Body & </td>
+          <td class="mdname" nowrap> <em>body</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void(Body::*)(Item) </td>
+          <td class="mdname" nowrap> <em>const</em></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">) </td>
+          <td class="md" colspan="2"></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+  <tr>
+    <td>
+       
+    </td>
+    <td>
+
+<p>
+For internal use only. 
+<p>
+Detects types of Body's operator function arguments.     </td>
+  </tr>
+</table>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/a00282.html b/doc/html/a00282.html
new file mode 100644
index 0000000..111a47a
--- /dev/null
+++ b/doc/html/a00282.html
@@ -0,0 +1,92 @@
+<!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_windef.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>_tbb_windef.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_tbb_windef_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#error Do not #include this file directly.  Use "#include tbb/tbb_stddef.h" instead.</span>
+00023 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_windef_H */</span>
+00024 
+00025 <span class="comment">// Check that the target Windows version has all API calls requried for TBB.</span>
+00026 <span class="comment">// Do not increase the version in condition beyond 0x0500 without prior discussion!</span>
+00027 <span class="preprocessor">#if defined(_WIN32_WINNT) && _WIN32_WINNT<0x0400</span>
+00028 <span class="preprocessor"></span><span class="preprocessor">#error TBB is unable to run on old Windows versions; _WIN32_WINNT must be 0x0400 or greater.</span>
+00029 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00030 <span class="preprocessor"></span>
+00031 <span class="preprocessor">#if !defined(_MT)</span>
+00032 <span class="preprocessor"></span><span class="preprocessor">#error TBB requires linkage with multithreaded C/C++ runtime library. \</span>
+00033 <span class="preprocessor">       Choose multithreaded DLL runtime in project settings, or use /MD[d] compiler switch.</span>
+00034 <span class="preprocessor"></span><span class="preprocessor">#elif !defined(_DLL)</span>
+00035 <span class="preprocessor"></span><span class="preprocessor">#pragma message("Warning: Using TBB together with static C/C++ runtime library is not recommended. " \</span>
+00036 <span class="preprocessor">                "Consider switching your project to multithreaded DLL runtime used by TBB.")</span>
+00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00038 <span class="preprocessor"></span>
+00039 <span class="comment">// Workaround for the problem with MVSC headers failing to define namespace std</span>
+00040 <span class="keyword">namespace </span>std {
+00041   using ::size_t; using ::ptrdiff_t;
+00042 }
+00043 
+00044 <span class="preprocessor">#define __TBB_STRING_AUX(x) #x</span>
+00045 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_STRING(x) __TBB_STRING_AUX(x)</span>
+00046 <span class="preprocessor"></span>
+00047 <span class="comment">// Default setting of TBB_DO_ASSERT</span>
+00048 <span class="preprocessor">#ifdef TBB_DO_ASSERT</span>
+00049 <span class="preprocessor"></span><span class="preprocessor">#    if TBB_DO_ASSERT </span>
+00050 <span class="preprocessor"></span><span class="preprocessor">#        if !defined(_DEBUG)</span>
+00051 <span class="preprocessor"></span><span class="preprocessor">#            pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warning: Recommend using /MDd if compiling with TBB_DO_ASSERT!=0")</span>
+00052 <span class="preprocessor"></span><span class="preprocessor">#        endif</span>
+00053 <span class="preprocessor"></span><span class="preprocessor">#    else</span>
+00054 <span class="preprocessor"></span><span class="preprocessor">#        if defined(_DEBUG)</span>
+00055 <span class="preprocessor"></span><span class="preprocessor">#            pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warning: Recommend using /MD if compiling with TBB_DO_ASSERT==0")</span>
+00056 <span class="preprocessor"></span><span class="preprocessor">#        endif</span>
+00057 <span class="preprocessor"></span><span class="preprocessor">#    endif</span>
+00058 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+00059 <span class="preprocessor"></span><span class="preprocessor">#    ifdef _DEBUG</span>
+00060 <span class="preprocessor"></span><span class="preprocessor">#        define TBB_DO_ASSERT 1</span>
+00061 <span class="preprocessor"></span><span class="preprocessor">#    endif</span>
+00062 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+00063 <span class="preprocessor"></span>
+00064 <span class="preprocessor">#if __TBB_BUILD && !defined(__TBB_NO_IMPLICIT_LINKAGE)</span>
+00065 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NO_IMPLICIT_LINKAGE 1</span>
+00066 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00067 <span class="preprocessor"></span>
+00068 <span class="preprocessor">#if _MSC_VER</span>
+00069 <span class="preprocessor"></span><span class="preprocessor">    #if !__TBB_NO_IMPLICIT_LINKAGE</span>
+00070 <span class="preprocessor"></span><span class="preprocessor">        #ifdef _DEBUG</span>
+00071 <span class="preprocessor"></span><span class="preprocessor">            #pragma comment(lib, "tbb_debug.lib")</span>
+00072 <span class="preprocessor"></span><span class="preprocessor">        #else</span>
+00073 <span class="preprocessor"></span><span class="preprocessor">            #pragma comment(lib, "tbb.lib")</span>
+00074 <span class="preprocessor"></span><span class="preprocessor">        #endif</span>
+00075 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+00076 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00283.html b/doc/html/a00283.html
new file mode 100644
index 0000000..23b7f23
--- /dev/null
+++ b/doc/html/a00283.html
@@ -0,0 +1,59 @@
+<!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>aligned_space.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>aligned_space.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_aligned_space_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_aligned_space_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 <span class="preprocessor">#include "tbb_machine.h"</span>
+00026 
+<a name="l00027"></a><a class="code" href="a00278.html">00027</a> <span class="keyword">namespace </span>tbb {
+00028 
+00030 
+00032 <span class="keyword">template</span><<span class="keyword">typename</span> T,size_t N>
+<a name="l00033"></a><a class="code" href="a00164.html">00033</a> <span class="keyword">class </span><a class="code" href="a00164.html">aligned_space</a> {
+00034 <span class="keyword">private</span>:
+00035     <span class="keyword">typedef</span> __TBB_TypeWithAlignmentAtLeastAsStrict(T) element_type;
+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)];
+00037 <span class="keyword">public</span>:
+<a name="l00039"></a><a class="code" href="a00164.html#a0">00039</a>     T* begin() {<span class="keywordflow">return</span> reinterpret_cast<T*>(<span class="keyword">this</span>);}
+00040 
+<a name="l00042"></a><a class="code" href="a00164.html#a1">00042</a>     T* end() {<span class="keywordflow">return</span> begin()+N;}
+00043 };
+00044 
+00045 } <span class="comment">// namespace tbb </span>
+00046 
+00047 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_aligned_space_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00284.html b/doc/html/a00284.html
new file mode 100644
index 0000000..1916f40
--- /dev/null
+++ b/doc/html/a00284.html
@@ -0,0 +1,429 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>atomic.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_atomic_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_atomic_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include <cstddef></span>
+00025 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00026 
+00027 <span class="preprocessor">#if _MSC_VER </span>
+00028 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_LONG_LONG __int64</span>
+00029 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+00030 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_LONG_LONG long long</span>
+00031 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER */</span>
+00032 
+00033 <span class="preprocessor">#include "tbb_machine.h"</span>
+00034 
+00035 <span class="preprocessor">#if defined(_MSC_VER) && defined(_Wp64)</span>
+00036 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warnings in /Wp64 mode</span>
+00037 <span class="preprocessor">    #pragma warning (push)</span>
+00038 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4244 4267)</span>
+00039 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER && _Wp64 */</span>
+00040 
+00041 <span class="keyword">namespace </span>tbb {
+00042 
+<a name="l00044"></a><a class="code" href="a00278.html#a37">00044</a> <span class="keyword">enum</span> <a class="code" href="a00278.html#a37">memory_semantics</a> {
+00046     __TBB_full_fence,
+00048     acquire,
+00050     <a class="code" href="a00278.html#a37a2">release</a>
+00051 };
+00052 
+<a name="l00054"></a><a class="code" href="a00279.html">00054</a> <span class="keyword">namespace </span>internal {
+00055 
+00056 <span class="keyword">template</span><size_t Size, memory_semantics M>
+00057 <span class="keyword">struct </span>atomic_traits {       <span class="comment">// Primary template</span>
+00058 };
+00059 
+00060 <span class="keyword">template</span><size_t Size>
+00061 <span class="keyword">struct </span>atomic_word {             <span class="comment">// Primary template</span>
+00062     <span class="keyword">typedef</span> <a class="code" href="a00279.html#a14">intptr</a> word;
+00063 };
+00064 
+00065 <span class="keyword">template</span><<span class="keyword">typename</span> I>            <span class="comment">// Primary template</span>
+00066 <span class="keyword">struct </span>atomic_base {
+00067     I my_value;
+00068 };
+00069 
+00070 <span class="preprocessor">#if __GNUC__ || __SUNPRO_CC</span>
+00071 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_DECL_ATOMIC_FIELD(t,f,a) t f  __attribute__ ((aligned(a)));</span>
+00072 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__INTEL_COMPILER)||_MSC_VER >= 1300</span>
+00073 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_DECL_ATOMIC_FIELD(t,f,a) __declspec(align(a)) t f;</span>
+00074 <span class="preprocessor"></span><span class="preprocessor">#else </span>
+00075 <span class="preprocessor"></span><span class="preprocessor">#error Do not know syntax for forcing alignment.</span>
+00076 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
+00077 
+00078 <span class="keyword">template</span><>
+00079 <span class="keyword">struct </span>atomic_word<8> {          <span class="comment">// Specialization</span>
+00080     <span class="keyword">typedef</span> int64_t word;
+00081 };
+00082 
+00083 <span class="preprocessor">#if _WIN32 && __TBB_x86_64</span>
+00084 <span class="preprocessor"></span><span class="comment">// ATTENTION: On 64-bit Windows, we currently have to specialize atomic_word</span>
+00085 <span class="comment">// for every size to avoid type conversion warnings</span>
+00086 <span class="comment">// See declarations of atomic primitives in machine/windows_em64t.h</span>
+00087 <span class="keyword">template</span><>
+00088 <span class="keyword">struct </span>atomic_word<1> {          <span class="comment">// Specialization</span>
+00089     <span class="keyword">typedef</span> int8_t word;
+00090 };
+00091 <span class="keyword">template</span><>
+00092 <span class="keyword">struct </span>atomic_word<2> {          <span class="comment">// Specialization</span>
+00093     <span class="keyword">typedef</span> int16_t word;
+00094 };
+00095 <span class="keyword">template</span><>
+00096 <span class="keyword">struct </span>atomic_word<4> {          <span class="comment">// Specialization</span>
+00097     <span class="keyword">typedef</span> int32_t word;
+00098 };
+00099 <span class="preprocessor">#endif</span>
+00100 <span class="preprocessor"></span>
+00101 <span class="keyword">template</span><>
+00102 <span class="keyword">struct </span>atomic_base<uint64_t> {   <span class="comment">// Specialization</span>
+00103     __TBB_DECL_ATOMIC_FIELD(uint64_t,my_value,8)
+00104 };
+00105 
+00106 <span class="keyword">template</span><>
+00107 <span class="keyword">struct </span>atomic_base<int64_t> {    <span class="comment">// Specialization</span>
+00108     __TBB_DECL_ATOMIC_FIELD(int64_t,my_value,8)
+00109 };
+00110 
+00111 <span class="preprocessor">#define __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(S,M)                         \</span>
+00112 <span class="preprocessor">    template<> struct atomic_traits<S,M> {                               \</span>
+00113 <span class="preprocessor">        typedef atomic_word<S>::word word;                               \</span>
+00114 <span class="preprocessor">        inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\</span>
+00115 <span class="preprocessor">            return __TBB_CompareAndSwap##S##M(location,new_value,comparand);    \</span>
+00116 <span class="preprocessor">        }                                                                       \</span>
+00117 <span class="preprocessor">        inline static word fetch_and_add( volatile void* location, word addend ) { \</span>
+00118 <span class="preprocessor">            return __TBB_FetchAndAdd##S##M(location,addend);                    \</span>
+00119 <span class="preprocessor">        }                                                                       \</span>
+00120 <span class="preprocessor">        inline static word fetch_and_store( volatile void* location, word value ) {\</span>
+00121 <span class="preprocessor">            return __TBB_FetchAndStore##S##M(location,value);                   \</span>
+00122 <span class="preprocessor">        }                                                                       \</span>
+00123 <span class="preprocessor">    };</span>
+00124 <span class="preprocessor"></span>
+00125 <span class="preprocessor">#define __TBB_DECL_ATOMIC_PRIMITIVES(S)                                  \</span>
+00126 <span class="preprocessor">    template<memory_semantics M>                                         \</span>
+00127 <span class="preprocessor">    struct atomic_traits<S,M> {                                          \</span>
+00128 <span class="preprocessor">        typedef atomic_word<S>::word word;                               \</span>
+00129 <span class="preprocessor">        inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\</span>
+00130 <span class="preprocessor">            return __TBB_CompareAndSwap##S(location,new_value,comparand);       \</span>
+00131 <span class="preprocessor">        }                                                                       \</span>
+00132 <span class="preprocessor">        inline static word fetch_and_add( volatile void* location, word addend ) { \</span>
+00133 <span class="preprocessor">            return __TBB_FetchAndAdd##S(location,addend);                       \</span>
+00134 <span class="preprocessor">        }                                                                       \</span>
+00135 <span class="preprocessor">        inline static word fetch_and_store( volatile void* location, word value ) {\</span>
+00136 <span class="preprocessor">            return __TBB_FetchAndStore##S(location,value);                      \</span>
+00137 <span class="preprocessor">        }                                                                       \</span>
+00138 <span class="preprocessor">    };</span>
+00139 <span class="preprocessor"></span>
+00140 <span class="preprocessor">#if __TBB_DECL_FENCED_ATOMICS</span>
+00141 <span class="preprocessor"></span>__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00278.html#a37a0">__TBB_full_fence</a>)
+00142 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00278.html#a37a0">__TBB_full_fence</a>)
+00143 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00278.html#a37a0">__TBB_full_fence</a>)
+00144 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00278.html#a37a0">__TBB_full_fence</a>)
+00145 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00278.html#a37a1">acquire</a>)
+00146 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00278.html#a37a1">acquire</a>)
+00147 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00278.html#a37a1">acquire</a>)
+00148 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00278.html#a37a1">acquire</a>)
+00149 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00278.html#a37a2">release</a>)
+00150 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00278.html#a37a2">release</a>)
+00151 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00278.html#a37a2">release</a>)
+00152 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00278.html#a37a2">release</a>)
+00153 #<span class="keywordflow">else</span>
+00154 __TBB_DECL_ATOMIC_PRIMITIVES(1)
+00155 __TBB_DECL_ATOMIC_PRIMITIVES(2)
+00156 __TBB_DECL_ATOMIC_PRIMITIVES(4)
+00157 __TBB_DECL_ATOMIC_PRIMITIVES(8)
+00158 #endif
+00159 
+00161 
+00163 <span class="preprocessor">#define __TBB_MINUS_ONE(T) (T(T(0)-T(1)))</span>
+00164 <span class="preprocessor"></span>
+00165 <span class="keyword">template</span><<span class="keyword">typename</span> I, <span class="keyword">typename</span> D, size_t Step>
+00166 <span class="keyword">struct </span>atomic_impl: <span class="keyword">private</span> atomic_base<I> {
+00167 <span class="keyword">private</span>:
+00168     <span class="keyword">typedef</span> <span class="keyword">typename</span> atomic_word<sizeof(I)>::word word;
+00169 <span class="keyword">public</span>:
+00170     <span class="keyword">typedef</span> I value_type;
+00171 
+00172     <span class="keyword">template</span><memory_semantics M>
+00173     value_type fetch_and_add( D addend ) {
+00174         <span class="keywordflow">return</span> value_type(internal::atomic_traits<sizeof(value_type),M>::fetch_and_add( &this->my_value, addend*Step ));
+00175     }
+00176 
+00177     value_type fetch_and_add( D addend ) {
+00178         <span class="keywordflow">return</span> fetch_and_add<__TBB_full_fence>(addend);
+00179     }
+00180 
+00181     <span class="keyword">template</span><memory_semantics M>
+00182     value_type fetch_and_increment() {
+00183         <span class="keywordflow">return</span> fetch_and_add<M>(1);
+00184     }
+00185 
+00186     value_type fetch_and_increment() {
+00187         <span class="keywordflow">return</span> fetch_and_add(1);
+00188     }
+00189 
+00190     <span class="keyword">template</span><memory_semantics M>
+00191     value_type fetch_and_decrement() {
+00192         <span class="keywordflow">return</span> fetch_and_add<M>(__TBB_MINUS_ONE(D));
+00193     }
+00194 
+00195     value_type fetch_and_decrement() {
+00196         <span class="keywordflow">return</span> fetch_and_add(__TBB_MINUS_ONE(D));
+00197     }
+00198 
+00199     <span class="keyword">template</span><memory_semantics M>
+00200     value_type fetch_and_store( value_type value ) {
+00201         <span class="keywordflow">return</span> value_type(internal::atomic_traits<sizeof(value_type),M>::fetch_and_store(&this->my_value,word(value)));
+00202     }
+00203 
+00204     value_type fetch_and_store( value_type value ) {
+00205         <span class="keywordflow">return</span> fetch_and_store<__TBB_full_fence>(value);
+00206     }
+00207 
+00208     <span class="keyword">template</span><memory_semantics M>
+00209     value_type compare_and_swap( value_type value, value_type comparand ) {
+00210         <span class="keywordflow">return</span> value_type(internal::atomic_traits<sizeof(value_type),M>::compare_and_swap(&this->my_value,word(value),word(comparand)));
+00211     }
+00212 
+00213     value_type compare_and_swap( value_type value, value_type comparand ) {
+00214         <span class="keywordflow">return</span> compare_and_swap<__TBB_full_fence>(value,comparand);
+00215     }
+00216 
+00217     operator value_type()<span class="keyword"> const volatile </span>{                <span class="comment">// volatile qualifier here for backwards compatibility </span>
+00218         <span class="keywordflow">return</span> __TBB_load_with_acquire( this->my_value );
+00219     }
+00220 
+00221     value_type& _internal_reference()<span class="keyword"> const </span>{
+00222         <span class="keywordflow">return</span> static_cast<value_type&>(this->my_value);
+00223     }
+00224 
+00225 <span class="keyword">protected</span>:
+00226     value_type store_with_release( value_type rhs ) {
+00227         __TBB_store_with_release(this->my_value,rhs);
+00228         <span class="keywordflow">return</span> rhs;
+00229     }
+00230 
+00231 <span class="keyword">public</span>:
+00232     value_type operator+=( D addend ) {
+00233         <span class="keywordflow">return</span> fetch_and_add(addend)+addend;
+00234     }
+00235 
+00236     value_type operator-=( D addend ) {
+00237         <span class="comment">// Additive inverse of addend computed using binary minus,</span>
+00238         <span class="comment">// instead of unary minus, for sake of avoiding compiler warnings.</span>
+00239         <span class="keywordflow">return</span> operator+=(D(0)-addend);    
+00240     }
+00241 
+00242     value_type operator++() {
+00243         <span class="keywordflow">return</span> fetch_and_add(1)+1;
+00244     }
+00245 
+00246     value_type operator--() {
+00247         <span class="keywordflow">return</span> fetch_and_add(__TBB_MINUS_ONE(D))-1;
+00248     }
+00249 
+00250     value_type operator++(<span class="keywordtype">int</span>) {
+00251         <span class="keywordflow">return</span> fetch_and_add(1);
+00252     }
+00253 
+00254     value_type operator--(<span class="keywordtype">int</span>) {
+00255         <span class="keywordflow">return</span> fetch_and_add(__TBB_MINUS_ONE(D));
+00256     }
+00257 };
+00258 
+00259 <span class="preprocessor">#if __TBB_WORDSIZE == 4</span>
+00260 <span class="preprocessor"></span><span class="comment">// Plaforms with 32-bit hardware require special effort for 64-bit loads and stores.</span>
+00261 <span class="preprocessor">#if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400</span>
+00262 <span class="preprocessor"></span>
+00263 <span class="keyword">template</span><>
+00264 <span class="keyword">inline</span> atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,1>::operator atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,1>::value_type()<span class="keyword"> const volatile </span>{
+00265     <span class="keywordflow">return</span> __TBB_Load8(&this->my_value);
+00266 }
+00267 
+00268 <span class="keyword">template</span><>
+00269 <span class="keyword">inline</span> atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,1>::operator atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,1>::value_type()<span class="keyword"> const volatile </span>{
+00270     <span class="keywordflow">return</span> __TBB_Load8(&this->my_value);
+00271 }
+00272 
+00273 <span class="keyword">template</span><>
+00274 <span class="keyword">inline</span> atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,1>::value_type atomic_impl<__TBB_LONG_LONG,__TBB_LONG_LONG,1>::store_with_release( value_type rhs ) {
+00275     __TBB_Store8(&this->my_value,rhs);
+00276     <span class="keywordflow">return</span> rhs;
+00277 }
+00278 
+00279 <span class="keyword">template</span><>
+00280 <span class="keyword">inline</span> atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,1>::value_type atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,1>::store_with_release( value_type rhs ) {
+00281     __TBB_Store8(&this->my_value,rhs);
+00282     <span class="keywordflow">return</span> rhs;
+00283 }
+00284 
+00285 <span class="preprocessor">#endif </span><span class="comment">/* defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */</span>
+00286 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_WORDSIZE==4 */</span>
+00287 
+00288 } <span class="comment">/* Internal */</span>
+00290 
+00292 
+00294 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00295"></a><a class="code" href="a00165.html">00295</a> <span class="keyword">struct </span><a class="code" href="a00165.html">atomic</a> {
+00296 };
+00297 
+00298 <span class="preprocessor">#define __TBB_DECL_ATOMIC(T) \</span>
+00299 <span class="preprocessor">    template<> struct atomic<T>: internal::atomic_impl<T,T,1> {  \</span>
+00300 <span class="preprocessor">        T operator=( T rhs ) {return store_with_release(rhs);}  \</span>
+00301 <span class="preprocessor">        atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;}  \</span>
+00302 <span class="preprocessor">    };</span>
+00303 <span class="preprocessor"></span>
+00304 <span class="preprocessor">#if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400</span>
+00305 <span class="preprocessor"></span>__TBB_DECL_ATOMIC(__TBB_LONG_LONG)
+00306 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> __TBB_LONG_LONG)
+00307 #else
+00308 <span class="comment">// Some old versions of MVSC cannot correctly compile templates with "long long".</span>
+00309 #endif <span class="comment">/* defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */</span>
+00310 __TBB_DECL_ATOMIC(<span class="keywordtype">long</span>)
+00311 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)
+00312 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)
+00313 __TBB_DECL_ATOMIC(<span class="keywordtype">int</span>)
+00314 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>)
+00315 __TBB_DECL_ATOMIC(<span class="keywordtype">short</span>)
+00316 __TBB_DECL_ATOMIC(<span class="keywordtype">char</span>)
+00317 __TBB_DECL_ATOMIC(<span class="keywordtype">signed</span> <span class="keywordtype">char</span>)
+00318 __TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)
+00319 
+00320 #if !defined(_MSC_VER)||defined(_NATIVE_WCHAR_T_DEFINED) 
+00321 __TBB_DECL_ATOMIC(<span class="keywordtype">wchar_t</span>)
+00322 #endif <span class="comment">/* _MSC_VER||!defined(_NATIVE_WCHAR_T_DEFINED) */</span>
+00323 
+00324 template<typename T> struct <a class="code" href="a00165.html">atomic</a><T*>: internal::atomic_impl<T*,ptrdiff_t,sizeof(T)> {
+00325     T* operator=( T* rhs ) {
+00326         <span class="comment">// "this" required here in strict ISO C++ because store_with_release is a dependent name</span>
+00327         <span class="keywordflow">return</span> this->store_with_release(rhs);
+00328     }
+00329     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>;}
+00330     T* operator->()<span class="keyword"> const </span>{
+00331         <span class="keywordflow">return</span> (*this);
+00332     }
+00333 };
+00334 
+00335 <span class="keyword">template</span><>
+00336 <span class="keyword">struct </span>atomic<void*> {
+00337 <span class="keyword">private</span>:
+00338     <span class="keywordtype">void</span>* my_value;
+00339 
+00340 <span class="keyword">public</span>:
+00341     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* value_type;
+00342 
+00343     <span class="keyword">template</span><memory_semantics M>
+00344     value_type compare_and_swap( value_type value, value_type comparand ) {
+00345         <span class="keywordflow">return</span> value_type(internal::atomic_traits<sizeof(value_type),M>::compare_and_swap(&my_value,internal::intptr(value),internal::intptr(comparand)));
+00346     }
+00347 
+00348     value_type compare_and_swap( value_type value, value_type comparand ) {
+00349         <span class="keywordflow">return</span> compare_and_swap<__TBB_full_fence>(value,comparand);
+00350     }
+00351 
+00352     <span class="keyword">template</span><memory_semantics M>
+00353     value_type fetch_and_store( value_type value ) {
+00354         <span class="keywordflow">return</span> value_type(internal::atomic_traits<sizeof(value_type),M>::fetch_and_store(&my_value,internal::intptr(value)));
+00355     }
+00356 
+00357     value_type fetch_and_store( value_type value ) {
+00358         <span class="keywordflow">return</span> fetch_and_store<__TBB_full_fence>(value);
+00359     }
+00360 
+00361     operator value_type()<span class="keyword"> const </span>{
+00362         <span class="keywordflow">return</span> __TBB_load_with_acquire(my_value);
+00363     }
+00364 
+00365     value_type operator=( value_type rhs ) {
+00366         __TBB_store_with_release(my_value,rhs);
+00367         <span class="keywordflow">return</span> rhs;
+00368     }
+00369 
+00370     atomic<void*>& operator=( <span class="keyword">const</span> atomic<void*>& rhs ) {
+00371         __TBB_store_with_release(my_value,rhs);
+00372         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00373     }
+00374 };
+00375 
+00376 <span class="keyword">template</span><>
+00377 <span class="keyword">struct </span>atomic<bool> {
+00378 <span class="keyword">private</span>:
+00379     <span class="keywordtype">bool</span> my_value;
+00380     <span class="keyword">typedef</span> internal::atomic_word<sizeof(bool)>::word word;
+00381 <span class="keyword">public</span>:
+00382     <span class="keyword">typedef</span> <span class="keywordtype">bool</span> value_type;
+00383     <span class="keyword">template</span><memory_semantics M>
+00384     value_type compare_and_swap( value_type value, value_type comparand ) {
+00385         <span class="keywordflow">return</span> internal::atomic_traits<sizeof(value_type),M>::compare_and_swap(&my_value,word(value),word(comparand))!=0;
+00386     }
+00387 
+00388     value_type compare_and_swap( value_type value, value_type comparand ) {
+00389         <span class="keywordflow">return</span> compare_and_swap<__TBB_full_fence>(value,comparand);
+00390     }
+00391 
+00392     <span class="keyword">template</span><memory_semantics M>
+00393     value_type fetch_and_store( value_type value ) {
+00394         <span class="keywordflow">return</span> internal::atomic_traits<sizeof(value_type),M>::fetch_and_store(&my_value,word(value))!=0;
+00395     }
+00396 
+00397     value_type fetch_and_store( value_type value ) {
+00398         <span class="keywordflow">return</span> fetch_and_store<__TBB_full_fence>(value);
+00399     }
+00400 
+00401     operator value_type()<span class="keyword"> const </span>{
+00402         <span class="keywordflow">return</span> __TBB_load_with_acquire(my_value);
+00403     }
+00404 
+00405     value_type operator=( value_type rhs ) {
+00406         __TBB_store_with_release(my_value,rhs);
+00407         <span class="keywordflow">return</span> rhs;
+00408     }
+00409 
+00410     atomic<bool>& operator=( <span class="keyword">const</span> atomic<bool>& rhs ) {
+00411         __TBB_store_with_release(my_value,rhs);
+00412         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00413     }
+00414 };
+00415 
+00416 } <span class="comment">// namespace tbb</span>
+00417 
+00418 <span class="preprocessor">#if defined(_MSC_VER) && defined(_Wp64)</span>
+00419 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warnings in /Wp64 mode</span>
+00420 <span class="preprocessor">    #pragma warning (pop)</span>
+00421 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER && _Wp64 */</span>
+00422 
+00423 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_atomic_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00285.html
new file mode 100644
index 0000000..68e09da
--- /dev/null
+++ b/doc/html/a00285.html
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>blocked_range.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>blocked_range.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_blocked_range_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_blocked_range_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 
+00026 <span class="keyword">namespace </span>tbb {
+00027 
+00037 
+00038 
+00039 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
+<a name="l00040"></a><a class="code" href="a00169.html">00040</a> <span class="keyword">class </span><a class="code" href="a00169.html">blocked_range</a> {
+00041 <span class="keyword">public</span>:
+00043 
+<a name="l00045"></a><a class="code" href="a00169.html#w0">00045</a>     <span class="keyword">typedef</span> Value <a class="code" href="a00169.html#w0">const_iterator</a>;
+00046 
+<a name="l00048"></a><a class="code" href="a00169.html#w1">00048</a>     <span class="keyword">typedef</span> std::size_t size_type;
+00049 
+00051 
+<a name="l00052"></a><a class="code" href="a00169.html#a0">00052</a>     <a class="code" href="a00169.html">blocked_range</a>() : my_begin(), my_end() {}
+00053 
+<a name="l00055"></a><a class="code" href="a00169.html#a1">00055</a>     <a class="code" href="a00169.html">blocked_range</a>( Value begin_, Value end_, size_type grainsize_=1 ) : 
+00056         my_end(end_), my_begin(begin_), my_grainsize(grainsize_) 
+00057     {
+00058         __TBB_ASSERT( my_grainsize>0, <span class="stringliteral">"grainsize must be positive"</span> );
+00059     }
+00060 
+<a name="l00062"></a><a class="code" href="a00169.html#a2">00062</a>     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin;}
+00063 
+<a name="l00065"></a><a class="code" href="a00169.html#a3">00065</a>     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_end;}
+00066 
+00068 
+<a name="l00069"></a><a class="code" href="a00169.html#a4">00069</a>     size_type size()<span class="keyword"> const </span>{
+00070         __TBB_ASSERT( !(end()<begin()), <span class="stringliteral">"size() unspecified if end()<begin()"</span> );
+00071         <span class="keywordflow">return</span> size_type(my_end-my_begin);
+00072     }
+00073 
+<a name="l00075"></a><a class="code" href="a00169.html#a5">00075</a>     size_type grainsize()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize;}
+00076 
+00077     <span class="comment">//------------------------------------------------------------------------</span>
+00078     <span class="comment">// Methods that implement Range concept</span>
+00079     <span class="comment">//------------------------------------------------------------------------</span>
+00080 
+<a name="l00082"></a><a class="code" href="a00169.html#a6">00082</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !(my_begin<my_end);}
+00083 
+00085 
+<a name="l00086"></a><a class="code" href="a00169.html#a7">00086</a>     <span class="keywordtype">bool</span> is_divisible()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize<size();}
+00087 
+00089 
+<a name="l00091"></a><a class="code" href="a00169.html#a8">00091</a>     <a class="code" href="a00169.html">blocked_range</a>( <a class="code" href="a00169.html">blocked_range</a>& r, <a class="code" href="a00221.html">split</a> ) : 
+00092         my_end(r.my_end),
+00093         my_begin(do_split(r)),
+00094         my_grainsize(r.my_grainsize)
+00095     {}
+00096 
+00097 <span class="keyword">private</span>:
+00099     Value my_end;
+00100     Value my_begin;
+00101     size_type my_grainsize;
+00102 
+00104 
+00105     <span class="keyword">static</span> Value do_split( <a class="code" href="a00169.html">blocked_range</a>& r ) {
+00106         __TBB_ASSERT( r.<a class="code" href="a00169.html#a7">is_divisible</a>(), <span class="stringliteral">"cannot split blocked_range that is not divisible"</span> );
+00107         Value middle = r.<a class="code" href="a00169.html#r1">my_begin</a> + (r.<a class="code" href="a00169.html#r0">my_end</a>-r.<a class="code" href="a00169.html#r1">my_begin</a>)/2u;
+00108         r.<a class="code" href="a00169.html#r0">my_end</a> = middle;
+00109         <span class="keywordflow">return</span> middle;
+00110     }
+00111 
+00112     <span class="keyword">template</span><<span class="keyword">typename</span> RowValue, <span class="keyword">typename</span> ColValue>
+00113     <span class="keyword">friend</span> <span class="keyword">class </span>blocked_range2d;
+00114 
+00115     <span class="keyword">template</span><<span class="keyword">typename</span> RowValue, <span class="keyword">typename</span> ColValue, <span class="keyword">typename</span> PageValue>
+00116     <span class="keyword">friend</span> <span class="keyword">class </span>blocked_range3d;
+00117 };
+00118 
+00119 } <span class="comment">// namespace tbb </span>
+00120 
+00121 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_blocked_range_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..98b1db0
--- /dev/null
+++ b/doc/html/a00286.html
@@ -0,0 +1,99 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>blocked_range2d.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>blocked_range2d.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_blocked_range2d_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_blocked_range2d_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 <span class="preprocessor">#include "blocked_range.h"</span>
+00026 
+00027 <span class="keyword">namespace </span>tbb {
+00028 
+00030 
+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="a00170.html">00032</a> <span class="keyword">class </span><a class="code" href="a00170.html">blocked_range2d</a> {
+00033 <span class="keyword">public</span>:
+<a name="l00035"></a><a class="code" href="a00170.html#w0">00035</a>     <span class="keyword">typedef</span> <a class="code" href="a00169.html">blocked_range<RowValue></a> <a class="code" href="a00169.html">row_range_type</a>;
+00036     <span class="keyword">typedef</span> <a class="code" href="a00169.html">blocked_range<ColValue></a> <a class="code" href="a00169.html">col_range_type</a>;
+00037  
+00038 <span class="keyword">private</span>:
+00039     row_range_type my_rows;
+00040     col_range_type my_cols;
+00041 
+00042 <span class="keyword">public</span>:
+00043 
+00044     <a class="code" href="a00170.html">blocked_range2d</a>( RowValue row_begin, RowValue row_end, <span class="keyword">typename</span> row_range_type::size_type row_grainsize,
+00045                      ColValue col_begin, ColValue col_end, <span class="keyword">typename</span> col_range_type::size_type col_grainsize ) : 
+00046         my_rows(row_begin,row_end,row_grainsize),
+00047         my_cols(col_begin,col_end,col_grainsize)
+00048     {
+00049     }
+00050 
+00051     <a class="code" href="a00170.html">blocked_range2d</a>( RowValue row_begin, RowValue row_end,
+00052                      ColValue col_begin, ColValue col_end ) : 
+00053         my_rows(row_begin,row_end),
+00054         my_cols(col_begin,col_end)
+00055     {
+00056     }
+00057 
+<a name="l00059"></a><a class="code" href="a00170.html#a2">00059</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{
+00060         <span class="comment">// Yes, it is a logical OR here, not AND.</span>
+00061         <span class="keywordflow">return</span> my_rows.<a class="code" href="a00169.html#a6">empty</a>() || my_cols.<a class="code" href="a00169.html#a6">empty</a>();
+00062     }
+00063 
+<a name="l00065"></a><a class="code" href="a00170.html#a3">00065</a>     <span class="keywordtype">bool</span> is_divisible()<span class="keyword"> const </span>{
+00066         <span class="keywordflow">return</span> my_rows.<a class="code" href="a00169.html#a7">is_divisible</a>() || my_cols.<a class="code" href="a00169.html#a7">is_divisible</a>();
+00067     }
+00068 
+00069     <a class="code" href="a00170.html">blocked_range2d</a>( <a class="code" href="a00170.html">blocked_range2d</a>& r, <a class="code" href="a00221.html">split</a> ) : 
+00070         my_rows(r.my_rows),
+00071         my_cols(r.my_cols)
+00072     {
+00073         <span class="keywordflow">if</span>( my_rows.<a class="code" href="a00169.html#a4">size</a>()*double(my_cols.<a class="code" href="a00169.html#a5">grainsize</a>()) < my_cols.<a class="code" href="a00169.html#a4">size</a>()*double(my_rows.<a class="code" href="a00169.html#a5">grainsize</a>()) ) {
+00074             my_cols.<a class="code" href="a00169.html#r1">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00170.html#r1">my_cols</a>);
+00075         } <span class="keywordflow">else</span> {
+00076             my_rows.<a class="code" href="a00169.html#r1">my_begin</a> = row_range_type::do_split(r.<a class="code" href="a00170.html#r0">my_rows</a>);
+00077         }
+00078     }
+00079 
+<a name="l00081"></a><a class="code" href="a00170.html#a5">00081</a>     <span class="keyword">const</span> row_range_type& rows()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_rows;}
+00082 
+<a name="l00084"></a><a class="code" href="a00170.html#a6">00084</a>     <span class="keyword">const</span> col_range_type& cols()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_cols;}
+00085 };
+00086 
+00087 } <span class="comment">// namespace tbb </span>
+00088 
+00089 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_blocked_range2d_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00287.html b/doc/html/a00287.html
new file mode 100644
index 0000000..61e2f93
--- /dev/null
+++ b/doc/html/a00287.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>blocked_range3d.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>blocked_range3d.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_blocked_range3d_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_blocked_range3d_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 <span class="preprocessor">#include "blocked_range.h"</span>
+00026 
+00027 <span class="keyword">namespace </span>tbb {
+00028 
+00030 
+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="a00171.html">00032</a> <span class="keyword">class </span><a class="code" href="a00171.html">blocked_range3d</a> {
+00033 <span class="keyword">public</span>:
+<a name="l00035"></a><a class="code" href="a00171.html#w0">00035</a>     <span class="keyword">typedef</span> <a class="code" href="a00169.html">blocked_range<PageValue></a> <a class="code" href="a00169.html">page_range_type</a>;
+00036     <span class="keyword">typedef</span> <a class="code" href="a00169.html">blocked_range<RowValue></a>  <a class="code" href="a00169.html">row_range_type</a>;
+00037     <span class="keyword">typedef</span> <a class="code" href="a00169.html">blocked_range<ColValue></a>  <a class="code" href="a00169.html">col_range_type</a>;
+00038  
+00039 <span class="keyword">private</span>:
+00040     page_range_type my_pages;
+00041     row_range_type  my_rows;
+00042     col_range_type  my_cols;
+00043 
+00044 <span class="keyword">public</span>:
+00045 
+00046     <a class="code" href="a00171.html">blocked_range3d</a>( PageValue page_begin, PageValue page_end,
+00047                      RowValue  row_begin,  RowValue row_end,
+00048                      ColValue  col_begin,  ColValue col_end ) : 
+00049         my_pages(page_begin,page_end),
+00050         my_rows(row_begin,row_end),
+00051         my_cols(col_begin,col_end)
+00052     {
+00053     }
+00054 
+00055     <a class="code" href="a00171.html">blocked_range3d</a>( PageValue page_begin, PageValue page_end, <span class="keyword">typename</span> page_range_type::size_type page_grainsize, 
+00056                      RowValue  row_begin,  RowValue row_end,   <span class="keyword">typename</span> row_range_type::size_type row_grainsize,
+00057                      ColValue  col_begin,  ColValue col_end,   <span class="keyword">typename</span> col_range_type::size_type col_grainsize ) :  
+00058         my_pages(page_begin,page_end,page_grainsize),
+00059         my_rows(row_begin,row_end,row_grainsize),
+00060         my_cols(col_begin,col_end,col_grainsize)
+00061     {
+00062     }
+00063 
+<a name="l00065"></a><a class="code" href="a00171.html#a2">00065</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{
+00066         <span class="comment">// Yes, it is a logical OR here, not AND.</span>
+00067         <span class="keywordflow">return</span> my_pages.<a class="code" href="a00169.html#a6">empty</a>() || my_rows.<a class="code" href="a00169.html#a6">empty</a>() || my_cols.<a class="code" href="a00169.html#a6">empty</a>();
+00068     }
+00069 
+<a name="l00071"></a><a class="code" href="a00171.html#a3">00071</a>     <span class="keywordtype">bool</span> is_divisible()<span class="keyword"> const </span>{
+00072         <span class="keywordflow">return</span>  my_pages.<a class="code" href="a00169.html#a7">is_divisible</a>() || my_rows.<a class="code" href="a00169.html#a7">is_divisible</a>() || my_cols.<a class="code" href="a00169.html#a7">is_divisible</a>();
+00073     }
+00074 
+00075     <a class="code" href="a00171.html">blocked_range3d</a>( <a class="code" href="a00171.html">blocked_range3d</a>& r, <a class="code" href="a00221.html">split</a> ) : 
+00076         my_pages(r.my_pages),
+00077         my_rows(r.my_rows),
+00078         my_cols(r.my_cols)
+00079     {
+00080         <span class="keywordflow">if</span>( my_pages.<a class="code" href="a00169.html#a4">size</a>()*double(my_rows.<a class="code" href="a00169.html#a5">grainsize</a>()) < my_rows.<a class="code" href="a00169.html#a4">size</a>()*double(my_pages.<a class="code" href="a00169.html#a5">grainsize</a>()) ) {
+00081             <span class="keywordflow">if</span> ( my_rows.<a class="code" href="a00169.html#a4">size</a>()*double(my_cols.<a class="code" href="a00169.html#a5">grainsize</a>()) < my_cols.<a class="code" href="a00169.html#a4">size</a>()*double(my_rows.<a class="code" href="a00169.html#a5">grainsize</a>()) ) {
+00082                 my_cols.<a class="code" href="a00169.html#r1">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00171.html#r2">my_cols</a>);
+00083             } <span class="keywordflow">else</span> {
+00084                 my_rows.<a class="code" href="a00169.html#r1">my_begin</a> = row_range_type::do_split(r.<a class="code" href="a00171.html#r1">my_rows</a>);
+00085             }
+00086         } <span class="keywordflow">else</span> {
+00087             <span class="keywordflow">if</span> ( my_pages.<a class="code" href="a00169.html#a4">size</a>()*double(my_cols.<a class="code" href="a00169.html#a5">grainsize</a>()) < my_cols.<a class="code" href="a00169.html#a4">size</a>()*double(my_pages.<a class="code" href="a00169.html#a5">grainsize</a>()) ) {
+00088                 my_cols.<a class="code" href="a00169.html#r1">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00171.html#r2">my_cols</a>);
+00089             } <span class="keywordflow">else</span> {
+00090                     my_pages.<a class="code" href="a00169.html#r1">my_begin</a> = page_range_type::do_split(r.<a class="code" href="a00171.html#r0">my_pages</a>);
+00091             }
+00092         }
+00093     }
+00094 
+<a name="l00096"></a><a class="code" href="a00171.html#a5">00096</a>     <span class="keyword">const</span> page_range_type& pages()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_pages;}
+00097 
+<a name="l00099"></a><a class="code" href="a00171.html#a6">00099</a>     <span class="keyword">const</span> row_range_type& rows()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_rows;}
+00100 
+<a name="l00102"></a><a class="code" href="a00171.html#a7">00102</a>     <span class="keyword">const</span> col_range_type& cols()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_cols;}
+00103 
+00104 };
+00105 
+00106 } <span class="comment">// namespace tbb </span>
+00107 
+00108 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_blocked_range3d_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00288.html b/doc/html/a00288.html
new file mode 100644
index 0000000..06de9cb
--- /dev/null
+++ b/doc/html/a00288.html
@@ -0,0 +1,127 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>cache_aligned_allocator.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_cache_aligned_allocator_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_cache_aligned_allocator_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include <new></span>
+00025 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00026 
+00027 <span class="keyword">namespace </span>tbb {
+00028 
+00030 <span class="keyword">namespace </span>internal {
+00032 
+<a name="l00035"></a><a class="code" href="a00279.html#a0">00035</a>     <span class="keyword">const</span> size_t <a class="code" href="a00279.html#a0">NFS_MaxLineSize</a> = 128;
+00036 
+00038 
+00039     size_t <a class="code" href="a00279.html#a16">NFS_GetLineSize</a>();
+00040 
+00042 
+00043     <span class="keywordtype">void</span>* <a class="code" href="a00279.html#a17">NFS_Allocate</a>( size_t n_element, size_t element_size, <span class="keywordtype">void</span>* hint );
+00044 
+00046 
+00048     <span class="keywordtype">void</span> <a class="code" href="a00279.html#a18">NFS_Free</a>( <span class="keywordtype">void</span>* );
+00049 }
+00051 
+00053 
+00056 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00057"></a><a class="code" href="a00172.html">00057</a> <span class="keyword">class </span><a class="code" href="a00172.html">cache_aligned_allocator</a> {
+00058 <span class="keyword">public</span>:
+00059     <span class="keyword">typedef</span> T* pointer;
+00060     <span class="keyword">typedef</span> <span class="keyword">const</span> T* const_pointer;
+00061     <span class="keyword">typedef</span> T& reference;
+00062     <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+00063     <span class="keyword">typedef</span> T value_type;
+00064     <span class="keyword">typedef</span> size_t size_type;
+00065     <span class="keyword">typedef</span> ptrdiff_t difference_type;
+00066     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
+00067         <span class="keyword">typedef</span> <a class="code" href="a00172.html">cache_aligned_allocator<U></a> other;
+00068     };
+00069 
+00070 <span class="preprocessor">#if _WIN64</span>
+00071 <span class="preprocessor"></span>
+00072 
+00074     <span class="keywordtype">char</span>* _Charalloc( size_type size ) {
+00075         <span class="keywordflow">return</span> (<span class="keywordtype">char</span>*)internal::NFS_Allocate( size, <span class="keyword">sizeof</span>(T), 0 );
+00076     }
+00077 <span class="preprocessor">#endif </span><span class="comment">/* _WIN64 */</span>
+00078 
+00079     <a class="code" href="a00172.html">cache_aligned_allocator</a>() <span class="keywordflow">throw</span>() {}
+00080     <a class="code" href="a00172.html">cache_aligned_allocator</a>( <span class="keyword">const</span> <a class="code" href="a00172.html">cache_aligned_allocator</a>& ) <span class="keywordflow">throw</span>() {}
+00081     <span class="keyword">template</span><<span class="keyword">typename</span> U> <a class="code" href="a00172.html">cache_aligned_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00172.html">cache_aligned_allocator<U></a>&) <span class="keywordflow">throw</span>() {}
+00082 
+00083     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+00084     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+00085     
+<a name="l00087"></a><a class="code" href="a00172.html#a5">00087</a>     pointer allocate( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* hint=0 ) {
+00088         <span class="comment">// The "hint" argument is always ignored in NFS_Allocate thus const_cast shouldn't hurt</span>
+00089         <span class="keywordflow">return</span> pointer(internal::NFS_Allocate( n, <span class="keyword">sizeof</span>(T), const_cast<void*>(hint) ));
+00090     }
+00091 
+<a name="l00093"></a><a class="code" href="a00172.html#a6">00093</a>     <span class="keywordtype">void</span> deallocate( pointer p, size_type ) {
+00094         internal::NFS_Free(p);
+00095     }
+00096 
+<a name="l00098"></a><a class="code" href="a00172.html#a7">00098</a>     size_type max_size() const throw() {
+00099         <span class="keywordflow">return</span> (~size_t(0)-internal::NFS_MaxLineSize)/<span class="keyword">sizeof</span>(T);
+00100     }
+00101 
+<a name="l00103"></a><a class="code" href="a00172.html#a8">00103</a>     <span class="keywordtype">void</span> construct( pointer p, <span class="keyword">const</span> T& value ) {<span class="keyword">new</span>(static_cast<void*>(p)) T(value);}
+00104 
+<a name="l00106"></a><a class="code" href="a00172.html#a9">00106</a>     <span class="keywordtype">void</span> destroy( pointer p ) {p->~T();}
+00107 };
+00108 
+00110 
+00111 <span class="keyword">template</span><> 
+<a name="l00112"></a><a class="code" href="a00173.html">00112</a> <span class="keyword">class </span><a class="code" href="a00172.html">cache_aligned_allocator</a><void> {
+00113 <span class="keyword">public</span>:
+00114     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
+00115     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
+00116     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
+00117     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
+00118         <span class="keyword">typedef</span> <a class="code" href="a00172.html">cache_aligned_allocator<U></a> other;
+00119     };
+00120 };
+00121 
+00122 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00123 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00172.html">cache_aligned_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00172.html">cache_aligned_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
+00124 
+00125 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00126 <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>;}
+00127 
+00128 } <span class="comment">// namespace ThreadBuildingBlocks </span>
+00129 
+00130 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_cache_aligned_allocator_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..553e947
--- /dev/null
+++ b/doc/html/a00289.html
@@ -0,0 +1,888 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>concurrent_hash_map.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_concurrent_hash_map_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_hash_map_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include <stdexcept></span>
+00025 <span class="preprocessor">#include <iterator></span>
+00026 <span class="preprocessor">#include <utility></span>      <span class="comment">// Need std::pair from here</span>
+00027 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00028 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
+00029 <span class="preprocessor">#include "tbb_allocator.h"</span>
+00030 <span class="preprocessor">#include "spin_rw_mutex.h"</span>
+00031 <span class="preprocessor">#include "atomic.h"</span>
+00032 <span class="preprocessor">#include "aligned_space.h"</span>
+00033 <span class="preprocessor">#if TBB_PERFORMANCE_WARNINGS</span>
+00034 <span class="preprocessor"></span><span class="preprocessor">#include <typeinfo></span>
+00035 <span class="preprocessor">#endif</span>
+00036 <span class="preprocessor"></span>
+00037 <span class="keyword">namespace </span>tbb {
+00038 
+00039 <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 = tbb_allocator<std::pair<Key, T> > >
+00040 <span class="keyword">class </span>concurrent_hash_map;
+00041 
+00043 <span class="keyword">namespace </span>internal {
+<a name="l00045"></a><a class="code" href="a00195.html">00045</a>     <span class="keyword">class </span><a class="code" href="a00195.html">hash_map_base</a> {
+00046     <span class="keyword">public</span>:
+00047         <span class="comment">// Mutex types for each layer of the container</span>
+00048         <span class="keyword">typedef</span> <a class="code" href="a00219.html">spin_rw_mutex</a> <a class="code" href="a00219.html">node_mutex_t</a>;
+00049         <span class="keyword">typedef</span> <a class="code" href="a00219.html">spin_rw_mutex</a> <a class="code" href="a00219.html">chain_mutex_t</a>;
+00050         <span class="keyword">typedef</span> <a class="code" href="a00219.html">spin_rw_mutex</a> <a class="code" href="a00219.html">segment_mutex_t</a>;
+00051 
+<a name="l00053"></a><a class="code" href="a00195.html#w3">00053</a>         <span class="keyword">typedef</span> size_t <a class="code" href="a00195.html#w3">hashcode_t</a>;
+<a name="l00055"></a><a class="code" href="a00195.html#s0">00055</a>         <span class="keyword">static</span> <span class="keyword">const</span> size_t n_segment_bits = 6;
+<a name="l00057"></a><a class="code" href="a00195.html#s1">00057</a>         <span class="keyword">static</span> <span class="keyword">const</span> size_t n_segment = size_t(1)<<n_segment_bits; 
+<a name="l00059"></a><a class="code" href="a00195.html#s2">00059</a>         <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);
+00060     };
+00061 
+00062     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
+00063     <span class="keyword">class </span><a class="code" href="a00197.html">hash_map_range</a>;
+00064 
+00065     <span class="keyword">struct </span>hash_map_segment_base {
+00067         <a class="code" href="a00219.html">hash_map_base::segment_mutex_t</a> my_mutex;
+00068 
+00069         <span class="comment">// Number of nodes</span>
+00070         <a class="code" href="a00165.html">atomic<size_t></a> my_logical_size;
+00071 
+00072         <span class="comment">// Size of chains</span>
+00074 <span class="comment"></span>        size_t my_physical_size;
+00075 
+00077 
+00078         <span class="keywordtype">bool</span> internal_grow_predicate() <span class="keyword">const</span>;
+00079     };
+00080 
+00082 
+00084     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00085"></a><a class="code" href="a00196.html">00085</a>     <span class="keyword">class </span><a class="code" href="a00196.html">hash_map_iterator</a>
+00086 #if defined(_WIN64) && defined(_MSC_VER) 
+00087         <span class="comment">// Ensure that Microsoft's internal template function _Val_type works correctly.</span>
+00088         : public std::iterator<std::forward_iterator_tag,Value>
+00089 #endif <span class="comment">/* defined(_WIN64) && defined(_MSC_VER) */</span>
+00090     {
+00091         <span class="keyword">typedef</span> <span class="keyword">typename</span> Container::node node;
+00092         <span class="keyword">typedef</span> <span class="keyword">typename</span> Container::chain chain;
+00093 
+00095         Container* my_table;
+00096 
+00098         node* my_node;
+00099 
+00101         size_t my_array_index;
+00102 
+00104         size_t my_segment_index;
+00105 
+00106         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00107         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00196.html">hash_map_iterator<C,T></a>& i, <span class="keyword">const</span> <a class="code" href="a00196.html">hash_map_iterator<C,U></a>& j );
+00108 
+00109         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00110         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> <a class="code" href="a00196.html">hash_map_iterator<C,T></a>& i, <span class="keyword">const</span> <a class="code" href="a00196.html">hash_map_iterator<C,U></a>& j );
+00111 
+00112         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00113         <span class="keyword">friend</span> ptrdiff_t operator-( <span class="keyword">const</span> <a class="code" href="a00196.html">hash_map_iterator<C,T></a>& i, <span class="keyword">const</span> <a class="code" href="a00196.html">hash_map_iterator<C,U></a>& j );
+00114     
+00115         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
+00116         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00196.html">internal::hash_map_iterator</a>;
+00117 
+00118         <span class="keyword">template</span><<span class="keyword">typename</span> I>
+00119         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00197.html">internal::hash_map_range</a>;
+00120 
+00121         <span class="keywordtype">void</span> advance_to_next_node() {
+00122             size_t i = my_array_index+1;
+00123             <span class="keywordflow">do</span> {
+00124                 <span class="keywordflow">while</span>( i<my_table->my_segment[my_segment_index].my_physical_size ) {
+00125                     my_node = my_table->my_segment[my_segment_index].my_array[i].node_list;
+00126                     <span class="keywordflow">if</span>( my_node ) <span class="keywordflow">goto</span> done;
+00127                     ++i;
+00128                 }
+00129                 i = 0;
+00130             } <span class="keywordflow">while</span>( ++my_segment_index<my_table->n_segment );
+00131         done:
+00132             my_array_index = i;
+00133         }
+00134 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
+00135 <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>
+00136         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00174.html">tbb::concurrent_hash_map</a>;
+00137 <span class="preprocessor">#else</span>
+00138 <span class="preprocessor"></span>    <span class="keyword">public</span>: <span class="comment">// workaround</span>
+00139 <span class="preprocessor">#endif</span>
+00140 <span class="preprocessor"></span>        <a class="code" href="a00196.html">hash_map_iterator</a>( <span class="keyword">const</span> Container& table, size_t segment_index, size_t array_index=0, node* b=NULL );
+00141     <span class="keyword">public</span>:
+<a name="l00143"></a><a class="code" href="a00196.html#a0">00143</a>         <a class="code" href="a00196.html">hash_map_iterator</a>() {}
+00144         <a class="code" href="a00196.html">hash_map_iterator</a>( <span class="keyword">const</span> <a class="code" href="a00196.html">hash_map_iterator<Container,typename Container::value_type></a>& other ) :
+00145             my_table(other.my_table),
+00146             my_node(other.my_node),
+00147             my_array_index(other.my_array_index),
+00148             my_segment_index(other.my_segment_index)
+00149         {}
+00150         Value& operator*()<span class="keyword"> const </span>{
+00151             __TBB_ASSERT( my_node, <span class="stringliteral">"iterator uninitialized or at end of container?"</span> );
+00152             <span class="keywordflow">return</span> my_node->item;
+00153         }
+00154         Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
+00155         hash_map_iterator& operator++();
+00156         
+<a name="l00158"></a><a class="code" href="a00196.html#a5">00158</a>         Value* operator++(<span class="keywordtype">int</span>) {
+00159             Value* result = &operator*();
+00160             operator++();
+00161             <span class="keywordflow">return</span> result;
+00162         }
+00163 
+00164         <span class="comment">// STL support</span>
+00165 
+00166         <span class="keyword">typedef</span> ptrdiff_t difference_type;
+00167         <span class="keyword">typedef</span> Value value_type;
+00168         <span class="keyword">typedef</span> Value* pointer;
+00169         <span class="keyword">typedef</span> Value& reference;
+00170         <span class="keyword">typedef</span> <span class="keyword">const</span> Value& const_reference;
+00171         <span class="keyword">typedef</span> std::forward_iterator_tag iterator_category;
+00172     };
+00173 
+00174     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+00175     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 ) : 
+00176         my_table(const_cast<Container*>(&table)),
+00177         my_node(b),
+00178         my_array_index(array_index),
+00179         my_segment_index(segment_index)
+00180     {
+00181         <span class="keywordflow">if</span>( segment_index<my_table->n_segment ) {
+00182             <span class="keywordflow">if</span>( !my_node ) {
+00183                 chain* first_chain = my_table->my_segment[segment_index].my_array;
+00184                 <span class="keywordflow">if</span>( first_chain ) my_node = first_chain[my_array_index].node_list;
+00185             }
+00186             <span class="keywordflow">if</span>( !my_node ) advance_to_next_node();
+00187         }
+00188     }
+00189 
+00190     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+00191     hash_map_iterator<Container,Value>& hash_map_iterator<Container,Value>::operator++() {
+00192         my_node=my_node->next;
+00193         <span class="keywordflow">if</span>( !my_node ) advance_to_next_node();
+00194         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00195     }
+00196 
+00197     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00198     <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 ) {
+00199         <span class="keywordflow">return</span> i.<a class="code" href="a00196.html#r1">my_node</a>==j.<a class="code" href="a00196.html#r1">my_node</a>;
+00200     }
+00201 
+00202     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00203     <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 ) {
+00204         <span class="keywordflow">return</span> i.<a class="code" href="a00196.html#r1">my_node</a>!=j.<a class="code" href="a00196.html#r1">my_node</a>;
+00205     }
+00206 
+00208 
+00209     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
+<a name="l00210"></a><a class="code" href="a00197.html">00210</a>     <span class="keyword">class </span><a class="code" href="a00197.html">hash_map_range</a> {
+00211     <span class="keyword">private</span>:
+00212         Iterator my_begin;
+00213         Iterator my_end;
+00214         <span class="keyword">mutable</span> Iterator my_midpoint;
+00215         size_t my_grainsize;
+00217         <span class="keywordtype">void</span> set_midpoint() <span class="keyword">const</span>;
+00218         <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00197.html">hash_map_range</a>;
+00219     <span class="keyword">public</span>:
+<a name="l00221"></a><a class="code" href="a00197.html#w0">00221</a>         <span class="keyword">typedef</span> std::size_t size_type;
+00222         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::value_type value_type;
+00223         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::reference reference;
+00224         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::const_reference const_reference;
+00225         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::difference_type difference_type;
+00226         <span class="keyword">typedef</span> Iterator iterator;
+00227 
+<a name="l00229"></a><a class="code" href="a00197.html#a0">00229</a>         <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin==my_end;}
+00230 
+<a name="l00232"></a><a class="code" href="a00197.html#a1">00232</a>         <span class="keywordtype">bool</span> is_divisible()<span class="keyword"> const </span>{
+00233             <span class="keywordflow">return</span> my_midpoint!=my_end;
+00234         }
+<a name="l00236"></a><a class="code" href="a00197.html#a2">00236</a>         <a class="code" href="a00197.html">hash_map_range</a>( <a class="code" href="a00197.html">hash_map_range</a>& r, <a class="code" href="a00221.html">split</a> ) : 
+00237             my_end(r.my_end),
+00238             my_grainsize(r.my_grainsize)
+00239         {
+00240             r.<a class="code" href="a00197.html#r1">my_end</a> = my_begin = r.<a class="code" href="a00197.html#r2">my_midpoint</a>;
+00241             set_midpoint();
+00242             r.<a class="code" href="a00197.html#d0">set_midpoint</a>();
+00243         }
+00245         <span class="keyword">template</span><<span class="keyword">typename</span> U>
+<a name="l00246"></a><a class="code" href="a00197.html#a3">00246</a>         <a class="code" href="a00197.html">hash_map_range</a>( <a class="code" href="a00197.html">hash_map_range<U></a>& r) : 
+00247             my_begin(r.my_begin),
+00248             my_end(r.my_end),
+00249             my_midpoint(r.my_midpoint),
+00250             my_grainsize(r.my_grainsize)
+00251         {}
+<a name="l00253"></a><a class="code" href="a00197.html#a4">00253</a>         <a class="code" href="a00197.html">hash_map_range</a>( <span class="keyword">const</span> Iterator& begin_, <span class="keyword">const</span> Iterator& end_, size_type grainsize = 1 ) : 
+00254             my_begin(begin_), 
+00255             my_end(end_), 
+00256             my_grainsize(grainsize) 
+00257         {
+00258             set_midpoint();
+00259             __TBB_ASSERT( grainsize>0, <span class="stringliteral">"grainsize must be positive"</span> );
+00260         }
+00261         <span class="keyword">const</span> Iterator& begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin;}
+00262         <span class="keyword">const</span> Iterator& end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_end;}
+<a name="l00264"></a><a class="code" href="a00197.html#a7">00264</a>         size_type grainsize()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize;}
+00265     };
+00266 
+00267     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
+00268     <span class="keywordtype">void</span> hash_map_range<Iterator>::set_midpoint()<span class="keyword"> const </span>{
+00269         size_t n = my_end.my_segment_index-my_begin.my_segment_index;
+00270         <span class="keywordflow">if</span>( n>1 || (n==1 && my_end.my_array_index>0) ) {
+00271             <span class="comment">// Split by groups of segments</span>
+00272             my_midpoint = Iterator(*my_begin.my_table,(my_end.my_segment_index+my_begin.my_segment_index)/2u);
+00273         } <span class="keywordflow">else</span> {
+00274             <span class="comment">// Split by groups of nodes</span>
+00275             size_t m = my_end.my_array_index-my_begin.my_array_index;
+00276             <span class="keywordflow">if</span>( m>my_grainsize ) {
+00277                 my_midpoint = Iterator(*my_begin.my_table,my_begin.my_segment_index,m/2u);
+00278             } <span class="keywordflow">else</span> {
+00279                 my_midpoint = my_end;
+00280             }
+00281         }
+00282         __TBB_ASSERT( my_midpoint.my_segment_index<=my_begin.my_table->n_segment, NULL );
+00283     }  
+00284 } <span class="comment">// namespace internal</span>
+00286 <span class="comment"></span>
+00288 
+00313 <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="l00314"></a><a class="code" href="a00174.html">00314</a> <span class="keyword">class </span><a class="code" href="a00174.html">concurrent_hash_map</a> : <span class="keyword">protected</span> internal::hash_map_base {
+00315     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+00316     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00196.html">internal::hash_map_iterator</a>;
+00317 
+00318     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+00319     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00197.html">internal::hash_map_range</a>;
+00320 
+00321     <span class="keyword">struct </span>node;
+00322     <span class="keyword">friend</span> <span class="keyword">struct </span>node;
+00323     <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template rebind<node>::other node_allocator_type;
+00324 
+00325 <span class="keyword">public</span>:
+00326     <span class="keyword">class </span><a class="code" href="a00176.html">const_accessor</a>;
+00327     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00176.html">const_accessor</a>;
+00328     <span class="keyword">class </span><a class="code" href="a00175.html">accessor</a>;
+00329 
+00330     <span class="keyword">typedef</span> Key key_type;
+00331     <span class="keyword">typedef</span> T mapped_type;
+00332     <span class="keyword">typedef</span> std::pair<const Key,T> value_type;
+00333     <span class="keyword">typedef</span> size_t size_type;
+00334     <span class="keyword">typedef</span> ptrdiff_t difference_type;
+00335     <span class="keyword">typedef</span> value_type *pointer;
+00336     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type *const_pointer;
+00337     <span class="keyword">typedef</span> value_type &reference;
+00338     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type &const_reference;
+00339     <span class="keyword">typedef</span> <a class="code" href="a00196.html">internal::hash_map_iterator<concurrent_hash_map,value_type></a> <a class="code" href="a00196.html">iterator</a>;
+00340     <span class="keyword">typedef</span> <a class="code" href="a00196.html">internal::hash_map_iterator<concurrent_hash_map,const value_type></a> <a class="code" href="a00196.html">const_iterator</a>;
+00341     <span class="keyword">typedef</span> <a class="code" href="a00197.html">internal::hash_map_range<iterator></a> <a class="code" href="a00197.html">range_type</a>;
+00342     <span class="keyword">typedef</span> <a class="code" href="a00197.html">internal::hash_map_range<const_iterator></a> <a class="code" href="a00197.html">const_range_type</a>;
+00343     <span class="keyword">typedef</span> A allocator_type;
+00344 
+<a name="l00346"></a><a class="code" href="a00176.html">00346</a>     <span class="keyword">class </span><a class="code" href="a00176.html">const_accessor</a> {
+00347         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00174.html">concurrent_hash_map</a>;
+00348         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00175.html">accessor</a>;
+00349         <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="a00175.html">accessor</a>& ) <span class="keyword">const</span>; <span class="comment">// Deny access</span>
+00350         <a class="code" href="a00176.html">const_accessor</a>( <span class="keyword">const</span> <a class="code" href="a00175.html">accessor</a>& );       <span class="comment">// Deny access</span>
+00351     <span class="keyword">public</span>:
+<a name="l00353"></a><a class="code" href="a00176.html#w0">00353</a>         <span class="keyword">typedef</span> <span class="keyword">const</span> std::pair<const Key,T> value_type;
+00354 
+<a name="l00356"></a><a class="code" href="a00176.html#a0">00356</a>         <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !my_node;}
+00357 
+<a name="l00359"></a><a class="code" href="a00176.html#a1">00359</a>         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a2">release</a>() {
+00360             <span class="keywordflow">if</span>( my_node ) {
+00361                 my_lock.release();
+00362                 my_node = NULL;
+00363             }
+00364         }
+00365 
+<a name="l00367"></a><a class="code" href="a00176.html#a2">00367</a>         const_reference operator*()<span class="keyword"> const </span>{
+00368             __TBB_ASSERT( my_node, <span class="stringliteral">"attempt to dereference empty accessor"</span> );
+00369             <span class="keywordflow">return</span> my_node->item;
+00370         }
+00371 
+<a name="l00373"></a><a class="code" href="a00176.html#a3">00373</a>         const_pointer operator->()<span class="keyword"> const </span>{
+00374             <span class="keywordflow">return</span> &operator*();
+00375         }
+00376 
+<a name="l00378"></a><a class="code" href="a00176.html#a4">00378</a>         <a class="code" href="a00176.html">const_accessor</a>() : my_node(NULL) {}
+00379 
+<a name="l00381"></a><a class="code" href="a00176.html#a5">00381</a>         ~<a class="code" href="a00176.html">const_accessor</a>() {
+00382             my_node = NULL; <span class="comment">// my_lock.release() is called in scoped_lock destructor</span>
+00383         }
+00384     <span class="keyword">private</span>:
+00385         node* my_node;
+00386         node_mutex_t::scoped_lock my_lock;
+00387         hashcode_t my_hash;
+00388     };
+00389 
+<a name="l00391"></a><a class="code" href="a00175.html">00391</a>     <span class="keyword">class </span><a class="code" href="a00175.html">accessor</a>: <span class="keyword">public</span> <a class="code" href="a00176.html">const_accessor</a> {
+00392     <span class="keyword">public</span>:
+<a name="l00394"></a><a class="code" href="a00175.html#w0">00394</a>         <span class="keyword">typedef</span> std::pair<const Key,T> value_type;
+00395 
+<a name="l00397"></a><a class="code" href="a00175.html#a0">00397</a>         reference operator*()<span class="keyword"> const </span>{
+00398             __TBB_ASSERT( this->my_node, <span class="stringliteral">"attempt to dereference empty accessor"</span> );
+00399             <span class="keywordflow">return</span> this->my_node->item;
+00400         }
+00401 
+<a name="l00403"></a><a class="code" href="a00175.html#a1">00403</a>         pointer operator->()<span class="keyword"> const </span>{
+00404             <span class="keywordflow">return</span> &operator*();
+00405         }       
+00406     };
+00407 
+<a name="l00409"></a><a class="code" href="a00174.html#a0">00409</a>     <a class="code" href="a00174.html">concurrent_hash_map</a>(<span class="keyword">const</span> allocator_type &a = allocator_type())
+00410         : my_allocator(a)
+00411 
+00412     {
+00413         initialize();
+00414     }
+00415 
+<a name="l00417"></a><a class="code" href="a00174.html#a1">00417</a>     <a class="code" href="a00174.html">concurrent_hash_map</a>( <span class="keyword">const</span> <a class="code" href="a00174.html">concurrent_hash_map</a>& table, <span class="keyword">const</span> allocator_type &a = allocator_type())
+00418         : my_allocator(a)
+00419     {
+00420         initialize();
+00421         internal_copy(table);
+00422     }
+00423 
+00425     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00426"></a><a class="code" href="a00174.html#a2">00426</a>     <a class="code" href="a00174.html">concurrent_hash_map</a>(I first, I last, <span class="keyword">const</span> allocator_type &a = allocator_type())
+00427         : my_allocator(a)
+00428     {
+00429         initialize();
+00430         internal_copy(first, last);
+00431     }
+00432 
+<a name="l00434"></a><a class="code" href="a00174.html#a3">00434</a>     <a class="code" href="a00174.html">concurrent_hash_map</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00174.html">concurrent_hash_map</a>& table ) {
+00435         <span class="keywordflow">if</span>( <span class="keyword">this</span>!=&table ) {
+00436             clear();
+00437             internal_copy(table);
+00438         } 
+00439         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00440     }
+00441 
+00442 
+00444     <span class="keywordtype">void</span> clear();
+00445 
+00447     ~<a class="code" href="a00174.html">concurrent_hash_map</a>();
+00448 
+00449     <span class="comment">//------------------------------------------------------------------------</span>
+00450     <span class="comment">// Parallel algorithm support</span>
+00451     <span class="comment">//------------------------------------------------------------------------</span>
+00452     range_type range( size_type grainsize=1 ) {
+00453         <span class="keywordflow">return</span> range_type( begin(), end(), grainsize );
+00454     }
+00455     const_range_type range( size_type grainsize=1 )<span class="keyword"> const </span>{
+00456         <span class="keywordflow">return</span> const_range_type( begin(), end(), grainsize );
+00457     }
+00458 
+00459     <span class="comment">//------------------------------------------------------------------------</span>
+00460     <span class="comment">// STL support - not thread-safe methods</span>
+00461     <span class="comment">//------------------------------------------------------------------------</span>
+00462     iterator begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,0);}
+00463     iterator end() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,n_segment);}
+00464     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0);}
+00465     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,n_segment);}
+00466     std::pair<iterator, iterator> equal_range( <span class="keyword">const</span> Key& key ) { <span class="keywordflow">return</span> internal_equal_range(key, end()); }
+00467     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()); }
+00468     
+00470 
+00472     size_type size() <span class="keyword">const</span>;
+00473 
+00475     <span class="keywordtype">bool</span> empty() <span class="keyword">const</span>;
+00476 
+<a name="l00478"></a><a class="code" href="a00174.html#a16">00478</a>     size_type max_size()<span class="keyword"> const </span>{<span class="keywordflow">return</span> (~size_type(0))/<span class="keyword">sizeof</span>(node);}
+00479 
+<a name="l00481"></a><a class="code" href="a00174.html#a17">00481</a>     allocator_type get_allocator()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
+00482 
+00484     <span class="keywordtype">void</span> swap(<a class="code" href="a00174.html">concurrent_hash_map</a> &table);
+00485 
+00486     <span class="comment">//------------------------------------------------------------------------</span>
+00487     <span class="comment">// concurrent map operations</span>
+00488     <span class="comment">//------------------------------------------------------------------------</span>
+00489 
+<a name="l00491"></a><a class="code" href="a00174.html#a19">00491</a>     size_type count( <span class="keyword">const</span> Key& key )<span class="keyword"> const </span>{
+00492         <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>>(NULL, key, <span class="comment">/*write=*/</span><span class="keyword">false</span>, NULL );
+00493     }
+00494 
+00496 
+<a name="l00497"></a><a class="code" href="a00174.html#a20">00497</a>     <span class="keywordtype">bool</span> find( <a class="code" href="a00176.html">const_accessor</a>& result, <span class="keyword">const</span> Key& key )<span class="keyword"> const </span>{
+00498         <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>>(&result, key, <span class="comment">/*write=*/</span><span class="keyword">false</span>, NULL );
+00499     }
+00500 
+00502 
+<a name="l00503"></a><a class="code" href="a00174.html#a21">00503</a>     <span class="keywordtype">bool</span> find( <a class="code" href="a00175.html">accessor</a>& result, <span class="keyword">const</span> Key& key ) {
+00504         <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 );
+00505     }
+00506         
+00508 
+<a name="l00509"></a><a class="code" href="a00174.html#a22">00509</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00176.html">const_accessor</a>& result, <span class="keyword">const</span> Key& key ) {
+00510         <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 );
+00511     }
+00512 
+00514 
+<a name="l00515"></a><a class="code" href="a00174.html#a23">00515</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00175.html">accessor</a>& result, <span class="keyword">const</span> Key& key ) {
+00516         <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 );
+00517     }
+00518 
+00520 
+<a name="l00521"></a><a class="code" href="a00174.html#a24">00521</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00176.html">const_accessor</a>& result, <span class="keyword">const</span> value_type& value ) {
+00522         <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 );
+00523     }
+00524 
+00526 
+<a name="l00527"></a><a class="code" href="a00174.html#a25">00527</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00175.html">accessor</a>& result, <span class="keyword">const</span> value_type& value ) {
+00528         <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 );
+00529     }
+00530 
+00532 
+<a name="l00533"></a><a class="code" href="a00174.html#a26">00533</a>     <span class="keywordtype">bool</span> insert( <span class="keyword">const</span> value_type& value ) {
+00534         <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 );
+00535     }
+00536 
+00538     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00539"></a><a class="code" href="a00174.html#a27">00539</a>     <span class="keywordtype">void</span> insert(I first, I last) {
+00540         <span class="keywordflow">for</span>(; first != last; ++first)
+00541             insert( *first );
+00542     }
+00543 
+00545 
+00546     <span class="keywordtype">bool</span> erase( <span class="keyword">const</span> Key& key );
+00547 
+00549 
+<a name="l00550"></a><a class="code" href="a00174.html#a29">00550</a>     <span class="keywordtype">bool</span> erase( <a class="code" href="a00176.html">const_accessor</a>& item_accessor ) {
+00551         <span class="keywordflow">return</span> exclude( item_accessor, <span class="comment">/*readonly=*/</span> <span class="keyword">true</span> );
+00552     }
+00553 
+00555 
+<a name="l00556"></a><a class="code" href="a00174.html#a30">00556</a>     <span class="keywordtype">bool</span> erase( <a class="code" href="a00175.html">accessor</a>& item_accessor ) {
+00557         <span class="keywordflow">return</span> exclude( item_accessor, <span class="comment">/*readonly=*/</span> <span class="keyword">false</span> );
+00558     }
+00559 
+00560 <span class="keyword">private</span>:
+00562     <span class="keyword">struct </span>node {
+00564         node* next;
+00565         node_mutex_t <a class="code" href="a00198.html">mutex</a>;
+00566         value_type item;
+00567         node( <span class="keyword">const</span> Key& key ) : item(key, T()) {}
+00568         node( <span class="keyword">const</span> Key& key, <span class="keyword">const</span> T& t ) : item(key, t) {}
+00569         <span class="comment">// exception-safe allocation, see C++ Standard 2003, clause 5.3.4p17</span>
+00570         <span class="keywordtype">void</span>* operator new( size_t size, node_allocator_type& a ) {
+00571             <span class="keywordtype">void</span> *ptr = a.allocate(1);
+00572             <span class="keywordflow">if</span>(!ptr) <span class="keywordflow">throw</span> std::bad_alloc();
+00573             <span class="keywordflow">return</span> ptr;
+00574         }
+00575         <span class="comment">// match placement-new form above to be called if exception thrown in constructor</span>
+00576         <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); }
+00577     };
+00578 
+00579     <span class="keyword">struct </span>chain;
+00580     <span class="keyword">friend</span> <span class="keyword">struct </span>chain;
+00581 
+00583 
+00584     <span class="keyword">struct </span>chain {
+00585         <span class="keywordtype">void</span> push_front( node& b ) {
+00586             b.next = node_list;
+00587             node_list = &b;
+00588         }
+00589         chain_mutex_t mutex;
+00590         node* node_list;
+00591     };
+00592 
+00593     <span class="keyword">struct </span>segment;
+00594     <span class="keyword">friend</span> <span class="keyword">struct </span>segment;
+00595 
+00597 
+00599     <span class="keyword">struct </span>segment: internal::hash_map_segment_base {
+00600 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00601 <span class="preprocessor"></span>        ~segment() {
+00602             __TBB_ASSERT( !my_array, <span class="stringliteral">"should have been cleared earlier"</span> );
+00603         }
+00604 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00605 
+00606         <span class="comment">// Pointer to array of chains</span>
+00607         chain* my_array;
+00608 
+00609         <span class="comment">// Get chain in this segment that corresponds to given hash code.</span>
+00610         chain& get_chain( hashcode_t hashcode, size_t n_segment_bits ) {
+00611             <span class="keywordflow">return</span> my_array[(hashcode>>n_segment_bits)&(my_physical_size-1)];
+00612         }
+00613      
+00615 
+00617         <span class="keywordtype">void</span> allocate_array( size_t new_size ) {
+00618             size_t n=(internal::NFS_GetLineSize()+<span class="keyword">sizeof</span>(chain)-1)/<span class="keyword">sizeof</span>(chain);
+00619             __TBB_ASSERT((n&(n-1))==0, NULL);
+00620             <span class="keywordflow">while</span>( n<new_size ) n<<=1;
+00621             chain* array = cache_aligned_allocator<chain>().allocate( n );
+00622             <span class="comment">// storing earlier might help overcome false positives of in deducing "bool grow" in concurrent threads</span>
+00623             __TBB_store_with_release(my_physical_size, n);
+00624             memset( array, 0, n*<span class="keyword">sizeof</span>(chain) );
+00625             my_array = array;
+00626         }
+00627     };
+00628 
+00629     segment& get_segment( hashcode_t hashcode ) {
+00630         <span class="keywordflow">return</span> my_segment[hashcode&(n_segment-1)];
+00631     }
+00632 
+00633     node_allocator_type my_allocator;
+00634 
+00635     HashCompare my_hash_compare;
+00636 
+00637     segment* my_segment;
+00638 
+00639     node* create_node(<span class="keyword">const</span> Key& key, <span class="keyword">const</span> T* t) {
+00640         <span class="comment">// exception-safe allocation and construction</span>
+00641         <span class="keywordflow">if</span>(t) <span class="keywordflow">return</span> <span class="keyword">new</span>( my_allocator ) node(key, *t);
+00642         <span class="keywordflow">else</span>  <span class="keywordflow">return</span> <span class="keyword">new</span>( my_allocator ) node(key);
+00643     }
+00644 
+00645     <span class="keywordtype">void</span> delete_node(node* b) {
+00646         my_allocator.destroy(b);
+00647         my_allocator.deallocate(b, 1);
+00648     }
+00649 
+00650     node* search_list( <span class="keyword">const</span> Key& key, chain& c )<span class="keyword"> const </span>{
+00651         node* b = c.node_list;
+00652         <span class="keywordflow">while</span>( b && !my_hash_compare.equal(key, b->item.first) )
+00653             b = b->next;
+00654         <span class="keywordflow">return</span> b;
+00655     }
+00657     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+00658     std::pair<I, I> internal_equal_range( <span class="keyword">const</span> Key& key, I end ) <span class="keyword">const</span>;
+00659 
+00661     <span class="keywordtype">bool</span> exclude( const_accessor& item_accessor, <span class="keywordtype">bool</span> readonly );
+00662 
+00664     <span class="keywordtype">void</span> grow_segment( segment_mutex_t::scoped_lock& segment_lock, segment& s );
+00665 
+00667     <span class="keyword">template</span><<span class="keywordtype">bool</span> op_insert>
+00668     <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 );
+00669 
+00671     <span class="keywordtype">void</span> initialize() {
+00672         my_segment = cache_aligned_allocator<segment>().allocate(n_segment);
+00673         memset( my_segment, 0, <span class="keyword">sizeof</span>(segment)*n_segment );
+00674      }
+00675 
+00677     <span class="keywordtype">void</span> internal_copy( <span class="keyword">const</span> concurrent_hash_map& source );
+00678 
+00679     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+00680     <span class="keywordtype">void</span> internal_copy(I first, I last);
+00681 };
+00682 
+00683 <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="l00684"></a><a class="code" href="a00174.html#a5">00684</a> <a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A>::~concurrent_hash_map</a>() {
+00685     <a class="code" href="a00174.html#a4">clear</a>();
+00686     <a class="code" href="a00172.html">cache_aligned_allocator<segment></a>().deallocate( my_segment, n_segment );
+00687 }
+00688 
+00689 <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="l00690"></a><a class="code" href="a00174.html#a14">00690</a> <span class="keyword">typename</span> <a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A></a>::size_type <a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A>::size</a>()<span class="keyword"> const </span>{
+00691     size_type result = 0;
+00692     <span class="keywordflow">for</span>( size_t k=0; k<n_segment; ++k )
+00693         result += my_segment[k].my_logical_size;
+00694     <span class="keywordflow">return</span> result;
+00695 }
+00696 
+00697 <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="l00698"></a><a class="code" href="a00174.html#a15">00698</a> <span class="keywordtype">bool</span> <a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A>::empty</a>()<span class="keyword"> const </span>{
+00699     <span class="keywordflow">for</span>( size_t k=0; k<n_segment; ++k )
+00700         <span class="keywordflow">if</span>( my_segment[k].my_logical_size )
+00701             <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00702     <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00703 }
+00704 
+00705 <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>
+00706 <span class="keyword">template</span><<span class="keywordtype">bool</span> op_insert>
+00707 <span class="keywordtype">bool</span> <a class="code" href="a00174.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 ) {
+00708     <span class="keywordflow">if</span>( result <span class="comment">/*&& result->my_node -- checked in release() */</span> )
+00709         result->release();
+00710     <span class="keyword">const</span> hashcode_t h = my_hash_compare.hash( key );
+00711     segment& s = get_segment(h);
+00712 restart:
+00713     <span class="keywordtype">bool</span> return_value = <span class="keyword">false</span>;
+00714     <span class="comment">// first check in double-check sequence</span>
+00715 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00716 <span class="preprocessor"></span>    <span class="keyword">const</span> <span class="keywordtype">bool</span> grow = op_insert && s.internal_grow_predicate();
+00717 <span class="preprocessor">#else</span>
+00718 <span class="preprocessor"></span>    <span class="keyword">const</span> <span class="keywordtype">bool</span> grow = op_insert && s.my_logical_size >= s.my_physical_size
+00719         && s.my_physical_size < max_physical_size; <span class="comment">// check whether there are free bits</span>
+00720 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */</span>
+00721     segment_mutex_t::scoped_lock segment_lock( s.my_mutex, <span class="comment">/*write=*/</span>grow );
+00722     <span class="keywordflow">if</span>( grow ) { <span class="comment">// Load factor is too high  </span>
+00723         grow_segment( segment_lock, s );
+00724     }
+00725     <span class="keywordflow">if</span>( !s.my_array ) {
+00726         __TBB_ASSERT( !op_insert, NULL );
+00727         <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00728     }
+00729     __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
+00730     chain& c = s.get_chain( h, n_segment_bits );
+00731     chain_mutex_t::scoped_lock chain_lock( c.mutex, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+00732 
+00733     node* b = search_list( key, c );
+00734     <span class="keywordflow">if</span>( op_insert ) {
+00735         <span class="keywordflow">if</span>( !b ) {
+00736             b = create_node(key, t);
+00737             <span class="comment">// Search failed</span>
+00738             <span class="keywordflow">if</span>( !chain_lock.upgrade_to_writer() ) {
+00739                 <span class="comment">// Rerun search_list, in case another thread inserted the item during the upgrade.</span>
+00740                 node* b_temp = search_list( key, c );
+00741                 <span class="keywordflow">if</span>( b_temp ) { <span class="comment">// unfortunately, it did</span>
+00742                     chain_lock.downgrade_to_reader();
+00743                     delete_node( b );
+00744                     b = b_temp;
+00745                     <span class="keywordflow">goto</span> done;
+00746                 }
+00747             }
+00748             ++s.my_logical_size; <span class="comment">// we can't change it earlier due to correctness of size() and exception safety of equal()</span>
+00749             return_value = <span class="keyword">true</span>;
+00750             c.push_front( *b );
+00751         }
+00752     } <span class="keywordflow">else</span> { <span class="comment">// find or count</span>
+00753         <span class="keywordflow">if</span>( !b )      <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00754         return_value = <span class="keyword">true</span>;
+00755     }
+00756 done:
+00757     <span class="keywordflow">if</span>( !result ) <span class="keywordflow">return</span> return_value;
+00758     <span class="keywordflow">if</span>( !result->my_lock.try_acquire( b->mutex, write ) ) {
+00759         <span class="comment">// we are unlucky, prepare for longer wait</span>
+00760         internal::AtomicBackoff trials;
+00761         <span class="keywordflow">do</span> {
+00762             <span class="keywordflow">if</span>( !trials.bounded_pause() ) {
+00763                 <span class="comment">// the wait takes really long, restart the operation</span>
+00764                 chain_lock.release(); segment_lock.release();
+00765                 __TBB_Yield();
+00766                 <span class="keywordflow">goto</span> restart;
+00767             }
+00768         } <span class="keywordflow">while</span>( !result->my_lock.try_acquire( b->mutex, write ) );
+00769     }
+00770     result->my_node = b;
+00771     result->my_hash = h;
+00772     <span class="keywordflow">return</span> return_value;
+00773 }
+00774 
+00775 <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>
+00776 <span class="keyword">template</span><<span class="keyword">typename</span> I>
+00777 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>{
+00778     <a class="code" href="a00195.html#w3">hashcode_t</a> h = my_hash_compare.hash( key );
+00779     size_t segment_index = h&(<a class="code" href="a00195.html#s1">n_segment</a>-1);
+00780     segment& s = my_segment[segment_index ];
+00781     size_t chain_index = (h>>n_segment_bits)&(s.my_physical_size-1);
+00782     <span class="keywordflow">if</span>( !s.my_array )
+00783         <span class="keywordflow">return</span> std::make_pair(end, end);
+00784     chain& c = s.my_array[chain_index];
+00785     node* b = search_list( key, c );
+00786     <span class="keywordflow">if</span>( !b )
+00787         <span class="keywordflow">return</span> std::make_pair(end, end);
+00788     iterator lower(*<span class="keyword">this</span>, segment_index, chain_index, b), upper(lower);
+00789     <span class="keywordflow">return</span> std::make_pair(lower, ++upper);
+00790 }
+00791 
+00792 <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="l00793"></a><a class="code" href="a00174.html#a28">00793</a> <span class="keywordtype">bool</span> <a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A>::erase</a>( <span class="keyword">const</span> Key &key ) {
+00794     hashcode_t h = my_hash_compare.hash( key );
+00795     segment& s = get_segment( h );
+00796     node* b;
+00797     {
+00798         <span class="keywordtype">bool</span> chain_locked_for_write = <span class="keyword">false</span>;
+00799         segment_mutex_t::scoped_lock segment_lock( s.my_mutex, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+00800         <span class="keywordflow">if</span>( !s.my_array ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00801         __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
+00802         chain& c = s.get_chain( h, n_segment_bits );
+00803         chain_mutex_t::scoped_lock chain_lock( c.mutex, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+00804     search:
+00805         node** p = &c.node_list;
+00806         b = *p;
+00807         <span class="keywordflow">while</span>( b && !my_hash_compare.equal(key, b->item.first ) ) {
+00808             p = &b->next;
+00809             b = *p;
+00810         }
+00811         <span class="keywordflow">if</span>( !b ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00812         <span class="keywordflow">if</span>( !chain_locked_for_write && !chain_lock.upgrade_to_writer() ) {
+00813             chain_locked_for_write = <span class="keyword">true</span>;
+00814             <span class="keywordflow">goto</span> search;
+00815         }
+00816         *p = b->next;
+00817         --s.my_logical_size;
+00818     }
+00819     {
+00820         node_mutex_t::scoped_lock item_locker( b->mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
+00821     }
+00822     <span class="comment">// note: there should be no threads pretending to acquire this mutex again, do not try to upgrade const_accessor!</span>
+00823     delete_node( b ); <span class="comment">// Only one thread can delete it due to write lock on the chain_mutex</span>
+00824     <span class="keywordflow">return</span> <span class="keyword">true</span>;        
+00825 }
+00826 
+00827 <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>
+00828 <span class="keywordtype">bool</span> <a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A>::exclude</a>( const_accessor &item_accessor, <span class="keywordtype">bool</span> readonly ) {
+00829     __TBB_ASSERT( item_accessor.my_node, NULL );
+00830     <span class="keyword">const</span> hashcode_t h = item_accessor.my_hash;
+00831     node *<span class="keyword">const</span> b = item_accessor.my_node;
+00832     item_accessor.my_node = NULL; <span class="comment">// we ought release accessor anyway</span>
+00833     segment& s = get_segment( h );
+00834     {
+00835         segment_mutex_t::scoped_lock segment_lock( s.my_mutex, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+00836         __TBB_ASSERT( s.my_array, NULL );
+00837         __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
+00838         chain& c = s.get_chain( h, n_segment_bits );
+00839         chain_mutex_t::scoped_lock chain_lock( c.mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
+00840         node** p = &c.node_list;
+00841         <span class="keywordflow">while</span>( *p && *p != b )
+00842             p = &(*p)->next;
+00843         <span class="keywordflow">if</span>( !*p ) { <span class="comment">// someone else was the first</span>
+00844             item_accessor.my_lock.release();
+00845             <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00846         }
+00847         __TBB_ASSERT( *p == b, NULL );
+00848         *p = b->next;
+00849         --s.my_logical_size;
+00850     }
+00851     <span class="keywordflow">if</span>( readonly ) <span class="comment">// need to get exclusive lock</span>
+00852         item_accessor.my_lock.upgrade_to_writer(); <span class="comment">// return value means nothing here</span>
+00853     item_accessor.my_lock.release();
+00854     delete_node( b ); <span class="comment">// Only one thread can delete it due to write lock on the chain_mutex</span>
+00855     <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00856 }
+00857 
+00858 <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="l00859"></a><a class="code" href="a00174.html#a18">00859</a> <span class="keywordtype">void</span> <a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A>::swap</a>(<a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A></a> &table) {
+00860     std::swap(this->my_allocator, table.<a class="code" href="a00174.html#r0">my_allocator</a>);
+00861     std::swap(this->my_hash_compare, table.<a class="code" href="a00174.html#r1">my_hash_compare</a>);
+00862     std::swap(this->my_segment, table.<a class="code" href="a00174.html#r2">my_segment</a>);
+00863 }
+00864 
+00865 <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="l00866"></a><a class="code" href="a00174.html#a4">00866</a> <span class="keywordtype">void</span> <a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A>::clear</a>() {
+00867 <span class="preprocessor">#if TBB_PERFORMANCE_WARNINGS</span>
+00868 <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>
+00869     <span class="keyword">static</span> <span class="keywordtype">bool</span> reported = <span class="keyword">false</span>;
+00870 <span class="preprocessor">#endif</span>
+00871 <span class="preprocessor"></span>    <span class="keywordflow">for</span>( size_t i=0; i<n_segment; ++i ) {
+00872         segment& s = my_segment[i];
+00873         size_t n = s.my_physical_size;
+00874         <span class="keywordflow">if</span>( chain* array = s.my_array ) {
+00875             s.my_array = NULL;
+00876             s.my_physical_size = 0;
+00877             s.my_logical_size = 0;
+00878             <span class="keywordflow">for</span>( size_t j=0; j<n; ++j ) {
+00879                 <span class="keywordflow">while</span>( node* b = array[j].node_list ) {
+00880                     array[j].node_list = b->next;
+00881                     delete_node(b);
+00882                 }
+00883             }
+00884             <a class="code" href="a00172.html">cache_aligned_allocator<chain></a>().deallocate( array, n );
+00885         }
+00886 <span class="preprocessor">#if TBB_PERFORMANCE_WARNINGS</span>
+00887 <span class="preprocessor"></span>        total_physical_size += n;
+00888         <span class="keywordflow">if</span>(min_physical_size > n) min_physical_size = n;
+00889         <span class="keywordflow">if</span>(max_physical_size < n) max_physical_size = n;
+00890     }
+00891     <span class="keywordflow">if</span>( !reported
+00892         && ( (total_physical_size >= n_segment*48 && min_physical_size < total_physical_size/n_segment/2)
+00893          || (total_physical_size >= n_segment*128 && max_physical_size > total_physical_size/n_segment*2) ) )
+00894     {
+00895         reported = <span class="keyword">true</span>;
+00896         internal::runtime_warning(
+00897             <span class="stringliteral">"Performance is not optimal because the hash function produces bad randomness in lower bits in %s"</span>,
+00898             <span class="keyword">typeid</span>(*this).name() );
+00899 <span class="preprocessor">#endif</span>
+00900 <span class="preprocessor"></span>    }
+00901 }
+00902 
+00903 <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>
+00904 <span class="keywordtype">void</span> <a class="code" href="a00174.html">concurrent_hash_map<Key,T,HashCompare,A>::grow_segment</a>( segment_mutex_t::scoped_lock& segment_lock, segment& s ) {
+00905     <span class="comment">// Following is second check in a double-check.</span>
+00906     <span class="keywordflow">if</span>( s.my_logical_size >= s.my_physical_size ) {
+00907         chain* old_array = s.my_array;
+00908         size_t old_size = s.my_physical_size;
+00909         s.allocate_array( s.my_logical_size+1 );
+00910         <span class="keywordflow">for</span>( size_t k=0; k<old_size; ++k )
+00911             <span class="keywordflow">while</span>( node* b = old_array[k].node_list ) {
+00912                 old_array[k].node_list = b->next;
+00913                 hashcode_t h = my_hash_compare.hash( b->item.first );
+00914                 __TBB_ASSERT( &get_segment(h)==&s, <span class="stringliteral">"hash function changed?"</span> );
+00915                 s.get_chain(h,n_segment_bits).push_front(*b);
+00916             }
+00917         cache_aligned_allocator<chain>().deallocate( old_array, old_size );
+00918     }
+00919     segment_lock.downgrade_to_reader();
+00920 }
+00921 
+00922 <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>
+00923 <span class="keywordtype">void</span> concurrent_hash_map<Key,T,HashCompare,A>::internal_copy( <span class="keyword">const</span> concurrent_hash_map& source ) {
+00924     <span class="keywordflow">for</span>( size_t i=0; i<n_segment; ++i ) {
+00925         segment& s = source.my_segment[i];
+00926         __TBB_ASSERT( !my_segment[i].my_array, <span class="stringliteral">"caller should have cleared"</span> );
+00927         <span class="keywordflow">if</span>( s.my_logical_size ) {
+00928             segment& d = my_segment[i];
+00929             d.allocate_array( s.my_logical_size );
+00930             d.my_logical_size = s.my_logical_size;
+00931             size_t s_size = s.my_physical_size;
+00932             chain* s_array = s.my_array;
+00933             chain* d_array = d.my_array;
+00934             <span class="keywordflow">for</span>( size_t k=0; k<s_size; ++k )
+00935                 <span class="keywordflow">for</span>( node* b = s_array[k].node_list; b; b=b->next ) {
+00936                     __TBB_ASSERT( &get_segment(my_hash_compare.hash( b->item.first ))==&d, <span class="stringliteral">"hash function changed?"</span> );
+00937                     node* b_new = create_node(b->item.first, &b->item.second);
+00938                     d_array[k].push_front(*b_new); <span class="comment">// hashcode is the same and segment and my_physical sizes are the same</span>
+00939                 }
+00940         }
+00941     }
+00942 }
+00943 
+00944 <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>
+00945 <span class="keyword">template</span><<span class="keyword">typename</span> I>
+00946 <span class="keywordtype">void</span> concurrent_hash_map<Key,T,HashCompare,A>::internal_copy(I first, I last) {
+00947     <span class="keywordflow">for</span>(; first != last; ++first)
+00948         <a class="code" href="a00174.html#a22">insert</a>( *first );
+00949 }
+00950 
+00951 <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>
+00952 <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) {
+00953     <span class="keywordflow">if</span>(a.size() != b.size()) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00954     <span class="keyword">typename</span> concurrent_hash_map<Key, T, HashCompare, A1>::const_iterator i(a.begin()), i_end(a.end());
+00955     <span class="keyword">typename</span> concurrent_hash_map<Key, T, HashCompare, A2>::const_iterator j, j_end(b.end());
+00956     <span class="keywordflow">for</span>(; i != i_end; ++i) {
+00957         j = b.equal_range(i->first).first;
+00958         <span class="keywordflow">if</span>( j == j_end || !(i->second == j->second) ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00959     }
+00960     <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00961 }
+00962 
+00963 <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>
+00964 <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)
+00965 {    <span class="keywordflow">return</span> !(a == b); }
+00966 
+00967 <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>
+00968 <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)
+00969 {    a.swap( b ); }
+00970 
+00971 } <span class="comment">// namespace tbb</span>
+00972 
+00973 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_hash_map_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00290.html
new file mode 100644
index 0000000..4aa9616
--- /dev/null
+++ b/doc/html/a00290.html
@@ -0,0 +1,327 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>concurrent_queue.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_concurrent_queue_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_queue_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
+00026 <span class="preprocessor">#include "tbb_allocator.h"</span>
+00027 <span class="preprocessor">#include <new></span>
+00028 
+00029 <span class="keyword">namespace </span>tbb {
+00030 
+00031 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A = cache_aligned_allocator<T> > 
+00032 <span class="keyword">class </span>concurrent_queue;
+00033 
+00035 <span class="keyword">namespace </span>internal {
+00036 
+00037 <span class="keyword">class </span>concurrent_queue_rep;
+00038 <span class="keyword">class </span>concurrent_queue_iterator_rep;
+00039 <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
+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;
+00041 
+00043 
+<a name="l00045"></a><a class="code" href="a00178.html">00045</a> <span class="keyword">class </span><a class="code" href="a00178.html">concurrent_queue_base_v3</a>: <a class="code" href="a00200.html">no_copy</a> {
+00047     concurrent_queue_rep* my_rep;
+00048 
+00049     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_rep;
+00050     <span class="keyword">friend</span> <span class="keyword">struct </span>micro_queue;
+00051     <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue_pop_finalizer;
+00052     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_rep;
+00053     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a>;
+00054 <span class="keyword">protected</span>:
+<a name="l00056"></a><a class="code" href="a00179.html">00056</a>     <span class="keyword">struct </span><a class="code" href="a00179.html">page</a> {
+00057         <a class="code" href="a00179.html">page</a>* next;
+00058         <a class="code" href="a00279.html#a13">uintptr</a> mask; 
+00059     };
+00060 
+<a name="l00062"></a><a class="code" href="a00178.html#p0">00062</a>     ptrdiff_t my_capacity;
+00063    
+<a name="l00065"></a><a class="code" href="a00178.html#p1">00065</a>     size_t items_per_page;
+00066 
+<a name="l00068"></a><a class="code" href="a00178.html#p2">00068</a>     size_t item_size;
+00069 
+00070 <span class="keyword">private</span>:
+00071     <span class="keyword">virtual</span> <span class="keywordtype">void</span> copy_item( <a class="code" href="a00179.html">page</a>& dst, size_t index, <span class="keyword">const</span> <span class="keywordtype">void</span>* src ) = 0;
+00072     <span class="keyword">virtual</span> <span class="keywordtype">void</span> assign_and_destroy_item( <span class="keywordtype">void</span>* dst, <a class="code" href="a00179.html">page</a>& src, size_t index ) = 0;
+00073 <span class="keyword">protected</span>:
+00074     <a class="code" href="a00178.html">concurrent_queue_base_v3</a>( size_t item_size );
+00075     <span class="keyword">virtual</span> ~<a class="code" href="a00178.html">concurrent_queue_base_v3</a>();
+00076 
+00078     <span class="keywordtype">void</span> internal_push( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
+00079 
+00081     <span class="keywordtype">void</span> internal_pop( <span class="keywordtype">void</span>* dst );
+00082 
+00084     <span class="keywordtype">bool</span> internal_push_if_not_full( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
+00085 
+00087 
+00088     <span class="keywordtype">bool</span> internal_pop_if_present( <span class="keywordtype">void</span>* dst );
+00089 
+00091     ptrdiff_t internal_size() <span class="keyword">const</span>;
+00092 
+00094     <span class="keywordtype">void</span> internal_set_capacity( ptrdiff_t capacity, size_t element_size );
+00095 
+00097     <span class="keyword">virtual</span> <a class="code" href="a00179.html">page</a> *allocate_page() = 0;
+00098 
+00100     <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( <a class="code" href="a00179.html">page</a> *p ) = 0;
+00101 
+00103     <span class="keywordtype">void</span> internal_finish_clear() ;
+00104 
+00106     <span class="keywordtype">void</span> internal_throw_exception() <span class="keyword">const</span>;
+00107 };
+00108 
+00109 <span class="keyword">typedef</span> <a class="code" href="a00178.html">concurrent_queue_base_v3</a> <a class="code" href="a00178.html">concurrent_queue_base</a> ;
+00110 
+00112 
+<a name="l00113"></a><a class="code" href="a00181.html">00113</a> <span class="keyword">class </span><a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a> {
+00115 
+00116     concurrent_queue_iterator_rep* my_rep;
+00117 
+00118     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00119     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00180.html">concurrent_queue_iterator<C,T></a>& i, <span class="keyword">const</span> <a class="code" href="a00180.html">concurrent_queue_iterator<C,U></a>& j );
+00120 
+00121     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00122     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> <a class="code" href="a00180.html">concurrent_queue_iterator<C,T></a>& i, <span class="keyword">const</span> <a class="code" href="a00180.html">concurrent_queue_iterator<C,U></a>& j );
+00123 <span class="keyword">protected</span>:
+<a name="l00125"></a><a class="code" href="a00181.html#p0">00125</a>     <span class="keyword">mutable</span> <span class="keywordtype">void</span>* my_item;
+00126 
+<a name="l00128"></a><a class="code" href="a00181.html#b0">00128</a>     <a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a>() : my_rep(NULL), my_item(NULL) {}
+00129 
+<a name="l00131"></a><a class="code" href="a00181.html#b1">00131</a>     <a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a>( <span class="keyword">const</span> <a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a>& i ) : my_rep(NULL), my_item(NULL) {
+00132         assign(i);
+00133     }
+00134 
+00136     <a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a>( <span class="keyword">const</span> concurrent_queue_base& queue );
+00137 
+00139     <span class="keywordtype">void</span> assign( <span class="keyword">const</span> <a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a>& i );
+00140 
+00142     <span class="keywordtype">void</span> advance();
+00143 
+00145     ~<a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a>();
+00146 };
+00147 
+00148 <span class="keyword">typedef</span> concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base;
+00149 
+00151 
+00153 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00154"></a><a class="code" href="a00180.html">00154</a> <span class="keyword">class </span><a class="code" href="a00180.html">concurrent_queue_iterator</a>: <span class="keyword">public</span> <a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a> {
+00155 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
+00156 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00157     <span class="keyword">friend</span> class ::tbb::concurrent_queue;
+00158 <span class="preprocessor">#else</span>
+00159 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
+00160 <span class="preprocessor">#endif </span>
+00161 <span class="preprocessor"></span>
+00162     <a class="code" href="a00180.html">concurrent_queue_iterator</a>( <span class="keyword">const</span> concurrent_queue_base& queue ) :
+00163         <a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a>(queue)
+00164     {
+00165     }
+00166 <span class="keyword">public</span>:
+00167     <a class="code" href="a00180.html">concurrent_queue_iterator</a>() {}
+00168 
+<a name="l00171"></a><a class="code" href="a00180.html#a1">00171</a>     <a class="code" href="a00180.html">concurrent_queue_iterator</a>( <span class="keyword">const</span> <a class="code" href="a00180.html">concurrent_queue_iterator<Container,typename Container::value_type></a>& other ) :
+00172         <a class="code" href="a00181.html">concurrent_queue_iterator_base_v3</a>(other)
+00173     {}
+00174 
+<a name="l00176"></a><a class="code" href="a00180.html#a2">00176</a>     <a class="code" href="a00180.html">concurrent_queue_iterator</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00180.html">concurrent_queue_iterator</a>& other ) {
+00177         assign(other);
+00178         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00179     }
+00180 
+<a name="l00182"></a><a class="code" href="a00180.html#a3">00182</a>     Value& operator*()<span class="keyword"> const </span>{
+00183         <span class="keywordflow">return</span> *static_cast<Value*>(my_item);
+00184     }
+00185 
+00186     Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
+00187 
+<a name="l00189"></a><a class="code" href="a00180.html#a5">00189</a>     <a class="code" href="a00180.html">concurrent_queue_iterator</a>& operator++() {
+00190         advance();
+00191         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00192     }
+00193 
+<a name="l00195"></a><a class="code" href="a00180.html#a6">00195</a>     Value* operator++(<span class="keywordtype">int</span>) {
+00196         Value* result = &operator*();
+00197         operator++();
+00198         <span class="keywordflow">return</span> result;
+00199     }
+00200 }; <span class="comment">// concurrent_queue_iterator</span>
+00201 
+00202 
+00203 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00204 <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 ) {
+00205     <span class="keywordflow">return</span> i.my_item==j.my_item;
+00206 }
+00207 
+00208 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00209 <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 ) {
+00210     <span class="keywordflow">return</span> i.my_item!=j.my_item;
+00211 }
+00212 
+00213 } <span class="comment">// namespace internal;</span>
+00214 
+00216 
+00218 
+00221 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00222"></a><a class="code" href="a00177.html">00222</a> <span class="keyword">class </span><a class="code" href="a00177.html">concurrent_queue</a>: <span class="keyword">public</span> internal::concurrent_queue_base_v3 {
+00223     <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><a class="code" href="a00180.html">internal::concurrent_queue_iterator</a>;
+00224 
+00226     <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template rebind<char>::other page_allocator_type;
+00227     page_allocator_type my_allocator;
+00228 
+00230     <span class="keyword">class </span>destroyer {
+00231         T& my_value;
+00232     <span class="keyword">public</span>:
+00233         destroyer( T& value ) : my_value(value) {}
+00234         ~destroyer() {my_value.~T();}          
+00235     };
+00236 
+00237     T& get_ref( page& page, size_t index ) {
+00238         __TBB_ASSERT( index<items_per_page, NULL );
+00239         <span class="keywordflow">return</span> static_cast<T*>(static_cast<void*>(&page+1))[index];
+00240     }
+00241 
+00242     <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 ) {
+00243         <span class="keyword">new</span>( &get_ref(dst,index) ) T(*static_cast<const T*>(src)); 
+00244     }
+00245 
+00246     <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 ) {
+00247         T& from = get_ref(src,index);
+00248         destroyer d(from);
+00249         *static_cast<T*>(dst) = from;
+00250     }
+00251 
+00252     <span class="comment">/*overide*/</span> <span class="keyword">virtual</span> page *allocate_page() {
+00253         size_t n = <span class="keyword">sizeof</span>(page) + items_per_page*item_size;
+00254         page *p = reinterpret_cast<page*>(my_allocator.allocate( n ));
+00255         <span class="keywordflow">if</span>( !p ) internal_throw_exception(); 
+00256         <span class="keywordflow">return</span> p;
+00257     }
+00258     
+00259     <span class="comment">/*override*/</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( page *p ) {
+00260         size_t n = <span class="keyword">sizeof</span>(page) + items_per_page*item_size;
+00261         my_allocator.deallocate( reinterpret_cast<char*>(p), n );
+00262     }
+00263 
+00264 <span class="keyword">public</span>:
+<a name="l00266"></a><a class="code" href="a00177.html#w0">00266</a>     <span class="keyword">typedef</span> T value_type;
+00267 
+<a name="l00269"></a><a class="code" href="a00177.html#w1">00269</a>     <span class="keyword">typedef</span> A allocator_type;
+00270 
+<a name="l00272"></a><a class="code" href="a00177.html#w2">00272</a>     <span class="keyword">typedef</span> T& reference;
+00273 
+<a name="l00275"></a><a class="code" href="a00177.html#w3">00275</a>     <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+00276 
+00278 
+<a name="l00280"></a><a class="code" href="a00177.html#w4">00280</a>     <span class="keyword">typedef</span> std::ptrdiff_t size_type;
+00281 
+<a name="l00283"></a><a class="code" href="a00177.html#w5">00283</a>     <span class="keyword">typedef</span> std::ptrdiff_t difference_type;
+00284 
+<a name="l00286"></a><a class="code" href="a00177.html#a0">00286</a>     <a class="code" href="a00177.html">concurrent_queue</a>(<span class="keyword">const</span> allocator_type  &a = allocator_type()) : 
+00287         concurrent_queue_base_v3( sizeof(T) )
+00288             , my_allocator( a )
+00289     {
+00290     }
+00291 
+00293     ~<a class="code" href="a00177.html">concurrent_queue</a>();
+00294 
+<a name="l00296"></a><a class="code" href="a00177.html#a2">00296</a>     <span class="keywordtype">void</span> push( <span class="keyword">const</span> T& source ) {
+00297         internal_push( &source );
+00298     }
+00299 
+00301 
+<a name="l00302"></a><a class="code" href="a00177.html#a3">00302</a>     <span class="keywordtype">void</span> pop( T& destination ) {
+00303         internal_pop( &destination );
+00304     }
+00305 
+00307 
+<a name="l00309"></a><a class="code" href="a00177.html#a4">00309</a>     <span class="keywordtype">bool</span> push_if_not_full( <span class="keyword">const</span> T& source ) {
+00310         <span class="keywordflow">return</span> internal_push_if_not_full( &source );
+00311     }
+00312 
+00314 
+<a name="l00316"></a><a class="code" href="a00177.html#a5">00316</a>     <span class="keywordtype">bool</span> pop_if_present( T& destination ) {
+00317         <span class="keywordflow">return</span> internal_pop_if_present( &destination );
+00318     }
+00319 
+00321 
+<a name="l00324"></a><a class="code" href="a00177.html#a6">00324</a>     size_type size()<span class="keyword"> const </span>{<span class="keywordflow">return</span> internal_size();}
+00325 
+<a name="l00327"></a><a class="code" href="a00177.html#a7">00327</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> size()<=0;}
+00328 
+<a name="l00330"></a><a class="code" href="a00177.html#a8">00330</a>     size_type capacity()<span class="keyword"> const </span>{
+00331         <span class="keywordflow">return</span> my_capacity;
+00332     }
+00333 
+00335 
+<a name="l00337"></a><a class="code" href="a00177.html#a9">00337</a>     <span class="keywordtype">void</span> set_capacity( size_type capacity ) {
+00338         internal_set_capacity( capacity, <span class="keyword">sizeof</span>(T) );
+00339     }
+00340 
+<a name="l00342"></a><a class="code" href="a00177.html#a10">00342</a>     allocator_type get_allocator()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
+00343 
+00345     <span class="keywordtype">void</span> clear() ;
+00346 
+00347     <span class="keyword">typedef</span> <a class="code" href="a00180.html">internal::concurrent_queue_iterator<concurrent_queue,T></a> iterator;
+00348     <span class="keyword">typedef</span> <a class="code" href="a00180.html">internal::concurrent_queue_iterator<concurrent_queue,const T></a> const_iterator;
+00349 
+00350     <span class="comment">//------------------------------------------------------------------------</span>
+00351     <span class="comment">// The iterators are intended only for debugging.  They are slow and not thread safe.</span>
+00352     <span class="comment">//------------------------------------------------------------------------</span>
+00353     iterator begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>);}
+00354     iterator end() {<span class="keywordflow">return</span> iterator();}
+00355     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>);}
+00356     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator();}
+00357     
+00358 }; 
+00359 
+00360 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00361"></a><a class="code" href="a00177.html#a1">00361</a> <a class="code" href="a00177.html">concurrent_queue<T,A>::~concurrent_queue</a>() {
+00362     <a class="code" href="a00177.html#a11">clear</a>();
+00363 }
+00364 
+00365 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00366"></a><a class="code" href="a00177.html#a11">00366</a> <span class="keywordtype">void</span> <a class="code" href="a00177.html">concurrent_queue<T,A>::clear</a>() {
+00367     <span class="keywordflow">while</span>( !<a class="code" href="a00177.html#a7">empty</a>() ) {
+00368         T value;
+00369         <a class="code" href="a00178.html#b5">internal_pop_if_present</a>(&value);
+00370     }
+00371     <a class="code" href="a00178.html#b10">internal_finish_clear</a>();
+00372 }
+00373 
+00374 } <span class="comment">// namespace tbb</span>
+00375 
+00376 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_queue_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00291.html b/doc/html/a00291.html
new file mode 100644
index 0000000..470f475
--- /dev/null
+++ b/doc/html/a00291.html
@@ -0,0 +1,787 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>concurrent_vector.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_concurrent_vector_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_vector_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 <span class="preprocessor">#include <algorithm></span>
+00026 <span class="preprocessor">#include <iterator></span>
+00027 <span class="preprocessor">#include <memory></span>
+00028 <span class="preprocessor">#include <limits></span>
+00029 <span class="preprocessor">#include <new></span>
+00030 <span class="preprocessor">#include <cstring></span>
+00031 <span class="preprocessor">#include "atomic.h"</span>
+00032 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
+00033 <span class="preprocessor">#include "blocked_range.h"</span>
+00034 
+00035 <span class="preprocessor">#include "tbb_machine.h"</span>
+00036 
+00037 <span class="preprocessor">#if defined(_MSC_VER) && defined(_Wp64)</span>
+00038 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warnings in /Wp64 mode</span>
+00039 <span class="preprocessor">    #pragma warning (push)</span>
+00040 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4267)</span>
+00041 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER && _Wp64 */</span>
+00042 
+00043 <span class="keyword">namespace </span>tbb {
+00044 
+00045 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A = cache_aligned_allocator<T> >
+00046 <span class="keyword">class </span>concurrent_vector;
+00047 
+00049 <span class="preprocessor">#define __TBB_BAD_ALLOC reinterpret_cast<void*>(63)</span>
+00050 <span class="preprocessor"></span>
+00052 <span class="keyword">namespace </span>internal {
+00053 
+00055 
+<a name="l00056"></a><a class="code" href="a00183.html">00056</a>     <span class="keyword">class </span><a class="code" href="a00183.html">concurrent_vector_base_v3</a> {
+00057     <span class="keyword">protected</span>:
+00058 
+00059         <span class="comment">// Basic types declarations</span>
+00060         <span class="keyword">typedef</span> size_t segment_index_t;
+00061         <span class="keyword">typedef</span> size_t size_type;
+00062 
+00063         <span class="comment">// Using enumerations due to Mac linking problems of static const variables</span>
+00064         <span class="keyword">enum</span> {
+00065             <span class="comment">// Size constants</span>
+00066             default_initial_segments = 1, <span class="comment">// 2 initial items</span>
+00068 <span class="comment"></span>            pointers_per_short_table = 3, <span class="comment">// to fit into 8 words of entire structure</span>
+00069             pointers_per_long_table = <span class="keyword">sizeof</span>(segment_index_t) * 8 <span class="comment">// one segment per bit</span>
+00070         };
+00071 
+00072         <span class="comment">// Segment pointer. Can be zero-initialized</span>
+00073         <span class="keyword">struct </span>segment_t {
+00074             <span class="keywordtype">void</span>* array;
+00075 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00076 <span class="preprocessor"></span>            ~segment_t() {
+00077                 __TBB_ASSERT( array <= __TBB_BAD_ALLOC, <span class="stringliteral">"should have been freed by clear"</span> );
+00078             }
+00079 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00080         };
+00081  
+00082         <span class="comment">// Data fields</span>
+00083 
+00085         <span class="keywordtype">void</span>* (*vector_allocator_ptr)(<a class="code" href="a00183.html">concurrent_vector_base_v3</a> &, size_t);
+00086 
+<a name="l00088"></a><a class="code" href="a00183.html#p1">00088</a>         <a class="code" href="a00165.html">atomic<size_type></a> my_first_block;
+00089 
+<a name="l00091"></a><a class="code" href="a00183.html#p2">00091</a>         <a class="code" href="a00165.html">atomic<size_type></a> my_early_size;
+00092 
+<a name="l00094"></a><a class="code" href="a00183.html#p3">00094</a>         <a class="code" href="a00165.html">atomic<segment_t*></a> my_segment;
+00095 
+<a name="l00097"></a><a class="code" href="a00183.html#p4">00097</a>         segment_t my_storage[pointers_per_short_table];
+00098 
+00099         <span class="comment">// Methods</span>
+00100 
+00101         concurrent_vector_base_v3() {
+00102             my_early_size = 0;
+00103             my_first_block = 0; <span class="comment">// here is not default_initial_segments</span>
+00104             <span class="keywordflow">for</span>( segment_index_t i = 0; i < pointers_per_short_table; i++)
+00105                 my_storage[i].array = NULL;
+00106             my_segment = my_storage;
+00107         }
+00108         ~concurrent_vector_base_v3();
+00109 
+00110         <span class="keyword">static</span> segment_index_t segment_index_of( size_type index ) {
+00111             <span class="keywordflow">return</span> segment_index_t( __TBB_Log2( index|1 ) );
+00112         }
+00113 
+00114         <span class="keyword">static</span> segment_index_t segment_base( segment_index_t k ) {
+00115             <span class="keywordflow">return</span> (segment_index_t(1)<<k & ~segment_index_t(1));
+00116         }
+00117 
+00118         <span class="keyword">static</span> <span class="keyword">inline</span> segment_index_t segment_base_index_of( segment_index_t &index ) {
+00119             segment_index_t k = segment_index_of( index );
+00120             index -= segment_base(k);
+00121             <span class="keywordflow">return</span> k;
+00122         }
+00123 
+00124         <span class="keyword">static</span> size_type segment_size( segment_index_t k ) {
+00125             <span class="keywordflow">return</span> segment_index_t(1)<<k; <span class="comment">// fake value for k==0</span>
+00126         }
+00127 
+<a name="l00129"></a><a class="code" href="a00183.html#x2">00129</a>         <span class="keyword">typedef</span> void(*internal_array_op1)(<span class="keywordtype">void</span>* begin, size_type n );
+00130 
+<a name="l00132"></a><a class="code" href="a00183.html#x3">00132</a>         <span class="keyword">typedef</span> void(*internal_array_op2)(<span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
+00133 
+<a name="l00135"></a><a class="code" href="a00184.html">00135</a>         <span class="keyword">struct </span><a class="code" href="a00184.html">internal_segments_table</a> {
+00136             segment_index_t first_block;
+00137             <span class="keywordtype">void</span>* table[pointers_per_long_table];
+00138         };
+00139 
+00140         <span class="keywordtype">void</span> internal_reserve( size_type n, size_type element_size, size_type max_size );
+00141         size_type internal_capacity() <span class="keyword">const</span>;
+00142         <span class="keywordtype">void</span> 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 );
+00143         <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 );
+00144         size_type 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 );
+00145         <span class="keywordtype">void</span>* internal_push_back( size_type element_size, size_type& index );
+00146         segment_index_t internal_clear( internal_array_op1 destroy );
+00147         <span class="keywordtype">void</span>* internal_compact( size_type element_size, <span class="keywordtype">void</span> *table, internal_array_op1 destroy, internal_array_op2 copy );
+00148         <span class="keywordtype">void</span> internal_copy( <span class="keyword">const</span> concurrent_vector_base_v3& src, size_type element_size, internal_array_op2 copy );
+00149         <span class="keywordtype">void</span> internal_assign( <span class="keyword">const</span> concurrent_vector_base_v3& src, size_type element_size,
+00150                               internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy );
+00151         <span class="keywordtype">void</span> internal_throw_exception(size_type) <span class="keyword">const</span>;
+00152         <span class="keywordtype">void</span> internal_swap(concurrent_vector_base_v3& v);
+00153 
+00154 <span class="keyword">private</span>:
+00156         <span class="keyword">class </span>helper;
+00157         <span class="keyword">friend</span> <span class="keyword">class </span>helper;
+00158     };
+00159     
+00160     <span class="keyword">typedef</span> concurrent_vector_base_v3 <a class="code" href="a00183.html">concurrent_vector_base</a>;
+00161 
+00162     <span class="comment">//TODO[?]: deal with _Range_checked_iterator_tag of MSVC</span>
+00164 <span class="comment"></span>
+00166     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00167"></a><a class="code" href="a00238.html">00167</a>     <span class="keyword">class </span><a class="code" href="a00238.html">vector_iterator</a> 
+00168 #if defined(_WIN64) && defined(_MSC_VER) 
+00169         <span class="comment">// Ensure that Microsoft's internal template function _Val_type works correctly.</span>
+00170         : public std::iterator<std::random_access_iterator_tag,Value>
+00171 #endif <span class="comment">/* defined(_WIN64) && defined(_MSC_VER) */</span>
+00172     {
+00174         Container* my_vector;
+00175 
+00177         size_t my_index;
+00178 
+00180 
+00181         <span class="keyword">mutable</span> Value* my_item;
+00182 
+00183         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T>
+00184         <span class="keyword">friend</span> <a class="code" href="a00238.html">vector_iterator<C,T></a> operator+( ptrdiff_t offset, <span class="keyword">const</span> <a class="code" href="a00238.html">vector_iterator<C,T></a>& v );
+00185 
+00186         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00187         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00238.html">vector_iterator<C,T></a>& i, <span class="keyword">const</span> <a class="code" href="a00238.html">vector_iterator<C,U></a>& j );
+00188 
+00189         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00190         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<( const vector_iterator<C,T>& i, <span class="keyword">const</span> <a class="code" href="a00238.html">vector_iterator<C,U></a>& j );
+00191 
+00192         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00193         <span class="keyword">friend</span> ptrdiff_t operator-( <span class="keyword">const</span> <a class="code" href="a00238.html">vector_iterator<C,T></a>& i, <span class="keyword">const</span> <a class="code" href="a00238.html">vector_iterator<C,U></a>& j );
+00194     
+00195         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
+00196         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00238.html">internal::vector_iterator</a>;
+00197 
+00198 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
+00199 <span class="preprocessor"></span>        <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00200         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00182.html">tbb::concurrent_vector</a>;
+00201 <span class="preprocessor">#else</span>
+00202 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
+00203 <span class="preprocessor">#endif </span>
+00204 <span class="preprocessor"></span>
+00205         <a class="code" href="a00238.html">vector_iterator</a>( <span class="keyword">const</span> Container& vector, size_t index ) : 
+00206             my_vector(const_cast<Container*>(&vector)), 
+00207             my_index(index), 
+00208             my_item(NULL)
+00209         {}
+00210 
+00211     <span class="keyword">public</span>:
+<a name="l00213"></a><a class="code" href="a00238.html#a0">00213</a>         <a class="code" href="a00238.html">vector_iterator</a>() : my_vector(NULL), my_index(~size_t(0)), my_item(NULL) {}
+00214 
+00215         <a class="code" href="a00238.html">vector_iterator</a>( <span class="keyword">const</span> <a class="code" href="a00238.html">vector_iterator<Container,typename Container::value_type></a>& other ) :
+00216             my_vector(other.my_vector),
+00217             my_index(other.my_index),
+00218             my_item(other.my_item)
+00219         {}
+00220 
+00221         vector_iterator operator+( ptrdiff_t offset )<span class="keyword"> const </span>{
+00222             <span class="keywordflow">return</span> vector_iterator( *my_vector, my_index+offset );
+00223         }
+00224         vector_iterator operator+=( ptrdiff_t offset ) {
+00225             my_index+=offset;
+00226             my_item = NULL;
+00227             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00228         }
+00229         vector_iterator operator-( ptrdiff_t offset )<span class="keyword"> const </span>{
+00230             <span class="keywordflow">return</span> vector_iterator( *my_vector, my_index-offset );
+00231         }
+00232         vector_iterator operator-=( ptrdiff_t offset ) {
+00233             my_index-=offset;
+00234             my_item = NULL;
+00235             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00236         }
+00237         Value& operator*()<span class="keyword"> const </span>{
+00238             Value* item = my_item;
+00239             <span class="keywordflow">if</span>( !item ) {
+00240                 item = my_item = &my_vector->internal_subscript(my_index);
+00241             }
+00242             __TBB_ASSERT( item==&my_vector->internal_subscript(my_index), <span class="stringliteral">"corrupt cache"</span> );
+00243             <span class="keywordflow">return</span> *item;
+00244         }
+00245         Value& <a class="code" href="a00182.html#a12">operator[]</a>( ptrdiff_t k )<span class="keyword"> const </span>{
+00246             <span class="keywordflow">return</span> my_vector->internal_subscript(my_index+k);
+00247         }
+00248         Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
+00249 
+<a name="l00251"></a><a class="code" href="a00238.html#a9">00251</a>         <a class="code" href="a00238.html">vector_iterator</a>& operator++() {
+00252             size_t k = ++my_index;
+00253             <span class="keywordflow">if</span>( my_item ) {
+00254                 <span class="comment">// Following test uses 2's-complement wizardry</span>
+00255                 <span class="keywordflow">if</span>( (k& (k-2))==0 ) {
+00256                     <span class="comment">// k is a power of two that is at least k-2</span>
+00257                     my_item= NULL;
+00258                 } <span class="keywordflow">else</span> {
+00259                     ++my_item;
+00260                 }
+00261             }
+00262             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00263         }
+00264 
+<a name="l00266"></a><a class="code" href="a00238.html#a10">00266</a>         <a class="code" href="a00238.html">vector_iterator</a>& operator--() {
+00267             __TBB_ASSERT( my_index>0, <span class="stringliteral">"operator--() applied to iterator already at beginning of concurrent_vector"</span> ); 
+00268             size_t k = my_index--;
+00269             <span class="keywordflow">if</span>( my_item ) {
+00270                 <span class="comment">// Following test uses 2's-complement wizardry</span>
+00271                 <span class="keywordflow">if</span>( (k& (k-2))==0 ) {
+00272                     <span class="comment">// k is a power of two that is at least k-2  </span>
+00273                     my_item= NULL;
+00274                 } <span class="keywordflow">else</span> {
+00275                     --my_item;
+00276                 }
+00277             }
+00278             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00279         }
+00280 
+<a name="l00282"></a><a class="code" href="a00238.html#a11">00282</a>         <a class="code" href="a00238.html">vector_iterator</a> operator++(<span class="keywordtype">int</span>) {
+00283             <a class="code" href="a00238.html">vector_iterator</a> result = *<span class="keyword">this</span>;
+00284             operator++();
+00285             <span class="keywordflow">return</span> result;
+00286         }
+00287 
+<a name="l00289"></a><a class="code" href="a00238.html#a12">00289</a>         <a class="code" href="a00238.html">vector_iterator</a> operator--(<span class="keywordtype">int</span>) {
+00290             <a class="code" href="a00238.html">vector_iterator</a> result = *<span class="keyword">this</span>;
+00291             operator--();
+00292             <span class="keywordflow">return</span> result;
+00293         }
+00294 
+00295         <span class="comment">// STL support</span>
+00296 
+00297         <span class="keyword">typedef</span> ptrdiff_t difference_type;
+00298         <span class="keyword">typedef</span> Value value_type;
+00299         <span class="keyword">typedef</span> Value* pointer;
+00300         <span class="keyword">typedef</span> Value& reference;
+00301         <span class="keyword">typedef</span> std::random_access_iterator_tag iterator_category;
+00302     };
+00303 
+00304     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T>
+00305     vector_iterator<Container,T> operator+( ptrdiff_t offset, <span class="keyword">const</span> vector_iterator<Container,T>& v ) {
+00306         <span class="keywordflow">return</span> vector_iterator<Container,T>( *v.my_vector, v.my_index+offset );
+00307     }
+00308 
+00309     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00310     <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 ) {
+00311         <span class="keywordflow">return</span> i.<a class="code" href="a00238.html#r1">my_index</a>==j.<a class="code" href="a00238.html#r1">my_index</a>;
+00312     }
+00313 
+00314     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00315     <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 ) {
+00316         <span class="keywordflow">return</span> !(i==j);
+00317     }
+00318 
+00319     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00320     <span class="keywordtype">bool</span> operator<( const vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+00321         <span class="keywordflow">return</span> i.<a class="code" href="a00238.html#r1">my_index</a><j.<a class="code" href="a00238.html#r1">my_index</a>;
+00322     }
+00323 
+00324     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00325     <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 ) {
+00326         <span class="keywordflow">return</span> j<i;
+00327     }
+00328 
+00329     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00330     <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 ) {
+00331         <span class="keywordflow">return</span> !(i<j);
+00332     }
+00333 
+00334     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00335     <span class="keywordtype">bool</span> operator<=( const vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+00336         <span class="keywordflow">return</span> !(j<i);
+00337     }
+00338 
+00339     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00340     ptrdiff_t operator-( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+00341         <span class="keywordflow">return</span> ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index);
+00342     }
+00343 
+00344     <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00345     <span class="keyword">class </span>allocator_base {
+00346     <span class="keyword">public</span>:
+00347         <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template
+00348             rebind<T>::other allocator_type;
+00349         allocator_type my_allocator;
+00350 
+00351         allocator_base(<span class="keyword">const</span> allocator_type &a = allocator_type() ) : my_allocator(a) {}
+00352     };
+00353 
+00354 } <span class="comment">// namespace internal</span>
+00356 <span class="comment"></span>
+00358 
+00413 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00414"></a><a class="code" href="a00182.html">00414</a> <span class="keyword">class </span><a class="code" href="a00182.html">concurrent_vector</a>: <span class="keyword">protected</span> internal::allocator_base<T, A>,
+00415                          <span class="keyword">private</span> internal::concurrent_vector_base_v3 {
+00416 <span class="keyword">private</span>:
+00417     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+00418     <span class="keyword">class </span>generic_range_type: <span class="keyword">public</span> <a class="code" href="a00169.html">blocked_range</a><I> {
+00419     <span class="keyword">public</span>:
+00420         <span class="keyword">typedef</span> T value_type;
+00421         <span class="keyword">typedef</span> T& reference;
+00422         <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+00423         <span class="keyword">typedef</span> I <a class="code" href="a00238.html">iterator</a>;
+00424         <span class="keyword">typedef</span> ptrdiff_t difference_type;
+00425         generic_range_type( I begin_, I end_, size_t grainsize = 1) : <a class="code" href="a00169.html">blocked_range<I></a>(begin_,end_,grainsize) {} 
+00426         <span class="keyword">template</span><<span class="keyword">typename</span> U>
+00427         generic_range_type( <span class="keyword">const</span> generic_range_type<U>& r) : <a class="code" href="a00169.html">blocked_range<I></a>(r.begin(),r.end(),r.grainsize()) {} 
+00428         generic_range_type( generic_range_type& r, <a class="code" href="a00221.html">split</a> ) : <a class="code" href="a00169.html">blocked_range<I></a>(r,<a class="code" href="a00221.html">split</a>()) {}
+00429     };
+00430 
+00431     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
+00432     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00238.html">internal::vector_iterator</a>;
+00433 <span class="keyword">public</span>:
+00434     <span class="comment">//------------------------------------------------------------------------</span>
+00435     <span class="comment">// STL compatible types</span>
+00436     <span class="comment">//------------------------------------------------------------------------</span>
+00437     <span class="keyword">typedef</span> internal::concurrent_vector_base_v3::size_type size_type;
+00438     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_base<T, A>::allocator_type allocator_type;
+00439 
+00440     <span class="keyword">typedef</span> T value_type;
+00441     <span class="keyword">typedef</span> ptrdiff_t difference_type;
+00442     <span class="keyword">typedef</span> T& reference;
+00443     <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+00444     <span class="keyword">typedef</span> T *pointer;
+00445     <span class="keyword">typedef</span> <span class="keyword">const</span> T *const_pointer;
+00446 
+00447     <span class="keyword">typedef</span> <a class="code" href="a00238.html">internal::vector_iterator<concurrent_vector,T></a> <a class="code" href="a00238.html">iterator</a>;
+00448     <span class="keyword">typedef</span> <a class="code" href="a00238.html">internal::vector_iterator<concurrent_vector,const T></a> <a class="code" href="a00238.html">const_iterator</a>;
+00449 
+00450 <span class="preprocessor">#if !defined(_MSC_VER) || _CPPLIB_VER>=300 </span>
+00451 <span class="preprocessor"></span>    <span class="comment">// Assume ISO standard definition of std::reverse_iterator</span>
+00452     <span class="keyword">typedef</span> std::reverse_iterator<iterator> reverse_iterator;
+00453     <span class="keyword">typedef</span> std::reverse_iterator<const_iterator> const_reverse_iterator;
+00454 <span class="preprocessor">#else</span>
+00455 <span class="preprocessor"></span>    <span class="comment">// Use non-standard std::reverse_iterator</span>
+00456     <span class="keyword">typedef</span> std::reverse_iterator<iterator,T,T&,T*> reverse_iterator;
+00457     <span class="keyword">typedef</span> std::reverse_iterator<const_iterator,T,const T&,const T*> const_reverse_iterator;
+00458 <span class="preprocessor">#endif </span><span class="comment">/* defined(_MSC_VER) && (_MSC_VER<1300) */</span>
+00459 
+00460     <span class="comment">//------------------------------------------------------------------------</span>
+00461     <span class="comment">// Parallel algorithm support</span>
+00462     <span class="comment">//------------------------------------------------------------------------</span>
+00463     <span class="keyword">typedef</span> generic_range_type<iterator> range_type;
+00464     <span class="keyword">typedef</span> generic_range_type<const_iterator> const_range_type;
+00465 
+00466     <span class="comment">//------------------------------------------------------------------------</span>
+00467     <span class="comment">// STL compatible constructors & destructors</span>
+00468     <span class="comment">//------------------------------------------------------------------------</span>
+00469 
+<a name="l00471"></a><a class="code" href="a00182.html#a0">00471</a>     <span class="keyword">explicit</span> <a class="code" href="a00182.html">concurrent_vector</a>(<span class="keyword">const</span> allocator_type &a = allocator_type())
+00472         : internal::allocator_base<T, A>(a)
+00473     {
+00474         vector_allocator_ptr = &internal_allocator;
+00475     }
+00476 
+<a name="l00478"></a><a class="code" href="a00182.html#a1">00478</a>     <a class="code" href="a00182.html">concurrent_vector</a>( <span class="keyword">const</span> <a class="code" href="a00182.html">concurrent_vector</a>& vector, <span class="keyword">const</span> allocator_type& a = allocator_type() )
+00479         : internal::allocator_base<T, A>(a)
+00480     {
+00481         vector_allocator_ptr = &internal_allocator;
+00482         internal_copy(vector, <span class="keyword">sizeof</span>(T), &copy_array);
+00483     }
+00484 
+00486     <span class="keyword">template</span><<span class="keyword">class</span> M>
+<a name="l00487"></a><a class="code" href="a00182.html#a2">00487</a>     <a class="code" href="a00182.html">concurrent_vector</a>( <span class="keyword">const</span> <a class="code" href="a00182.html">concurrent_vector<T, M></a>& vector, <span class="keyword">const</span> allocator_type& a = allocator_type() )
+00488         : internal::allocator_base<T, A>(a)
+00489     {
+00490         vector_allocator_ptr = &internal_allocator;
+00491         internal_copy(vector.<a class="code" href="a00182.html#a42">internal_vector_base</a>(), <span class="keyword">sizeof</span>(T), &copy_array);
+00492     }
+00493 
+<a name="l00495"></a><a class="code" href="a00182.html#a3">00495</a>     <span class="keyword">explicit</span> <a class="code" href="a00182.html">concurrent_vector</a>(size_type n)
+00496     {
+00497         vector_allocator_ptr = &internal_allocator;
+00498         <span class="keywordflow">if</span> ( !n ) <span class="keywordflow">return</span>;
+00499         internal_reserve(n, <span class="keyword">sizeof</span>(T), max_size()); my_early_size = n;
+00500         __TBB_ASSERT( my_first_block == segment_index_of(n-1)+1, NULL );
+00501         initialize_array(static_cast<T*>(my_segment[0].array), NULL, n);
+00502     }
+00503 
+<a name="l00505"></a><a class="code" href="a00182.html#a4">00505</a>     <a class="code" href="a00182.html">concurrent_vector</a>(size_type n, const_reference t, <span class="keyword">const</span> allocator_type& a = allocator_type())
+00506         : internal::allocator_base<T, A>(a)
+00507     {
+00508         vector_allocator_ptr = &internal_allocator;
+00509         internal_assign( n, t );
+00510     }
+00511 
+00513     <span class="keyword">template</span><<span class="keyword">class</span> I>
+<a name="l00514"></a><a class="code" href="a00182.html#a5">00514</a>     <a class="code" href="a00182.html">concurrent_vector</a>(I first, I last, <span class="keyword">const</span> allocator_type &a = allocator_type())
+00515         : internal::allocator_base<T, A>(a)
+00516     {
+00517         vector_allocator_ptr = &internal_allocator;
+00518         internal_assign(first, last, <span class="keyword">static_cast</span><is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
+00519     }
+00520 
+<a name="l00522"></a><a class="code" href="a00182.html#a6">00522</a>     <a class="code" href="a00182.html">concurrent_vector</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00182.html">concurrent_vector</a>& vector ) {
+00523         <span class="keywordflow">if</span>( <span class="keyword">this</span> != &vector )
+00524             concurrent_vector_base_v3::internal_assign(vector, <span class="keyword">sizeof</span>(T), &destroy_array, &assign_array, &copy_array);
+00525         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00526     }
+00527 
+00529     <span class="keyword">template</span><<span class="keyword">class</span> M>
+<a name="l00530"></a><a class="code" href="a00182.html#a7">00530</a>     <a class="code" href="a00182.html">concurrent_vector</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00182.html">concurrent_vector<T, M></a>& vector ) {
+00531         <span class="keywordflow">if</span>( static_cast<void*>( this ) != static_cast<const void*>( &vector ) )
+00532             concurrent_vector_base_v3::internal_assign(vector.<a class="code" href="a00182.html#a42">internal_vector_base</a>(),
+00533                 <span class="keyword">sizeof</span>(T), &destroy_array, &assign_array, &copy_array);
+00534         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00535     }
+00536 
+00537     <span class="comment">//------------------------------------------------------------------------</span>
+00538     <span class="comment">// Concurrent operations</span>
+00539     <span class="comment">//------------------------------------------------------------------------</span>
+00541 <span class="comment"></span>
+<a name="l00542"></a><a class="code" href="a00182.html#a8">00542</a>     size_type grow_by( size_type delta ) {
+00543         <span class="keywordflow">return</span> delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array, NULL ) : my_early_size;
+00544     }
+00545 
+00547 
+<a name="l00548"></a><a class="code" href="a00182.html#a9">00548</a>     size_type grow_by( size_type delta, const_reference t ) {
+00549         <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;
+00550     }
+00551 
+<a name="l00553"></a><a class="code" href="a00182.html#a10">00553</a>     <span class="keywordtype">void</span> grow_to_at_least( size_type n ) {
+00554         <span class="keywordflow">if</span>( my_early_size<n )
+00555             internal_grow_to_at_least( n, <span class="keyword">sizeof</span>(T), &initialize_array, NULL );
+00556     };
+00557 
+<a name="l00559"></a><a class="code" href="a00182.html#a11">00559</a>     size_type push_back( const_reference item ) {
+00560         size_type k;
+00561         internal_loop_guide loop(1, internal_push_back(<span class="keyword">sizeof</span>(T),k));
+00562         loop.init(&item);
+00563         <span class="keywordflow">return</span> k;
+00564     }
+00565 
+00567 
+<a name="l00569"></a><a class="code" href="a00182.html#a12">00569</a>     reference operator[]( size_type index ) {
+00570         <span class="keywordflow">return</span> internal_subscript(index);
+00571     }
+00572 
+<a name="l00574"></a><a class="code" href="a00182.html#a13">00574</a>     const_reference operator[]( size_type index )<span class="keyword"> const </span>{
+00575         <span class="keywordflow">return</span> internal_subscript(index);
+00576     }
+00577 
+<a name="l00579"></a><a class="code" href="a00182.html#a14">00579</a>     reference at( size_type index ) {
+00580         <span class="keywordflow">return</span> internal_subscript_with_exceptions(index);
+00581     }
+00582 
+<a name="l00584"></a><a class="code" href="a00182.html#a15">00584</a>     const_reference at( size_type index )<span class="keyword"> const </span>{
+00585         <span class="keywordflow">return</span> internal_subscript_with_exceptions(index);
+00586     }
+00587 
+<a name="l00589"></a><a class="code" href="a00182.html#a16">00589</a>     range_type range( size_t grainsize = 1) {
+00590         <span class="keywordflow">return</span> range_type( begin(), end(), grainsize );
+00591     }
+00592 
+<a name="l00594"></a><a class="code" href="a00182.html#a17">00594</a>     const_range_type range( size_t grainsize = 1 )<span class="keyword"> const </span>{
+00595         <span class="keywordflow">return</span> const_range_type( begin(), end(), grainsize );
+00596     }
+00597     <span class="comment">//------------------------------------------------------------------------</span>
+00598     <span class="comment">// Capacity</span>
+00599     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00601"></a><a class="code" href="a00182.html#a18">00601</a> <span class="comment"></span>    size_type size()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_early_size;}
+00602 
+<a name="l00604"></a><a class="code" href="a00182.html#a19">00604</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !my_early_size;}
+00605 
+<a name="l00607"></a><a class="code" href="a00182.html#a20">00607</a>     size_type capacity()<span class="keyword"> const </span>{<span class="keywordflow">return</span> internal_capacity();}
+00608 
+00610 
+<a name="l00612"></a><a class="code" href="a00182.html#a21">00612</a>     <span class="keywordtype">void</span> reserve( size_type n ) {
+00613         <span class="keywordflow">if</span>( n )
+00614             internal_reserve(n, <span class="keyword">sizeof</span>(T), max_size());
+00615     }
+00616 
+00618     <span class="keywordtype">void</span> compact();
+00619 
+<a name="l00621"></a><a class="code" href="a00182.html#a23">00621</a>     size_type max_size()<span class="keyword"> const </span>{<span class="keywordflow">return</span> (~size_type(0))/<span class="keyword">sizeof</span>(T);}
+00622 
+00623     <span class="comment">//------------------------------------------------------------------------</span>
+00624     <span class="comment">// STL support</span>
+00625     <span class="comment">//------------------------------------------------------------------------</span>
+00626 
+<a name="l00628"></a><a class="code" href="a00182.html#a24">00628</a>     <a class="code" href="a00238.html">iterator</a> begin() {<span class="keywordflow">return</span> <a class="code" href="a00238.html">iterator</a>(*<span class="keyword">this</span>,0);}
+<a name="l00630"></a><a class="code" href="a00182.html#a25">00630</a>     <a class="code" href="a00238.html">iterator</a> end() {<span class="keywordflow">return</span> <a class="code" href="a00238.html">iterator</a>(*<span class="keyword">this</span>,size());}
+<a name="l00632"></a><a class="code" href="a00182.html#a26">00632</a>     <a class="code" href="a00238.html">const_iterator</a> begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00238.html">const_iterator</a>(*<span class="keyword">this</span>,0);}
+<a name="l00634"></a><a class="code" href="a00182.html#a27">00634</a>     <a class="code" href="a00238.html">const_iterator</a> end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00238.html">const_iterator</a>(*<span class="keyword">this</span>,size());}
+<a name="l00636"></a><a class="code" href="a00182.html#a28">00636</a>     reverse_iterator rbegin() {<span class="keywordflow">return</span> reverse_iterator(end());}
+<a name="l00638"></a><a class="code" href="a00182.html#a29">00638</a>     reverse_iterator rend() {<span class="keywordflow">return</span> reverse_iterator(begin());}
+<a name="l00640"></a><a class="code" href="a00182.html#a30">00640</a>     const_reverse_iterator rbegin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(end());}
+<a name="l00642"></a><a class="code" href="a00182.html#a31">00642</a>     const_reverse_iterator rend()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(begin());}
+<a name="l00644"></a><a class="code" href="a00182.html#a32">00644</a>     reference front() {
+00645         __TBB_ASSERT( size()>0, NULL);
+00646         <span class="keywordflow">return</span> static_cast<T*>(my_segment[0].array)[0];
+00647     }
+<a name="l00649"></a><a class="code" href="a00182.html#a33">00649</a>     const_reference front()<span class="keyword"> const </span>{
+00650         __TBB_ASSERT( size()>0, NULL);
+00651         <span class="keywordflow">return</span> static_cast<const T*>(my_segment[0].array)[0];
+00652     }
+<a name="l00654"></a><a class="code" href="a00182.html#a34">00654</a>     reference back() {
+00655         __TBB_ASSERT( size()>0, NULL);
+00656         <span class="keywordflow">return</span> internal_subscript( my_early_size-1 );
+00657     }
+<a name="l00659"></a><a class="code" href="a00182.html#a35">00659</a>     const_reference back()<span class="keyword"> const </span>{
+00660         __TBB_ASSERT( size()>0, NULL);
+00661         <span class="keywordflow">return</span> internal_subscript( my_early_size-1 );
+00662     }
+<a name="l00664"></a><a class="code" href="a00182.html#a36">00664</a>     allocator_type get_allocator()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
+00665 
+<a name="l00667"></a><a class="code" href="a00182.html#a37">00667</a>     <span class="keywordtype">void</span> assign(size_type n, const_reference t) { clear(); internal_assign( n, t ); }
+00668 
+00670     <span class="keyword">template</span><<span class="keyword">class</span> I>
+<a name="l00671"></a><a class="code" href="a00182.html#a38">00671</a>     <span class="keywordtype">void</span> assign(I first, I last) {
+00672         clear(); internal_assign( first, last, <span class="keyword">static_cast</span><is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
+00673     }
+00674 
+<a name="l00676"></a><a class="code" href="a00182.html#a39">00676</a>     <span class="keywordtype">void</span> swap(<a class="code" href="a00182.html">concurrent_vector</a> &vector) {
+00677         <span class="keywordflow">if</span>( <span class="keyword">this</span> != &vector ) {
+00678             concurrent_vector_base_v3::internal_swap(static_cast<concurrent_vector_base_v3&>(vector));
+00679             std::swap(this->my_allocator, vector.my_allocator);
+00680         }
+00681     }
+00682 
+<a name="l00684"></a><a class="code" href="a00182.html#a40">00684</a>     <span class="keywordtype">void</span> clear() {
+00685         segment_t *table = my_segment;
+00686         internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+00687         my_first_block = 0; <span class="comment">// here is not default_initial_segments</span>
+00688     }
+00689 
+<a name="l00691"></a><a class="code" href="a00182.html#a41">00691</a>     ~<a class="code" href="a00182.html">concurrent_vector</a>() {
+00692         clear();
+00693         <span class="comment">// base class destructor call should be then</span>
+00694     }
+00695 
+00696     <span class="keyword">const</span> <a class="code" href="a00183.html">internal::concurrent_vector_base_v3</a> &internal_vector_base()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+00697 <span class="keyword">private</span>:
+00699     <span class="keyword">static</span> <span class="keywordtype">void</span> *internal_allocator(internal::concurrent_vector_base_v3 &vb, size_t k) {
+00700         <span class="keywordflow">return</span> static_cast<concurrent_vector<T, A>&>(vb).my_allocator.allocate(k);
+00701     }
+00703     <span class="keywordtype">void</span> internal_free_segments(<span class="keywordtype">void</span> *table[], segment_index_t k, segment_index_t first_block);
+00704 
+00706     T& internal_subscript( size_type index ) <span class="keyword">const</span>;
+00707 
+00709     T& internal_subscript_with_exceptions( size_type index ) <span class="keyword">const</span>;
+00710 
+00712     <span class="keywordtype">void</span> internal_assign(size_type n, const_reference t);
+00713 
+00715     <span class="keyword">template</span><<span class="keywordtype">bool</span> B> <span class="keyword">class </span>is_integer_tag;
+00716 
+00718     <span class="keyword">template</span><<span class="keyword">class</span> I>
+00719     <span class="keywordtype">void</span> internal_assign(I first, I last, is_integer_tag<true> *) {
+00720         internal_assign(static_cast<size_type>(first), static_cast<T>(last));
+00721     }
+00723     <span class="keyword">template</span><<span class="keyword">class</span> I>
+00724     <span class="keywordtype">void</span> internal_assign(I first, I last, is_integer_tag<false> *) {
+00725         internal_assign_iterators(first, last);
+00726     }
+00728     <span class="keyword">template</span><<span class="keyword">class</span> I>
+00729     <span class="keywordtype">void</span> internal_assign_iterators(I first, I last);
+00730 
+00732     <span class="keyword">static</span> <span class="keywordtype">void</span> initialize_array( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span>*, size_type n );
+00733 
+00735     <span class="keyword">static</span> <span class="keywordtype">void</span> initialize_array_by( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
+00736 
+00738     <span class="keyword">static</span> <span class="keywordtype">void</span> copy_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
+00739 
+00741     <span class="keyword">static</span> <span class="keywordtype">void</span> assign_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
+00742 
+00744     <span class="keyword">static</span> <span class="keywordtype">void</span> destroy_array( <span class="keywordtype">void</span>* begin, size_type n );
+00745 
+00747     <span class="keyword">class </span>internal_loop_guide {
+00748     <span class="keyword">public</span>:
+00749         <span class="keyword">const</span> pointer array;
+00750         <span class="keyword">const</span> size_type n;
+00751         size_type i;
+00752         internal_loop_guide(size_type ntrials, <span class="keywordtype">void</span> *ptr)
+00753             : array(static_cast<pointer>(ptr)), n(ntrials), i(0) {}
+00754         <span class="keywordtype">void</span> init() {   <span class="keywordflow">for</span>(; i < n; ++i) <span class="keyword">new</span>( &array[i] ) T(); }
+00755         <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)); }
+00756         <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]); }
+00757         <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]; }
+00758         <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 ); }
+00759         ~internal_loop_guide() {
+00760             <span class="keywordflow">if</span>(i < n) <span class="comment">// if exception raised, do zerroing on the rest of items</span>
+00761                 std::memset(array+i, 0, (n-i)*<span class="keyword">sizeof</span>(value_type));
+00762         }
+00763     };
+00764 };
+00765 
+00766 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00767"></a><a class="code" href="a00182.html#a22">00767</a> <span class="keywordtype">void</span> <a class="code" href="a00182.html">concurrent_vector<T, A>::compact</a>() {
+00768     internal_segments_table old;
+00769     <span class="keywordflow">try</span> {
+00770         <span class="keywordflow">if</span>( internal_compact( <span class="keyword">sizeof</span>(T), &old, &destroy_array, &copy_array ) )
+00771             internal_free_segments( old.table, pointers_per_long_table, old.first_block ); <span class="comment">// free joined and unnecessary segments</span>
+00772     } <span class="keywordflow">catch</span>(...) {
+00773         <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>
+00774             internal_free_segments( old.table, 1, old.first_block );
+00775         <span class="keywordflow">throw</span>;
+00776     }
+00777 }
+00778 
+00779 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00780 <span class="keywordtype">void</span> <a class="code" href="a00182.html">concurrent_vector<T, A>::internal_free_segments</a>(<span class="keywordtype">void</span> *table[], segment_index_t k, segment_index_t first_block) {
+00781     <span class="comment">// Free the arrays</span>
+00782     <span class="keywordflow">while</span>( k > first_block ) {
+00783         --k;
+00784         T* array = static_cast<T*>(table[k]);
+00785         table[k] = NULL;
+00786         <span class="keywordflow">if</span>( array > __TBB_BAD_ALLOC ) <span class="comment">// check for correct segment pointer</span>
+00787             this->my_allocator.deallocate( array, segment_size(k) );
+00788     }
+00789     T* array = static_cast<T*>(table[0]);
+00790     <span class="keywordflow">if</span>( array > __TBB_BAD_ALLOC ) {
+00791         __TBB_ASSERT( first_block > 0, NULL );
+00792         <span class="keywordflow">while</span>(k > 0) table[--k] = NULL;
+00793         this->my_allocator.deallocate( array, segment_size(first_block) );
+00794     }
+00795 }
+00796 
+00797 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00798 T& concurrent_vector<T, A>::internal_subscript( size_type index )<span class="keyword"> const </span>{
+00799     __TBB_ASSERT( index<<a class="code" href="a00182.html#a18">size</a>(), <span class="stringliteral">"index out of bounds"</span> );
+00800     size_type j = index;
+00801     segment_index_t k = segment_base_index_of( j );
+00802     <span class="comment">// no need in __TBB_load_with_acquire since thread works in own space or gets </span>
+00803     <span class="keywordflow">return</span> static_cast<T*>(my_segment[k].array)[j];
+00804 }
+00805 
+00806 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00807 T& concurrent_vector<T, A>::internal_subscript_with_exceptions( size_type index )<span class="keyword"> const </span>{
+00808     <span class="keywordflow">if</span>( index >= <a class="code" href="a00182.html#a18">size</a>() )
+00809         internal_throw_exception(0); <span class="comment">// throw std::out_of_range</span>
+00810     size_type j = index;
+00811     segment_index_t k = segment_base_index_of( j );
+00812     <span class="keywordflow">if</span>( my_segment == (segment_t*)my_storage && k >= pointers_per_short_table )
+00813         internal_throw_exception(1); <span class="comment">// throw std::out_of_range</span>
+00814     <span class="keywordtype">void</span> *array = my_segment[k].array; <span class="comment">// no need in __TBB_load_with_acquire</span>
+00815     <span class="keywordflow">if</span>( array <= __TBB_BAD_ALLOC ) <span class="comment">// check for correct segment pointer</span>
+00816         internal_throw_exception(2); <span class="comment">// throw std::range_error</span>
+00817     <span class="keywordflow">return</span> static_cast<T*>(array)[j];
+00818 }
+00819 
+00820 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00821 <span class="keywordtype">void</span> concurrent_vector<T, A>::internal_assign(size_type n, const_reference t)
+00822 {
+00823     <span class="keywordflow">if</span>( !n ) <span class="keywordflow">return</span>;
+00824     internal_reserve(n, <span class="keyword">sizeof</span>(T), <a class="code" href="a00182.html#a23">max_size</a>()); my_early_size = n;
+00825     __TBB_ASSERT( my_first_block == segment_index_of(n-1)+1, NULL );
+00826     initialize_array_by(static_cast<T*>(my_segment[0].array), static_cast<const void*>(&t), n);
+00827 }
+00828 
+00829 <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>
+00830 <span class="keywordtype">void</span> concurrent_vector<T, A>::internal_assign_iterators(I first, I last) {
+00831     size_type n = std::distance(first, last);
+00832     <span class="keywordflow">if</span>( !n ) <span class="keywordflow">return</span>;
+00833     internal_reserve(n, <span class="keyword">sizeof</span>(T), <a class="code" href="a00182.html#a23">max_size</a>()); my_early_size = n;
+00834     __TBB_ASSERT( my_first_block == segment_index_of(n-1)+1, NULL );
+00835     internal_loop_guide loop(n, my_segment[0].array); loop.iterate(first);
+00836 }
+00837 
+00838 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00839 <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 ) {
+00840     internal_loop_guide loop(n, begin); loop.init();
+00841 }
+00842 
+00843 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00844 <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 ) {
+00845     internal_loop_guide loop(n, begin); loop.init(src);
+00846 }
+00847 
+00848 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00849 <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 ) {
+00850     internal_loop_guide loop(n, dst); loop.copy(src);
+00851 }
+00852 
+00853 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00854 <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 ) {
+00855     internal_loop_guide loop(n, dst); loop.assign(src);
+00856 }
+00857 
+00858 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00859 <span class="keywordtype">void</span> concurrent_vector<T, A>::destroy_array( <span class="keywordtype">void</span>* begin, size_type n ) {
+00860     T* array = static_cast<T*>(begin);
+00861     <span class="keywordflow">for</span>( size_type j=n; j>0; --j )
+00862         array[j-1].~T(); <span class="comment">// destructors are supposed to not throw any exceptions</span>
+00863 }
+00864 
+00865 <span class="comment">// concurrent_vector's template functions</span>
+00866 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+00867 <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) {
+00868     <span class="comment">//TODO[?]: deal with _Range_checked_iterator_tag of MSVC.</span>
+00869     <span class="comment">// Simply:    return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());</span>
+00870     <span class="keywordflow">if</span>(a.size() != b.size()) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00871     <span class="keyword">typename</span> concurrent_vector<T, A1>::const_iterator i(a.begin());
+00872     <span class="keyword">typename</span> concurrent_vector<T, A2>::const_iterator j(b.begin());
+00873     <span class="keywordflow">for</span>(; i != a.end(); ++i, ++j)
+00874         <span class="keywordflow">if</span>( !(*i == *j) ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00875     <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00876 }
+00877 
+00878 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+00879 <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)
+00880 {    <span class="keywordflow">return</span> !(a == b); }
+00881 
+00882 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+00883 <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)
+00884 {    <span class="keywordflow">return</span> (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())); }
+00885 
+00886 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+00887 <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)
+00888 {    <span class="keywordflow">return</span> b < a; }
+00889 
+00890 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+00891 <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)
+00892 {    <span class="keywordflow">return</span> !(b < a); }
+00893 
+00894 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+00895 <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)
+00896 {    <span class="keywordflow">return</span> !(a < b); }
+00897 
+00898 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+00899 <span class="keyword">inline</span> <span class="keywordtype">void</span> swap(concurrent_vector<T, A> &a, concurrent_vector<T, A> &b)
+00900 {    a.swap( b ); }
+00901 
+00902 } <span class="comment">// namespace tbb</span>
+00903 
+00904 <span class="preprocessor">#if defined(_MSC_VER) && defined(_Wp64)</span>
+00905 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warnings in /Wp64 mode</span>
+00906 <span class="preprocessor">    #pragma warning (pop)</span>
+00907 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER && _Wp64 */</span>
+00908 
+00909 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_vector_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00292.html b/doc/html/a00292.html
new file mode 100644
index 0000000..ca79cb3
--- /dev/null
+++ b/doc/html/a00292.html
@@ -0,0 +1,185 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>mutex.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_mutex_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_mutex_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00025 <span class="preprocessor"></span><span class="preprocessor">#include <windows.h></span>
+00026 <span class="preprocessor">#if !defined(_WIN32_WINNT)</span>
+00027 <span class="preprocessor"></span><span class="comment">// The following Windows API function is declared explicitly;</span>
+00028 <span class="comment">// otherwise any user would have to specify /D_WIN32_WINNT=0x0400</span>
+00029 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION );
+00030 <span class="preprocessor">#endif</span>
+00031 <span class="preprocessor"></span>
+00032 <span class="preprocessor">#else </span><span class="comment">/* if not _WIN32||_WIN64 */</span>
+00033 <span class="preprocessor">#include <pthread.h></span>
+00034 <span class="keyword">namespace </span>tbb { <span class="keyword">namespace </span>internal {
+00035 <span class="comment">// Use this internal TBB function to throw an exception</span>
+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 );
+00037 } } <span class="comment">//namespaces</span>
+00038 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00039 
+00040 <span class="preprocessor">#include <stdio.h></span>
+00041 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00042 
+00043 <span class="keyword">namespace </span>tbb {
+00044 
+00046 
+<a name="l00048"></a><a class="code" href="a00198.html">00048</a> <span class="keyword">class </span><a class="code" href="a00198.html">mutex</a> {
+00049 <span class="keyword">public</span>:
+<a name="l00051"></a><a class="code" href="a00198.html#a0">00051</a>     <a class="code" href="a00198.html">mutex</a>() {
+00052 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00053 <span class="preprocessor"></span>    internal_construct();
+00054 <span class="preprocessor">#else</span>
+00055 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+00056 <span class="preprocessor"></span>        InitializeCriticalSection(&impl);
+00057 <span class="preprocessor">  #else</span>
+00058 <span class="preprocessor"></span>        <span class="keywordtype">int</span> error_code = pthread_mutex_init(&impl,NULL);
+00059         <span class="keywordflow">if</span>( error_code )
+00060             tbb::internal::handle_perror(error_code,<span class="stringliteral">"mutex: pthread_mutex_init failed"</span>);
+00061 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64*/</span>
+00062 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00063     };
+00064 
+00065     ~<a class="code" href="a00198.html">mutex</a>() {
+00066 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00067 <span class="preprocessor"></span>        internal_destroy();
+00068 <span class="preprocessor">#else</span>
+00069 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+00070 <span class="preprocessor"></span>        DeleteCriticalSection(&impl);
+00071 <span class="preprocessor">  #else</span>
+00072 <span class="preprocessor"></span>        pthread_mutex_destroy(&impl); 
+00073 
+00074 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00075 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00076     };
+00077 
+00078     <span class="keyword">class </span>scoped_lock;
+00079     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
+00080 
+00082 
+<a name="l00084"></a><a class="code" href="a00199.html">00084</a>     <span class="keyword">class </span><a class="code" href="a00199.html">scoped_lock</a> : <span class="keyword">private</span> internal::no_copy {
+00085     <span class="keyword">public</span>:
+<a name="l00087"></a><a class="code" href="a00199.html#a0">00087</a>         <a class="code" href="a00199.html">scoped_lock</a>() : my_mutex(NULL) {};
+00088 
+00090 
+<a name="l00091"></a><a class="code" href="a00199.html#a1">00091</a>         <a class="code" href="a00199.html">scoped_lock</a>( <a class="code" href="a00198.html">mutex</a>& <a class="code" href="a00198.html">mutex</a> ) {
+00092             <a class="code" href="a00278.html#a37a1">acquire</a>( mutex );
+00093         }
+00094 
+<a name="l00096"></a><a class="code" href="a00199.html#a2">00096</a>         ~<a class="code" href="a00199.html">scoped_lock</a>() {
+00097             <span class="keywordflow">if</span>( my_mutex ) 
+00098                 <a class="code" href="a00278.html#a37a2">release</a>();
+00099         }
+00100 
+<a name="l00102"></a><a class="code" href="a00199.html#a3">00102</a>         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a1">acquire</a>( <a class="code" href="a00198.html">mutex</a>& <a class="code" href="a00198.html">mutex</a> ) {
+00103 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00104 <span class="preprocessor"></span>            internal_acquire(mutex);
+00105 <span class="preprocessor">#else</span>
+00106 <span class="preprocessor"></span>            my_mutex = &mutex;
+00107 <span class="preprocessor">  #if _WIN32||_WIN64</span>
+00108 <span class="preprocessor"></span>            EnterCriticalSection(&mutex.<a class="code" href="a00198.html#r0">impl</a>);
+00109 <span class="preprocessor">  #else</span>
+00110 <span class="preprocessor"></span>            pthread_mutex_lock(&mutex.<a class="code" href="a00198.html#r0">impl</a>);
+00111 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00112 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00113         }
+00114 
+<a name="l00116"></a><a class="code" href="a00199.html#a4">00116</a>         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00198.html">mutex</a>& <a class="code" href="a00198.html">mutex</a> ) {
+00117 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00118 <span class="preprocessor"></span>            <span class="keywordflow">return</span> internal_try_acquire (mutex);
+00119 <span class="preprocessor">#else</span>
+00120 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result;
+00121 <span class="preprocessor">  #if _WIN32||_WIN64</span>
+00122 <span class="preprocessor"></span>            result = TryEnterCriticalSection(&mutex.<a class="code" href="a00198.html#r0">impl</a>)!=0;
+00123 <span class="preprocessor">  #else</span>
+00124 <span class="preprocessor"></span>            result = pthread_mutex_trylock(&mutex.<a class="code" href="a00198.html#r0">impl</a>)==0;
+00125 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00126             <span class="keywordflow">if</span>( result )
+00127                 my_mutex = &mutex;
+00128             <span class="keywordflow">return</span> result;
+00129 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00130         }
+00131 
+<a name="l00133"></a><a class="code" href="a00199.html#a5">00133</a>         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a2">release</a>() {
+00134 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00135 <span class="preprocessor"></span>            internal_release ();
+00136 <span class="preprocessor">#else</span>
+00137 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+00138 <span class="preprocessor"></span>            LeaveCriticalSection(&my_mutex->impl);
+00139 <span class="preprocessor">  #else</span>
+00140 <span class="preprocessor"></span>            pthread_mutex_unlock(&my_mutex->impl);
+00141 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00142             my_mutex = NULL;
+00143 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00144         }
+00145 
+00146     <span class="keyword">private</span>:
+00148         <a class="code" href="a00198.html">mutex</a>* my_mutex;
+00149 
+00151         <span class="keywordtype">void</span> internal_acquire( <a class="code" href="a00198.html">mutex</a>& m );
+00152 
+00154         <span class="keywordtype">bool</span> internal_try_acquire( <a class="code" href="a00198.html">mutex</a>& m );
+00155 
+00157         <span class="keywordtype">void</span> internal_release();
+00158     };
+00159 
+00160     <span class="comment">// Mutex traits</span>
+00161     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;
+00162     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
+00163     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">false</span>;
+00164 
+00165 <span class="keyword">private</span>:
+00166 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00167 <span class="preprocessor"></span>    CRITICAL_SECTION impl;    
+00168     <span class="keyword">enum</span> state_t {
+00169         INITIALIZED=0x1234,
+00170         DESTROYED=0x789A,
+00171         HELD=0x56CD
+00172     } state;
+00173 <span class="preprocessor">#else</span>
+00174 <span class="preprocessor"></span>    pthread_mutex_t impl;
+00175 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00176 
+00178     <span class="keywordtype">void</span> internal_construct();
+00179 
+00181     <span class="keywordtype">void</span> internal_destroy();
+00182 };
+00183 
+00184 } <span class="comment">// namespace tbb </span>
+00185 
+00186 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_mutex_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00293.html b/doc/html/a00293.html
new file mode 100644
index 0000000..dfd3f8f
--- /dev/null
+++ b/doc/html/a00293.html
@@ -0,0 +1,409 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>parallel_do.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_parallel_do_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_do_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "task.h"</span>
+00025 <span class="preprocessor">#include "aligned_space.h"</span>
+00026 <span class="preprocessor">#include <iterator></span>
+00027 
+00028 <span class="keyword">namespace </span>tbb {
+00029 
+00031 <span class="keyword">namespace </span>internal {
+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;
+00033     <span class="keyword">template</span><<span class="keyword">typename</span> Body> <span class="keyword">class </span>do_group_task;
+00034 
+00036     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00037"></a><a class="code" href="a00226.html">00037</a>     <span class="keyword">struct </span><a class="code" href="a00226.html">strip</a> { <span class="keyword">typedef</span> T type; };
+00038     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00039     <span class="keyword">struct </span><a class="code" href="a00226.html">strip</a><T&> { <span class="keyword">typedef</span> T type; };
+00040     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00041     <span class="keyword">struct </span>strip<const T&> { <span class="keyword">typedef</span> T type; };
+00042     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00043     <span class="keyword">struct </span>strip<volatile T&> { <span class="keyword">typedef</span> T type; };
+00044     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00045     <span class="keyword">struct </span>strip<const volatile T&> { <span class="keyword">typedef</span> T type; };
+00046     <span class="comment">// Most of the compilers remove cv-qualifiers from non-reference function argument types. </span>
+00047     <span class="comment">// But unfortunately there are those that don't.</span>
+00048     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00049     <span class="keyword">struct </span>strip<const T> { <span class="keyword">typedef</span> T type; };
+00050     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00051     <span class="keyword">struct </span>strip<volatile T> { <span class="keyword">typedef</span> T type; };
+00052     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00053     <span class="keyword">struct </span>strip<const volatile T> { <span class="keyword">typedef</span> T type; };
+00054 } <span class="comment">// namespace internal</span>
+00056 <span class="comment"></span>
+00058 
+00059 <span class="keyword">template</span><<span class="keyword">typename</span> Item>
+<a name="l00060"></a><a class="code" href="a00201.html">00060</a> <span class="keyword">class </span><a class="code" href="a00201.html">parallel_do_feeder</a>: internal::no_copy
+00061 {
+00062     <a class="code" href="a00201.html">parallel_do_feeder</a>() {}
+00063     <span class="keyword">virtual</span> ~<a class="code" href="a00201.html">parallel_do_feeder</a> () {}
+00064     <span class="keyword">virtual</span> <span class="keywordtype">void</span> internal_add( <span class="keyword">const</span> Item& item ) = 0;
+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><a class="code" href="a00202.html">internal::parallel_do_feeder_impl</a>;
+00066 <span class="keyword">public</span>:
+<a name="l00068"></a><a class="code" href="a00201.html#a0">00068</a>     <span class="keywordtype">void</span> add( <span class="keyword">const</span> Item& item ) {internal_add(item);}
+00069 };
+00070 
+00072 <span class="keyword">namespace </span>internal {
+00074 
+00076     <span class="keyword">template</span><<span class="keyword">class</span> Body, <span class="keyword">typename</span> Item>
+<a name="l00077"></a><a class="code" href="a00203.html">00077</a>     <span class="keyword">class </span><a class="code" href="a00203.html">parallel_do_operator_selector</a>
+00078     {
+00079         <span class="keyword">typedef</span> <a class="code" href="a00201.html">parallel_do_feeder<Item></a> <a class="code" href="a00201.html">Feeder</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 >
+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> ) {
+00082             obj(arg1);
+00083         }
+00084         <span class="keyword">template</span><<span class="keyword">typename</span> A1, <span class="keyword">typename</span> A2, <span class="keyword">typename</span> CvItem >
+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, <a class="code" href="a00201.html">parallel_do_feeder<Item></a>&) <span class="keyword">const</span> ) {
+00086             obj(arg1, arg2);
+00087         }
+00088 
+00089     <span class="keyword">public</span>:
+00090         <span class="keyword">template</span><<span class="keyword">typename</span> A1, <span class="keyword">typename</span> A2 >
+00091         <span class="keyword">static</span> <span class="keywordtype">void</span> call( <span class="keyword">const</span> Body& obj, A1& arg1, A2& arg2 )
+00092         {
+00093             internal_call( obj, arg1, arg2, &Body::operator() );
+00094         }
+00095     };
+00096 
+00098 
+00100     <span class="keyword">template</span><<span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item>
+<a name="l00101"></a><a class="code" href="a00186.html">00101</a>     <span class="keyword">class </span><a class="code" href="a00186.html">do_iteration_task</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a>
+00102     {
+00103         <span class="keyword">typedef</span> <a class="code" href="a00202.html">parallel_do_feeder_impl<Body, Item></a> <a class="code" href="a00202.html">feeder_type</a>;
+00104 
+00105         Item my_value;
+00106         <a class="code" href="a00202.html">feeder_type</a>& my_feeder;
+00107 
+00108         <a class="code" href="a00186.html">do_iteration_task</a>( <span class="keyword">const</span> Item& value, <a class="code" href="a00202.html">feeder_type</a>& feeder ) : 
+00109             my_value(value), my_feeder(feeder)
+00110         {}
+00111 
+00112         <span class="comment">/*override*/</span> 
+00113         <a class="code" href="a00228.html">task</a>* execute()
+00114         {
+00115             <a class="code" href="a00203.html">parallel_do_operator_selector<Body, Item>::call</a>(*my_feeder.my_body, my_value, my_feeder);
+00116             <span class="keywordflow">return</span> NULL;
+00117         }
+00118 
+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><a class="code" href="a00202.html">parallel_do_feeder_impl</a>;
+00120     }; <span class="comment">// class do_iteration_task</span>
+00121 
+00122     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item>
+00123     <span class="keyword">class </span>do_iteration_task_iter: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a>
+00124     {
+00125         <span class="keyword">typedef</span> <a class="code" href="a00202.html">parallel_do_feeder_impl<Body, Item></a> feeder_type;
+00126 
+00127         Iterator my_iter;
+00128         feeder_type& my_feeder;
+00129 
+00130         do_iteration_task_iter( <span class="keyword">const</span> Iterator& iter, feeder_type& feeder ) : 
+00131             my_iter(iter), my_feeder(feeder)
+00132         {}
+00133 
+00134         <span class="comment">/*override*/</span> 
+00135         <a class="code" href="a00228.html">task</a>* <a class="code" href="a00228.html#a1">execute</a>()
+00136         {
+00137             parallel_do_operator_selector<Body, Item>::call(*my_feeder.my_body, *my_iter, my_feeder);
+00138             <span class="keywordflow">return</span> NULL;
+00139         }
+00140 
+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;    
+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;    
+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;    
+00144     }; <span class="comment">// class do_iteration_task_iter</span>
+00145 
+00147 
+00149     <span class="keyword">template</span><<span class="keyword">class</span> Body, <span class="keyword">typename</span> Item>
+<a name="l00150"></a><a class="code" href="a00202.html">00150</a>     <span class="keyword">class </span><a class="code" href="a00202.html">parallel_do_feeder_impl</a> : <span class="keyword">public</span> <a class="code" href="a00201.html">parallel_do_feeder</a><Item>
+00151     {
+00152         <span class="comment">/*override*/</span> 
+00153         <span class="keywordtype">void</span> internal_add( <span class="keyword">const</span> Item& item )
+00154         {
+00155             <span class="keyword">typedef</span> <a class="code" href="a00186.html">do_iteration_task<Body, Item></a> iteration_type;
+00156 
+00157             iteration_type& t = *<span class="keyword">new</span> (task::self().allocate_additional_child_of(*my_barrier)) iteration_type(item, *<span class="keyword">this</span>);
+00158 
+00159             t.<a class="code" href="a00228.html#a14">spawn</a>( t );
+00160         }
+00161     <span class="keyword">public</span>:
+00162         <span class="keyword">const</span> Body* my_body;
+00163         <a class="code" href="a00188.html">empty_task</a>* my_barrier;
+00164     }; <span class="comment">// class parallel_do_feeder_impl</span>
+00165 
+00166 
+00168 
+00171     <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="l00172"></a><a class="code" href="a00185.html">00172</a>     <span class="keyword">class </span><a class="code" href="a00185.html">do_group_task_forward</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a>
+00173     {
+00174         <span class="keyword">static</span> <span class="keyword">const</span> size_t max_arg_size = 4;         
+00175 
+00176         <span class="keyword">typedef</span> <a class="code" href="a00202.html">parallel_do_feeder_impl<Body, Item></a> <a class="code" href="a00202.html">feeder_type</a>;
+00177 
+00178         <a class="code" href="a00202.html">feeder_type</a>& my_feeder;
+00179         Iterator my_first;
+00180         size_t my_size;
+00181         
+00182         <a class="code" href="a00185.html">do_group_task_forward</a>( Iterator first, size_t size, <a class="code" href="a00202.html">feeder_type</a>& feeder ) 
+00183             : my_feeder(feeder), my_first(first), my_size(size)
+00184         {}
+00185 
+00186         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute()
+00187         {
+00188             <span class="keyword">typedef</span> do_iteration_task_iter<Iterator, Body, Item> iteration_type;
+00189             __TBB_ASSERT( my_size>0, NULL );
+00190             <a class="code" href="a00229.html">task_list</a> list;
+00191             <a class="code" href="a00228.html">task</a>* t; 
+00192             size_t k=0; 
+00193             <span class="keywordflow">for</span>(;;) {
+00194                 t = <span class="keyword">new</span>( allocate_child() ) iteration_type( my_first, my_feeder );
+00195                 ++my_first;
+00196                 <span class="keywordflow">if</span>( ++k==my_size ) <span class="keywordflow">break</span>;
+00197                 list.<a class="code" href="a00229.html#a3">push_back</a>(*t);
+00198             }
+00199             set_ref_count(<span class="keywordtype">int</span>(k+1));
+00200             spawn(list);
+00201             spawn_and_wait_for_all(*t);
+00202             <span class="keywordflow">return</span> NULL;
+00203         }
+00204 
+00205         <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><a class="code" href="a00187.html">do_task_iter</a>;
+00206     }; <span class="comment">// class do_group_task_forward</span>
+00207 
+00208     <span class="keyword">template</span><<span class="keyword">typename</span> Body, <span class="keyword">typename</span> Item>
+00209     <span class="keyword">class </span>do_group_task_input: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a>
+00210     {
+00211         <span class="keyword">static</span> <span class="keyword">const</span> size_t max_arg_size = 4;         
+00212         
+00213         <span class="keyword">typedef</span> <a class="code" href="a00202.html">parallel_do_feeder_impl<Body, Item></a> feeder_type;
+00214 
+00215         feeder_type& my_feeder;
+00216         size_t my_size;
+00217         <a class="code" href="a00164.html">aligned_space<Item, max_arg_size></a> my_arg;
+00218 
+00219         do_group_task_input( feeder_type& feeder ) 
+00220             : my_feeder(feeder), my_size(0)
+00221         {}
+00222 
+00223         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* <a class="code" href="a00228.html#a1">execute</a>()
+00224         {
+00225             <span class="keyword">typedef</span> do_iteration_task_iter<Item*, Body, Item> iteration_type;
+00226             __TBB_ASSERT( my_size>0, NULL );
+00227             <a class="code" href="a00229.html">task_list</a> list;
+00228             <a class="code" href="a00228.html">task</a>* t; 
+00229             size_t k=0; 
+00230             <span class="keywordflow">for</span>(;;) {
+00231                 t = <span class="keyword">new</span>( <a class="code" href="a00228.html#a3">allocate_child</a>() ) iteration_type( my_arg.begin() + k, my_feeder );
+00232                 <span class="keywordflow">if</span>( ++k==my_size ) <span class="keywordflow">break</span>;
+00233                 list.<a class="code" href="a00229.html#a3">push_back</a>(*t);
+00234             }
+00235             <a class="code" href="a00228.html#a13">set_ref_count</a>(<span class="keywordtype">int</span>(k+1));
+00236             <a class="code" href="a00228.html#a14">spawn</a>(list);
+00237             <a class="code" href="a00228.html#a16">spawn_and_wait_for_all</a>(*t);
+00238             <span class="keywordflow">return</span> NULL;
+00239         }
+00240 
+00241         ~do_group_task_input(){
+00242             <span class="keywordflow">for</span>( size_t k=0; k<my_size; ++k)
+00243                 (my_arg.begin() + k)->~Item();
+00244         }
+00245 
+00246         <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;
+00247     }; <span class="comment">// class do_group_task_input</span>
+00248     
+00250 
+00252     <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="l00253"></a><a class="code" href="a00187.html">00253</a>     <span class="keyword">class </span><a class="code" href="a00187.html">do_task_iter</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a>
+00254     {
+00255         <span class="comment">//typedef typename std::iterator_traits<Iterator>::value_type Item;</span>
+00256         <span class="keyword">typedef</span> <a class="code" href="a00202.html">parallel_do_feeder_impl<Body, Item></a> <a class="code" href="a00202.html">feeder_type</a>;
+00257 
+00258     <span class="keyword">public</span>:
+00259         <a class="code" href="a00187.html">do_task_iter</a>( Iterator first, Iterator last , <a class="code" href="a00202.html">feeder_type</a>& feeder ) : 
+00260             my_first(first), my_last(last), my_feeder(feeder)
+00261         {}
+00262     
+00263     <span class="keyword">private</span>:
+00264         Iterator my_first;
+00265         Iterator my_last;
+00266         <a class="code" href="a00202.html">feeder_type</a>& my_feeder;
+00267 
+00268         <span class="comment">/* Do not merge run(xxx) and run_xxx() methods. They are separated in order</span>
+00269 <span class="comment">            to make sure that compilers will eliminate unused argument of type xxx</span>
+00270 <span class="comment">            (that is will not put it on stack). The sole purpose of this argument </span>
+00271 <span class="comment">            is overload resolution.</span>
+00272 <span class="comment">            </span>
+00273 <span class="comment">            An alternative could be using template functions, but explicit specialization </span>
+00274 <span class="comment">            of member function templates is not supported for non specialized class </span>
+00275 <span class="comment">            templates. Besides template functions would always fall back to the least </span>
+00276 <span class="comment">            efficient variant (the one for input iterators) in case of iterators having </span>
+00277 <span class="comment">            custom tags derived from basic ones. */</span>
+00278         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute()
+00279         {
+00280             <span class="keyword">typedef</span> <span class="keyword">typename</span> std::iterator_traits<Iterator>::iterator_category iterator_tag;
+00281             <span class="keywordflow">return</span> run( (iterator_tag*)NULL );
+00282         }
+00283 
+00286         <span class="keyword">inline</span> <a class="code" href="a00228.html">task</a>* run( <span class="keywordtype">void</span>* ) { <span class="keywordflow">return</span> run_for_input_iterator(); }
+00287         
+00288         <a class="code" href="a00228.html">task</a>* run_for_input_iterator() {
+00289             <span class="keyword">typedef</span> do_group_task_input<Body, Item> block_type;
+00290 
+00291             block_type& t = *<span class="keyword">new</span>( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(my_feeder);
+00292             size_t k=0; 
+00293             <span class="keywordflow">while</span>( !(my_first == my_last) ) {
+00294                 <span class="keyword">new</span> (t.my_arg.begin() + k) Item(*my_first);
+00295                 ++my_first;
+00296                 <span class="keywordflow">if</span>( ++k==block_type::max_arg_size ) {
+00297                     <span class="keywordflow">if</span> ( !(my_first == my_last) )
+00298                         recycle_to_reexecute();
+00299                     <span class="keywordflow">break</span>;
+00300                 }
+00301             }
+00302             <span class="keywordflow">if</span>( k==0 ) {
+00303                 destroy(t);
+00304                 <span class="keywordflow">return</span> NULL;
+00305             } <span class="keywordflow">else</span> {
+00306                 t.my_size = k;
+00307                 <span class="keywordflow">return</span> &t;
+00308             }
+00309         }
+00310 
+00311         <span class="keyword">inline</span> <a class="code" href="a00228.html">task</a>* run( std::forward_iterator_tag* ) { <span class="keywordflow">return</span> run_for_forward_iterator(); }
+00312 
+00313         <a class="code" href="a00228.html">task</a>* run_for_forward_iterator() {
+00314             <span class="keyword">typedef</span> <a class="code" href="a00185.html">do_group_task_forward<Iterator, Body, Item></a> block_type;
+00315 
+00316             Iterator first = my_first;
+00317             size_t k=0; 
+00318             <span class="keywordflow">while</span>( !(my_first==my_last) ) {
+00319                 ++my_first;
+00320                 <span class="keywordflow">if</span>( ++k==block_type::max_arg_size ) {
+00321                     <span class="keywordflow">if</span> ( !(my_first==my_last) )
+00322                         recycle_to_reexecute();
+00323                     <span class="keywordflow">break</span>;
+00324                 }
+00325             }
+00326             <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);
+00327         }
+00328         
+00329         <span class="keyword">inline</span> <a class="code" href="a00228.html">task</a>* run( std::random_access_iterator_tag* ) { <span class="keywordflow">return</span> run_for_random_access_iterator(); }
+00330 
+00331         <a class="code" href="a00228.html">task</a>* run_for_random_access_iterator() {
+00332             <span class="keyword">typedef</span> <a class="code" href="a00185.html">do_group_task_forward<Iterator, Body, Item></a> block_type;
+00333             <span class="keyword">typedef</span> do_iteration_task_iter<Iterator, Body, Item> iteration_type;
+00334             
+00335             size_t k = static_cast<size_t>(my_last-my_first); 
+00336             <span class="keywordflow">if</span>( k > block_type::max_arg_size ) {
+00337                 Iterator middle = my_first + k/2;
+00338 
+00339                 <a class="code" href="a00188.html">empty_task</a>& c = *<span class="keyword">new</span>( allocate_continuation() ) <a class="code" href="a00188.html">empty_task</a>;
+00340                 <a class="code" href="a00187.html">do_task_iter</a>& b = *<span class="keyword">new</span>( c.<a class="code" href="a00228.html#a3">allocate_child</a>() ) <a class="code" href="a00187.html">do_task_iter</a>(middle, my_last, my_feeder);
+00341                 recycle_as_child_of(c);
+00342 
+00343                 my_last = middle;
+00344                 c.<a class="code" href="a00228.html#a13">set_ref_count</a>(2);
+00345                 c.<a class="code" href="a00228.html#a14">spawn</a>(b);
+00346                 <span class="keywordflow">return</span> <span class="keyword">this</span>;
+00347             }<span class="keywordflow">else</span> <span class="keywordflow">if</span>( k != 0 ) {
+00348                 <a class="code" href="a00229.html">task_list</a> list;
+00349                 <a class="code" href="a00228.html">task</a>* t; 
+00350                 size_t k1=0; 
+00351                 <span class="keywordflow">for</span>(;;) {
+00352                     t = <span class="keyword">new</span>( allocate_child() ) iteration_type(my_first, my_feeder);
+00353                     ++my_first;
+00354                     <span class="keywordflow">if</span>( ++k1==k ) <span class="keywordflow">break</span>;
+00355                     list.<a class="code" href="a00229.html#a3">push_back</a>(*t);
+00356                 }
+00357                 set_ref_count(<span class="keywordtype">int</span>(k+1));
+00358                 spawn(list);
+00359                 spawn_and_wait_for_all(*t);
+00360             }
+00361             <span class="keywordflow">return</span> NULL;
+00362         }
+00363     }; <span class="comment">// class do_task_iter</span>
+00364 
+00366 
+00368     <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="l00369"></a><a class="code" href="a00281.html#ga0">00369</a>     <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga0">run_parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& body )
+00370     {
+00371         <span class="keyword">typedef</span> do_task_iter<Iterator, Body, Item> root_iteration_task;
+00372         parallel_do_feeder_impl<Body, Item> feeder;
+00373         feeder.my_body = &body;
+00374         feeder.my_barrier = <span class="keyword">new</span>( task::allocate_root() ) empty_task();
+00375         __TBB_ASSERT(feeder.my_barrier, <span class="stringliteral">"root task allocation failed"</span>);
+00376 
+00377         root_iteration_task &t = *<span class="keyword">new</span>( feeder.my_barrier->allocate_child() ) root_iteration_task(first, last, feeder);
+00378 
+00379         feeder.my_barrier->set_ref_count(2);
+00380         feeder.my_barrier->spawn_and_wait_for_all(t);
+00381 
+00382         feeder.my_barrier->destroy(*feeder.my_barrier);
+00383     }
+00384 
+00386 
+00388     <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="l00389"></a><a class="code" href="a00281.html#ga1">00389</a>     <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga2">select_parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& body, <span class="keywordtype">void</span> (Body::*)(Item) <span class="keyword">const</span> )
+00390     {
+00391         run_parallel_do<Iterator, Body, typename strip<Item>::type>( first, last, body );
+00392     }
+00393 
+00395 
+00397     <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="l00398"></a><a class="code" href="a00281.html#ga2">00398</a>     <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga2">select_parallel_do</a>( 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> )
+00399     {
+00400         run_parallel_do<Iterator, Body, typename strip<Item>::type>( first, last, body );
+00401     }
+00402 
+00403 } <span class="comment">// namespace internal</span>
+00405 <span class="comment"></span>
+00406 
+00429 
+00430 
+00431 <span class="keyword">template</span><<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Body> 
+<a name="l00432"></a><a class="code" href="a00281.html#ga3">00432</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga3">parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& body )
+00433 {
+00434     <span class="keywordflow">if</span> ( first == last )
+00435         <span class="keywordflow">return</span>;
+00436     <a class="code" href="a00281.html#ga2">internal::select_parallel_do</a>( first, last, body, &Body::operator() );
+00437 }
+00439 
+00440 } <span class="comment">// namespace </span>
+00441 
+00442 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_do_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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
new file mode 100644
index 0000000..29c2972
--- /dev/null
+++ b/doc/html/a00294.html
@@ -0,0 +1,161 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>parallel_for.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_parallel_for_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_for_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "task.h"</span>
+00025 <span class="preprocessor">#include "partitioner.h"</span>
+00026 <span class="preprocessor">#include <new></span>
+00027 
+00028 <span class="keyword">namespace </span>tbb {
+00029 
+00031 <span class="keyword">namespace </span>internal {
+00032 
+00034 
+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><a class="code" href="a00222.html">00036</a>     <span class="keyword">class </span><a class="code" href="a00222.html">start_for</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00037         Range my_range;
+00038         <span class="keyword">const</span> Body my_body;
+00039         <span class="keyword">typename</span> Partitioner::partition_type my_partition;
+00040         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute();
+00041 
+00043         <a class="code" href="a00222.html">start_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, Partitioner& partitioner ) :
+00044             my_range(range),    
+00045             my_body(body),
+00046             my_partition(partitioner)
+00047         {
+00048         }
+00050 
+00051         <a class="code" href="a00222.html">start_for</a>( <a class="code" href="a00222.html">start_for</a>& parent, <a class="code" href="a00221.html">split</a> ) :
+00052             my_range(parent.<a class="code" href="a00222.html#r0">my_range</a>,<a class="code" href="a00221.html">split</a>()),    
+00053             my_body(parent.<a class="code" href="a00222.html#r1">my_body</a>),
+00054             my_partition(parent.<a class="code" href="a00222.html#r2">my_partition</a>,<a class="code" href="a00221.html">split</a>())
+00055         {
+00056             my_partition.set_affinity(*<span class="keyword">this</span>);
+00057         }
+00059         <span class="comment">/*override*/</span> <span class="keywordtype">void</span> note_affinity( <a class="code" href="a00279.html#a12">affinity_id</a> <span class="keywordtype">id</span> ) {
+00060             my_partition.note_affinity( <span class="keywordtype">id</span> );
+00061         }
+00062     <span class="keyword">public</span>:
+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 ) {
+00064             <span class="keywordflow">if</span>( !range.empty() ) {
+00065 <span class="preprocessor">#if !__TBB_EXCEPTIONS || TBB_JOIN_OUTER_TASK_GROUP</span>
+00066 <span class="preprocessor"></span>                <a class="code" href="a00222.html">start_for</a>& a = *<span class="keyword">new</span>(task::allocate_root()) <a class="code" href="a00222.html">start_for</a>(range,body,const_cast<Partitioner&>(partitioner));
+00067 <span class="preprocessor">#else</span>
+00068 <span class="preprocessor"></span>                <span class="comment">// Bound context prevents exceptions from body to affect nesting or sibling algorithms,</span>
+00069                 <span class="comment">// and allows users to handle exceptions safely by wrapping parallel_for in the try-block.</span>
+00070                 task_group_context context;
+00071                 <a class="code" href="a00222.html">start_for</a>& a = *<span class="keyword">new</span>(task::allocate_root(context)) <a class="code" href="a00222.html">start_for</a>(range,body,const_cast<Partitioner&>(partitioner));
+00072 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS && !TBB_JOIN_OUTER_TASK_GROUP */</span>
+00073                 task::spawn_root_and_wait(a);
+00074             }
+00075         }
+00076 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+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 ) {
+00078             <span class="keywordflow">if</span>( !range.empty() ) {
+00079                 <a class="code" href="a00222.html">start_for</a>& a = *<span class="keyword">new</span>(task::allocate_root(context)) <a class="code" href="a00222.html">start_for</a>(range,body,const_cast<Partitioner&>(partitioner));
+00080                 task::spawn_root_and_wait(a);
+00081             }
+00082         }
+00083 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00084     };
+00085 
+00086     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
+00087     <a class="code" href="a00228.html">task</a>* <a class="code" href="a00222.html">start_for<Range,Body,Partitioner>::execute</a>() {
+00088         <span class="keywordflow">if</span>( !my_range.is_divisible() || my_partition.should_execute_range(*<span class="keyword">this</span>) ) {
+00089             my_body( my_range );
+00090             <span class="keywordflow">return</span> my_partition.continue_after_execute_range(*<span class="keyword">this</span>); 
+00091         } <span class="keywordflow">else</span> {
+00092             <a class="code" href="a00188.html">empty_task</a>& c = *<span class="keyword">new</span>( this-><a class="code" href="a00228.html#a2">allocate_continuation</a>() ) <a class="code" href="a00188.html">empty_task</a>;
+00093             <a class="code" href="a00228.html#a8">recycle_as_child_of</a>(c);
+00094             c.<a class="code" href="a00228.html#a13">set_ref_count</a>(2);
+00095             <span class="keywordtype">bool</span> delay = my_partition.decide_whether_to_delay();
+00096             start_for& b = *<span class="keyword">new</span>( c.<a class="code" href="a00228.html#a3">allocate_child</a>() ) start_for(*<span class="keyword">this</span>,<a class="code" href="a00221.html">split</a>());
+00097             my_partition.spawn_or_delay(delay,*<span class="keyword">this</span>,b);
+00098             <span class="keywordflow">return</span> <span class="keyword">this</span>;
+00099         }
+00100     } 
+00101 } <span class="comment">// namespace internal</span>
+00103 <span class="comment"></span>
+00104 
+00105 <span class="comment">// Requirements on Range concept are documented in blocked_range.h</span>
+00106 
+00117 
+00119 
+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="a00281.html#ga4">00121</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga4">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> simple_partitioner& partitioner=simple_partitioner() ) {
+00122     internal::start_for<Range,Body,simple_partitioner>::run(range,body,partitioner);
+00123 }
+00124 
+00126 
+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="a00281.html#ga5">00128</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga4">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> auto_partitioner& partitioner ) {
+00129     internal::start_for<Range,Body,auto_partitioner>::run(range,body,partitioner);
+00130 }
+00131 
+00133 
+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="a00281.html#ga6">00135</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga4">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, affinity_partitioner& partitioner ) {
+00136     internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner);
+00137 }
+00138 
+00139 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00140 <span class="preprocessor"></span>
+00141 
+00142 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+00143 <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga4">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> simple_partitioner& partitioner, task_group_context& context ) {
+00144     internal::start_for<Range,Body,simple_partitioner>::run(range, body, partitioner, context);
+00145 }
+00146 
+00148 
+00149 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+00150 <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga4">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> auto_partitioner& partitioner, task_group_context& context ) {
+00151     internal::start_for<Range,Body,auto_partitioner>::run(range, body, partitioner, context);
+00152 }
+00153 
+00155 
+00156 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+00157 <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga4">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, affinity_partitioner& partitioner, task_group_context& context ) {
+00158     internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner, context);
+00159 }
+00160 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00161 
+00162 
+00163 } <span class="comment">// namespace tbb</span>
+00164 
+00165 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_for_H */</span>
+00166 
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00295.html b/doc/html/a00295.html
new file mode 100644
index 0000000..912e4ca
--- /dev/null
+++ b/doc/html/a00295.html
@@ -0,0 +1,318 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>parallel_reduce.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_parallel_reduce_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_reduce_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "task.h"</span>
+00025 <span class="preprocessor">#include "aligned_space.h"</span>
+00026 <span class="preprocessor">#include "partitioner.h"</span>
+00027 <span class="preprocessor">#include <new></span>
+00028 
+00029 <span class="keyword">namespace </span>tbb {
+00030 
+00032 <span class="keyword">namespace </span>internal {
+00033 
+00035     <span class="keywordtype">void</span> <a class="code" href="a00279.html#a35">itt_store_pointer_with_release_v3</a>( <span class="keywordtype">void</span>* dst, <span class="keywordtype">void</span>* src );
+00036 
+00038     <span class="keywordtype">void</span>* <a class="code" href="a00279.html#a36">itt_load_pointer_with_acquire_v3</a>( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
+00039 
+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 ) {
+00041 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00042 <span class="preprocessor"></span>        <a class="code" href="a00279.html#a35">itt_store_pointer_with_release_v3</a>(&dst,src);
+00043 <span class="preprocessor">#else</span>
+00044 <span class="preprocessor"></span>        __TBB_store_with_release(dst,src);
+00045 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */</span>
+00046     }
+00047 
+00048     <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">inline</span> T* parallel_reduce_load_body( T*& src ) {
+00049 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00050 <span class="preprocessor"></span>        <span class="keywordflow">return</span> static_cast<T*>(<a class="code" href="a00279.html#a36">itt_load_pointer_with_acquire_v3</a>(&src));
+00051 <span class="preprocessor">#else</span>
+00052 <span class="preprocessor"></span>        <span class="keywordflow">return</span> __TBB_load_with_acquire(src);
+00053 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */</span>
+00054     }
+00055 
+00057 
+00058     <span class="keyword">template</span><<span class="keyword">typename</span> Body>
+<a name="l00059"></a><a class="code" href="a00192.html">00059</a>     <span class="keyword">class </span><a class="code" href="a00192.html">finish_reduce</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00060         Body* <span class="keyword">const</span> my_body;
+00061         <span class="keywordtype">bool</span> has_right_zombie;
+00062         <a class="code" href="a00164.html">aligned_space<Body,1></a> zombie_space;
+00063         <a class="code" href="a00192.html">finish_reduce</a>( Body* body ) : 
+00064             my_body(body),
+00065             has_right_zombie(<span class="keyword">false</span>)
+00066         {
+00067         }
+00068         <a class="code" href="a00228.html">task</a>* execute() {
+00069             <span class="keywordflow">if</span>( has_right_zombie ) {
+00070                 <span class="comment">// Right child was stolen.</span>
+00071                 Body* s = zombie_space.begin();
+00072                 my_body->join( *s );
+00073                 s->~Body();
+00074             }
+00075             <span class="keywordflow">return</span> NULL;
+00076         }       
+00077         <span class="keyword">template</span><<span class="keyword">typename</span> Range,<span class="keyword">typename</span> Body_, <span class="keyword">typename</span> Partitioner>
+00078         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00223.html">start_reduce</a>;
+00079     };
+00080 
+00082 
+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><a class="code" href="a00223.html">00084</a>     <span class="keyword">class </span><a class="code" href="a00223.html">start_reduce</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00085         <span class="keyword">typedef</span> <a class="code" href="a00192.html">finish_reduce<Body></a> <a class="code" href="a00192.html">finish_type</a>;
+00086         Body* my_body;
+00087         Range my_range;
+00088         <span class="keyword">typename</span> Partitioner::partition_type my_partition;
+00089         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute();
+00090         <span class="keyword">template</span><<span class="keyword">typename</span> Body_>
+00091         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00192.html">finish_reduce</a>;
+00092     
+00094         <a class="code" href="a00223.html">start_reduce</a>( <span class="keyword">const</span> Range& range, Body* body, <span class="keyword">const</span> Partitioner &partitioner ) :
+00095             my_body(body),
+00096             my_range(range),
+00097             my_partition(partitioner)
+00098         {
+00099         }
+00101 
+00102         <a class="code" href="a00223.html">start_reduce</a>( <a class="code" href="a00223.html">start_reduce</a>& parent, <a class="code" href="a00221.html">split</a> ) :
+00103             my_body(parent.<a class="code" href="a00223.html#r0">my_body</a>),
+00104             my_range(parent.<a class="code" href="a00223.html#r1">my_range</a>,<a class="code" href="a00221.html">split</a>()),
+00105             my_partition(parent.<a class="code" href="a00223.html#r2">my_partition</a>,<a class="code" href="a00221.html">split</a>())
+00106         {
+00107         }
+00109 
+00110         <span class="comment">/*override*/</span> <span class="keywordtype">void</span> note_affinity( <a class="code" href="a00279.html#a12">affinity_id</a> <span class="keywordtype">id</span> ) {
+00111             <a class="code" href="a00192.html">finish_type</a>* p = static_cast<finish_type*>(parent() );
+00112             Body* body = <span class="keyword">new</span>( p-><a class="code" href="a00192.html#r2">zombie_space</a>.<a class="code" href="a00164.html#a0">begin</a>() ) Body(*my_body,<a class="code" href="a00221.html">split</a>());
+00113             p-><a class="code" href="a00192.html#r1">has_right_zombie</a> = <span class="keyword">true</span>;
+00114             my_body = body;
+00115         }
+00116     <span class="keyword">public</span>:
+00117 <span class="preprocessor">#if !__TBB_EXCEPTIONS</span>
+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 ) {
+00119             <span class="keywordflow">if</span>( !range.empty() ) 
+00120                 task::spawn_root_and_wait( *<span class="keyword">new</span>(task::allocate_root()) <a class="code" href="a00223.html">start_reduce</a>(range,&body,partitioner) );
+00121         }
+00122 <span class="preprocessor">#else </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+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 ) {
+00124             <span class="comment">// Bound context prevents exceptions from body to affect nesting or sibling algorithms,</span>
+00125             <span class="comment">// and allows users to handle exceptions safely by wrapping parallel_for in the try-block.</span>
+00126             <span class="keywordflow">if</span>( !range.empty() )  {
+00127                 task_group_context context;
+00128                 task::spawn_root_and_wait( *<span class="keyword">new</span>(task::allocate_root(context)) <a class="code" href="a00223.html">start_reduce</a>(range,&body,partitioner) );
+00129             }
+00130         }
+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 ) {
+00132             <span class="keywordflow">if</span>( !range.empty() ) 
+00133                 task::spawn_root_and_wait( *<span class="keyword">new</span>(task::allocate_root(context)) <a class="code" href="a00223.html">start_reduce</a>(range,&body,partitioner) );
+00134         }
+00135 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00136     };
+00137 
+00138     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
+00139     <a class="code" href="a00228.html">task</a>* <a class="code" href="a00223.html">start_reduce<Range,Body,Partitioner>::execute</a>() {
+00140         <span class="keywordflow">if</span>( !my_range.is_divisible() || my_partition.should_execute_range(*<span class="keyword">this</span>) ) {
+00141             (*my_body)( my_range );
+00142             <span class="keywordflow">return</span> NULL;
+00143         } <span class="keywordflow">else</span> {
+00144             finish_type& c = *<span class="keyword">new</span>( <a class="code" href="a00228.html#a2">allocate_continuation</a>()) finish_type(my_body);
+00145             <a class="code" href="a00228.html#a8">recycle_as_child_of</a>(c);
+00146             c.<a class="code" href="a00228.html#a13">set_ref_count</a>(2);    
+00147             start_reduce& b = *<span class="keyword">new</span>( c.allocate_child() ) start_reduce(*<span class="keyword">this</span>,<a class="code" href="a00221.html">split</a>());
+00148             <a class="code" href="a00228.html#a14">spawn</a>(b);
+00149             <span class="keywordflow">return</span> <span class="keyword">this</span>;
+00150         }
+00151     }
+00152  
+00154 
+<a name="l00155"></a><a class="code" href="a00279.html#a4">00155</a>     <span class="keyword">typedef</span> <span class="keywordtype">char</span> reduction_context;
+00156 
+00158 
+00159     <span class="keyword">template</span><<span class="keyword">typename</span> Body>
+<a name="l00160"></a><a class="code" href="a00193.html">00160</a>     <span class="keyword">class </span><a class="code" href="a00193.html">finish_reduce_with_affinity</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00162         Body* my_body;
+00163         <span class="keywordtype">bool</span> has_right_zombie;
+00164         <span class="keyword">const</span> <a class="code" href="a00279.html#a4">reduction_context</a> my_context;
+00165         <a class="code" href="a00164.html">aligned_space<Body,1></a> zombie_space;
+00166         <a class="code" href="a00193.html">finish_reduce_with_affinity</a>( <span class="keywordtype">char</span> context ) : 
+00167             my_body(NULL),
+00168             has_right_zombie(<span class="keyword">false</span>),
+00169             my_context(context)
+00170         {
+00171         }
+00172         <a class="code" href="a00228.html">task</a>* <a class="code" href="a00228.html#a1">execute</a>() {
+00173             <span class="keywordflow">if</span>( has_right_zombie ) {
+00174                 <span class="comment">// Right child was stolen.</span>
+00175                 Body* s = zombie_space.<a class="code" href="a00164.html#a0">begin</a>();
+00176                 my_body->join( *s );
+00177                 s->~Body();
+00178             }
+00179             <span class="keywordflow">if</span>( my_context==1 ) 
+00180                 parallel_reduce_store_body( static_cast<finish_reduce_with_affinity*>(<a class="code" href="a00228.html#a19">parent</a>())->my_body, my_body );
+00181             <span class="keywordflow">return</span> NULL;
+00182         }       
+00183         <span class="keyword">template</span><<span class="keyword">typename</span> Range,<span class="keyword">typename</span> Body_>
+00184         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00224.html">start_reduce_with_affinity</a>;
+00185     };
+00186 
+00188 
+00189     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00190"></a><a class="code" href="a00224.html">00190</a>     <span class="keyword">class </span><a class="code" href="a00224.html">start_reduce_with_affinity</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00191         <span class="keyword">typedef</span> <a class="code" href="a00193.html">finish_reduce_with_affinity<Body></a> <a class="code" href="a00193.html">finish_type</a>;
+00192         Body* my_body;
+00193         Range my_range;
+00194         <span class="keyword">typename</span> affinity_partitioner::partition_type my_partition;
+00195         <a class="code" href="a00279.html#a4">reduction_context</a> my_context;
+00196         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* <a class="code" href="a00228.html#a1">execute</a>();
+00197         <span class="keyword">template</span><<span class="keyword">typename</span> Body_>
+00198         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00193.html">finish_reduce_with_affinity</a>;
+00199     
+00201         <a class="code" href="a00224.html">start_reduce_with_affinity</a>( <span class="keyword">const</span> Range& range, Body* body, <a class="code" href="a00162.html">affinity_partitioner</a>& partitioner ) :
+00202             my_body(body),
+00203             my_range(range),
+00204             my_partition(partitioner),
+00205             my_context(0)
+00206         {
+00207         }
+00209 
+00210         <a class="code" href="a00224.html">start_reduce_with_affinity</a>( <a class="code" href="a00224.html">start_reduce_with_affinity</a>& parent, <a class="code" href="a00221.html">split</a> ) :
+00211             my_body(parent.<a class="code" href="a00224.html#r0">my_body</a>),
+00212             my_range(parent.<a class="code" href="a00224.html#r1">my_range</a>,<a class="code" href="a00221.html">split</a>()),
+00213             my_partition(parent.<a class="code" href="a00224.html#r2">my_partition</a>,<a class="code" href="a00221.html">split</a>()),
+00214             my_context(2)
+00215         {
+00216             my_partition.<a class="code" href="a00228.html#a24">set_affinity</a>(*<span class="keyword">this</span>);
+00217             parent.<a class="code" href="a00224.html#r3">my_context</a> = 1;
+00218         }
+00220         <span class="comment">/*override*/</span> <span class="keywordtype">void</span> <a class="code" href="a00228.html#a26">note_affinity</a>( affinity_id <span class="keywordtype">id</span> ) {
+00221             my_partition.<a class="code" href="a00224.html#d3">note_affinity</a>( <span class="keywordtype">id</span> );
+00222         }
+00223 
+00224 <span class="keyword">public</span>:
+00225         <span class="keyword">static</span> <span class="keywordtype">void</span> run( <span class="keyword">const</span> Range& range, Body& body, <a class="code" href="a00162.html">affinity_partitioner</a>& partitioner ) {
+00226             <span class="keywordflow">if</span>( !range.empty() ) {
+00227 <span class="preprocessor">#if !__TBB_EXCEPTIONS || TBB_JOIN_OUTER_TASK_GROUP</span>
+00228 <span class="preprocessor"></span>                task::spawn_root_and_wait( *<span class="keyword">new</span>(task::allocate_root()) <a class="code" href="a00224.html">start_reduce_with_affinity</a>(range,&body,partitioner) );
+00229 <span class="preprocessor">#else</span>
+00230 <span class="preprocessor"></span>                <span class="comment">// Bound context prevents exceptions from body to affect nesting or sibling algorithms,</span>
+00231                 <span class="comment">// and allows users to handle exceptions safely by wrapping parallel_for in the try-block.</span>
+00232                 task_group_context context;
+00233                 task::spawn_root_and_wait( *<span class="keyword">new</span>(task::allocate_root(context)) <a class="code" href="a00224.html">start_reduce_with_affinity</a>(range,&body,partitioner) );
+00234 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS && !TBB_JOIN_OUTER_TASK_GROUP */</span>
+00235             }
+00236         }
+00237 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+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, <a class="code" href="a00162.html">affinity_partitioner</a>& partitioner, task_group_context& context ) {
+00239             <span class="keywordflow">if</span>( !range.empty() ) 
+00240                 task::spawn_root_and_wait( *<span class="keyword">new</span>(task::allocate_root(context)) <a class="code" href="a00224.html">start_reduce_with_affinity</a>(range,&body,partitioner) );
+00241         }
+00242 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00243     };
+00244 
+00245     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+00246     <a class="code" href="a00228.html">task</a>* <a class="code" href="a00224.html">start_reduce_with_affinity<Range,Body>::execute</a>() {
+00247         <span class="keywordflow">if</span>( my_context==2 ) {
+00248             finish_type* p = static_cast<finish_type*>(<a class="code" href="a00228.html#a19">parent</a>() );
+00249             <span class="keywordflow">if</span>( !parallel_reduce_load_body(p->my_body) ) {
+00250                 my_body = <span class="keyword">new</span>( p->zombie_space.begin() ) Body(*my_body,<a class="code" href="a00221.html">split</a>());
+00251                 p->has_right_zombie = <span class="keyword">true</span>;
+00252             } 
+00253         }
+00254         <span class="keywordflow">if</span>( !my_range.is_divisible() || my_partition.should_execute_range(*<span class="keyword">this</span>) ) {
+00255             (*my_body)( my_range );
+00256             <span class="keywordflow">if</span>( my_context==1 ) 
+00257                 parallel_reduce_store_body(static_cast<finish_type*>(<a class="code" href="a00228.html#a19">parent</a>())->my_body, my_body );
+00258             <span class="keywordflow">return</span> my_partition.continue_after_execute_range(*<span class="keyword">this</span>);
+00259         } <span class="keywordflow">else</span> {
+00260             finish_type& c = *<span class="keyword">new</span>( <a class="code" href="a00228.html#a2">allocate_continuation</a>()) finish_type(my_context);
+00261             <a class="code" href="a00228.html#a8">recycle_as_child_of</a>(c);
+00262             c.<a class="code" href="a00228.html#a13">set_ref_count</a>(2);    
+00263             <span class="keywordtype">bool</span> delay = my_partition.decide_whether_to_delay();
+00264             start_reduce_with_affinity& b = *<span class="keyword">new</span>( c.allocate_child() ) start_reduce_with_affinity(*<span class="keyword">this</span>,split());
+00265             my_partition.spawn_or_delay(delay,*<span class="keyword">this</span>,b);
+00266             <span class="keywordflow">return</span> <span class="keyword">this</span>;
+00267         }
+00268     } 
+00269 } <span class="comment">// namespace internal</span>
+00271 <span class="comment"></span>
+00272 <span class="comment">// Requirements on Range concept are documented in blocked_range.h</span>
+00273 
+00288 
+00290 
+00291 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00292"></a><a class="code" href="a00281.html#ga7">00292</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga7">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> simple_partitioner& partitioner = simple_partitioner() ) {
+00293     internal::start_reduce<Range,Body,simple_partitioner>::run( range, body, partitioner );
+00294 }
+00295 
+00297 
+00298 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00299"></a><a class="code" href="a00281.html#ga8">00299</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga7">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> auto_partitioner& partitioner ) {
+00300     internal::start_reduce<Range,Body,auto_partitioner>::run( range, body, partitioner );
+00301 }
+00302 
+00304 
+00305 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00306"></a><a class="code" href="a00281.html#ga9">00306</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga7">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, affinity_partitioner& partitioner ) {
+00307     internal::start_reduce_with_affinity<Range,Body>::run( range, body, partitioner );
+00308 }
+00309 
+00310 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00311 <span class="preprocessor"></span>
+00312 
+00313 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+00314 <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga7">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> simple_partitioner& partitioner, task_group_context& context ) {
+00315     internal::start_reduce<Range,Body,simple_partitioner>::run( range, body, partitioner, context );
+00316 }
+00317 
+00319 
+00320 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+00321 <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga7">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> auto_partitioner& partitioner, task_group_context& context ) {
+00322     internal::start_reduce<Range,Body,auto_partitioner>::run( range, body, partitioner, context );
+00323 }
+00324 
+00326 
+00327 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+00328 <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga7">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, affinity_partitioner& partitioner, task_group_context& context ) {
+00329     internal::start_reduce_with_affinity<Range,Body>::run( range, body, partitioner, context );
+00330 }
+00331 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00332 
+00333 
+00334 } <span class="comment">// namespace tbb</span>
+00335 
+00336 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_reduce_H */</span>
+00337 
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00296.html b/doc/html/a00296.html
new file mode 100644
index 0000000..9ffe704
--- /dev/null
+++ b/doc/html/a00296.html
@@ -0,0 +1,321 @@
+<!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_scan.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>parallel_scan.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_parallel_scan_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_scan_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "task.h"</span>
+00025 <span class="preprocessor">#include "aligned_space.h"</span>
+00026 <span class="preprocessor">#include <new></span>
+00027 <span class="preprocessor">#include "partitioner.h"</span>
+00028 
+00029 <span class="keyword">namespace </span>tbb {
+00030 
+00032 
+<a name="l00033"></a><a class="code" href="a00207.html">00033</a> <span class="keyword">struct </span><a class="code" href="a00207.html">pre_scan_tag</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>;}
+00035 };
+00036 
+00038 
+<a name="l00039"></a><a class="code" href="a00190.html">00039</a> <span class="keyword">struct </span><a class="code" href="a00190.html">final_scan_tag</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>;}
+00041 };
+00042 
+00044 <span class="keyword">namespace </span>internal {
+00045 
+00047 
+00048     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00049"></a><a class="code" href="a00191.html">00049</a>     <span class="keyword">class </span><a class="code" href="a00191.html">final_sum</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00050     <span class="keyword">public</span>:
+00051         Body body;
+00052     <span class="keyword">private</span>:
+00053         <a class="code" href="a00164.html">aligned_space<Range,1></a> range;
+00055         Body* stuff_last;
+00056     <span class="keyword">public</span>:
+00057         <a class="code" href="a00191.html">final_sum</a>( Body& body_ ) :
+00058             body(body_,<a class="code" href="a00221.html">split</a>())
+00059         {
+00060             poison_pointer(stuff_last);
+00061         }
+00062         ~<a class="code" href="a00191.html">final_sum</a>() {
+00063             range.begin()->~Range();
+00064         }     
+00065         <span class="keywordtype">void</span> finish_construction( <span class="keyword">const</span> Range& range_, Body* stuff_last_ ) {
+00066             <span class="keyword">new</span>( range.begin() ) Range(range_);
+00067             stuff_last = stuff_last_;
+00068         }
+00069     <span class="keyword">private</span>:
+00070         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute() {
+00071             body( *range.begin(), <a class="code" href="a00190.html">final_scan_tag</a>() );
+00072             <span class="keywordflow">if</span>( stuff_last )
+00073                 stuff_last->assign(body);
+00074             <span class="keywordflow">return</span> NULL;
+00075         }
+00076     };       
+00077 
+00079 
+00080     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00081"></a><a class="code" href="a00227.html">00081</a>     <span class="keyword">class </span><a class="code" href="a00227.html">sum_node</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00082         <span class="keyword">typedef</span> <a class="code" href="a00191.html">final_sum<Range,Body></a> <a class="code" href="a00191.html">final_sum_type</a>;
+00083     <span class="keyword">public</span>:
+00084         <a class="code" href="a00191.html">final_sum_type</a> *incoming; 
+00085         <a class="code" href="a00191.html">final_sum_type</a> *body;
+00086         Body *stuff_last;
+00087     <span class="keyword">private</span>:
+00088         <a class="code" href="a00191.html">final_sum_type</a> *left_sum;
+00089         <a class="code" href="a00227.html">sum_node</a> *left;
+00090         <a class="code" href="a00227.html">sum_node</a> *right;     
+00091         <span class="keywordtype">bool</span> left_is_final;
+00092         Range range;
+00093         <a class="code" href="a00227.html">sum_node</a>( <span class="keyword">const</span> Range range_, <span class="keywordtype">bool</span> left_is_final_ ) : 
+00094             left_sum(NULL), 
+00095             left(NULL), 
+00096             right(NULL), 
+00097             left_is_final(left_is_final_), 
+00098             range(range_)
+00099         {
+00100             <span class="comment">// Poison fields that will be set by second pass.</span>
+00101             poison_pointer(body);
+00102             poison_pointer(incoming);
+00103         }
+00104         <a class="code" href="a00228.html">task</a>* create_child( <span class="keyword">const</span> Range& range, <a class="code" href="a00191.html">final_sum_type</a>& f, <a class="code" href="a00227.html">sum_node</a>* n, <a class="code" href="a00191.html">final_sum_type</a>* incoming, Body* stuff_last ) {
+00105             <span class="keywordflow">if</span>( !n ) {
+00106                 f.<a class="code" href="a00228.html#a8">recycle_as_child_of</a>( *<span class="keyword">this</span> );
+00107                 f.<a class="code" href="a00191.html#a2">finish_construction</a>( range, stuff_last );
+00108                 <span class="keywordflow">return</span> &f;
+00109             } <span class="keywordflow">else</span> {
+00110                 n-><a class="code" href="a00227.html#o1">body</a> = &f;
+00111                 n-><a class="code" href="a00227.html#o0">incoming</a> = incoming;
+00112                 n-><a class="code" href="a00227.html#o2">stuff_last</a> = stuff_last;
+00113                 <span class="keywordflow">return</span> n;
+00114             }
+00115         }
+00116         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute() {
+00117             <span class="keywordflow">if</span>( body ) {
+00118                 <span class="keywordflow">if</span>( incoming )
+00119                     left_sum-><a class="code" href="a00227.html#o1">body</a>.reverse_join( incoming-><a class="code" href="a00191.html#o0">body</a> );
+00120                 recycle_as_continuation();
+00121                 <a class="code" href="a00227.html">sum_node</a>& c = *<span class="keyword">this</span>;
+00122                 <a class="code" href="a00228.html">task</a>* b = c.<a class="code" href="a00227.html#d1">create_child</a>(Range(range,<a class="code" href="a00221.html">split</a>()),*left_sum,right,left_sum,stuff_last);
+00123                 <a class="code" href="a00228.html">task</a>* a = left_is_final ? NULL : c.<a class="code" href="a00227.html#d1">create_child</a>(range,*body,left,incoming,NULL);
+00124                 set_ref_count( (a!=NULL)+(b!=NULL) );
+00125                 body = NULL; 
+00126                 <span class="keywordflow">if</span>( a ) spawn(*b);
+00127                 <span class="keywordflow">else</span> a = b;
+00128                 <span class="keywordflow">return</span> a;
+00129             } <span class="keywordflow">else</span> {
+00130                 <span class="keywordflow">return</span> NULL;
+00131             }
+00132         }
+00133         <span class="keyword">template</span><<span class="keyword">typename</span> Range_,<span class="keyword">typename</span> Body_,<span class="keyword">typename</span> Partitioner_>
+00134         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00225.html">start_scan</a>;
+00135 
+00136         <span class="keyword">template</span><<span class="keyword">typename</span> Range_,<span class="keyword">typename</span> Body_>
+00137         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00194.html">finish_scan</a>;
+00138     };
+00139 
+00141 
+00142     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00143"></a><a class="code" href="a00194.html">00143</a>     <span class="keyword">class </span><a class="code" href="a00194.html">finish_scan</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00144         <span class="keyword">typedef</span> <a class="code" href="a00227.html">sum_node<Range,Body></a> <a class="code" href="a00227.html">sum_node_type</a>;
+00145         <span class="keyword">typedef</span> <a class="code" href="a00191.html">final_sum<Range,Body></a> <a class="code" href="a00191.html">final_sum_type</a>;
+00146         <a class="code" href="a00191.html">final_sum_type</a>** <span class="keyword">const</span> sum;
+00147         <a class="code" href="a00227.html">sum_node_type</a>*& return_slot;
+00148     <span class="keyword">public</span>:
+00149         <a class="code" href="a00191.html">final_sum_type</a>* right_zombie;
+00150         <a class="code" href="a00227.html">sum_node_type</a>& result;
+00151 
+<a name="l00152"></a><a class="code" href="a00194.html#a0">00152</a>         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute() {
+00153             __TBB_ASSERT( result.ref_count()==(result.left!=NULL)+(result.right!=NULL), NULL );
+00154             <span class="keywordflow">if</span>( result.left )
+00155                 result.left_is_final = <span class="keyword">false</span>;
+00156             <span class="keywordflow">if</span>( right_zombie && sum ) 
+00157                 ((*sum)->body).reverse_join(result.left_sum->body);
+00158             __TBB_ASSERT( !return_slot, NULL );
+00159             <span class="keywordflow">if</span>( right_zombie || result.right ) {
+00160                 return_slot = &result;
+00161             } <span class="keywordflow">else</span> {
+00162                 destroy( result );
+00163             }
+00164             <span class="keywordflow">if</span>( right_zombie && !sum && !result.right ) destroy(*right_zombie);
+00165             <span class="keywordflow">return</span> NULL;
+00166         }
+00167 
+00168         <a class="code" href="a00194.html">finish_scan</a>( sum_node_type*& return_slot_, final_sum_type** sum_, sum_node_type& result_ ) : 
+00169             sum(sum_),
+00170             return_slot(return_slot_), 
+00171             right_zombie(NULL),
+00172             result(result_)
+00173         {
+00174             __TBB_ASSERT( !return_slot, NULL );
+00175         }
+00176     };
+00177 
+00179 
+00180     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner=simple_partitioner>
+<a name="l00181"></a><a class="code" href="a00225.html">00181</a>     <span class="keyword">class </span><a class="code" href="a00225.html">start_scan</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00182         <span class="keyword">typedef</span> <a class="code" href="a00227.html">sum_node<Range,Body></a> <a class="code" href="a00227.html">sum_node_type</a>;
+00183         <span class="keyword">typedef</span> <a class="code" href="a00191.html">final_sum<Range,Body></a> <a class="code" href="a00191.html">final_sum_type</a>;
+00184         <a class="code" href="a00191.html">final_sum_type</a>* body;
+00186         <a class="code" href="a00191.html">final_sum_type</a>** sum; 
+00187         <a class="code" href="a00227.html">sum_node_type</a>** return_slot;
+00189         <a class="code" href="a00227.html">sum_node_type</a>* parent_sum;
+00190         <span class="keywordtype">bool</span> is_final;
+00191         <span class="keywordtype">bool</span> is_right_child;
+00192         Range range;
+00193         <span class="keyword">typename</span> Partitioner::partition_type partition;
+00194         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute();
+00195     <span class="keyword">public</span>:
+00196         <a class="code" href="a00225.html">start_scan</a>( <a class="code" href="a00227.html">sum_node_type</a>*& return_slot_, <a class="code" href="a00225.html">start_scan</a>& parent, <a class="code" href="a00227.html">sum_node_type</a>* parent_sum_ ) :
+00197             body(parent.<a class="code" href="a00225.html#r0">body</a>),
+00198             sum(parent.<a class="code" href="a00225.html#r1">sum</a>),
+00199             return_slot(&return_slot_),
+00200             parent_sum(parent_sum_),
+00201             is_final(parent.<a class="code" href="a00225.html#r4">is_final</a>),
+00202             is_right_child(<span class="keyword">false</span>),
+00203             range(parent.<a class="code" href="a00225.html#r6">range</a>,<a class="code" href="a00221.html">split</a>()),
+00204             partition(parent.<a class="code" href="a00225.html#r7">partition</a>,<a class="code" href="a00221.html">split</a>())
+00205         {
+00206             __TBB_ASSERT( !*return_slot, NULL );
+00207         }
+00208 
+00209         <a class="code" href="a00225.html">start_scan</a>( <a class="code" href="a00227.html">sum_node_type</a>*& return_slot_, <span class="keyword">const</span> Range& range_, <a class="code" href="a00191.html">final_sum_type</a>& body_, <span class="keyword">const</span> Partitioner& partitioner_) :
+00210             body(&body_),
+00211             sum(NULL),
+00212             return_slot(&return_slot_),
+00213             parent_sum(NULL),
+00214             is_final(<span class="keyword">true</span>),
+00215             is_right_child(<span class="keyword">false</span>),
+00216             range(range_),
+00217             partition(partitioner_)
+00218         {
+00219             __TBB_ASSERT( !*return_slot, NULL );
+00220         }
+00221 
+00222         <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 ) {
+00223             <span class="keywordflow">if</span>( !range.empty() ) {
+00224                 <span class="keyword">typedef</span> <a class="code" href="a00225.html">internal::start_scan<Range,Body,Partitioner></a> start_pass1_type;
+00225                 <a class="code" href="a00227.html">internal::sum_node<Range,Body></a>* root = NULL;
+00226                 <span class="keyword">typedef</span> <a class="code" href="a00191.html">internal::final_sum<Range,Body></a> <a class="code" href="a00191.html">final_sum_type</a>;
+00227                 final_sum_type* temp_body = <span class="keyword">new</span>(task::allocate_root()) final_sum_type( body );
+00228                 start_pass1_type& pass1 = *<span class="keyword">new</span>(task::allocate_root()) start_pass1_type(
+00229                     <span class="comment">/*return_slot=*/</span>root,
+00230                     range,
+00231                     *temp_body,
+00232                     partitioner );
+00233                 task::spawn_root_and_wait( pass1 );
+00234                 <span class="keywordflow">if</span>( root ) {
+00235                     root-><a class="code" href="a00227.html#o1">body</a> = temp_body;
+00236                     root-><a class="code" href="a00227.html#o0">incoming</a> = NULL;
+00237                     root-><a class="code" href="a00227.html#o2">stuff_last</a> = &body;
+00238                     task::spawn_root_and_wait( *root );
+00239                 } <span class="keywordflow">else</span> {
+00240                     body.assign(temp_body-><a class="code" href="a00191.html#o0">body</a>);
+00241                     temp_body-><a class="code" href="a00191.html#a2">finish_construction</a>( range, NULL );
+00242                     temp_body-><a class="code" href="a00228.html#a5">destroy</a>(*temp_body);
+00243                 }
+00244             }
+00245         }
+00246     };
+00247 
+00248     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner>
+00249     <a class="code" href="a00228.html">task</a>* <a class="code" href="a00225.html">start_scan<Range,Body,Partitioner>::execute</a>() {
+00250         <span class="keyword">typedef</span> <a class="code" href="a00194.html">internal::finish_scan<Range,Body></a> finish_pass1_type;
+00251         finish_pass1_type* p = parent_sum ? static_cast<finish_pass1_type*>( <a class="code" href="a00228.html#a19">parent</a>() ) : NULL;
+00252         <span class="comment">// Inspecting p->result.left_sum would ordinarily be a race condition.</span>
+00253         <span class="comment">// But we inspect it only if we are not a stolen task, in which case we</span>
+00254         <span class="comment">// know that task assigning to p->result.left_sum has completed.</span>
+00255         <span class="keywordtype">bool</span> treat_as_stolen = is_right_child && (<a class="code" href="a00228.html#a20">is_stolen_task</a>() || body!=p->result.left_sum);
+00256         <span class="keywordflow">if</span>( treat_as_stolen ) {
+00257             <span class="comment">// Invocation is for right child that has been really stolen or needs to be virtually stolen</span>
+00258             p->right_zombie = body = <span class="keyword">new</span>( <a class="code" href="a00228.html#e0">allocate_root</a>() ) final_sum_type(body-><a class="code" href="a00191.html#o0">body</a>);
+00259             is_final = <span class="keyword">false</span>;
+00260         }
+00261         <a class="code" href="a00228.html">task</a>* next_task = NULL;
+00262         <span class="keywordflow">if</span>( (is_right_child && !treat_as_stolen) || !range.is_divisible() || partition.should_execute_range(*<span class="keyword">this</span>) ) {
+00263             <span class="keywordflow">if</span>( is_final )
+00264                 (body-><a class="code" href="a00191.html#o0">body</a>)( range, <a class="code" href="a00190.html">final_scan_tag</a>() );
+00265             <span class="keywordflow">else</span> <span class="keywordflow">if</span>( sum )
+00266                 (body-><a class="code" href="a00191.html#o0">body</a>)( range, <a class="code" href="a00207.html">pre_scan_tag</a>() );
+00267             <span class="keywordflow">if</span>( sum ) 
+00268                 *sum = body;
+00269             __TBB_ASSERT( !*return_slot, NULL );
+00270         } <span class="keywordflow">else</span> {
+00271             sum_node_type* result;
+00272             <span class="keywordflow">if</span>( parent_sum ) 
+00273                 result = <span class="keyword">new</span>(<a class="code" href="a00228.html#a4">allocate_additional_child_of</a>(*parent_sum)) sum_node_type(range,<span class="comment">/*left_is_final=*/</span>is_final);
+00274             <span class="keywordflow">else</span>
+00275                 result = <span class="keyword">new</span>(task::allocate_root()) sum_node_type(range,<span class="comment">/*left_is_final=*/</span>is_final);
+00276             finish_pass1_type& c = *<span class="keyword">new</span>( <a class="code" href="a00228.html#a2">allocate_continuation</a>()) finish_pass1_type(*return_slot,sum,*result);
+00277             <span class="comment">// Split off right child</span>
+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 );
+00279             b.is_right_child = <span class="keyword">true</span>;    
+00280             <span class="comment">// Left child is recycling of *this.  Must recycle this before spawning b, </span>
+00281             <span class="comment">// otherwise b might complete and decrement c.ref_count() to zero, which</span>
+00282             <span class="comment">// would cause c.execute() to run prematurely.</span>
+00283             <a class="code" href="a00228.html#a8">recycle_as_child_of</a>(c);
+00284             c.<a class="code" href="a00228.html#a13">set_ref_count</a>(2);
+00285             c.<a class="code" href="a00228.html#a14">spawn</a>(b);
+00286             sum = &result->left_sum;
+00287             return_slot = &result-><a class="code" href="a00227.html#r1">left</a>;
+00288             is_right_child = <span class="keyword">false</span>;
+00289             next_task = <span class="keyword">this</span>;
+00290             parent_sum = result; 
+00291             __TBB_ASSERT( !*return_slot, NULL );
+00292         }
+00293         <span class="keywordflow">return</span> next_task;
+00294     } 
+00295 } <span class="comment">// namespace internal</span>
+00297 <span class="comment"></span>
+00298 <span class="comment">// Requirements on Range concept are documented in blocked_range.h</span>
+00299 
+00317 
+00319 
+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="a00281.html#ga10">00321</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga10">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> simple_partitioner& partitioner=simple_partitioner() ) {
+00322     internal::start_scan<Range,Body,simple_partitioner>::run(range,body,partitioner);
+00323 }
+00324 
+00326 
+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="a00281.html#ga11">00328</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga10">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> auto_partitioner& partitioner ) {
+00329     internal::start_scan<Range,Body,auto_partitioner>::run(range,body,partitioner);
+00330 }
+00332 
+00333 } <span class="comment">// namespace tbb</span>
+00334 
+00335 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_scan_H */</span>
+00336 
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00297.html b/doc/html/a00297.html
new file mode 100644
index 0000000..abf32ce
--- /dev/null
+++ b/doc/html/a00297.html
@@ -0,0 +1,147 @@
+<!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_sort.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>parallel_sort.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_parallel_sort_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_sort_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "parallel_for.h"</span>
+00025 <span class="preprocessor">#include <algorithm></span>
+00026 <span class="preprocessor">#include <iterator></span>
+00027 <span class="preprocessor">#include <functional></span>
+00028 
+00029 <span class="keyword">namespace </span>tbb {
+00030 
+00032 <span class="keyword">namespace </span>internal {
+00033 
+00035 
+00037 <span class="keyword">template</span><<span class="keyword">typename</span> RandomAccessIterator, <span class="keyword">typename</span> Compare>
+<a name="l00038"></a><a class="code" href="a00213.html">00038</a> <span class="keyword">struct </span><a class="code" href="a00213.html">quick_sort_range</a> {
+00039     <span class="keyword">static</span> <span class="keyword">const</span> size_t grainsize = 500;
+00040     <span class="keyword">const</span> Compare &comp;
+00041     RandomAccessIterator begin;
+00042     size_t size;
+00043 
+00044     <a class="code" href="a00213.html">quick_sort_range</a>( RandomAccessIterator begin_, size_t size_, <span class="keyword">const</span> Compare &comp_ ) :
+00045         comp(comp_), begin(begin_), size(size_) {}
+00046 
+00047     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> size==0;}
+00048     <span class="keywordtype">bool</span> is_divisible()<span class="keyword"> const </span>{<span class="keywordflow">return</span> size>=grainsize;}
+00049 
+00050     <a class="code" href="a00213.html">quick_sort_range</a>( <a class="code" href="a00213.html">quick_sort_range</a>& range, <a class="code" href="a00221.html">split</a> ) : comp(range.<a class="code" href="a00213.html#o0">comp</a>) {
+00051         RandomAccessIterator array = range.<a class="code" href="a00213.html#o1">begin</a>;
+00052         RandomAccessIterator key0 = range.<a class="code" href="a00213.html#o1">begin</a>; 
+00053         size_t m = range.<a class="code" href="a00213.html#o2">size</a>/2u;
+00054         std::swap ( array[0], array[m] );
+00055 
+00056         size_t i=0;
+00057         size_t j=range.<a class="code" href="a00213.html#o2">size</a>;
+00058         <span class="comment">// Partition interval [i+1,j-1] with key *key0.</span>
+00059         <span class="keywordflow">for</span>(;;) {
+00060             __TBB_ASSERT( i<j, NULL );
+00061             <span class="comment">// Loop must terminate since array[l]==*key0.</span>
+00062             <span class="keywordflow">do</span> {
+00063                 --j;
+00064                 __TBB_ASSERT( i<=j, <span class="stringliteral">"bad ordering relation?"</span> );
+00065             } <span class="keywordflow">while</span>( comp( *key0, array[j] ));
+00066             <span class="keywordflow">do</span> {
+00067                 __TBB_ASSERT( i<=j, NULL );
+00068                 <span class="keywordflow">if</span>( i==j ) <span class="keywordflow">goto</span> partition;
+00069                 ++i;
+00070             } <span class="keywordflow">while</span>( comp( array[i],*key0 ));
+00071             <span class="keywordflow">if</span>( i==j ) <span class="keywordflow">goto</span> partition;
+00072             std::swap( array[i], array[j] );
+00073         }
+00074 partition:
+00075         <span class="comment">// Put the partition key were it belongs</span>
+00076         std::swap( array[j], *key0 );
+00077         <span class="comment">// array[l..j) is less or equal to key.</span>
+00078         <span class="comment">// array(j..r) is greater or equal to key.</span>
+00079         <span class="comment">// array[j] is equal to key</span>
+00080         i=j+1;
+00081         begin = array+i;
+00082         size = range.<a class="code" href="a00213.html#o2">size</a>-i;
+00083         range.<a class="code" href="a00213.html#o2">size</a> = j;
+00084     }
+00085 };
+00086 
+00088 
+00089 <span class="keyword">template</span><<span class="keyword">typename</span> RandomAccessIterator, <span class="keyword">typename</span> Compare>
+<a name="l00090"></a><a class="code" href="a00212.html">00090</a> <span class="keyword">struct </span><a class="code" href="a00212.html">quick_sort_body</a> {
+00091     <span class="keywordtype">void</span> operator()( <span class="keyword">const</span> <a class="code" href="a00213.html">quick_sort_range<RandomAccessIterator,Compare></a>& range )<span class="keyword"> const </span>{
+00092         <span class="comment">//SerialQuickSort( range.begin, range.size, range.comp );</span>
+00093         std::sort( range.<a class="code" href="a00213.html#o1">begin</a>, range.<a class="code" href="a00213.html#o1">begin</a> + range.<a class="code" href="a00213.html#o2">size</a>, range.<a class="code" href="a00213.html#o0">comp</a> );
+00094     }
+00095 };
+00096 
+00098 
+00099 <span class="keyword">template</span><<span class="keyword">typename</span> RandomAccessIterator, <span class="keyword">typename</span> Compare>
+<a name="l00100"></a><a class="code" href="a00281.html#ga12">00100</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga12">parallel_quick_sort</a>( RandomAccessIterator begin, RandomAccessIterator end, <span class="keyword">const</span> Compare& comp ) {
+00101     <a class="code" href="a00281.html#ga6">parallel_for</a>( quick_sort_range<RandomAccessIterator,Compare>(begin, end-begin, comp ), quick_sort_body<RandomAccessIterator,Compare>() );
+00102 }
+00103 
+00104 } <span class="comment">// namespace internal</span>
+00106 <span class="comment"></span>
+00117 
+00119 
+00122 <span class="keyword">template</span><<span class="keyword">typename</span> RandomAccessIterator, <span class="keyword">typename</span> Compare>
+<a name="l00123"></a><a class="code" href="a00281.html#ga13">00123</a> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga15">parallel_sort</a>( RandomAccessIterator begin, RandomAccessIterator end, <span class="keyword">const</span> Compare& comp) { 
+00124     <span class="keyword">const</span> <span class="keywordtype">int</span> min_parallel_size = 500; 
+00125     <span class="keywordflow">if</span>( end > begin ) {
+00126         <span class="keywordflow">if</span> (end - begin < min_parallel_size) { 
+00127             std::sort(begin, end, comp);
+00128         } <span class="keywordflow">else</span> {
+00129             <a class="code" href="a00281.html#ga12">internal::parallel_quick_sort</a>(begin, end, comp);
+00130         }
+00131     }
+00132 }
+00133 
+00135 
+00136 <span class="keyword">template</span><<span class="keyword">typename</span> RandomAccessIterator>
+<a name="l00137"></a><a class="code" href="a00281.html#ga14">00137</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga15">parallel_sort</a>( RandomAccessIterator begin, RandomAccessIterator end ) { 
+00138     <a class="code" href="a00281.html#ga15">parallel_sort</a>( begin, end, std::less< <span class="keyword">typename</span> std::iterator_traits<RandomAccessIterator>::value_type >() );
+00139 }
+00140 
+00142 
+00143 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00144"></a><a class="code" href="a00281.html#ga15">00144</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00281.html#ga15">parallel_sort</a>( T * begin, T * end ) {
+00145     <a class="code" href="a00281.html#ga15">parallel_sort</a>( begin, end, std::less< T >() );
+00146 }   
+00148 
+00149 
+00150 } <span class="comment">// namespace tbb</span>
+00151 
+00152 <span class="preprocessor">#endif</span>
+00153 <span class="preprocessor"></span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00298.html b/doc/html/a00298.html
new file mode 100644
index 0000000..0dfc34d
--- /dev/null
+++ b/doc/html/a00298.html
@@ -0,0 +1,182 @@
+<!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_while.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>parallel_while.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_parallel_while</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_parallel_while</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "task.h"</span>
+00025 <span class="preprocessor">#include <new></span>
+00026 
+00027 <span class="keyword">namespace </span>tbb {
+00028 
+00029 <span class="keyword">template</span><<span class="keyword">typename</span> Body>
+00030 <span class="keyword">class </span>parallel_while;
+00031 
+00033 <span class="keyword">namespace </span>internal {
+00034 
+00035     <span class="keyword">template</span><<span class="keyword">typename</span> Stream, <span class="keyword">typename</span> Body> <span class="keyword">class </span>while_task;
+00036 
+00038 
+00040     <span class="keyword">template</span><<span class="keyword">typename</span> Body>
+<a name="l00041"></a><a class="code" href="a00241.html">00041</a>     <span class="keyword">class </span><a class="code" href="a00241.html">while_iteration_task</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00042         <span class="keyword">const</span> Body& my_body;
+00043         <span class="keyword">typename</span> Body::argument_type my_value;
+00044         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute() {
+00045             my_body(my_value); 
+00046             <span class="keywordflow">return</span> NULL;
+00047         }
+00048         <a class="code" href="a00241.html">while_iteration_task</a>( <span class="keyword">const</span> <span class="keyword">typename</span> Body::argument_type& value, <span class="keyword">const</span> Body& body ) : 
+00049             my_body(body), my_value(value)
+00050         {}
+00051         <span class="keyword">template</span><<span class="keyword">typename</span> Body_> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00240.html">while_group_task</a>;
+00052         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00204.html">tbb::parallel_while</a><Body>;
+00053     };
+00054 
+00056 
+00058     <span class="keyword">template</span><<span class="keyword">typename</span> Body>
+<a name="l00059"></a><a class="code" href="a00240.html">00059</a>     <span class="keyword">class </span><a class="code" href="a00240.html">while_group_task</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00060         <span class="keyword">static</span> <span class="keyword">const</span> size_t max_arg_size = 4;         
+00061         <span class="keyword">const</span> Body& my_body;
+00062         size_t size;
+00063         <span class="keyword">typename</span> Body::argument_type my_arg[max_arg_size];
+00064         <a class="code" href="a00240.html">while_group_task</a>( <span class="keyword">const</span> Body& body ) : my_body(body), size(0) {} 
+00065         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute() {
+00066             <span class="keyword">typedef</span> <a class="code" href="a00241.html">while_iteration_task<Body></a> iteration_type;
+00067             __TBB_ASSERT( size>0, NULL );
+00068             <a class="code" href="a00229.html">task_list</a> list;
+00069             <a class="code" href="a00228.html">task</a>* t; 
+00070             size_t k=0; 
+00071             <span class="keywordflow">for</span>(;;) {
+00072                 t = <span class="keyword">new</span>( allocate_child() ) iteration_type(my_arg[k],my_body); 
+00073                 <span class="keywordflow">if</span>( ++k==size ) <span class="keywordflow">break</span>;
+00074                 list.<a class="code" href="a00229.html#a3">push_back</a>(*t);
+00075             }
+00076             set_ref_count(<span class="keywordtype">int</span>(k+1));
+00077             spawn(list);
+00078             spawn_and_wait_for_all(*t);
+00079             <span class="keywordflow">return</span> NULL;
+00080         }
+00081         <span class="keyword">template</span><<span class="keyword">typename</span> Stream, <span class="keyword">typename</span> Body_> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00242.html">while_task</a>;
+00082     };
+00083     
+00085 
+00087     <span class="keyword">template</span><<span class="keyword">typename</span> Stream, <span class="keyword">typename</span> Body>
+<a name="l00088"></a><a class="code" href="a00242.html">00088</a>     <span class="keyword">class </span><a class="code" href="a00242.html">while_task</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00089         Stream& my_stream;
+00090         <span class="keyword">const</span> Body& my_body;
+00091         <a class="code" href="a00188.html">empty_task</a>& my_barrier;
+00092         <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute() {
+00093             <span class="keyword">typedef</span> <a class="code" href="a00240.html">while_group_task<Body></a> block_type;
+00094             block_type& t = *<span class="keyword">new</span>( allocate_additional_child_of(my_barrier) ) block_type(my_body);
+00095             size_t k=0; 
+00096             <span class="keywordflow">while</span>( my_stream.pop_if_present(t.my_arg[k]) ) {
+00097                 <span class="keywordflow">if</span>( ++k==block_type::max_arg_size ) {
+00098                     <span class="comment">// There might be more iterations.</span>
+00099                     recycle_to_reexecute();
+00100                     <span class="keywordflow">break</span>;
+00101                 }
+00102             }
+00103             <span class="keywordflow">if</span>( k==0 ) {
+00104                 destroy(t);
+00105                 <span class="keywordflow">return</span> NULL;
+00106             } <span class="keywordflow">else</span> {
+00107                 t.<a class="code" href="a00240.html#r1">size</a> = k;
+00108                 <span class="keywordflow">return</span> &t;
+00109             }
+00110         }
+00111         <a class="code" href="a00242.html">while_task</a>( Stream& stream, <span class="keyword">const</span> Body& body, <a class="code" href="a00188.html">empty_task</a>& barrier ) : 
+00112             my_stream(stream),
+00113             my_body(body),
+00114             my_barrier(barrier)
+00115         {} 
+00116         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00204.html">tbb::parallel_while</a><Body>;
+00117     };
+00118 
+00119 } <span class="comment">// namespace internal</span>
+00121 <span class="comment"></span>
+00123 
+00128 <span class="keyword">template</span><<span class="keyword">typename</span> Body>
+<a name="l00129"></a><a class="code" href="a00204.html">00129</a> <span class="keyword">class </span><a class="code" href="a00204.html">parallel_while</a>: internal::no_copy {
+00130 <span class="keyword">public</span>:
+<a name="l00132"></a><a class="code" href="a00204.html#a0">00132</a>     <a class="code" href="a00204.html">parallel_while</a>() : my_body(NULL), my_barrier(NULL) {}
+00133 
+<a name="l00135"></a><a class="code" href="a00204.html#a1">00135</a>     ~<a class="code" href="a00204.html">parallel_while</a>() {
+00136         <span class="keywordflow">if</span>( my_barrier ) {
+00137             my_barrier->destroy(*my_barrier);    
+00138             my_barrier = NULL;
+00139         }
+00140     }
+00141 
+<a name="l00143"></a><a class="code" href="a00204.html#w0">00143</a>     <span class="keyword">typedef</span> <span class="keyword">typename</span> Body::argument_type value_type;
+00144 
+00146 
+00149     <span class="keyword">template</span><<span class="keyword">typename</span> Stream>
+00150     <span class="keywordtype">void</span> run( Stream& stream, <span class="keyword">const</span> Body& body );
+00151 
+00153 
+00154     <span class="keywordtype">void</span> add( <span class="keyword">const</span> value_type& item );
+00155 
+00156 <span class="keyword">private</span>:
+00157     <span class="keyword">const</span> Body* my_body;
+00158     <a class="code" href="a00188.html">empty_task</a>* my_barrier;
+00159 };
+00160 
+00161 <span class="keyword">template</span><<span class="keyword">typename</span> Body>
+00162 <span class="keyword">template</span><<span class="keyword">typename</span> Stream>
+<a name="l00163"></a><a class="code" href="a00204.html#a2">00163</a> <span class="keywordtype">void</span> <a class="code" href="a00204.html">parallel_while<Body>::run</a>( Stream& stream, <span class="keyword">const</span> Body& body ) {
+00164     <span class="keyword">using</span> <span class="keyword">namespace </span>internal;
+00165     <a class="code" href="a00188.html">empty_task</a>& barrier = *<span class="keyword">new</span>( task::allocate_root() ) <a class="code" href="a00188.html">empty_task</a>();
+00166     my_body = &body;
+00167     my_barrier = &barrier;
+00168     my_barrier-><a class="code" href="a00228.html#a13">set_ref_count</a>(2);
+00169     while_task<Stream,Body>& w = *<span class="keyword">new</span>( my_barrier-><a class="code" href="a00228.html#a3">allocate_child</a>() ) while_task<Stream,Body>( stream, body, barrier );
+00170     my_barrier-><a class="code" href="a00228.html#a16">spawn_and_wait_for_all</a>(w);
+00171     my_barrier-><a class="code" href="a00228.html#a5">destroy</a>(*my_barrier);
+00172     my_barrier = NULL;
+00173     my_body = NULL;
+00174 }
+00175 
+00176 <span class="keyword">template</span><<span class="keyword">typename</span> Body>
+<a name="l00177"></a><a class="code" href="a00204.html#a3">00177</a> <span class="keywordtype">void</span> <a class="code" href="a00204.html">parallel_while<Body>::add</a>( <span class="keyword">const</span> value_type& item ) {
+00178     __TBB_ASSERT(my_barrier,<span class="stringliteral">"attempt to add to parallel_while that is not running"</span>);
+00179     <span class="keyword">typedef</span> <a class="code" href="a00241.html">internal::while_iteration_task<Body></a> iteration_type;
+00180     iteration_type& i = *<span class="keyword">new</span>( task::self().allocate_additional_child_of(*my_barrier) ) iteration_type(item,*my_body);
+00181     task::self().<a class="code" href="a00228.html#a14">spawn</a>( i );
+00182 }
+00183 
+00184 } <span class="comment">// namespace </span>
+00185 
+00186 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_while */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00299.html b/doc/html/a00299.html
new file mode 100644
index 0000000..fc04e7a
--- /dev/null
+++ b/doc/html/a00299.html
@@ -0,0 +1,209 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>partitioner.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_partitioner_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_partitioner_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "task.h"</span>
+00025 
+00026 <span class="keyword">namespace </span>tbb {
+00027 <span class="keyword">class </span>affinity_partitioner;
+00028 
+00030 <span class="keyword">namespace </span>internal {
+00031 size_t get_initial_auto_partitioner_divisor();
+00032 
+00034 
+<a name="l00035"></a><a class="code" href="a00163.html">00035</a> <span class="keyword">class </span><a class="code" href="a00163.html">affinity_partitioner_base_v3</a>: <a class="code" href="a00200.html">no_copy</a> {
+00036     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00162.html">tbb::affinity_partitioner</a>;
+00038 
+00039     <a class="code" href="a00279.html#a12">affinity_id</a>* my_array;
+00041     size_t my_size;
+00043     <a class="code" href="a00163.html">affinity_partitioner_base_v3</a>() : my_array(NULL), my_size(0) {}
+00045     ~<a class="code" href="a00163.html">affinity_partitioner_base_v3</a>() {resize(0);}
+00047 
+00048     <span class="keywordtype">void</span> resize( <span class="keywordtype">unsigned</span> factor );
+00049     <span class="keyword">friend</span> <span class="keyword">class </span>affinity_partition_type;
+00050 };
+00051 
+<a name="l00053"></a><a class="code" href="a00205.html">00053</a> <span class="keyword">class </span><a class="code" href="a00205.html">partition_type_base</a> {
+00054 <span class="keyword">public</span>:
+00055     <span class="keywordtype">void</span> set_affinity( <a class="code" href="a00228.html">task</a> &t ) {}
+00056     <span class="keywordtype">void</span> note_affinity( task::affinity_id <span class="keywordtype">id</span> ) {}
+00057     <a class="code" href="a00228.html">task</a>* continue_after_execute_range( <a class="code" href="a00228.html">task</a>& t ) {<span class="keywordflow">return</span> NULL;}
+00058     <span class="keywordtype">bool</span> decide_whether_to_delay() {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
+00059     <span class="keywordtype">void</span> spawn_or_delay( <span class="keywordtype">bool</span>, <a class="code" href="a00228.html">task</a>& a, <a class="code" href="a00228.html">task</a>& b ) {
+00060         a.<a class="code" href="a00228.html#a14">spawn</a>(b);
+00061     }
+00062 };
+00063 
+00064 <span class="keyword">class </span>affinity_partition_type;
+00065 
+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><a class="code" href="a00222.html">start_for</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><a class="code" href="a00223.html">start_reduce</a>;
+00068 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body> <span class="keyword">class </span><a class="code" href="a00224.html">start_reduce_with_affinity</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><a class="code" href="a00225.html">start_scan</a>;
+00070 
+00071 } <span class="comment">// namespace internal</span>
+00073 <span class="comment"></span>
+00075 
+<a name="l00077"></a><a class="code" href="a00216.html">00077</a> <span class="keyword">class </span><a class="code" href="a00216.html">simple_partitioner</a> {
+00078 <span class="keyword">public</span>:
+00079     <a class="code" href="a00216.html">simple_partitioner</a>() {}
+00080 <span class="keyword">private</span>:
+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><a class="code" href="a00222.html">internal::start_for</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><a class="code" href="a00223.html">internal::start_reduce</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><a class="code" href="a00225.html">internal::start_scan</a>;
+00084 
+00085     <span class="keyword">class </span>partition_type: <span class="keyword">public</span> internal::partition_type_base {
+00086     <span class="keyword">public</span>:
+00087         <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> <a class="code" href="a00228.html">task</a> &t) {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
+00088         partition_type( <span class="keyword">const</span> <a class="code" href="a00216.html">simple_partitioner</a>& sp ) {}
+00089         partition_type( <span class="keyword">const</span> partition_type&, <a class="code" href="a00221.html">split</a> ) {}
+00090     };
+00091 };
+00092 
+00094 
+<a name="l00097"></a><a class="code" href="a00167.html">00097</a> <span class="keyword">class </span><a class="code" href="a00167.html">auto_partitioner</a> {
+00098 <span class="keyword">public</span>:
+00099     <a class="code" href="a00167.html">auto_partitioner</a>() {}
+00100 
+00101 <span class="keyword">private</span>:
+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><a class="code" href="a00222.html">internal::start_for</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><a class="code" href="a00223.html">internal::start_reduce</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><a class="code" href="a00225.html">internal::start_scan</a>;
+00105 
+00106     <span class="keyword">class </span>partition_type: <span class="keyword">public</span> internal::partition_type_base {
+00107         size_t num_chunks;
+00108         <span class="keyword">static</span> <span class="keyword">const</span> size_t VICTIM_CHUNKS = 4;
+00109 <span class="keyword">public</span>:
+00110         <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> <a class="code" href="a00228.html">task</a> &t) {
+00111             <span class="keywordflow">if</span>( num_chunks<VICTIM_CHUNKS && t.<a class="code" href="a00228.html#a20">is_stolen_task</a>() )
+00112                 num_chunks = VICTIM_CHUNKS;
+00113             <span class="keywordflow">return</span> num_chunks==1;
+00114         }
+00115         partition_type( <span class="keyword">const</span> <a class="code" href="a00167.html">auto_partitioner</a>& ap ) : num_chunks(internal::get_initial_auto_partitioner_divisor()) {}
+00116         partition_type( partition_type& pt, <a class="code" href="a00221.html">split</a> ) {
+00117             num_chunks = pt.num_chunks /= 2u;
+00118         }
+00119     };
+00120 };
+00121 
+<a name="l00123"></a><a class="code" href="a00162.html">00123</a> <span class="keyword">class </span><a class="code" href="a00162.html">affinity_partitioner</a>: <span class="keyword">private</span> internal::affinity_partitioner_base_v3 {
+00124 <span class="keyword">public</span>:
+00125     <a class="code" href="a00162.html">affinity_partitioner</a>() {}
+00126 
+00127 <span class="keyword">private</span>:
+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><a class="code" href="a00222.html">internal::start_for</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><a class="code" href="a00224.html">internal::start_reduce_with_affinity</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><a class="code" href="a00225.html">internal::start_scan</a>;
+00131 
+00132     <span class="keyword">typedef</span> internal::affinity_partition_type partition_type;
+00133     <span class="keyword">friend</span> <span class="keyword">class </span>internal::affinity_partition_type;
+00134 };
+00135 
+00137 <span class="keyword">namespace </span>internal {
+00138 
+00139 <span class="keyword">class </span>affinity_partition_type: <span class="keyword">public</span> no_copy {
+00141     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> factor = 16;
+00142     <span class="keyword">static</span> <span class="keyword">const</span> size_t VICTIM_CHUNKS = 4;
+00143 
+00144     internal::affinity_id* my_array;
+00145     <a class="code" href="a00229.html">task_list</a> delay_list;
+00146     <span class="keywordtype">unsigned</span> map_begin, map_end;
+00147     size_t num_chunks;
+00148 <span class="keyword">public</span>:
+00149     affinity_partition_type( <a class="code" href="a00162.html">affinity_partitioner</a>& ap ) {
+00150         __TBB_ASSERT( (factor&(factor-1))==0, <span class="stringliteral">"factor must be power of two"</span> ); 
+00151         ap.resize(factor);
+00152         my_array = ap.my_array;
+00153         map_begin = 0;
+00154         map_end = unsigned(ap.my_size);
+00155         num_chunks = internal::get_initial_auto_partitioner_divisor();
+00156     }
+00157     affinity_partition_type(affinity_partition_type& p, split) : my_array(p.my_array) {
+00158         __TBB_ASSERT( p.map_end-p.map_begin<factor || (p.map_end-p.map_begin)%factor==0, NULL );
+00159         num_chunks = p.num_chunks /= 2;
+00160         <span class="keywordtype">unsigned</span> e = p.map_end;
+00161         <span class="keywordtype">unsigned</span> d = (e - p.map_begin)/2;
+00162         <span class="keywordflow">if</span>( d>factor ) 
+00163             d &= 0u-factor;
+00164         map_end = e;
+00165         map_begin = p.map_end = e-d;
+00166     }
+00167 
+00168     <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> task &t) {
+00169         <span class="keywordflow">if</span>( num_chunks < VICTIM_CHUNKS && t.is_stolen_task() )
+00170             num_chunks = VICTIM_CHUNKS;
+00171         <span class="keywordflow">return</span> num_chunks == 1;
+00172     }
+00173 
+00174     <span class="keywordtype">void</span> set_affinity( task &t ) {
+00175         <span class="keywordflow">if</span>( map_begin<map_end )
+00176             t.set_affinity( my_array[map_begin] );
+00177     }
+00178     <span class="keywordtype">void</span> note_affinity( task::affinity_id <span class="keywordtype">id</span> ) {
+00179         <span class="keywordflow">if</span>( map_begin<map_end ) 
+00180             my_array[map_begin] = id;
+00181     }
+00182     task* continue_after_execute_range( task& t ) {
+00183         task* first = NULL;
+00184         <span class="keywordflow">if</span>( !delay_list.empty() ) {
+00185             first = &delay_list.pop_front();
+00186             <span class="keywordflow">while</span>( !delay_list.empty() ) {
+00187                 t.spawn(*first);
+00188                 first = &delay_list.pop_front();
+00189             }
+00190         }
+00191         <span class="keywordflow">return</span> first;
+00192     }
+00193     <span class="keywordtype">bool</span> decide_whether_to_delay() {
+00194         <span class="comment">// The possible underflow caused by "-1u" is deliberate</span>
+00195         <span class="keywordflow">return</span> (map_begin&(factor-1))==0 && map_end-map_begin-1u<factor;
+00196     }
+00197     <span class="keywordtype">void</span> spawn_or_delay( <span class="keywordtype">bool</span> delay, task& a, task& b ) {
+00198         <span class="keywordflow">if</span>( delay )  
+00199             delay_list.push_back(b);
+00200         <span class="keywordflow">else</span> 
+00201             a.spawn(b);
+00202     }
+00203 };
+00204 
+00205 } <span class="comment">// namespace internal</span>
+00207 <span class="comment"></span>
+00208 
+00209 } <span class="comment">// namespace tbb</span>
+00210 
+00211 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_partitioner_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00300.html b/doc/html/a00300.html
new file mode 100644
index 0000000..c811e9b
--- /dev/null
+++ b/doc/html/a00300.html
@@ -0,0 +1,154 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>pipeline.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_pipeline_H </span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_pipeline_H </span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "atomic.h"</span>
+00025 <span class="preprocessor">#include "task.h"</span>
+00026 <span class="preprocessor">#include <cstddef></span>
+00027 
+00028 <span class="keyword">namespace </span>tbb {
+00029 
+00030 <span class="keyword">class </span>pipeline;
+00031 <span class="keyword">class </span>filter;
+00032 
+00034 <span class="keyword">namespace </span>internal {
+00035 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> IS_SERIAL = 0x1;
+00036 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> SERIAL_MODE_MASK = 0x1; <span class="comment">// the lowest bit 0 is for parallel vs. serial </span>
+00037 
+00038 <span class="comment">// The argument for PIPELINE_VERSION should be an integer between 2 and 9</span>
+00039 <span class="preprocessor">#define __TBB_PIPELINE_VERSION(x) (unsigned char)(x-2)<<1</span>
+00040 <span class="preprocessor"></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>
+00041 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> CURRENT_VERSION = __TBB_PIPELINE_VERSION(3);
+00042 
+00043 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> Token;
+00044 <span class="keyword">typedef</span> <span class="keywordtype">long</span> tokendiff_t;
+00045 <span class="keyword">class </span>stage_task;
+00046 <span class="keyword">class </span>ordered_buffer;
+00047 
+00048 } <span class="comment">// namespace internal</span>
+00050 <span class="comment"></span>
+00052 
+<a name="l00053"></a><a class="code" href="a00189.html">00053</a> <span class="keyword">class </span><a class="code" href="a00189.html">filter</a> {
+00054 <span class="keyword">private</span>:
+00056     <span class="keyword">static</span> <a class="code" href="a00189.html">filter</a>* not_in_pipeline() {<span class="keywordflow">return</span> reinterpret_cast<filter*>(internal::intptr(-1));}
+00057 <span class="keyword">protected</span>:
+<a name="l00059"></a><a class="code" href="a00189.html#x2">00059</a>     <span class="keyword">enum</span> mode {
+00060         parallel = internal::CURRENT_VERSION,
+00061         serial = internal::CURRENT_VERSION | internal::IS_SERIAL
+00062     };
+00063 
+00064     <a class="code" href="a00189.html">filter</a>( <span class="keywordtype">bool</span> is_serial_ ) : 
+00065         next_filter_in_pipeline(not_in_pipeline()),
+00066         input_buffer(NULL),
+00067         my_filter_mode(static_cast<unsigned char>(is_serial_ ? serial : parallel)),
+00068         prev_filter_in_pipeline(not_in_pipeline()),
+00069         my_pipeline(NULL)
+00070     {}
+00071     
+00072     filter( mode filter_mode ) :
+00073         next_filter_in_pipeline(not_in_pipeline()),
+00074         input_buffer(NULL),
+00075         my_filter_mode(static_cast<unsigned char>(filter_mode)),
+00076         prev_filter_in_pipeline(not_in_pipeline()),
+00077         my_pipeline(NULL)
+00078     {}
+00079 
+00080 
+00081 <span class="keyword">public</span>:
+<a name="l00083"></a><a class="code" href="a00189.html#a0">00083</a>     <span class="keywordtype">bool</span> is_serial()<span class="keyword"> const </span>{
+00084         <span class="keywordflow">return</span> (my_filter_mode & internal::SERIAL_MODE_MASK) == internal::IS_SERIAL;
+00085     }  
+00086 
+00088 
+00089     <span class="keyword">virtual</span> <span class="keywordtype">void</span>* operator()( <span class="keywordtype">void</span>* item ) = 0;
+00090 
+00092 
+00093     <span class="keyword">virtual</span> ~<a class="code" href="a00189.html">filter</a>();
+00094 
+00095 <span class="keyword">private</span>:
+00097     <a class="code" href="a00189.html">filter</a>* next_filter_in_pipeline;
+00098 
+00100     internal::ordered_buffer* input_buffer;
+00101 
+00102     <span class="keyword">friend</span> <span class="keyword">class </span>internal::stage_task;
+00103     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00206.html">pipeline</a>;
+00104 
+00106     <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> my_filter_mode;
+00107 
+00109     <a class="code" href="a00189.html">filter</a>* prev_filter_in_pipeline;
+00110 
+00112     <a class="code" href="a00206.html">pipeline</a>* my_pipeline;
+00113 };
+00114 
+00116 
+<a name="l00117"></a><a class="code" href="a00206.html">00117</a> <span class="keyword">class </span><a class="code" href="a00206.html">pipeline</a> {
+00118 <span class="keyword">public</span>:
+00120     <a class="code" href="a00206.html">pipeline</a>();
+00121 
+00123     <span class="keyword">virtual</span> ~<a class="code" href="a00206.html">pipeline</a>();
+00124 
+00126     <span class="keywordtype">void</span> add_filter( <a class="code" href="a00189.html">filter</a>& filter_ );
+00127 
+00129     <span class="keywordtype">void</span> run( size_t max_number_of_live_tokens );
+00130 
+00132     <span class="keywordtype">void</span> clear();
+00133 
+00134 <span class="keyword">private</span>:
+00135     <span class="keyword">friend</span> <span class="keyword">class </span>internal::stage_task;
+00136     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00189.html">filter</a>;
+00137 
+00139     <a class="code" href="a00189.html">filter</a>* filter_list;
+00140 
+00142     <a class="code" href="a00189.html">filter</a>* filter_end;
+00143 
+00145     <a class="code" href="a00188.html">empty_task</a>* end_counter;
+00146 
+00148     <a class="code" href="a00165.html">atomic<internal::Token></a> input_tokens;
+00149 
+00151     internal::Token token_counter;
+00152 
+00154     <span class="keywordtype">bool</span> end_of_input;
+00155 
+00157     <span class="keywordtype">void</span> remove_filter( <a class="code" href="a00189.html">filter</a>& filter_ );
+00158 
+00160     <span class="keywordtype">void</span> inject_token( <a class="code" href="a00228.html">task</a>& <span class="keyword">self</span> );
+00161 };
+00162 
+00163 } <span class="comment">// tbb</span>
+00164 
+00165 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_pipeline_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00301.html b/doc/html/a00301.html
new file mode 100644
index 0000000..6519f31
--- /dev/null
+++ b/doc/html/a00301.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>queuing_mutex.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>queuing_mutex.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_queuing_mutex_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_queuing_mutex_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include <cstring></span>
+00025 <span class="preprocessor">#include "atomic.h"</span>
+00026 
+00027 <span class="keyword">namespace </span>tbb {
+00028 
+00030 
+<a name="l00031"></a><a class="code" href="a00208.html">00031</a> <span class="keyword">class </span><a class="code" href="a00208.html">queuing_mutex</a> {
+00032 <span class="keyword">public</span>:
+<a name="l00034"></a><a class="code" href="a00208.html#a0">00034</a>     <a class="code" href="a00208.html">queuing_mutex</a>() {
+00035         q_tail = NULL;
+00036     };
+00037 
+00039 
+<a name="l00041"></a><a class="code" href="a00209.html">00041</a>     <span class="keyword">class </span><a class="code" href="a00209.html">scoped_lock</a> : <span class="keyword">private</span> internal:: no_copy {
+00043         <span class="keywordtype">void</span> initialize() {
+00044             <a class="code" href="a00198.html">mutex</a> = NULL;
+00045 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00046 <span class="preprocessor"></span>            internal::poison_pointer(next);
+00047 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00048         }
+00049     <span class="keyword">public</span>:
+00051 
+<a name="l00052"></a><a class="code" href="a00209.html#a0">00052</a>         <a class="code" href="a00209.html">scoped_lock</a>() {initialize();}
+00053 
+00055 
+<a name="l00056"></a><a class="code" href="a00209.html#a1">00056</a>         <a class="code" href="a00209.html">scoped_lock</a>( <a class="code" href="a00208.html">queuing_mutex</a>& m ) {
+00057             initialize();
+00058             <a class="code" href="a00278.html#a37a1">acquire</a>(m);
+00059         }
+00060 
+<a name="l00062"></a><a class="code" href="a00209.html#a2">00062</a>         ~<a class="code" href="a00209.html">scoped_lock</a>() {
+00063             <span class="keywordflow">if</span>( <a class="code" href="a00198.html">mutex</a> ) <a class="code" href="a00278.html#a37a2">release</a>();
+00064         }
+00065 
+00067         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a1">acquire</a>( <a class="code" href="a00208.html">queuing_mutex</a>& m );
+00068 
+00070         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00208.html">queuing_mutex</a>& m );
+00071 
+00073         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a2">release</a>();
+00074 
+00075     <span class="keyword">private</span>:
+00077         <a class="code" href="a00208.html">queuing_mutex</a>* <a class="code" href="a00198.html">mutex</a>;
+00078 
+00080         <a class="code" href="a00209.html">scoped_lock</a> *next;
+00081 
+00083 
+00086         <a class="code" href="a00279.html#a13">internal::uintptr</a> going;
+00087     };
+00088 
+00089     <span class="comment">// Mutex traits</span>
+00090     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;
+00091     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
+00092     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
+00093 
+00094     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
+00095 <span class="keyword">private</span>:
+00097     <a class="code" href="a00165.html">atomic<scoped_lock*></a> q_tail;
+00098 
+00099 };
+00100 
+00101 } <span class="comment">// namespace tbb</span>
+00102 
+00103 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_queuing_mutex_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00302.html b/doc/html/a00302.html
new file mode 100644
index 0000000..85a0451
--- /dev/null
+++ b/doc/html/a00302.html
@@ -0,0 +1,149 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>queuing_rw_mutex.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>queuing_rw_mutex.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_queuing_rw_mutex_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_queuing_rw_mutex_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include <cstring></span>
+00025 <span class="preprocessor">#include "atomic.h"</span>
+00026 
+00027 <span class="keyword">namespace </span>tbb {
+00028 
+00030 
+<a name="l00033"></a><a class="code" href="a00210.html">00033</a> <span class="keyword">class </span><a class="code" href="a00210.html">queuing_rw_mutex</a> {
+00034 <span class="keyword">public</span>:
+<a name="l00036"></a><a class="code" href="a00210.html#a0">00036</a>     <a class="code" href="a00210.html">queuing_rw_mutex</a>() {
+00037         q_tail = NULL;
+00038     };
+00039 
+<a name="l00041"></a><a class="code" href="a00210.html#a1">00041</a>     ~<a class="code" href="a00210.html">queuing_rw_mutex</a>() {
+00042 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00043 <span class="preprocessor"></span>        __TBB_ASSERT( !q_tail, <span class="stringliteral">"destruction of an acquired mutex"</span>);
+00044 <span class="preprocessor">#endif</span>
+00045 <span class="preprocessor"></span>    };
+00046 
+00047     <span class="keyword">class </span>scoped_lock;
+00048     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
+00049 
+00051 
+<a name="l00053"></a><a class="code" href="a00211.html">00053</a>     <span class="keyword">class </span><a class="code" href="a00211.html">scoped_lock</a> : <span class="keyword">private</span> internal::no_copy {
+00055         <span class="keyword">enum</span> state_t {
+00056             STATE_NONE = 0,
+00057             STATE_WRITER = 1,
+00058             STATE_READER = 1<<1,
+00059             STATE_READER_UNBLOCKNEXT = 1<<2,
+00060             STATE_COMBINED_WAITINGREADER = STATE_READER | STATE_READER_UNBLOCKNEXT,
+00061             STATE_ACTIVEREADER = 1<<3,
+00062             STATE_COMBINED_READER = STATE_COMBINED_WAITINGREADER | STATE_ACTIVEREADER,
+00063             STATE_UPGRADE_REQUESTED = 1<<4,
+00064             STATE_UPGRADE_WAITING = 1<<5,
+00065             STATE_UPGRADE_LOSER = 1<<6,
+00066             STATE_COMBINED_UPGRADING = STATE_UPGRADE_WAITING | STATE_UPGRADE_LOSER
+00067 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00068 <span class="preprocessor"></span>           ,STATE_INVALID
+00069 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00070         };
+00071 
+00073         <span class="keywordtype">void</span> initialize() {
+00074             <a class="code" href="a00198.html">mutex</a> = NULL;
+00075 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00076 <span class="preprocessor"></span>            state = STATE_INVALID;
+00077             internal::poison_pointer(next);
+00078             internal::poison_pointer(prev);
+00079 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00080         }
+00081     <span class="keyword">public</span>:
+00083 
+<a name="l00084"></a><a class="code" href="a00211.html#a0">00084</a>         <a class="code" href="a00211.html">scoped_lock</a>() {initialize();}
+00085 
+00087 
+<a name="l00088"></a><a class="code" href="a00211.html#a1">00088</a>         <a class="code" href="a00211.html">scoped_lock</a>( <a class="code" href="a00210.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> ) {
+00089             initialize();
+00090             <a class="code" href="a00278.html#a37a1">acquire</a>(m,write);
+00091         }
+00092 
+<a name="l00094"></a><a class="code" href="a00211.html#a2">00094</a>         ~<a class="code" href="a00211.html">scoped_lock</a>() {
+00095             <span class="keywordflow">if</span>( <a class="code" href="a00198.html">mutex</a> ) <a class="code" href="a00278.html#a37a2">release</a>();
+00096         }
+00097 
+00099         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a1">acquire</a>( <a class="code" href="a00210.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> );
+00100 
+00102         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00210.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> );
+00103 
+00105         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a2">release</a>();
+00106 
+00108 
+00109         <span class="keywordtype">bool</span> upgrade_to_writer();
+00110 
+00112         <span class="keywordtype">bool</span> downgrade_to_reader();
+00113 
+00114     <span class="keyword">private</span>:
+00116         <a class="code" href="a00210.html">queuing_rw_mutex</a>* <a class="code" href="a00198.html">mutex</a>;
+00117 
+00119         <a class="code" href="a00211.html">scoped_lock</a> * prev, * next;
+00120 
+00122         <a class="code" href="a00165.html">atomic<unsigned char></a> state;
+00123 
+00125 
+00126         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> going;
+00127 
+00129         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> internal_lock;
+00130 
+00132         <span class="keywordtype">void</span> acquire_internal_lock();
+00133 
+00135 
+00136         <span class="keywordtype">bool</span> try_acquire_internal_lock();
+00137 
+00139         <span class="keywordtype">void</span> release_internal_lock();
+00140 
+00142         <span class="keywordtype">void</span> wait_for_release_of_internal_lock();
+00143 
+00145         <span class="keywordtype">void</span> unblock_or_wait_on_internal_lock( uintptr_t );
+00146     };
+00147 
+00148     <span class="comment">// Mutex traits</span>
+00149     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">true</span>;
+00150     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
+00151     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
+00152 
+00153 <span class="keyword">private</span>:
+00155     <a class="code" href="a00165.html">atomic<scoped_lock*></a> q_tail;
+00156 
+00157 };
+00158 
+00159 } <span class="comment">// namespace tbb</span>
+00160 
+00161 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_queuing_rw_mutex_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00303.html b/doc/html/a00303.html
new file mode 100644
index 0000000..926ee1c
--- /dev/null
+++ b/doc/html/a00303.html
@@ -0,0 +1,195 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>recursive_mutex.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_recursive_mutex_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_recursive_mutex_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00025 <span class="preprocessor"></span>
+00026 <span class="preprocessor">#include <windows.h></span>
+00027 <span class="preprocessor">#if !defined(_WIN32_WINNT)</span>
+00028 <span class="preprocessor"></span><span class="comment">// The following Windows API function is declared explicitly;</span>
+00029 <span class="comment">// otherwise any user would have to specify /D_WIN32_WINNT=0x0400</span>
+00030 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION );
+00031 <span class="preprocessor">#endif</span>
+00032 <span class="preprocessor"></span>
+00033 <span class="preprocessor">#else </span><span class="comment">/* if not _WIN32||_WIN64 */</span>
+00034 
+00035 <span class="preprocessor">#include <pthread.h></span>
+00036 <span class="keyword">namespace </span>tbb { <span class="keyword">namespace </span>internal {
+00037 <span class="comment">// Use this internal TBB function to throw an exception</span>
+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 );
+00039 } } <span class="comment">//namespaces</span>
+00040 
+00041 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00042 
+00043 <span class="preprocessor">#include <stdio.h></span>
+00044 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00045 
+00046 <span class="keyword">namespace </span>tbb {
+00048 
+<a name="l00050"></a><a class="code" href="a00214.html">00050</a> <span class="keyword">class </span><a class="code" href="a00214.html">recursive_mutex</a> {
+00051 <span class="keyword">public</span>:
+<a name="l00053"></a><a class="code" href="a00214.html#a0">00053</a>     <a class="code" href="a00214.html">recursive_mutex</a>() {
+00054 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00055 <span class="preprocessor"></span>        internal_construct();
+00056 <span class="preprocessor">#else</span>
+00057 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+00058 <span class="preprocessor"></span>        InitializeCriticalSection(&impl);
+00059 <span class="preprocessor">  #else</span>
+00060 <span class="preprocessor"></span>        pthread_mutexattr_t mtx_attr;
+00061         <span class="keywordtype">int</span> error_code = pthread_mutexattr_init( &mtx_attr );
+00062         <span class="keywordflow">if</span>( error_code )
+00063             tbb::internal::handle_perror(error_code,<span class="stringliteral">"recursive_mutex: pthread_mutexattr_init failed"</span>);
+00064 
+00065         pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE );
+00066         error_code = pthread_mutex_init( &impl, &mtx_attr );
+00067         <span class="keywordflow">if</span>( error_code )
+00068             tbb::internal::handle_perror(error_code,<span class="stringliteral">"recursive_mutex: pthread_mutex_init failed"</span>);
+00069 
+00070         pthread_mutexattr_destroy( &mtx_attr );
+00071 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64*/</span>
+00072 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00073     };
+00074 
+00075     ~<a class="code" href="a00214.html">recursive_mutex</a>() {
+00076 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00077 <span class="preprocessor"></span>        internal_destroy();
+00078 <span class="preprocessor">#else</span>
+00079 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+00080 <span class="preprocessor"></span>        DeleteCriticalSection(&impl);
+00081 <span class="preprocessor">  #else</span>
+00082 <span class="preprocessor"></span>        pthread_mutex_destroy(&impl); 
+00083 
+00084 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00085 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00086     };
+00087 
+00088     <span class="keyword">class </span>scoped_lock;
+00089     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
+00090 
+00092 
+<a name="l00094"></a><a class="code" href="a00215.html">00094</a>     <span class="keyword">class </span><a class="code" href="a00215.html">scoped_lock</a> : <span class="keyword">private</span> internal::no_copy {
+00095     <span class="keyword">public</span>:
+<a name="l00097"></a><a class="code" href="a00215.html#a0">00097</a>         <a class="code" href="a00215.html">scoped_lock</a>() : my_mutex(NULL) {};
+00098 
+00100 
+<a name="l00101"></a><a class="code" href="a00215.html#a1">00101</a>         <a class="code" href="a00215.html">scoped_lock</a>( <a class="code" href="a00214.html">recursive_mutex</a>& <a class="code" href="a00198.html">mutex</a> ) {
+00102             <a class="code" href="a00278.html#a37a1">acquire</a>( mutex );
+00103         }
+00104 
+<a name="l00106"></a><a class="code" href="a00215.html#a2">00106</a>         ~<a class="code" href="a00215.html">scoped_lock</a>() {
+00107             <span class="keywordflow">if</span>( my_mutex ) 
+00108                 <a class="code" href="a00278.html#a37a2">release</a>();
+00109         }
+00110 
+<a name="l00112"></a><a class="code" href="a00215.html#a3">00112</a>         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a1">acquire</a>( <a class="code" href="a00214.html">recursive_mutex</a>& <a class="code" href="a00198.html">mutex</a> ) {
+00113 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00114 <span class="preprocessor"></span>            internal_acquire( mutex );
+00115 <span class="preprocessor">#else</span>
+00116 <span class="preprocessor"></span>            my_mutex = &mutex;
+00117 <span class="preprocessor">  #if _WIN32||_WIN64</span>
+00118 <span class="preprocessor"></span>            EnterCriticalSection(&mutex.<a class="code" href="a00214.html#r0">impl</a>);
+00119 <span class="preprocessor">  #else</span>
+00120 <span class="preprocessor"></span>            pthread_mutex_lock( &mutex.<a class="code" href="a00214.html#r0">impl</a> );
+00121 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00122 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00123         }
+00124 
+<a name="l00126"></a><a class="code" href="a00215.html#a4">00126</a>         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00214.html">recursive_mutex</a>& <a class="code" href="a00198.html">mutex</a> ) {
+00127 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00128 <span class="preprocessor"></span>            <span class="keywordflow">return</span> internal_try_acquire( mutex );
+00129 <span class="preprocessor">#else</span>
+00130 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result;
+00131 <span class="preprocessor">  #if _WIN32||_WIN64</span>
+00132 <span class="preprocessor"></span>            result = TryEnterCriticalSection(&mutex.<a class="code" href="a00214.html#r0">impl</a>)!=0;
+00133 <span class="preprocessor">  #else</span>
+00134 <span class="preprocessor"></span>            result = pthread_mutex_trylock(&mutex.<a class="code" href="a00214.html#r0">impl</a>)==0;
+00135 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00136             <span class="keywordflow">if</span>( result )
+00137                 my_mutex = &mutex;
+00138 
+00139             <span class="keywordflow">return</span> result;
+00140 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00141         }
+00142 
+<a name="l00144"></a><a class="code" href="a00215.html#a5">00144</a>         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a2">release</a>() {
+00145 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00146 <span class="preprocessor"></span>            internal_release ();
+00147 <span class="preprocessor">#else</span>
+00148 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+00149 <span class="preprocessor"></span>            LeaveCriticalSection(&my_mutex->impl);
+00150 <span class="preprocessor">  #else</span>
+00151 <span class="preprocessor"></span>            pthread_mutex_unlock(&my_mutex->impl);
+00152 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00153             my_mutex = NULL;
+00154 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00155         }
+00156 
+00157     <span class="keyword">private</span>:
+00159         <a class="code" href="a00214.html">recursive_mutex</a>* my_mutex;
+00160 
+00162         <span class="keywordtype">void</span> internal_acquire( <a class="code" href="a00214.html">recursive_mutex</a>& m );
+00163 
+00165         <span class="keywordtype">bool</span> internal_try_acquire( <a class="code" href="a00214.html">recursive_mutex</a>& m );
+00166 
+00168         <span class="keywordtype">void</span> internal_release();
+00169     };
+00170 
+00171     <span class="comment">// Mutex traits</span>
+00172     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;
+00173     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">true</span>;
+00174     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">false</span>;
+00175 
+00176 <span class="keyword">private</span>:
+00177 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00178 <span class="preprocessor"></span>    CRITICAL_SECTION impl;
+00179     <span class="keyword">enum</span> state_t {
+00180         INITIALIZED=0x1234,
+00181         DESTROYED=0x789A,
+00182     } state;
+00183 <span class="preprocessor">#else</span>
+00184 <span class="preprocessor"></span>    pthread_mutex_t impl;
+00185 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00186 
+00188     <span class="keywordtype">void</span> internal_construct();
+00189 
+00191     <span class="keywordtype">void</span> internal_destroy();
+00192 };
+00193 
+00194 } <span class="comment">// namespace tbb </span>
+00195 
+00196 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_recursive_mutex_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00304.html b/doc/html/a00304.html
new file mode 100644
index 0000000..47d6b29
--- /dev/null
+++ b/doc/html/a00304.html
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>scalable_allocator.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>scalable_allocator.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_scalable_allocator_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_scalable_allocator_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include <stddef.h></span> <span class="comment">// Need ptrdiff_t and size_t from here.</span>
+00025 
+00026 <span class="preprocessor">#ifdef __cplusplus</span>
+00027 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
+00028 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
+00029 
+00031 
+00032 <span class="keywordtype">void</span> * scalable_malloc (size_t size);
+00033 
+00035 
+00036 <span class="keywordtype">void</span>   scalable_free (<span class="keywordtype">void</span>* ptr);
+00037 
+00039 
+00040 <span class="keywordtype">void</span> * scalable_realloc (<span class="keywordtype">void</span>* ptr, size_t size);
+00041 
+00043 
+00044 <span class="keywordtype">void</span> * scalable_calloc (size_t nobj, size_t size);
+00045 
+00046 <span class="preprocessor">#ifdef __cplusplus</span>
+00047 <span class="preprocessor"></span>} <span class="comment">// extern "C"</span>
+00048 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
+00049 
+00050 <span class="preprocessor">#ifdef __cplusplus</span>
+00051 <span class="preprocessor"></span>
+00052 <span class="preprocessor">#include <new></span>      <span class="comment">// To use new with the placement argument</span>
+00053 
+00054 <span class="keyword">namespace </span>tbb {
+00055 
+00057 
+00060 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00061 <span class="keyword">class </span>scalable_allocator {
+00062 <span class="keyword">public</span>:
+00063     <span class="keyword">typedef</span> T* pointer;
+00064     <span class="keyword">typedef</span> <span class="keyword">const</span> T* const_pointer;
+00065     <span class="keyword">typedef</span> T& reference;
+00066     <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+00067     <span class="keyword">typedef</span> T value_type;
+00068     <span class="keyword">typedef</span> size_t size_type;
+00069     <span class="keyword">typedef</span> ptrdiff_t difference_type;
+00070     <span class="keyword">template</span><<span class="keyword">class</span> U> <span class="keyword">struct </span>rebind {
+00071         <span class="keyword">typedef</span> scalable_allocator<U> other;
+00072     };
+00073 
+00074     scalable_allocator() throw() {}
+00075     scalable_allocator( <span class="keyword">const</span> scalable_allocator& ) throw() {}
+00076     <span class="keyword">template</span><<span class="keyword">typename</span> U> scalable_allocator(<span class="keyword">const</span> scalable_allocator<U>&) throw() {}
+00077 
+00078     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+00079     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+00080 
+00082     pointer allocate( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="comment">/*hint*/</span> =0 ) {
+00083         <span class="keywordflow">return</span> static_cast<pointer>( scalable_malloc( n * <span class="keyword">sizeof</span>(value_type) ) );
+00084     }
+00085 
+00087     <span class="keywordtype">void</span> deallocate( pointer p, size_type ) {
+00088         scalable_free( p );
+00089     }
+00090 
+00092     size_type max_size() const throw() {
+00093         size_type absolutemax = static_cast<size_type>(-1) / <span class="keyword">sizeof</span> (T);
+00094         <span class="keywordflow">return</span> (absolutemax > 0 ? absolutemax : 1);
+00095     }
+00096     <span class="keywordtype">void</span> construct( pointer p, <span class="keyword">const</span> T& val ) { <span class="keyword">new</span>(static_cast<void*>(p)) T(val); }
+00097     <span class="keywordtype">void</span> destroy( pointer p ) {(static_cast<T*>(p))->~T();}
+00098 };
+00099 
+00101 
+00102 <span class="keyword">template</span><>
+00103 <span class="keyword">class </span>scalable_allocator<void> {
+00104 <span class="keyword">public</span>:
+00105     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
+00106     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
+00107     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
+00108     <span class="keyword">template</span><<span class="keyword">class</span> U> <span class="keyword">struct </span>rebind {
+00109         <span class="keyword">typedef</span> scalable_allocator<U> other;
+00110     };
+00111 };
+00112 
+00113 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00114 <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">true</span>;}
+00115 
+00116 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00117 <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>;}
+00118 
+00119 } <span class="comment">// namespace tbb</span>
+00120 
+00121 <span class="preprocessor">#if _MSC_VER</span>
+00122 <span class="preprocessor"></span><span class="preprocessor">    #if __TBB_BUILD && !defined(__TBBMALLOC_NO_IMPLICIT_LINKAGE)</span>
+00123 <span class="preprocessor"></span><span class="preprocessor">        #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1</span>
+00124 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+00125 <span class="preprocessor"></span>
+00126 <span class="preprocessor">    #if !__TBBMALLOC_NO_IMPLICIT_LINKAGE</span>
+00127 <span class="preprocessor"></span><span class="preprocessor">        #ifdef _DEBUG</span>
+00128 <span class="preprocessor"></span><span class="preprocessor">            #pragma comment(lib, "tbbmalloc_debug.lib")</span>
+00129 <span class="preprocessor"></span><span class="preprocessor">        #else</span>
+00130 <span class="preprocessor"></span><span class="preprocessor">            #pragma comment(lib, "tbbmalloc.lib")</span>
+00131 <span class="preprocessor"></span><span class="preprocessor">        #endif</span>
+00132 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+00133 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00134 <span class="preprocessor"></span>
+00135 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
+00136 
+00137 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_scalable_allocator_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00305.html b/doc/html/a00305.html
new file mode 100644
index 0000000..3b33c23
--- /dev/null
+++ b/doc/html/a00305.html
@@ -0,0 +1,131 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>spin_mutex.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_spin_mutex_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_spin_mutex_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include <cstddef></span>
+00025 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00026 <span class="preprocessor">#include "tbb/tbb_machine.h"</span>
+00027 
+00028 <span class="keyword">namespace </span>tbb {
+00029 
+00031 
+<a name="l00036"></a><a class="code" href="a00217.html">00036</a> <span class="keyword">class </span><a class="code" href="a00217.html">spin_mutex</a> {
+00038     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> flag;
+00039 
+00040 <span class="keyword">public</span>:
+00042 
+<a name="l00043"></a><a class="code" href="a00217.html#a0">00043</a>     <a class="code" href="a00217.html">spin_mutex</a>() : flag(0) {}
+00044 
+<a name="l00046"></a><a class="code" href="a00218.html">00046</a>     <span class="keyword">class </span><a class="code" href="a00218.html">scoped_lock</a> : <span class="keyword">private</span> internal::no_copy {
+00047     <span class="keyword">private</span>:
+00049         <a class="code" href="a00217.html">spin_mutex</a>* my_mutex; 
+00050 
+00052         <a class="code" href="a00279.html#a13">internal::uintptr</a> my_unlock_value;
+00053 
+00055         <span class="keywordtype">void</span> internal_acquire( <a class="code" href="a00217.html">spin_mutex</a>& m );
+00056 
+00058         <span class="keywordtype">bool</span> internal_try_acquire( <a class="code" href="a00217.html">spin_mutex</a>& m );
+00059 
+00061         <span class="keywordtype">void</span> internal_release();
+00062 
+00063     <span class="keyword">public</span>:
+<a name="l00065"></a><a class="code" href="a00218.html#a0">00065</a>         <a class="code" href="a00218.html">scoped_lock</a>() : my_mutex(NULL), my_unlock_value(0) {}
+00066 
+<a name="l00068"></a><a class="code" href="a00218.html#a1">00068</a>         <a class="code" href="a00218.html">scoped_lock</a>( <a class="code" href="a00217.html">spin_mutex</a>& m ) { 
+00069 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00070 <span class="preprocessor"></span>            my_mutex=NULL;
+00071             internal_acquire(m);
+00072 <span class="preprocessor">#else</span>
+00073 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00217.html#r0">flag</a>);
+00074             my_mutex=&m;
+00075 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT*/</span>
+00076         }
+00077 
+<a name="l00079"></a><a class="code" href="a00218.html#a2">00079</a>         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a1">acquire</a>( <a class="code" href="a00217.html">spin_mutex</a>& m ) {
+00080 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00081 <span class="preprocessor"></span>            internal_acquire(m);
+00082 <span class="preprocessor">#else</span>
+00083 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00217.html#r0">flag</a>);
+00084             my_mutex = &m;
+00085 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT*/</span>
+00086         }
+00087 
+<a name="l00089"></a><a class="code" href="a00218.html#a3">00089</a>         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00217.html">spin_mutex</a>& m ) {
+00090 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00091 <span class="preprocessor"></span>            <span class="keywordflow">return</span> internal_try_acquire(m);
+00092 <span class="preprocessor">#else</span>
+00093 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result = __TBB_TryLockByte(m.<a class="code" href="a00217.html#r0">flag</a>);
+00094             <span class="keywordflow">if</span>( result ) {
+00095                 my_unlock_value = 0;
+00096                 my_mutex = &m;
+00097             }
+00098             <span class="keywordflow">return</span> result;
+00099 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT*/</span>
+00100         }
+00101 
+<a name="l00103"></a><a class="code" href="a00218.html#a4">00103</a>         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a2">release</a>() {
+00104 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00105 <span class="preprocessor"></span>            internal_release();
+00106 <span class="preprocessor">#else</span>
+00107 <span class="preprocessor"></span>            __TBB_store_with_release(my_mutex->flag, static_cast<unsigned char>(my_unlock_value));
+00108             my_mutex = NULL;
+00109 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */</span>
+00110         }
+00111 
+<a name="l00113"></a><a class="code" href="a00218.html#a5">00113</a>         ~<a class="code" href="a00218.html">scoped_lock</a>() {
+00114             <span class="keywordflow">if</span>( my_mutex ) {
+00115 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00116 <span class="preprocessor"></span>                internal_release();
+00117 <span class="preprocessor">#else</span>
+00118 <span class="preprocessor"></span>                __TBB_store_with_release(my_mutex->flag, static_cast<unsigned char>(my_unlock_value));
+00119 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */</span>
+00120             }
+00121         }
+00122     };
+00123 
+00124     <span class="comment">// Mutex traits</span>
+00125     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;
+00126     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
+00127     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">false</span>;
+00128 
+00129     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
+00130 };
+00131 
+00132 } <span class="comment">// namespace tbb</span>
+00133 
+00134 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_spin_mutex_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00306.html b/doc/html/a00306.html
new file mode 100644
index 0000000..4b6f7df
--- /dev/null
+++ b/doc/html/a00306.html
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>spin_rw_mutex.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>spin_rw_mutex.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_spin_rw_mutex_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_spin_rw_mutex_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 <span class="preprocessor">#include "tbb_machine.h"</span>
+00026 
+00027 <span class="keyword">namespace </span>tbb {
+00028 
+00029 <span class="keyword">class </span>spin_rw_mutex_v3;
+00030 <span class="keyword">typedef</span> spin_rw_mutex_v3 spin_rw_mutex;
+00031 
+00033 
+<a name="l00034"></a><a class="code" href="a00219.html">00034</a> <span class="keyword">class </span><a class="code" href="a00219.html">spin_rw_mutex_v3</a> {
+00036 
+00038     <span class="keywordtype">bool</span> internal_acquire_writer();
+00039 
+00041 
+00042     <span class="keywordtype">void</span> internal_release_writer();
+00043 
+00045     <span class="keywordtype">void</span> internal_acquire_reader();
+00046 
+00048     <span class="keywordtype">bool</span> internal_upgrade();
+00049 
+00051 
+00052     <span class="keywordtype">void</span> internal_downgrade();
+00053 
+00055     <span class="keywordtype">void</span> internal_release_reader();
+00056 
+00058     <span class="keywordtype">bool</span> internal_try_acquire_writer();
+00059 
+00061     <span class="keywordtype">bool</span> internal_try_acquire_reader();
+00062 
+00064 <span class="keyword">public</span>:
+<a name="l00066"></a><a class="code" href="a00219.html#a0">00066</a>     <a class="code" href="a00219.html">spin_rw_mutex_v3</a>() : state(0) {}
+00067 
+00068 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00069 <span class="preprocessor"></span>
+00070     ~<a class="code" href="a00219.html">spin_rw_mutex_v3</a>() {
+00071         __TBB_ASSERT( !state, <span class="stringliteral">"destruction of an acquired mutex"</span>);
+00072     };
+00073 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00074 
+00076 
+<a name="l00078"></a><a class="code" href="a00220.html">00078</a>     <span class="keyword">class </span><a class="code" href="a00220.html">scoped_lock</a> : <span class="keyword">private</span> internal::no_copy {
+00079     <span class="keyword">public</span>:
+00081 
+<a name="l00082"></a><a class="code" href="a00220.html#a0">00082</a>         <a class="code" href="a00220.html">scoped_lock</a>() : <a class="code" href="a00198.html">mutex</a>(NULL) {}
+00083 
+00085 
+<a name="l00086"></a><a class="code" href="a00220.html#a1">00086</a>         <a class="code" href="a00220.html">scoped_lock</a>( spin_rw_mutex& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) : <a class="code" href="a00198.html">mutex</a>(NULL) {
+00087             <a class="code" href="a00278.html#a37a1">acquire</a>(m, write);
+00088         }
+00089 
+<a name="l00091"></a><a class="code" href="a00220.html#a2">00091</a>         ~<a class="code" href="a00220.html">scoped_lock</a>() {
+00092             <span class="keywordflow">if</span>( <a class="code" href="a00198.html">mutex</a> ) <a class="code" href="a00278.html#a37a2">release</a>();
+00093         }
+00094 
+<a name="l00096"></a><a class="code" href="a00220.html#a3">00096</a>         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a1">acquire</a>( spin_rw_mutex& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) {
+00097             __TBB_ASSERT( !<a class="code" href="a00198.html">mutex</a>, <span class="stringliteral">"holding mutex already"</span> );
+00098             is_writer = write; 
+00099             <a class="code" href="a00198.html">mutex</a> = &m;
+00100             <span class="keywordflow">if</span>( write ) <a class="code" href="a00198.html">mutex</a>-><a class="code" href="a00219.html#d0">internal_acquire_writer</a>();
+00101             <span class="keywordflow">else</span>        <a class="code" href="a00198.html">mutex</a>-><a class="code" href="a00219.html#d2">internal_acquire_reader</a>();
+00102         }
+00103 
+00105 
+<a name="l00106"></a><a class="code" href="a00220.html#a4">00106</a>         <span class="keywordtype">bool</span> upgrade_to_writer() {
+00107             __TBB_ASSERT( <a class="code" href="a00198.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
+00108             __TBB_ASSERT( !is_writer, <span class="stringliteral">"not a reader"</span> );
+00109             is_writer = <span class="keyword">true</span>; 
+00110             <span class="keywordflow">return</span> <a class="code" href="a00198.html">mutex</a>-><a class="code" href="a00219.html#d3">internal_upgrade</a>();
+00111         }
+00112 
+<a name="l00114"></a><a class="code" href="a00220.html#a5">00114</a>         <span class="keywordtype">void</span> <a class="code" href="a00278.html#a37a2">release</a>() {
+00115             __TBB_ASSERT( <a class="code" href="a00198.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
+00116             spin_rw_mutex *m = <a class="code" href="a00198.html">mutex</a>; 
+00117             <a class="code" href="a00198.html">mutex</a> = NULL;
+00118 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00119 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( is_writer ) m-><a class="code" href="a00219.html#d1">internal_release_writer</a>();
+00120             <span class="keywordflow">else</span>            m-><a class="code" href="a00219.html#d5">internal_release_reader</a>();
+00121 <span class="preprocessor">#else</span>
+00122 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( is_writer ) __TBB_AtomicAND( &m-><a class="code" href="a00219.html#r0">state</a>, READERS ); 
+00123             <span class="keywordflow">else</span>            __TBB_FetchAndAddWrelease( &m-><a class="code" href="a00219.html#r0">state</a>, -(intptr_t)ONE_READER);
+00124 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */</span>
+00125         }
+00126 
+<a name="l00128"></a><a class="code" href="a00220.html#a6">00128</a>         <span class="keywordtype">bool</span> downgrade_to_reader() {
+00129 <span class="preprocessor">#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT</span>
+00130 <span class="preprocessor"></span>            __TBB_ASSERT( <a class="code" href="a00198.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
+00131             __TBB_ASSERT( is_writer, <span class="stringliteral">"not a writer"</span> );
+00132             <a class="code" href="a00198.html">mutex</a>-><a class="code" href="a00219.html#d4">internal_downgrade</a>();
+00133 <span class="preprocessor">#else</span>
+00134 <span class="preprocessor"></span>             __TBB_FetchAndAddW( &<a class="code" href="a00198.html">mutex</a>->state, ((intptr_t)ONE_READER-WRITER));
+00135 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */</span>
+00136             is_writer = <span class="keyword">false</span>;
+00137 
+00138             <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00139         }
+00140 
+<a name="l00142"></a><a class="code" href="a00220.html#a7">00142</a>         <span class="keywordtype">bool</span> try_acquire( spin_rw_mutex& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) {
+00143             __TBB_ASSERT( !<a class="code" href="a00198.html">mutex</a>, <span class="stringliteral">"holding mutex already"</span> );
+00144             <span class="keywordtype">bool</span> result;
+00145             is_writer = write; 
+00146             result = write? m.<a class="code" href="a00219.html#d6">internal_try_acquire_writer</a>()
+00147                           : m.<a class="code" href="a00219.html#d7">internal_try_acquire_reader</a>();
+00148             <span class="keywordflow">if</span>( result ) 
+00149                 <a class="code" href="a00198.html">mutex</a> = &m;
+00150             <span class="keywordflow">return</span> result;
+00151         }
+00152 
+00153     <span class="keyword">private</span>:
+00155         spin_rw_mutex* <a class="code" href="a00198.html">mutex</a>;
+00156 
+00158 
+00159         <span class="keywordtype">bool</span> is_writer;
+00160     };
+00161 
+00162     <span class="comment">// Mutex traits</span>
+00163     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">true</span>;
+00164     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
+00165     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">false</span>;
+00166 
+00167 <span class="keyword">private</span>:
+00168     <span class="keyword">typedef</span> intptr_t state_t;
+00169     <span class="keyword">static</span> <span class="keyword">const</span> state_t WRITER = 1;
+00170     <span class="keyword">static</span> <span class="keyword">const</span> state_t WRITER_PENDING = 2;
+00171     <span class="keyword">static</span> <span class="keyword">const</span> state_t READERS = ~(WRITER | WRITER_PENDING);
+00172     <span class="keyword">static</span> <span class="keyword">const</span> state_t ONE_READER = 4;
+00173     <span class="keyword">static</span> <span class="keyword">const</span> state_t BUSY = WRITER | READERS;
+00175 
+00178     state_t state;
+00179 };
+00180 
+00181 } <span class="comment">// namespace ThreadingBuildingBlocks</span>
+00182 
+00183 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_spin_rw_mutex_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00307.html
new file mode 100644
index 0000000..ff3f211
--- /dev/null
+++ b/doc/html/a00307.html
@@ -0,0 +1,556 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>task.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_task_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 
+00026 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00027 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/cache_aligned_allocator.h"</span>
+00028 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00029 
+00030 <span class="keyword">namespace </span>tbb {
+00031 
+00032 <span class="keyword">class </span>task;
+00033 <span class="keyword">class </span>task_list;
+00034 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00035 <span class="preprocessor"></span><span class="keyword">class </span>task_group_context;
+00036 <span class="keyword">class </span>tbb_exception;
+00037 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00038 
+00040 <span class="keyword">namespace </span>internal {
+00041 
+00042     <span class="keyword">class </span>scheduler {
+00043     <span class="keyword">public</span>:
+00045         <span class="keyword">virtual</span> <span class="keywordtype">void</span> spawn( task& first, task*& next ) = 0;
+00046 
+00048         <span class="keyword">virtual</span> <span class="keywordtype">void</span> wait_for_all( task& parent, task* child ) = 0;
+00049 
+00051         <span class="keyword">virtual</span> <span class="keywordtype">void</span> spawn_root_and_wait( task& first, task*& next ) = 0;
+00052 
+00054         <span class="comment">//  Have to have it just to shut up overzealous compilation warnings</span>
+00055         <span class="keyword">virtual</span> ~scheduler() = 0;
+00056     };
+00057 
+00059 
+<a name="l00060"></a><a class="code" href="a00279.html#a11">00060</a>     <span class="keyword">typedef</span> <a class="code" href="a00279.html#a14">intptr</a> reference_count;
+00061 
+<a name="l00063"></a><a class="code" href="a00279.html#a12">00063</a>     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> affinity_id;
+00064 
+00065 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00066 <span class="preprocessor"></span>    <span class="keyword">struct </span>context_list_node_t {
+00067         context_list_node_t *my_prev,
+00068                             *my_next;
+00069     };
+00070 
+00071     <span class="keyword">class </span>allocate_root_with_context_proxy {
+00072         task_group_context& my_context;
+00073     <span class="keyword">public</span>:
+00074         allocate_root_with_context_proxy ( task_group_context& ctx ) : my_context(ctx) {}
+00075         task& allocate( size_t size ) <span class="keyword">const</span>;
+00076         <span class="keywordtype">void</span> free( task& ) <span class="keyword">const</span>;
+00077     };
+00078 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00079 
+00080     <span class="keyword">class </span>allocate_root_proxy {
+00081     <span class="keyword">public</span>:
+00082         <span class="keyword">static</span> task& allocate( size_t size );
+00083         <span class="keyword">static</span> <span class="keywordtype">void</span> free( task& );
+00084     };
+00085 
+00086     <span class="keyword">class </span>allocate_continuation_proxy {
+00087     <span class="keyword">public</span>:
+00088         task& allocate( size_t size ) <span class="keyword">const</span>;
+00089         <span class="keywordtype">void</span> free( task& ) <span class="keyword">const</span>;
+00090     };
+00091 
+00092     <span class="keyword">class </span>allocate_child_proxy {
+00093     <span class="keyword">public</span>:
+00094         task& allocate( size_t size ) <span class="keyword">const</span>;
+00095         <span class="keywordtype">void</span> free( task& ) <span class="keyword">const</span>;
+00096     };
+00097 
+00098     <span class="keyword">class </span>allocate_additional_child_of_proxy {
+00099         task& <span class="keyword">self</span>;
+00100         task& parent;
+00101     <span class="keyword">public</span>:
+00102         allocate_additional_child_of_proxy( task& self_, task& parent_ ) : self(self_), parent(parent_) {}
+00103         task& allocate( size_t size ) <span class="keyword">const</span>;
+00104         <span class="keywordtype">void</span> free( task& ) <span class="keyword">const</span>;
+00105     };
+00106 
+00108 
+<a name="l00113"></a><a class="code" href="a00230.html">00113</a>     <span class="keyword">class </span><a class="code" href="a00230.html">task_prefix</a> {
+00114     <span class="keyword">private</span>:
+00115         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00228.html">tbb::task</a>;
+00116         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00229.html">tbb::task_list</a>;
+00117         <span class="keyword">friend</span> <span class="keyword">class </span>internal::scheduler;
+00118         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_proxy;
+00119         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_child_proxy;
+00120         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_continuation_proxy;
+00121         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_additional_child_of_proxy;
+00122 
+00123 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00124 <span class="preprocessor"></span>
+00125 
+00128         task_group_context  *context;
+00129 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00130         
+00132 
+00137         scheduler* origin;
+00138 
+00140         scheduler* owner;
+00141 
+00143 
+00146         <a class="code" href="a00228.html">tbb::task</a>* parent;
+00147 
+00149 
+00153         <a class="code" href="a00279.html#a11">reference_count</a> ref_count;
+00154 
+00156         <span class="keywordtype">int</span> depth;
+00157 
+00159 
+00160         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> state;
+00161 
+00163 
+00167         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> extra_state;
+00168 
+00169         <a class="code" href="a00279.html#a12">affinity_id</a> affinity;
+00170 
+00172         <a class="code" href="a00228.html">tbb::task</a>* next;
+00173 
+00175         <a class="code" href="a00228.html">tbb::task</a>& <a class="code" href="a00228.html">task</a>() {<span class="keywordflow">return</span> *reinterpret_cast<tbb::task*>(<span class="keyword">this</span>+1);}
+00176     };
+00177 
+00178 } <span class="comment">// namespace internal</span>
+00180 <span class="comment"></span>
+00181 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00182 <span class="preprocessor"></span>
+00183 
+00185 
+00200 <span class="keyword">class </span>task_group_context : internal::no_copy
+00201 {
+00202 <span class="keyword">public</span>:
+00203     <span class="keyword">enum</span> kind_type {
+00204         isolated,
+00205         bound
+00206     };
+00207 
+00208 <span class="keyword">private</span>:
+00209     <span class="keyword">union </span>{
+00211         kind_type my_kind;
+00212         uintptr_t _my_kind_aligner;
+00213     };
+00214 
+00216     task_group_context *my_parent;
+00217 
+00219 
+00221     internal::context_list_node_t my_node;
+00222 
+00224 
+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)];
+00228     
+00230     uintptr_t my_cancellation_requested;
+00231     
+00233 
+00236     uintptr_t  my_version;
+00237 
+00239     tbb_exception *my_exception;
+00240 
+00242 
+00245     <span class="keywordtype">void</span> *my_owner;
+00246 
+00248 
+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>*)];
+00250 
+00251 <span class="keyword">public</span>:
+00252 
+00253 
+00255 
+00272     task_group_context ( kind_type relation_with_parent = bound )
+00273         : my_kind(relation_with_parent)
+00274         , my_version(0)
+00275     {
+00276         init();
+00277     }
+00278 
+00279     ~task_group_context ();
+00280 
+00282 
+00289     <span class="keywordtype">void</span> reset ();
+00290 
+00292 
+00299     <span class="keywordtype">bool</span> cancel_group_execution ();
+00300 
+00302     <span class="keywordtype">bool</span> is_group_execution_cancelled () <span class="keyword">const</span>;
+00303 
+00304 <span class="keyword">protected</span>:
+00306 
+00307     <span class="keywordtype">void</span> init ();
+00308 
+00309 <span class="keyword">private</span>:
+00310     <span class="keyword">friend</span> <span class="keyword">class </span>task;
+00311     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_with_context_proxy;
+00312 
+00313     <span class="keyword">static</span> <span class="keyword">const</span> kind_type binding_required = bound;
+00314     <span class="keyword">static</span> <span class="keyword">const</span> kind_type binding_completed = kind_type(bound+1);
+00315 
+00318     <span class="keywordtype">void</span> propagate_cancellation_from_ancestors ();
+00319 }; <span class="comment">// class task_group_context</span>
+00320 
+00321 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00322 
+00324 
+<a name="l00325"></a><a class="code" href="a00228.html">00325</a> <span class="keyword">class </span><a class="code" href="a00228.html">task</a>: internal::no_copy {
+00327     <span class="keywordtype">void</span> internal_set_ref_count( <span class="keywordtype">int</span> count );
+00328 
+00329 <span class="keyword">protected</span>:
+<a name="l00331"></a><a class="code" href="a00228.html#b0">00331</a>     <a class="code" href="a00228.html">task</a>() {prefix().extra_state=1;}
+00332 
+00333 <span class="keyword">public</span>:
+<a name="l00335"></a><a class="code" href="a00228.html#a0">00335</a>     <span class="keyword">virtual</span> ~<a class="code" href="a00228.html">task</a>() {}
+00336 
+00338     <span class="keyword">virtual</span> <a class="code" href="a00228.html">task</a>* execute() = 0;
+00339 
+<a name="l00341"></a><a class="code" href="a00228.html#w8">00341</a>     <span class="keyword">enum</span> state_type {
+00343         executing,
+00345         reexecute,
+00347         ready,
+00349         allocated,
+00351         freed,
+00353         recycle
+00354     };
+00355 
+00356     <span class="comment">//------------------------------------------------------------------------</span>
+00357     <span class="comment">// Allocating tasks</span>
+00358     <span class="comment">//------------------------------------------------------------------------</span>
+00359 
+<a name="l00361"></a><a class="code" href="a00228.html#e0">00361</a>     <span class="keyword">static</span> internal::allocate_root_proxy allocate_root() {
+00362         <span class="keywordflow">return</span> internal::allocate_root_proxy();
+00363     }
+00364 
+00365 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00366 <span class="preprocessor"></span>
+00367     <span class="keyword">static</span> internal::allocate_root_with_context_proxy allocate_root( task_group_context& ctx ) {
+00368         <span class="keywordflow">return</span> internal::allocate_root_with_context_proxy(ctx);
+00369     }
+00370 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00371 
+00373 
+<a name="l00374"></a><a class="code" href="a00228.html#a2">00374</a>     internal::allocate_continuation_proxy& allocate_continuation() {
+00375         <span class="keywordflow">return</span> *reinterpret_cast<internal::allocate_continuation_proxy*>(<span class="keyword">this</span>);
+00376     }
+00377 
+<a name="l00379"></a><a class="code" href="a00228.html#a3">00379</a>     internal::allocate_child_proxy& allocate_child() {
+00380         <span class="keywordflow">return</span> *reinterpret_cast<internal::allocate_child_proxy*>(<span class="keyword">this</span>);
+00381     }
+00382 
+00384 
+<a name="l00386"></a><a class="code" href="a00228.html#a4">00386</a>     internal::allocate_additional_child_of_proxy allocate_additional_child_of( <a class="code" href="a00228.html">task</a>& t ) {
+00387         <span class="keywordflow">return</span> internal::allocate_additional_child_of_proxy(*<span class="keyword">this</span>,t);
+00388     }
+00389 
+00391 
+00395     <span class="keywordtype">void</span> destroy( <a class="code" href="a00228.html">task</a>& victim );
+00396 
+00397     <span class="comment">//------------------------------------------------------------------------</span>
+00398     <span class="comment">// Recycling of tasks</span>
+00399     <span class="comment">//------------------------------------------------------------------------</span>
+00400 
+00402 
+<a name="l00408"></a><a class="code" href="a00228.html#a6">00408</a>     <span class="keywordtype">void</span> recycle_as_continuation() {
+00409         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running?"</span> );
+00410         prefix().state = allocated;
+00411     }
+00412 
+00414 
+<a name="l00415"></a><a class="code" href="a00228.html#a7">00415</a>     <span class="keywordtype">void</span> recycle_as_safe_continuation() {
+00416         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running?"</span> );
+00417         prefix().state = recycle;
+00418     }
+00419 
+<a name="l00421"></a><a class="code" href="a00228.html#a8">00421</a>     <span class="keywordtype">void</span> recycle_as_child_of( <a class="code" href="a00228.html">task</a>& new_parent ) {
+00422         <a class="code" href="a00230.html">internal::task_prefix</a>& p = prefix();
+00423         __TBB_ASSERT( prefix().state==executing||prefix().state==allocated, <span class="stringliteral">"execute not running, or already recycled"</span> );
+00424         __TBB_ASSERT( prefix().ref_count==0, <span class="stringliteral">"no child tasks allowed when recycled as a child"</span> );
+00425         __TBB_ASSERT( p.<a class="code" href="a00230.html#r2">parent</a>==NULL, <span class="stringliteral">"parent must be null"</span> );
+00426         __TBB_ASSERT( new_parent.<a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r5">state</a><=recycle, <span class="stringliteral">"corrupt parent's state"</span> );
+00427         __TBB_ASSERT( new_parent.<a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r5">state</a>!=freed, <span class="stringliteral">"parent already freed"</span> );
+00428         p.<a class="code" href="a00230.html#r5">state</a> = allocated;
+00429         p.<a class="code" href="a00230.html#r2">parent</a> = &new_parent;
+00430         p.<a class="code" href="a00230.html#r4">depth</a> = new_parent.<a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r4">depth</a>+1;
+00431 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00432 <span class="preprocessor"></span>        p.context = new_parent.<a class="code" href="a00228.html#d1">prefix</a>().context;
+00433 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00434     }
+00435 
+00437 
+<a name="l00438"></a><a class="code" href="a00228.html#a9">00438</a>     <span class="keywordtype">void</span> recycle_to_reexecute() {
+00439         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running, or already recycled"</span> );
+00440         __TBB_ASSERT( prefix().ref_count==0, <span class="stringliteral">"no child tasks allowed when recycled for reexecution"</span> );
+00441         prefix().<a class="code" href="a00230.html#r5">state</a> = reexecute;
+00442     }
+00443 
+00445 
+<a name="l00446"></a><a class="code" href="a00228.html#w0">00446</a>     <span class="keyword">typedef</span> internal::intptr depth_type;
+00447 
+<a name="l00449"></a><a class="code" href="a00228.html#a10">00449</a>     depth_type depth()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().<a class="code" href="a00230.html#r4">depth</a>;}
+00450 
+00452 
+<a name="l00453"></a><a class="code" href="a00228.html#a11">00453</a>     <span class="keywordtype">void</span> set_depth( depth_type new_depth ) {
+00454         __TBB_ASSERT( state()!=ready, <span class="stringliteral">"cannot change depth of ready task"</span> );
+00455         __TBB_ASSERT( new_depth>=0, <span class="stringliteral">"depth cannot be negative"</span> );
+00456         __TBB_ASSERT( new_depth==<span class="keywordtype">int</span>(new_depth), <span class="stringliteral">"integer overflow error"</span>);
+00457         prefix().<a class="code" href="a00230.html#r4">depth</a> = int(new_depth);
+00458     }
+00459 
+00461 
+<a name="l00462"></a><a class="code" href="a00228.html#a12">00462</a>     <span class="keywordtype">void</span> add_to_depth( <span class="keywordtype">int</span> delta ) {
+00463         __TBB_ASSERT( state()!=ready, <span class="stringliteral">"cannot change depth of ready task"</span> );
+00464         __TBB_ASSERT( prefix().depth>=-delta, <span class="stringliteral">"depth cannot be negative"</span> );
+00465         prefix().<a class="code" href="a00230.html#r4">depth</a>+=delta;
+00466     }
+00467 
+00468     <span class="comment">//------------------------------------------------------------------------</span>
+00469     <span class="comment">// Spawning and blocking</span>
+00470     <span class="comment">//------------------------------------------------------------------------</span>
+00471 
+<a name="l00473"></a><a class="code" href="a00228.html#a13">00473</a>     <span class="keywordtype">void</span> set_ref_count( <span class="keywordtype">int</span> count ) {
+00474 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00475 <span class="preprocessor"></span>        internal_set_ref_count(count);
+00476 <span class="preprocessor">#else</span>
+00477 <span class="preprocessor"></span>        prefix().<a class="code" href="a00230.html#r3">ref_count</a> = count;
+00478 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00479     }
+00480 
+00482 
+<a name="l00486"></a><a class="code" href="a00228.html#a14">00486</a>     <span class="keywordtype">void</span> spawn( <a class="code" href="a00228.html">task</a>& child ) {
+00487         __TBB_ASSERT( is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
+00488         prefix().<a class="code" href="a00230.html#r1">owner</a>->spawn( child, child.<a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r8">next</a> );
+00489     }
+00490 
+00492 
+00493     <span class="keywordtype">void</span> spawn( <a class="code" href="a00229.html">task_list</a>& list );
+00494 
+<a name="l00496"></a><a class="code" href="a00228.html#a16">00496</a>     <span class="keywordtype">void</span> spawn_and_wait_for_all( <a class="code" href="a00228.html">task</a>& child ) {
+00497         __TBB_ASSERT( is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
+00498         prefix().<a class="code" href="a00230.html#r1">owner</a>->wait_for_all( *<span class="keyword">this</span>, &child );
+00499     }
+00500 
+00502     <span class="keywordtype">void</span> spawn_and_wait_for_all( <a class="code" href="a00229.html">task_list</a>& list );
+00503 
+00505 
+<a name="l00507"></a><a class="code" href="a00228.html#e1">00507</a>     <span class="keyword">static</span> <span class="keywordtype">void</span> spawn_root_and_wait( <a class="code" href="a00228.html">task</a>& root ) {
+00508         __TBB_ASSERT( root.<a class="code" href="a00228.html#a23">is_owned_by_current_thread</a>(), <span class="stringliteral">"root not owned by current thread"</span> );
+00509         root.<a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r1">owner</a>->spawn_root_and_wait( root, root.<a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r8">next</a> );
+00510     }
+00511 
+00513 
+00515     <span class="keyword">static</span> <span class="keywordtype">void</span> spawn_root_and_wait( <a class="code" href="a00229.html">task_list</a>& root_list );
+00516 
+00518 
+<a name="l00519"></a><a class="code" href="a00228.html#a18">00519</a>     <span class="keywordtype">void</span> wait_for_all() {
+00520         __TBB_ASSERT( is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
+00521         prefix().<a class="code" href="a00230.html#r1">owner</a>->wait_for_all( *<span class="keyword">this</span>, NULL );
+00522     }
+00523 
+00525     <span class="keyword">static</span> <a class="code" href="a00228.html">task</a>& <span class="keyword">self</span>();
+00526 
+<a name="l00528"></a><a class="code" href="a00228.html#a19">00528</a>     <a class="code" href="a00228.html">task</a>* parent()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().<a class="code" href="a00230.html#r2">parent</a>;}
+00529 
+<a name="l00531"></a><a class="code" href="a00228.html#a20">00531</a>     <span class="keywordtype">bool</span> is_stolen_task()<span class="keyword"> const </span>{
+00532         <a class="code" href="a00230.html">internal::task_prefix</a>& p = prefix();
+00533         <a class="code" href="a00230.html">internal::task_prefix</a>& q = parent()-><a class="code" href="a00228.html#d1">prefix</a>();
+00534         <span class="keywordflow">return</span> p.<a class="code" href="a00230.html#r1">owner</a>!=q.<a class="code" href="a00230.html#r1">owner</a>;
+00535     }
+00536 
+00537     <span class="comment">//------------------------------------------------------------------------</span>
+00538     <span class="comment">// Debugging</span>
+00539     <span class="comment">//------------------------------------------------------------------------</span>
+00540 
+<a name="l00542"></a><a class="code" href="a00228.html#a21">00542</a>     state_type state()<span class="keyword"> const </span>{<span class="keywordflow">return</span> state_type(prefix().state);}
+00543 
+<a name="l00545"></a><a class="code" href="a00228.html#a22">00545</a>     <span class="keywordtype">int</span> ref_count()<span class="keyword"> const </span>{
+00546 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00547 <span class="preprocessor"></span>        internal::reference_count ref_count = prefix().<a class="code" href="a00230.html#r3">ref_count</a>;
+00548         __TBB_ASSERT( ref_count==<span class="keywordtype">int</span>(ref_count), <span class="stringliteral">"integer overflow error"</span>);
+00549 <span class="preprocessor">#endif</span>
+00550 <span class="preprocessor"></span>        <span class="keywordflow">return</span> int(prefix().ref_count);
+00551     }
+00552 
+00554     <span class="keywordtype">bool</span> is_owned_by_current_thread() <span class="keyword">const</span>;
+00555 
+00556     <span class="comment">//------------------------------------------------------------------------</span>
+00557     <span class="comment">// Affinity</span>
+00558     <span class="comment">//------------------------------------------------------------------------</span>
+00559  
+00561 
+<a name="l00562"></a><a class="code" href="a00228.html#w1">00562</a>     <span class="keyword">typedef</span> internal::affinity_id affinity_id;
+00563 
+<a name="l00565"></a><a class="code" href="a00228.html#a24">00565</a>     <span class="keywordtype">void</span> set_affinity( affinity_id <span class="keywordtype">id</span> ) {prefix().<a class="code" href="a00230.html#r7">affinity</a> = id;}
+00566 
+<a name="l00568"></a><a class="code" href="a00228.html#a25">00568</a>     affinity_id affinity()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().<a class="code" href="a00230.html#r7">affinity</a>;}
+00569 
+00571 
+00575     <span class="keyword">virtual</span> <span class="keywordtype">void</span> note_affinity( affinity_id <span class="keywordtype">id</span> );
+00576 
+00577 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00578 <span class="preprocessor"></span>
+00579 
+00580     <span class="keywordtype">bool</span> cancel_group_execution () { <span class="keywordflow">return</span> prefix().context->cancel_group_execution(); }
+00581 
+00583     <span class="keywordtype">bool</span> is_cancelled ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> prefix().context->is_group_execution_cancelled(); }
+00584 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00585 
+00586 <span class="keyword">private</span>:
+00587     <span class="keyword">friend</span> <span class="keyword">class </span>task_list;
+00588     <span class="keyword">friend</span> <span class="keyword">class </span>internal::scheduler;
+00589     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_proxy;
+00590 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00591 <span class="preprocessor"></span>    <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_with_context_proxy;
+00592 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00593     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_continuation_proxy;
+00594     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_child_proxy;
+00595     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_additional_child_of_proxy;
+00596 
+00598 
+00599     internal::task_prefix& prefix( internal::version_tag* = NULL )<span class="keyword"> const </span>{
+00600         <span class="keywordflow">return</span> reinterpret_cast<internal::task_prefix*>(const_cast<task*>(<span class="keyword">this</span>))[-1];
+00601     }
+00602 }; <span class="comment">// class task</span>
+00603 
+00605 
+<a name="l00606"></a><a class="code" href="a00188.html">00606</a> <span class="keyword">class </span><a class="code" href="a00188.html">empty_task</a>: <span class="keyword">public</span> <a class="code" href="a00228.html">task</a> {
+00607     <span class="comment">/*override*/</span> <a class="code" href="a00228.html">task</a>* execute() {
+00608         <span class="keywordflow">return</span> NULL;
+00609     }
+00610 };
+00611 
+00613 
+<a name="l00615"></a><a class="code" href="a00229.html">00615</a> <span class="keyword">class </span><a class="code" href="a00229.html">task_list</a>: internal::no_copy {
+00616 <span class="keyword">private</span>:
+00617     <a class="code" href="a00228.html">task</a>* first;
+00618     <a class="code" href="a00228.html">task</a>** next_ptr;
+00619     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00228.html">task</a>;
+00620 <span class="keyword">public</span>:
+<a name="l00622"></a><a class="code" href="a00229.html#a0">00622</a>     <a class="code" href="a00229.html">task_list</a>() : first(NULL), next_ptr(&first) {}
+00623 
+<a name="l00625"></a><a class="code" href="a00229.html#a1">00625</a>     ~<a class="code" href="a00229.html">task_list</a>() {}
+00626 
+<a name="l00628"></a><a class="code" href="a00229.html#a2">00628</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !first;}
+00629 
+<a name="l00631"></a><a class="code" href="a00229.html#a3">00631</a>     <span class="keywordtype">void</span> push_back( <a class="code" href="a00228.html">task</a>& <a class="code" href="a00228.html">task</a> ) {
+00632         task.<a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r8">next</a> = NULL;
+00633         *next_ptr = &task;
+00634         next_ptr = &task.<a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r8">next</a>;
+00635     }
+00636 
+<a name="l00638"></a><a class="code" href="a00229.html#a4">00638</a>     <a class="code" href="a00228.html">task</a>& pop_front() {
+00639         __TBB_ASSERT( !empty(), <span class="stringliteral">"attempt to pop item from empty task_list"</span> );
+00640         <a class="code" href="a00228.html">task</a>* result = first;
+00641         first = result-><a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r8">next</a>;
+00642         <span class="keywordflow">if</span>( !first ) next_ptr = &first;
+00643         <span class="keywordflow">return</span> *result;
+00644     }
+00645 
+<a name="l00647"></a><a class="code" href="a00229.html#a5">00647</a>     <span class="keywordtype">void</span> clear() {
+00648         first=NULL;
+00649         next_ptr=&first;
+00650     }
+00651 };
+00652 
+<a name="l00653"></a><a class="code" href="a00228.html#a15">00653</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> task::spawn( <a class="code" href="a00229.html">task_list</a>& list ) {
+00654     __TBB_ASSERT( <a class="code" href="a00228.html#a23">is_owned_by_current_thread</a>(), <span class="stringliteral">"'this' not owned by current thread"</span> );
+00655     <span class="keywordflow">if</span>( <a class="code" href="a00228.html">task</a>* t = list.<a class="code" href="a00229.html#r0">first</a> ) {
+00656         prefix().<a class="code" href="a00230.html#r1">owner</a>->spawn( *t, *list.<a class="code" href="a00229.html#r1">next_ptr</a> );
+00657         list.<a class="code" href="a00229.html#a5">clear</a>();
+00658     }
+00659 }
+00660 
+<a name="l00661"></a><a class="code" href="a00228.html#e2">00661</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> task::spawn_root_and_wait( <a class="code" href="a00229.html">task_list</a>& root_list ) {
+00662     <span class="keywordflow">if</span>( <a class="code" href="a00228.html">task</a>* t = root_list.<a class="code" href="a00229.html#r0">first</a> ) {
+00663         __TBB_ASSERT( t-><a class="code" href="a00228.html#a23">is_owned_by_current_thread</a>(), <span class="stringliteral">"'this' not owned by current thread"</span> );
+00664         t-><a class="code" href="a00228.html#d1">prefix</a>().<a class="code" href="a00230.html#r1">owner</a>->spawn_root_and_wait( *t, *root_list.<a class="code" href="a00229.html#r1">next_ptr</a> );
+00665         root_list.<a class="code" href="a00229.html#a5">clear</a>();
+00666     }
+00667 }
+00668 
+00669 } <span class="comment">// namespace tbb</span>
+00670 
+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& p ) {
+00672     <span class="keywordflow">return</span> &p.allocate(bytes);
+00673 }
+00674 
+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& p ) {
+00676     p.free( *static_cast<tbb::task*>(task) );
+00677 }
+00678 
+00679 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+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 ) {
+00681     <span class="keywordflow">return</span> &p.allocate(bytes);
+00682 }
+00683 
+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 ) {
+00685     p.free( *static_cast<tbb::task*>(task) );
+00686 }
+00687 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00688 
+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 ) {
+00690     <span class="keywordflow">return</span> &p.allocate(bytes);
+00691 }
+00692 
+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 ) {
+00694     p.free( *static_cast<tbb::task*>(task) );
+00695 }
+00696 
+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 ) {
+00698     <span class="keywordflow">return</span> &p.allocate(bytes);
+00699 }
+00700 
+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 ) {
+00702     p.free( *static_cast<tbb::task*>(task) );
+00703 }
+00704 
+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 ) {
+00706     <span class="keywordflow">return</span> &p.allocate(bytes);
+00707 }
+00708 
+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 ) {
+00710     p.free( *static_cast<tbb::task*>(task) );
+00711 }
+00712 
+00713 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00308.html b/doc/html/a00308.html
new file mode 100644
index 0000000..8b9f7c9
--- /dev/null
+++ b/doc/html/a00308.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>task_scheduler_init.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>task_scheduler_init.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_task_scheduler_init_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_scheduler_init_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 
+00026 <span class="keyword">namespace </span>tbb {
+00027 
+00028 <span class="keyword">typedef</span> std::size_t stack_size_type;
+00029 
+00031 <span class="keyword">namespace </span>internal {
+00033 
+00034     <span class="keyword">class </span>scheduler;
+00035 } <span class="comment">// namespace internal</span>
+00037 <span class="comment"></span>
+00039 
+<a name="l00042"></a><a class="code" href="a00231.html">00042</a> <span class="keyword">class </span><a class="code" href="a00231.html">task_scheduler_init</a>: internal::no_copy {
+00044     internal::scheduler* my_scheduler;
+00045 <span class="keyword">public</span>:
+00046     
+<a name="l00048"></a><a class="code" href="a00231.html#s0">00048</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> automatic = -1;
+00049 
+<a name="l00051"></a><a class="code" href="a00231.html#s1">00051</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> deferred = -2;
+00052 
+00054 
+00062     <span class="keywordtype">void</span> initialize( <span class="keywordtype">int</span> number_of_threads=automatic );
+00063 
+00065 
+00066     <span class="keywordtype">void</span> initialize( <span class="keywordtype">int</span> number_of_threads, stack_size_type thread_stack_size );
+00067 
+00069     <span class="keywordtype">void</span> terminate();
+00070 
+<a name="l00072"></a><a class="code" href="a00231.html#a3">00072</a>     <a class="code" href="a00231.html">task_scheduler_init</a>( <span class="keywordtype">int</span> number_of_threads=automatic, stack_size_type thread_stack_size=0 ) : my_scheduler(NULL)  {
+00073         initialize( number_of_threads, thread_stack_size );
+00074     }
+00075   
+<a name="l00077"></a><a class="code" href="a00231.html#a4">00077</a>     ~<a class="code" href="a00231.html">task_scheduler_init</a>() {
+00078         <span class="keywordflow">if</span>( my_scheduler ) 
+00079             terminate();
+00080         internal::poison_pointer( my_scheduler );
+00081     }
+00083 
+00090     <span class="keyword">static</span> <span class="keywordtype">int</span> default_num_threads ();
+00091 };
+00092 
+00093 } <span class="comment">// namespace tbb</span>
+00094 
+00095 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_scheduler_init_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00309.html b/doc/html/a00309.html
new file mode 100644
index 0000000..dbdb877
--- /dev/null
+++ b/doc/html/a00309.html
@@ -0,0 +1,76 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>task_scheduler_observer.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_task_scheduler_observer_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_scheduler_observer_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "atomic.h"</span>
+00025 
+00026 <span class="preprocessor">#if __TBB_SCHEDULER_OBSERVER</span>
+00027 <span class="preprocessor"></span>
+00028 <span class="keyword">namespace </span>tbb {
+00029 
+00030 <span class="keyword">namespace </span>internal {
+00031 
+00032 <span class="keyword">class </span>observer_proxy;
+00033 
+00034 <span class="keyword">class </span>task_scheduler_observer_v3 {
+00035     <span class="keyword">friend</span> <span class="keyword">class </span>observer_proxy;
+00036     observer_proxy* my_proxy;
+00037     atomic<intptr> my_busy_count;
+00038 <span class="keyword">public</span>:
+00040     <span class="keywordtype">void</span> observe( <span class="keywordtype">bool</span> state=<span class="keyword">true</span> );
+00041 
+00043     <span class="keywordtype">bool</span> is_observing()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_proxy!=NULL;}
+00044 
+00046     task_scheduler_observer_v3() : my_proxy(NULL) {my_busy_count=0;}
+00047 
+00049     <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_scheduler_entry( <span class="keywordtype">bool</span> is_worker ) {} 
+00050 
+00052     <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_scheduler_exit( <span class="keywordtype">bool</span> is_worker ) {}
+00053 
+00055     <span class="keyword">virtual</span> ~task_scheduler_observer_v3() {observe(<span class="keyword">false</span>);}
+00056 };
+00057 
+00058 } <span class="comment">// namespace internal</span>
+00059 
+00060 <span class="keyword">typedef</span> internal::task_scheduler_observer_v3 task_scheduler_observer;
+00061 
+00062 } <span class="comment">// namespace tbb</span>
+00063 
+00064 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_SCHEDULER_OBSERVER */</span>
+00065 
+00066 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_scheduler_observer_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00310.html b/doc/html/a00310.html
new file mode 100644
index 0000000..d827f61
--- /dev/null
+++ b/doc/html/a00310.html
@@ -0,0 +1,133 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb_allocator.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_tbb_allocator_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_allocator_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include <new></span>
+00025 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00026 
+00027 <span class="keyword">namespace </span>tbb {
+00028 
+00030 <span class="keyword">namespace </span>internal {
+00031 
+00033 
+00034     <span class="keywordtype">void</span> <a class="code" href="a00279.html#a41">deallocate_via_handler_v3</a>( <span class="keywordtype">void</span> *p );
+00035 
+00037 
+00038     <span class="keywordtype">void</span>* <a class="code" href="a00279.html#a42">allocate_via_handler_v3</a>( size_t n );
+00039 
+00041     <span class="keywordtype">bool</span> <a class="code" href="a00279.html#a43">is_malloc_used_v3</a>();
+00042 }
+00044 
+00046 
+00051 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00052"></a><a class="code" href="a00232.html">00052</a> <span class="keyword">class </span><a class="code" href="a00232.html">tbb_allocator</a> {
+00053 <span class="keyword">public</span>:
+00054     <span class="keyword">typedef</span> T* pointer;
+00055     <span class="keyword">typedef</span> <span class="keyword">const</span> T* const_pointer;
+00056     <span class="keyword">typedef</span> T& reference;
+00057     <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+00058     <span class="keyword">typedef</span> T value_type;
+00059     <span class="keyword">typedef</span> size_t size_type;
+00060     <span class="keyword">typedef</span> ptrdiff_t difference_type;
+00061     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
+00062         <span class="keyword">typedef</span> <a class="code" href="a00232.html">tbb_allocator<U></a> other;
+00063     };
+00064 
+<a name="l00066"></a><a class="code" href="a00232.html#w9">00066</a>     <span class="keyword">enum</span> malloc_type {
+00067         scalable, 
+00068         standard
+00069     };
+00070 
+00071 <span class="preprocessor">#if _WIN64</span>
+00072 <span class="preprocessor"></span>
+00073 
+00075     <span class="keywordtype">char</span>* _Charalloc( size_type size ) {        
+00076         <span class="keywordflow">return</span> (<span class="keywordtype">char</span>*)(internal::allocate_via_handler_v3( size * <span class="keyword">sizeof</span>(T)));
+00077     }
+00078 <span class="preprocessor">#endif </span><span class="comment">/* _WIN64 */</span>
+00079 
+00080     tbb_allocator() throw() {}
+00081     tbb_allocator( <span class="keyword">const</span> tbb_allocator& ) throw() {}
+00082     <span class="keyword">template</span><<span class="keyword">typename</span> U> tbb_allocator(<span class="keyword">const</span> tbb_allocator<U>&) throw() {}
+00083 
+00084     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+00085     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+00086     
+<a name="l00088"></a><a class="code" href="a00232.html#a5">00088</a>     pointer allocate( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="comment">/*hint*/</span> = 0) {
+00089         <span class="keywordflow">return</span> pointer(internal::allocate_via_handler_v3( n * <span class="keyword">sizeof</span>(T) ));
+00090     }
+00091 
+<a name="l00093"></a><a class="code" href="a00232.html#a6">00093</a>     <span class="keywordtype">void</span> deallocate( pointer p, size_type ) {
+00094         internal::deallocate_via_handler_v3(p);        
+00095     }
+00096 
+<a name="l00098"></a><a class="code" href="a00232.html#a7">00098</a>     size_type max_size() const throw() {
+00099         size_type max = static_cast<size_type>(-1) / <span class="keyword">sizeof</span> (T);
+00100         <span class="keywordflow">return</span> (max > 0 ? max : 1);
+00101     }
+00102     
+<a name="l00104"></a><a class="code" href="a00232.html#a8">00104</a>     <span class="keywordtype">void</span> construct( pointer p, <span class="keyword">const</span> T& value ) {<span class="keyword">new</span>(static_cast<void*>(p)) T(value);}
+00105 
+<a name="l00107"></a><a class="code" href="a00232.html#a9">00107</a>     <span class="keywordtype">void</span> destroy( pointer p ) {p->~T();}
+00108 
+<a name="l00110"></a><a class="code" href="a00232.html#e0">00110</a>     <span class="keyword">static</span> malloc_type allocator_type() {
+00111         <span class="keywordflow">return</span> internal::is_malloc_used_v3() ? standard : scalable;
+00112     }
+00113 };
+00114 
+00116 
+00117 <span class="keyword">template</span><> 
+<a name="l00118"></a><a class="code" href="a00233.html">00118</a> <span class="keyword">class </span><a class="code" href="a00232.html">tbb_allocator</a><void> {
+00119 <span class="keyword">public</span>:
+00120     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
+00121     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
+00122     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
+00123     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
+00124         <span class="keyword">typedef</span> <a class="code" href="a00232.html">tbb_allocator<U></a> other;
+00125     };
+00126 };
+00127 
+00128 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00129 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00232.html">tbb_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00232.html">tbb_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
+00130 
+00131 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+00132 <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>;}
+00133 
+00134 } <span class="comment">// namespace ThreadBuildingBlocks </span>
+00135 
+00136 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_allocator_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00311.html b/doc/html/a00311.html
new file mode 100644
index 0000000..9353281
--- /dev/null
+++ b/doc/html/a00311.html
@@ -0,0 +1,207 @@
+<!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">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb_exception.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_exception_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_exception_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 <span class="preprocessor">#include <stdexcept></span>
+00026 
+00027 <span class="keyword">namespace </span>tbb {
+00028 
+<a name="l00030"></a><a class="code" href="a00168.html">00030</a> <span class="keyword">class </span><a class="code" href="a00168.html">bad_last_alloc</a> : <span class="keyword">public</span> std::bad_alloc {
+00031 <span class="keyword">public</span>:
+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>; }
+00033     <span class="keyword">virtual</span> ~<a class="code" href="a00168.html">bad_last_alloc</a>() <span class="keywordflow">throw</span>() {}
+00034 };
+00035 
+00036 } <span class="comment">// namespace tbb</span>
+00037 
+00038 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+00039 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/tbb_allocator.h"</span>
+00040 <span class="preprocessor">#include <exception></span>
+00041 <span class="preprocessor">#include <typeinfo></span>
+00042 <span class="preprocessor">#include <new></span>
+00043 
+00044 <span class="keyword">namespace </span>tbb {
+00045 
+00047 
+00067 <span class="keyword">class </span>tbb_exception : <span class="keyword">public</span> std::exception {
+00068 <span class="keyword">public</span>:
+00070 
+00071     <span class="keyword">virtual</span> tbb_exception* move () throw() = 0;
+00072     
+00074 
+00076     virtual <span class="keywordtype">void</span> destroy () throw() = 0;
+00077 
+00079 
+00083     virtual <span class="keywordtype">void</span> throw_self () = 0;
+00084 
+00086     virtual const <span class="keywordtype">char</span>* name() const throw() = 0;
+00087 
+00089     virtual const <span class="keywordtype">char</span>* what() const throw() = 0;
+00090 };
+00091 
+00093 
+00097 class captured_exception : public tbb_exception
+00098 {
+00099 <span class="keyword">public</span>:
+00100     captured_exception ( <span class="keyword">const</span> captured_exception& src )
+00101         : my_dynamic(false)
+00102     {
+00103         set(src.my_exception_name, src.my_exception_info);
+00104     }
+00105 
+00106     captured_exception ( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span>* info )
+00107         : my_dynamic(false)
+00108     {
+00109         set(name, info);
+00110     }
+00111 
+00112     ~captured_exception () throw() {
+00113         clear();
+00114     }
+00115 
+00116     captured_exception& operator= ( <span class="keyword">const</span> captured_exception& src ) {
+00117         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &src ) {
+00118             clear();
+00119             set(src.my_exception_name, src.my_exception_info);
+00120         }
+00121         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00122     }
+00123 
+00124     <span class="comment">/*override*/</span> 
+00125     captured_exception* move () throw();
+00126 
+00127     <span class="comment">/*override*/</span> 
+00128     <span class="keywordtype">void</span> destroy () throw();
+00129 
+00130     <span class="comment">/*override*/</span> 
+00131     <span class="keywordtype">void</span> throw_self () { <span class="keywordflow">throw</span> *<span class="keyword">this</span>; }
+00132 
+00133     <span class="comment">/*override*/</span> 
+00134     <span class="keyword">const</span> <span class="keywordtype">char</span>* name() const throw();
+00135 
+00136     <span class="comment">/*override*/</span> 
+00137     const <span class="keywordtype">char</span>* what() const throw();
+00138 
+00139 private:
+00141     captured_exception() {}
+00142 
+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 );
+00145 
+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>();
+00147     <span class="keywordtype">void</span> clear () throw();
+00148 
+00149     <span class="keywordtype">bool</span> my_dynamic;
+00150     const <span class="keywordtype">char</span>* my_exception_name;
+00151     const <span class="keywordtype">char</span>* my_exception_info;
+00152 };
+00153 
+00155 
+00159 template<typename ExceptionData>
+00160 class movable_exception : public tbb_exception
+00161 {
+00162     <span class="keyword">typedef</span> movable_exception<ExceptionData> self_type;
+00163 
+00164 <span class="keyword">public</span>:
+00165     movable_exception ( <span class="keyword">const</span> ExceptionData& data ) 
+00166         : my_exception_data(data)
+00167         , my_dynamic(false)
+00168         , my_exception_name(typeid(self_type).name())
+00169     {}
+00170 
+00171     movable_exception ( <span class="keyword">const</span> movable_exception& src ) <span class="keywordflow">throw</span> () 
+00172         : my_exception_data(src.my_exception_data)
+00173         , my_dynamic(<span class="keyword">false</span>)
+00174         , my_exception_name(src.my_exception_name)
+00175     {}
+00176 
+00177     ~movable_exception () throw() {}
+00178 
+00179     <span class="keyword">const</span> movable_exception& operator= ( <span class="keyword">const</span> movable_exception& src ) {
+00180         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &src ) {
+00181             my_exception_data = src.my_exception_data;
+00182             my_exception_name = src.my_exception_name;
+00183         }
+00184         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00185     }
+00186 
+00187     ExceptionData& data () throw() { <span class="keywordflow">return</span> my_exception_data; }
+00188 
+00189     <span class="keyword">const</span> ExceptionData& data () const throw() { <span class="keywordflow">return</span> my_exception_data; }
+00190 
+00191     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* name () const throw() { <span class="keywordflow">return</span> my_exception_name; }
+00192 
+00193     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* what () const throw() { <span class="keywordflow">return</span> <span class="stringliteral">"tbb::movable_exception"</span>; }
+00194 
+00195     <span class="comment">/*override*/</span> 
+00196     movable_exception* move () throw() {
+00197         <span class="keywordtype">void</span>* e = internal::allocate_via_handler_v3(<span class="keyword">sizeof</span>(movable_exception));
+00198         <span class="keywordflow">if</span> ( e ) {
+00199             <span class="keyword">new</span> (e) movable_exception(*<span class="keyword">this</span>);
+00200             ((movable_exception*)e)->my_dynamic = <span class="keyword">true</span>;
+00201         }
+00202         <span class="keywordflow">return</span> (movable_exception*)e;
+00203     }
+00204     <span class="comment">/*override*/</span> 
+00205     <span class="keywordtype">void</span> destroy () throw() {
+00206         __TBB_ASSERT ( my_dynamic, <span class="stringliteral">"Method destroy can be called only on dynamically allocated movable_exceptions"</span> );
+00207         <span class="keywordflow">if</span> ( my_dynamic ) {
+00208             this->~movable_exception();
+00209             internal::deallocate_via_handler_v3(<span class="keyword">this</span>);
+00210         }
+00211     }
+00212     <span class="comment">/*override*/</span> 
+00213     <span class="keywordtype">void</span> throw_self () {
+00214         <span class="keywordflow">throw</span> *<span class="keyword">this</span>;
+00215     }
+00216 
+00217 <span class="keyword">protected</span>:
+00219     ExceptionData  my_exception_data;
+00220 
+00221 <span class="keyword">private</span>:
+00223     <span class="keywordtype">bool</span> my_dynamic;
+00224 
+00226 
+00227     <span class="keyword">const</span> <span class="keywordtype">char</span>* my_exception_name;
+00228 };
+00229 
+00230 } <span class="comment">// namespace tbb</span>
+00231 
+00232 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00233 
+00234 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_exception_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00312.html b/doc/html/a00312.html
new file mode 100644
index 0000000..94e12eb
--- /dev/null
+++ b/doc/html/a00312.html
@@ -0,0 +1,563 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>tbb_machine.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb_machine.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_machine_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_machine_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb/tbb_stddef.h"</span>
+00025 
+00026 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00027 <span class="preprocessor"></span>
+00028 <span class="preprocessor">#ifdef _MANAGED</span>
+00029 <span class="preprocessor"></span><span class="preprocessor">#pragma managed(push, off)</span>
+00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00031 <span class="preprocessor"></span>
+00032 <span class="preprocessor">#if defined(_M_IX86)</span>
+00033 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/windows_ia32.h"</span>
+00034 <span class="preprocessor">#elif defined(_M_AMD64) </span>
+00035 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/windows_em64t.h"</span>
+00036 <span class="preprocessor">#else</span>
+00037 <span class="preprocessor"></span><span class="preprocessor">#error Unsupported platform</span>
+00038 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00039 <span class="preprocessor"></span>
+00040 <span class="preprocessor">#ifdef _MANAGED</span>
+00041 <span class="preprocessor"></span><span class="preprocessor">#pragma managed(pop)</span>
+00042 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00043 <span class="preprocessor"></span>
+00044 <span class="preprocessor">#elif __linux__ || __FreeBSD__</span>
+00045 <span class="preprocessor"></span>
+00046 <span class="preprocessor">#if __i386__</span>
+00047 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/linux_ia32.h"</span>
+00048 <span class="preprocessor">#elif __x86_64__</span>
+00049 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/linux_em64t.h"</span>
+00050 <span class="preprocessor">#elif __ia64__</span>
+00051 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/linux_itanium.h"</span>
+00052 <span class="preprocessor">#endif</span>
+00053 <span class="preprocessor"></span>
+00054 <span class="preprocessor">#elif __APPLE__</span>
+00055 <span class="preprocessor"></span>
+00056 <span class="preprocessor">#if __i386__</span>
+00057 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/linux_ia32.h"</span>
+00058 <span class="preprocessor">#elif __x86_64__</span>
+00059 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/linux_em64t.h"</span>
+00060 <span class="preprocessor">#elif __POWERPC__</span>
+00061 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/mac_ppc.h"</span>
+00062 <span class="preprocessor">#endif</span>
+00063 <span class="preprocessor"></span>
+00064 <span class="preprocessor">#elif _AIX</span>
+00065 <span class="preprocessor"></span>
+00066 <span class="preprocessor">#include "tbb/machine/ibm_aix51.h"</span>
+00067 
+00068 <span class="preprocessor">#elif __sun || __SUNPRO_CC</span>
+00069 <span class="preprocessor"></span>
+00070 <span class="preprocessor">#define __asm__ asm </span>
+00071 <span class="preprocessor"></span><span class="preprocessor">#define __volatile__ volatile</span>
+00072 <span class="preprocessor"></span><span class="preprocessor">#if __i386  || __i386__</span>
+00073 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/linux_ia32.h"</span>
+00074 <span class="preprocessor">#elif __x86_64__</span>
+00075 <span class="preprocessor"></span><span class="preprocessor">#include "tbb/machine/linux_em64t.h"</span>
+00076 <span class="preprocessor">#endif</span>
+00077 <span class="preprocessor"></span>
+00078 <span class="preprocessor">#endif</span>
+00079 <span class="preprocessor"></span>
+00080 <span class="preprocessor">#if !defined(__TBB_CompareAndSwap4) || !defined(__TBB_CompareAndSwap8) || !defined(__TBB_Yield)</span>
+00081 <span class="preprocessor"></span><span class="preprocessor">#error Minimal requirements for tbb_machine.h not satisfied </span>
+00082 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00083 <span class="preprocessor"></span>
+00084 <span class="preprocessor">#ifndef __TBB_load_with_acquire</span>
+00085 <span class="preprocessor"></span>
+00086     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00087     <span class="keyword">inline</span> T __TBB_load_with_acquire(<span class="keyword">const</span> <span class="keyword">volatile</span> T& location) {
+00088         T temp = location;
+00089 <span class="preprocessor">#ifdef __TBB_fence_for_acquire </span>
+00090 <span class="preprocessor"></span>        __TBB_fence_for_acquire();
+00091 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_fence_for_acquire */</span>
+00092         <span class="keywordflow">return</span> temp;
+00093     }
+00094 <span class="preprocessor">#endif</span>
+00095 <span class="preprocessor"></span>
+00096 <span class="preprocessor">#ifndef __TBB_store_with_release</span>
+00097 <span class="preprocessor"></span>
+00098     <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> V>
+00099     <span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_store_with_release(<span class="keyword">volatile</span> T& location, V value) {
+00100 <span class="preprocessor">#ifdef __TBB_fence_for_release</span>
+00101 <span class="preprocessor"></span>        __TBB_fence_for_release();
+00102 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_fence_for_release */</span>
+00103         location = value; 
+00104     }
+00105 <span class="preprocessor">#endif</span>
+00106 <span class="preprocessor"></span>
+00107 <span class="preprocessor">#ifndef __TBB_Pause</span>
+00108 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_Pause(int32_t) {
+00109         __TBB_Yield();
+00110     }
+00111 <span class="preprocessor">#endif</span>
+00112 <span class="preprocessor"></span>
+00113 <span class="keyword">namespace </span>tbb {
+00114 <span class="keyword">namespace </span>internal {
+00115 
+00117 
+<a name="l00118"></a><a class="code" href="a00166.html">00118</a> <span class="keyword">class </span><a class="code" href="a00166.html">AtomicBackoff</a> {
+00120 
+00122     <span class="keyword">static</span> <span class="keyword">const</span> int32_t LOOPS_BEFORE_YIELD = 16;
+00123     int32_t count;
+00124 <span class="keyword">public</span>:
+00125     <a class="code" href="a00166.html">AtomicBackoff</a>() : count(1) {}
+00126 
+<a name="l00128"></a><a class="code" href="a00166.html#a1">00128</a>     <span class="keywordtype">void</span> pause() {
+00129         <span class="keywordflow">if</span>( count<=LOOPS_BEFORE_YIELD ) {
+00130             __TBB_Pause(count);
+00131             <span class="comment">// Pause twice as long the next time.</span>
+00132             count*=2;
+00133         } <span class="keywordflow">else</span> {
+00134             <span class="comment">// Pause is so long that we might as well yield CPU to scheduler.</span>
+00135             __TBB_Yield();
+00136         }
+00137     }
+00138 
+00139     <span class="comment">// pause for a few times and then return false immediately.</span>
+00140     <span class="keywordtype">bool</span> bounded_pause() {
+00141         <span class="keywordflow">if</span>( count<=LOOPS_BEFORE_YIELD ) {
+00142             __TBB_Pause(count);
+00143             <span class="comment">// Pause twice as long the next time.</span>
+00144             count*=2;
+00145             <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00146         } <span class="keywordflow">else</span> {
+00147             <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00148         }
+00149     }
+00150 
+00151     <span class="keywordtype">void</span> reset() {
+00152         count = 1;
+00153     }
+00154 };
+00155 
+00156 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
+00157 <span class="keyword">inline</span> intptr_t __TBB_MaskedCompareAndSwap (<span class="keyword">volatile</span> int32_t *ptr, T value, T comparand ) {
+00158     T *base = (T *)( (uintptr_t)(ptr) & ~(uintptr_t)(0x3) );
+00159 <span class="preprocessor">#if __TBB_BIG_ENDIAN</span>
+00160 <span class="preprocessor"></span>    <span class="keyword">const</span> uint8_t bitoffset = ( (4-S) - ( (uint8_t *)ptr - (uint8_t *)base) ) * 8;
+00161 <span class="preprocessor">#else</span>
+00162 <span class="preprocessor"></span>    <span class="keyword">const</span> uint8_t bitoffset = ( (uint8_t *)ptr - (uint8_t *)base ) * 8;
+00163 <span class="preprocessor">#endif</span>
+00164 <span class="preprocessor"></span>    <span class="keyword">const</span> uint32_t mask = ( (1<<(S*8) ) - 1)<<bitoffset;
+00165     AtomicBackoff b;
+00166     uint32_t result;
+00167     <span class="keywordflow">for</span>(;;) {
+00168         result = *(<span class="keyword">volatile</span> uint32_t *)base;
+00169         uint32_t old_value = ( result & ~mask ) | ( comparand << bitoffset );
+00170         uint32_t new_value = ( result & ~mask ) | ( value << bitoffset );
+00171         <span class="comment">// __TBB_CompareAndSwap4 presumed to have full fence. </span>
+00172         uint32_t tmp = __TBB_CompareAndSwap4( base, new_value, old_value );
+00173         <span class="keywordflow">if</span>( tmp==old_value || ((tmp^old_value)&mask)!=0 ) 
+00174             <span class="keywordflow">break</span>;
+00175         b.pause();
+00176     }
+00177     <span class="keywordflow">return</span> (T)((result & mask) >> bitoffset);
+00178 }
+00179 
+00180 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
+00181 <span class="keyword">inline</span> T __TBB_CompareAndSwapGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T value, T comparand ) { 
+00182     <span class="keywordflow">return</span> __TBB_CompareAndSwapW((T *)ptr,value,comparand);
+00183 }
+00184 
+00185 <span class="keyword">template</span><>
+00186 <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 ) {
+00187 <span class="preprocessor">#ifdef __TBB_CompareAndSwap1</span>
+00188 <span class="preprocessor"></span>    <span class="keywordflow">return</span> __TBB_CompareAndSwap1(ptr,value,comparand);
+00189 <span class="preprocessor">#else</span>
+00190 <span class="preprocessor"></span>    <span class="keywordflow">return</span> __TBB_MaskedCompareAndSwap<1,uint8_t>((<span class="keyword">volatile</span> int32_t *)ptr,value,comparand);
+00191 <span class="preprocessor">#endif</span>
+00192 <span class="preprocessor"></span>}
+00193 
+00194 <span class="keyword">template</span><>
+00195 <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 ) {
+00196 <span class="preprocessor">#ifdef __TBB_CompareAndSwap2</span>
+00197 <span class="preprocessor"></span>    <span class="keywordflow">return</span> __TBB_CompareAndSwap2(ptr,value,comparand);
+00198 <span class="preprocessor">#else</span>
+00199 <span class="preprocessor"></span>    <span class="keywordflow">return</span> __TBB_MaskedCompareAndSwap<2,uint16_t>((<span class="keyword">volatile</span> int32_t *)ptr,value,comparand);
+00200 <span class="preprocessor">#endif</span>
+00201 <span class="preprocessor"></span>}
+00202 
+00203 <span class="keyword">template</span><>
+00204 <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 ) { 
+00205     <span class="keywordflow">return</span> __TBB_CompareAndSwap4(ptr,value,comparand);
+00206 }
+00207 
+00208 <span class="keyword">template</span><>
+00209 <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 ) { 
+00210     <span class="keywordflow">return</span> __TBB_CompareAndSwap8(ptr,value,comparand);
+00211 }
+00212 
+00213 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
+00214 <span class="keyword">inline</span> T __TBB_FetchAndAddGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T addend) {
+00215     AtomicBackoff b;
+00216     T result;
+00217     <span class="keywordflow">for</span>(;;) {
+00218         result = *reinterpret_cast<volatile T *>(ptr);
+00219         <span class="comment">// __TBB_CompareAndSwapGeneric presumed to have full fence. </span>
+00220         <span class="keywordflow">if</span>( __TBB_CompareAndSwapGeneric<S,T> ( ptr, result+addend, result )==result ) 
+00221             <span class="keywordflow">break</span>;
+00222         b.pause();
+00223     }
+00224     <span class="keywordflow">return</span> result;
+00225 }
+00226 
+00227 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
+00228 <span class="keyword">inline</span> T __TBB_FetchAndStoreGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T value) {
+00229     AtomicBackoff b;
+00230     T result;
+00231     <span class="keywordflow">for</span>(;;) {
+00232         result = *reinterpret_cast<volatile T *>(ptr);
+00233         <span class="comment">// __TBB_CompareAndSwapGeneric presumed to have full fence.</span>
+00234         <span class="keywordflow">if</span>( __TBB_CompareAndSwapGeneric<S,T> ( ptr, value, result )==result ) 
+00235             <span class="keywordflow">break</span>;
+00236         b.pause();
+00237     }
+00238     <span class="keywordflow">return</span> result;
+00239 }
+00240 
+00241 <span class="comment">// Macro __TBB_TypeWithAlignmentAtLeastAsStrict(T) should be a type with alignment at least as </span>
+00242 <span class="comment">// strict as type T.  Type type should have a trivial default constructor and destructor, so that</span>
+00243 <span class="comment">// arrays of that type can be declared without initializers.  </span>
+00244 <span class="comment">// It is correct (but perhaps a waste of space) if __TBB_TypeWithAlignmentAtLeastAsStrict(T) expands</span>
+00245 <span class="comment">// to a type bigger than T.</span>
+00246 <span class="comment">// The default definition here works on machines where integers are naturally aligned and the</span>
+00247 <span class="comment">// strictest alignment is 16.</span>
+00248 <span class="preprocessor">#ifndef __TBB_TypeWithAlignmentAtLeastAsStrict</span>
+00249 <span class="preprocessor"></span>
+00250 <span class="preprocessor">#if __GNUC__ || __SUNPRO_CC</span>
+00251 <span class="preprocessor"></span><span class="keyword">struct </span>__TBB_machine_type_with_strictest_alignment {
+00252     <span class="keywordtype">int</span> member[4];
+00253 } __attribute__((aligned(16)));
+00254 <span class="preprocessor">#elif _MSC_VER</span>
+00255 <span class="preprocessor"></span>__declspec(align(16)) struct __TBB_machine_type_with_strictest_alignment {
+00256     <span class="keywordtype">int</span> member[4];
+00257 };
+00258 <span class="preprocessor">#else</span>
+00259 <span class="preprocessor"></span><span class="preprocessor">#error Must define __TBB_TypeWithAlignmentAtLeastAsStrict(T) or __TBB_machine_type_with_strictest_alignment</span>
+00260 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00261 <span class="preprocessor"></span>
+00262 <span class="keyword">template</span><size_t N> <span class="keyword">struct </span>type_with_alignment {__TBB_machine_type_with_strictest_alignment member;};
+00263 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<1> { <span class="keywordtype">char</span> member; };
+00264 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<2> { uint16_t member; };
+00265 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<4> { uint32_t member; };
+00266 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<8> { uint64_t member; };
+00267 
+00268 <span class="preprocessor">#if _MSC_VER||defined(__GNUC__)&&__GNUC__==3 && __GNUC_MINOR__<=2  </span>
+00269 <span class="preprocessor"></span>
+00270 
+00272 <span class="keyword">template</span><size_t Size, <span class="keyword">typename</span> T> 
+00273 <span class="keyword">struct </span>work_around_alignment_bug {
+00274 <span class="preprocessor">#if _MSC_VER</span>
+00275 <span class="preprocessor"></span>    <span class="keyword">static</span> <span class="keyword">const</span> size_t alignment = __alignof(T);
+00276 <span class="preprocessor">#else</span>
+00277 <span class="preprocessor"></span>    <span class="keyword">static</span> <span class="keyword">const</span> size_t alignment = __alignof__(T);
+00278 <span class="preprocessor">#endif</span>
+00279 <span class="preprocessor"></span>};
+00280 <span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<tbb::internal::work_around_alignment_bug<sizeof(T),T>::alignment></span>
+00281 <span class="preprocessor"></span><span class="preprocessor">#elif __GNUC__ || __SUNPRO_CC</span>
+00282 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<__alignof__(T)></span>
+00283 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+00284 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) __TBB_machine_type_with_strictest_alignment</span>
+00285 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00286 <span class="preprocessor"></span><span class="preprocessor">#endif  </span><span class="comment">/* ____TBB_TypeWithAlignmentAtLeastAsStrict */</span>
+00287 
+00288 } <span class="comment">// namespace internal</span>
+00289 } <span class="comment">// namespace tbb</span>
+00290 
+00291 <span class="preprocessor">#ifndef __TBB_CompareAndSwap1</span>
+00292 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1 tbb::internal::__TBB_CompareAndSwapGeneric<1,uint8_t></span>
+00293 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00294 <span class="preprocessor"></span>
+00295 <span class="preprocessor">#ifndef __TBB_CompareAndSwap2 </span>
+00296 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2 tbb::internal::__TBB_CompareAndSwapGeneric<2,uint16_t></span>
+00297 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00298 <span class="preprocessor"></span>
+00299 <span class="preprocessor">#ifndef __TBB_CompareAndSwapW</span>
+00300 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwapW tbb::internal::__TBB_CompareAndSwapGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
+00301 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00302 <span class="preprocessor"></span>
+00303 <span class="preprocessor">#ifndef __TBB_FetchAndAdd1</span>
+00304 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1 tbb::internal::__TBB_FetchAndAddGeneric<1,uint8_t></span>
+00305 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00306 <span class="preprocessor"></span>
+00307 <span class="preprocessor">#ifndef __TBB_FetchAndAdd2</span>
+00308 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2 tbb::internal::__TBB_FetchAndAddGeneric<2,uint16_t></span>
+00309 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00310 <span class="preprocessor"></span>
+00311 <span class="preprocessor">#ifndef __TBB_FetchAndAdd4</span>
+00312 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4 tbb::internal::__TBB_FetchAndAddGeneric<4,uint32_t></span>
+00313 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00314 <span class="preprocessor"></span>
+00315 <span class="preprocessor">#ifndef __TBB_FetchAndAdd8</span>
+00316 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8 tbb::internal::__TBB_FetchAndAddGeneric<8,uint64_t></span>
+00317 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00318 <span class="preprocessor"></span>
+00319 <span class="preprocessor">#ifndef __TBB_FetchAndAddW</span>
+00320 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAddW tbb::internal::__TBB_FetchAndAddGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
+00321 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00322 <span class="preprocessor"></span>
+00323 <span class="preprocessor">#ifndef __TBB_FetchAndStore1</span>
+00324 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1 tbb::internal::__TBB_FetchAndStoreGeneric<1,uint8_t></span>
+00325 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00326 <span class="preprocessor"></span>
+00327 <span class="preprocessor">#ifndef __TBB_FetchAndStore2</span>
+00328 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2 tbb::internal::__TBB_FetchAndStoreGeneric<2,uint16_t></span>
+00329 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00330 <span class="preprocessor"></span>
+00331 <span class="preprocessor">#ifndef __TBB_FetchAndStore4</span>
+00332 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4 tbb::internal::__TBB_FetchAndStoreGeneric<4,uint32_t></span>
+00333 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00334 <span class="preprocessor"></span>
+00335 <span class="preprocessor">#ifndef __TBB_FetchAndStore8</span>
+00336 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8 tbb::internal::__TBB_FetchAndStoreGeneric<8,uint64_t></span>
+00337 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00338 <span class="preprocessor"></span>
+00339 <span class="preprocessor">#ifndef __TBB_FetchAndStoreW</span>
+00340 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStoreW tbb::internal::__TBB_FetchAndStoreGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
+00341 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00342 <span class="preprocessor"></span>
+00343 <span class="preprocessor">#if __TBB_DECL_FENCED_ATOMICS</span>
+00344 <span class="preprocessor"></span>
+00345 <span class="preprocessor">#ifndef __TBB_CompareAndSwap1__TBB_full_fence</span>
+00346 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1__TBB_full_fence __TBB_CompareAndSwap1</span>
+00347 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+00348 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap1acquire</span>
+00349 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1acquire __TBB_CompareAndSwap1__TBB_full_fence</span>
+00350 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+00351 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap1release</span>
+00352 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1release __TBB_CompareAndSwap1__TBB_full_fence</span>
+00353 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+00354 <span class="preprocessor"></span>
+00355 <span class="preprocessor">#ifndef __TBB_CompareAndSwap2__TBB_full_fence</span>
+00356 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2__TBB_full_fence __TBB_CompareAndSwap2</span>
+00357 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00358 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap2acquire</span>
+00359 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2acquire __TBB_CompareAndSwap2__TBB_full_fence</span>
+00360 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00361 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap2release</span>
+00362 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2release __TBB_CompareAndSwap2__TBB_full_fence</span>
+00363 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00364 <span class="preprocessor"></span>
+00365 <span class="preprocessor">#ifndef __TBB_CompareAndSwap4__TBB_full_fence</span>
+00366 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4__TBB_full_fence __TBB_CompareAndSwap4</span>
+00367 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+00368 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap4acquire</span>
+00369 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4acquire __TBB_CompareAndSwap4__TBB_full_fence</span>
+00370 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+00371 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap4release</span>
+00372 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4release __TBB_CompareAndSwap4__TBB_full_fence</span>
+00373 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+00374 <span class="preprocessor"></span>
+00375 <span class="preprocessor">#ifndef __TBB_CompareAndSwap8__TBB_full_fence</span>
+00376 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8__TBB_full_fence __TBB_CompareAndSwap8</span>
+00377 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00378 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap8acquire</span>
+00379 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8acquire __TBB_CompareAndSwap8__TBB_full_fence</span>
+00380 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00381 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap8release</span>
+00382 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8release __TBB_CompareAndSwap8__TBB_full_fence</span>
+00383 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00384 <span class="preprocessor"></span>
+00385 <span class="preprocessor">#ifndef __TBB_FetchAndAdd1__TBB_full_fence</span>
+00386 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1__TBB_full_fence __TBB_FetchAndAdd1</span>
+00387 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00388 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd1acquire</span>
+00389 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1acquire __TBB_FetchAndAdd1__TBB_full_fence</span>
+00390 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00391 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd1release</span>
+00392 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1release __TBB_FetchAndAdd1__TBB_full_fence</span>
+00393 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00394 <span class="preprocessor"></span>
+00395 <span class="preprocessor">#ifndef __TBB_FetchAndAdd2__TBB_full_fence</span>
+00396 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2__TBB_full_fence __TBB_FetchAndAdd2</span>
+00397 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00398 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd2acquire</span>
+00399 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2acquire __TBB_FetchAndAdd2__TBB_full_fence</span>
+00400 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00401 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd2release</span>
+00402 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2release __TBB_FetchAndAdd2__TBB_full_fence</span>
+00403 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00404 <span class="preprocessor"></span>
+00405 <span class="preprocessor">#ifndef __TBB_FetchAndAdd4__TBB_full_fence</span>
+00406 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4__TBB_full_fence __TBB_FetchAndAdd4</span>
+00407 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00408 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd4acquire</span>
+00409 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4acquire __TBB_FetchAndAdd4__TBB_full_fence</span>
+00410 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00411 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd4release</span>
+00412 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4release __TBB_FetchAndAdd4__TBB_full_fence</span>
+00413 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00414 <span class="preprocessor"></span>
+00415 <span class="preprocessor">#ifndef __TBB_FetchAndAdd8__TBB_full_fence</span>
+00416 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8__TBB_full_fence __TBB_FetchAndAdd8</span>
+00417 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00418 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd8acquire</span>
+00419 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8acquire __TBB_FetchAndAdd8__TBB_full_fence</span>
+00420 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00421 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd8release</span>
+00422 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8release __TBB_FetchAndAdd8__TBB_full_fence</span>
+00423 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00424 <span class="preprocessor"></span>
+00425 <span class="preprocessor">#ifndef __TBB_FetchAndStore1__TBB_full_fence</span>
+00426 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1__TBB_full_fence __TBB_FetchAndStore1</span>
+00427 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00428 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore1acquire</span>
+00429 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1acquire __TBB_FetchAndStore1__TBB_full_fence</span>
+00430 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00431 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore1release</span>
+00432 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1release __TBB_FetchAndStore1__TBB_full_fence</span>
+00433 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00434 <span class="preprocessor"></span>
+00435 <span class="preprocessor">#ifndef __TBB_FetchAndStore2__TBB_full_fence</span>
+00436 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2__TBB_full_fence __TBB_FetchAndStore2</span>
+00437 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00438 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore2acquire</span>
+00439 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2acquire __TBB_FetchAndStore2__TBB_full_fence</span>
+00440 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00441 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore2release</span>
+00442 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2release __TBB_FetchAndStore2__TBB_full_fence</span>
+00443 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00444 <span class="preprocessor"></span>
+00445 <span class="preprocessor">#ifndef __TBB_FetchAndStore4__TBB_full_fence</span>
+00446 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4__TBB_full_fence __TBB_FetchAndStore4</span>
+00447 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00448 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore4acquire</span>
+00449 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4acquire __TBB_FetchAndStore4__TBB_full_fence</span>
+00450 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00451 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore4release</span>
+00452 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4release __TBB_FetchAndStore4__TBB_full_fence</span>
+00453 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00454 <span class="preprocessor"></span>
+00455 <span class="preprocessor">#ifndef __TBB_FetchAndStore8__TBB_full_fence</span>
+00456 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8__TBB_full_fence __TBB_FetchAndStore8</span>
+00457 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00458 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore8acquire</span>
+00459 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8acquire __TBB_FetchAndStore8__TBB_full_fence</span>
+00460 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00461 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore8release</span>
+00462 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8release __TBB_FetchAndStore8__TBB_full_fence</span>
+00463 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00464 <span class="preprocessor"></span>
+00465 <span class="preprocessor">#endif // __TBB_DECL_FENCED_ATOMICS</span>
+00466 <span class="preprocessor"></span>
+00467 <span class="comment">// Special atomic functions</span>
+00468 <span class="preprocessor">#ifndef __TBB_FetchAndAddWrelease</span>
+00469 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAddWrelease __TBB_FetchAndAddW</span>
+00470 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00471 <span class="preprocessor"></span>
+00472 <span class="preprocessor">#ifndef __TBB_FetchAndIncrementWacquire</span>
+00473 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndIncrementWacquire(P) __TBB_FetchAndAddW(P,1)</span>
+00474 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00475 <span class="preprocessor"></span>
+00476 <span class="preprocessor">#ifndef __TBB_FetchAndDecrementWrelease</span>
+00477 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,(-1))</span>
+00478 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00479 <span class="preprocessor"></span>
+00480 <span class="preprocessor">#if __TBB_WORDSIZE==4</span>
+00481 <span class="preprocessor"></span><span class="comment">// On 32-bit platforms, "atomic.h" requires definition of __TBB_Store8 and __TBB_Load8</span>
+00482 <span class="preprocessor">#ifndef __TBB_Store8</span>
+00483 <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) {
+00484     <a class="code" href="a00166.html">tbb::internal::AtomicBackoff</a> b;
+00485     <span class="keywordflow">for</span>(;;) {
+00486         int64_t result = *(int64_t *)ptr;
+00487         <span class="keywordflow">if</span>( __TBB_CompareAndSwap8(ptr,value,result)==result ) <span class="keywordflow">break</span>;
+00488         b.<a class="code" href="a00166.html#a1">pause</a>();
+00489     }
+00490 }
+00491 <span class="preprocessor">#endif</span>
+00492 <span class="preprocessor"></span>
+00493 <span class="preprocessor">#ifndef __TBB_Load8</span>
+00494 <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) {
+00495     int64_t result = *(int64_t *)ptr;
+00496     result = __TBB_CompareAndSwap8((<span class="keyword">volatile</span> <span class="keywordtype">void</span> *)ptr,result,result);
+00497     <span class="keywordflow">return</span> result;
+00498 }
+00499 <span class="preprocessor">#endif</span>
+00500 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_WORDSIZE==4 */</span>
+00501 
+00502 <span class="preprocessor">#ifndef __TBB_Log2</span>
+00503 <span class="preprocessor"></span><span class="keyword">inline</span> intptr_t __TBB_Log2( uintptr_t x ) {
+00504     <span class="keywordtype">long</span> result = -1;
+00505     <span class="keywordflow">for</span>(; x; x>>=1 ) ++result;
+00506     <span class="keywordflow">return</span> result;
+00507 }
+00508 <span class="preprocessor">#endif</span>
+00509 <span class="preprocessor"></span>
+00510 <span class="preprocessor">#ifndef __TBB_AtomicOR</span>
+00511 <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 ) {
+00512     <a class="code" href="a00166.html">tbb::internal::AtomicBackoff</a> b;
+00513     <span class="keywordflow">for</span>(;;) {
+00514         uintptr_t tmp = *(<span class="keyword">volatile</span> uintptr_t *)operand;
+00515         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp);
+00516         <span class="keywordflow">if</span>( result==tmp ) <span class="keywordflow">break</span>;
+00517         b.<a class="code" href="a00166.html#a1">pause</a>();
+00518     }
+00519 }
+00520 <span class="preprocessor">#endif</span>
+00521 <span class="preprocessor"></span>
+00522 <span class="preprocessor">#ifndef __TBB_AtomicAND</span>
+00523 <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 ) {
+00524     <a class="code" href="a00166.html">tbb::internal::AtomicBackoff</a> b;
+00525     <span class="keywordflow">for</span>(;;) {
+00526         uintptr_t tmp = *(<span class="keyword">volatile</span> uintptr_t *)operand;
+00527         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp&addend, tmp);
+00528         <span class="keywordflow">if</span>( result==tmp ) <span class="keywordflow">break</span>;
+00529         b.<a class="code" href="a00166.html#a1">pause</a>();
+00530     }
+00531 }
+00532 <span class="preprocessor">#endif</span>
+00533 <span class="preprocessor"></span>
+00534 <span class="preprocessor">#ifndef __TBB_TryLockByte</span>
+00535 <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 ) {
+00536     <span class="keywordflow">return</span> __TBB_CompareAndSwap1(&flag,1,0)==0;
+00537 }
+00538 <span class="preprocessor">#endif</span>
+00539 <span class="preprocessor"></span>
+00540 <span class="preprocessor">#ifndef __TBB_LockByte</span>
+00541 <span class="preprocessor"></span><span class="keyword">inline</span> uintptr_t __TBB_LockByte( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>& flag ) {
+00542     <span class="keywordflow">if</span> ( !__TBB_TryLockByte(flag) ) {
+00543         <a class="code" href="a00166.html">tbb::internal::AtomicBackoff</a> b;
+00544         <span class="keywordflow">do</span> {
+00545             b.<a class="code" href="a00166.html#a1">pause</a>();
+00546         } <span class="keywordflow">while</span> ( !__TBB_TryLockByte(flag) );
+00547     }
+00548     <span class="keywordflow">return</span> 0;
+00549 }
+00550 <span class="preprocessor">#endif</span>
+00551 <span class="preprocessor"></span>
+00552 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_machine_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00313.html b/doc/html/a00313.html
new file mode 100644
index 0000000..686819d
--- /dev/null
+++ b/doc/html/a00313.html
@@ -0,0 +1,198 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb_stddef.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_tbb_stddef_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_stddef_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="comment">// Marketing-driven product version</span>
+00025 <span class="preprocessor">#define TBB_VERSION_MAJOR 2</span>
+00026 <span class="preprocessor"></span><span class="preprocessor">#define TBB_VERSION_MINOR 1</span>
+00027 <span class="preprocessor"></span>
+00028 <span class="comment">// Engineering-focused interface version</span>
+00029 <span class="preprocessor">#define TBB_INTERFACE_VERSION 3011</span>
+00030 <span class="preprocessor"></span><span class="preprocessor">#define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000</span>
+00031 <span class="preprocessor"></span>
+00032 <span class="comment">// The oldest major interface version still supported</span>
+00033 <span class="comment">// To be used in SONAME, manifests, etc.</span>
+00034 <span class="preprocessor">#define TBB_COMPATIBLE_INTERFACE_VERSION 2</span>
+00035 <span class="preprocessor"></span>
+00036 <span class="preprocessor">#define __TBB_STRING_AUX(x) #x</span>
+00037 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_STRING(x) __TBB_STRING_AUX(x)</span>
+00038 <span class="preprocessor"></span>
+00039 <span class="comment">// We do not need defines below for resource processing on windows</span>
+00040 <span class="preprocessor">#if !defined RC_INVOKED</span>
+00041 <span class="preprocessor"></span>
+00042 <span class="comment">// Define groups for Doxygen documentation</span>
+00052 <span class="comment"></span><span class="comment">// Simple text that is displayed on the main page of Doxygen documentation.</span>
+00094 <span class="comment"></span><span class="comment">// Define preprocessor symbols used to determine architecture</span>
+00095 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00096 <span class="preprocessor"></span><span class="preprocessor">#   if defined(_M_AMD64)</span>
+00097 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_x86_64 1</span>
+00098 <span class="preprocessor"></span><span class="preprocessor">#   elif defined(_M_IA64)</span>
+00099 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_ipf 1</span>
+00100 <span class="preprocessor"></span><span class="preprocessor">#   elif defined(_M_IX86)</span>
+00101 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_x86_32 1</span>
+00102 <span class="preprocessor"></span><span class="preprocessor">#   endif</span>
+00103 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* Assume generic Unix */</span>
+00104 <span class="preprocessor">#   if !__linux__ && !__APPLE__</span>
+00105 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_generic_os 1</span>
+00106 <span class="preprocessor"></span><span class="preprocessor">#   endif</span>
+00107 <span class="preprocessor"></span><span class="preprocessor">#   if __x86_64__</span>
+00108 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_x86_64 1</span>
+00109 <span class="preprocessor"></span><span class="preprocessor">#   elif __ia64__</span>
+00110 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_ipf 1</span>
+00111 <span class="preprocessor"></span><span class="preprocessor">#   elif __i386__||__i386  // __i386 is for Sun OS</span>
+00112 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_x86_32 1</span>
+00113 <span class="preprocessor"></span><span class="preprocessor">#   else</span>
+00114 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_generic_arch 1</span>
+00115 <span class="preprocessor"></span><span class="preprocessor">#   endif</span>
+00116 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00117 <span class="preprocessor"></span>
+00118 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00119 <span class="preprocessor"></span><span class="comment">// define the parts of stdint.h that are needed, but put them inside tbb::internal </span>
+00120 <span class="keyword">namespace </span>tbb {
+00121 <span class="keyword">namespace </span>internal {
+00122     <span class="keyword">typedef</span> __int8 int8_t;
+00123     <span class="keyword">typedef</span> __int16 int16_t;
+00124     <span class="keyword">typedef</span> __int32 int32_t;
+00125     <span class="keyword">typedef</span> __int64 int64_t;
+00126     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int8 uint8_t;
+00127     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int16 uint16_t;
+00128     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int32 uint32_t;
+00129     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int64 uint64_t;
+00130 } <span class="comment">// namespace internal</span>
+00131 } <span class="comment">// namespace tbb</span>
+00132 <span class="preprocessor">#else</span>
+00133 <span class="preprocessor"></span><span class="preprocessor">#include <stdint.h></span>
+00134 <span class="preprocessor">#endif</span>
+00135 <span class="preprocessor"></span>
+00136 <span class="preprocessor">#include <cstddef></span>      <span class="comment">/* Need size_t and ptrdiff_t (the latter on Windows only) from here. */</span>
+00137 
+00138 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00139 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_windef_H</span>
+00140 <span class="preprocessor"></span><span class="preprocessor">#include "_tbb_windef.h"</span>
+00141 <span class="preprocessor">#undef __TBB_tbb_windef_H</span>
+00142 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00143 
+00144 <span class="keyword">namespace </span>tbb {
+<a name="l00146"></a><a class="code" href="a00278.html#a6">00146</a>     <span class="keyword">typedef</span> void(*assertion_handler_type)( <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 );
+00147 }
+00148 
+00149 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00150 <span class="preprocessor"></span>
+00152 
+00155 <span class="preprocessor">#define __TBB_ASSERT(predicate,message) ((predicate)?((void)0):tbb::assertion_failure(__FILE__,__LINE__,#predicate,message))</span>
+00156 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_ASSERT_EX __TBB_ASSERT</span>
+00157 <span class="preprocessor"></span>
+00158 <span class="keyword">namespace </span>tbb {
+00160     assertion_handler_type set_assertion_handler( assertion_handler_type new_handler ); 
+00161 
+00163 
+00166     <span class="keywordtype">void</span> assertion_failure( <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 );
+00167 } <span class="comment">// namespace tbb</span>
+00168 
+00169 <span class="preprocessor">#else</span>
+00170 <span class="preprocessor"></span>
+00172 <span class="preprocessor">#define __TBB_ASSERT(predicate,comment) ((void)0)</span>
+00173 <span class="preprocessor"></span>
+00174 <span class="preprocessor">#define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate)))</span>
+00175 <span class="preprocessor"></span>
+00176 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00177 
+00179 <span class="keyword">namespace </span>tbb {
+00180 
+00182 
+<a name="l00186"></a><a class="code" href="a00221.html">00186</a> <span class="keyword">class </span><a class="code" href="a00221.html">split</a> {
+00187 };
+00188 
+00193 <span class="keyword">namespace </span>internal {
+00194 
+00195 <span class="keyword">using</span> std::size_t;
+00196 
+00198 
+<a name="l00200"></a><a class="code" href="a00279.html#a13">00200</a> <span class="keyword">typedef</span> size_t <a class="code" href="a00279.html#a13">uintptr</a>;
+00201 
+00203 
+<a name="l00205"></a><a class="code" href="a00279.html#a14">00205</a> <span class="keyword">typedef</span> std::ptrdiff_t intptr;
+00206 
+00208 <span class="keywordtype">void</span> <a class="code" href="a00279.html#a52">runtime_warning</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* format, ... );
+00209 
+00210 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00211 <span class="preprocessor"></span>
+00212 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+00213 <span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* & p ) {
+00214     p = reinterpret_cast<T*>(-1);
+00215 }
+00216 <span class="preprocessor">#else</span>
+00217 <span class="preprocessor"></span><span class="keyword">template</span><<span class="keyword">typename</span> T>
+00218 <span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* ) {<span class="comment">/*do nothing*/</span>}
+00219 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00220 
+<a name="l00222"></a><a class="code" href="a00200.html">00222</a> <span class="keyword">class </span><a class="code" href="a00200.html">no_copy</a> {
+00224     <a class="code" href="a00200.html">no_copy</a>( <span class="keyword">const</span> <a class="code" href="a00200.html">no_copy</a>& );
+00225 
+00226     <span class="comment">// Deny assignment</span>
+00227     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="a00200.html">no_copy</a>& );
+00228 <span class="keyword">public</span>:
+<a name="l00230"></a><a class="code" href="a00200.html#a0">00230</a>     <a class="code" href="a00200.html">no_copy</a>() {}
+00231 };
+00232 
+00233 <span class="comment">// Struct to be used as a version tag for inline functions.</span>
+<a name="l00236"></a><a class="code" href="a00239.html">00236</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="a00239.html">version_tag_v3</a> {};
+00237 
+00238 <span class="keyword">typedef</span> <a class="code" href="a00239.html">version_tag_v3</a> <a class="code" href="a00239.html">version_tag</a>;
+00239 
+00240 } <span class="comment">// internal</span>
+00242 <span class="comment"></span>
+00243 } <span class="comment">// tbb</span>
+00244 
+00245 <span class="preprocessor">#if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)</span>
+00246 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_EXCEPTIONS</span>
+00247 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXCEPTIONS 1</span>
+00248 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+00249 
+00250 <span class="preprocessor">#endif</span>
+00251 <span class="preprocessor"></span>
+00252 <span class="preprocessor">#ifndef __TBB_SCHEDULER_OBSERVER</span>
+00253 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_SCHEDULER_OBSERVER 1</span>
+00254 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_SCHEDULER_OBSERVER */</span>
+00255 
+00256 <span class="preprocessor">#ifndef TBB_PERFORMANCE_WARNINGS</span>
+00257 <span class="preprocessor"></span><span class="preprocessor">#define TBB_PERFORMANCE_WARNINGS TBB_DO_ASSERT</span>
+00258 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_PERFORMANCE_WARNINGS */</span>
+00259 
+00260 <span class="preprocessor">#endif </span><span class="comment">/* RC_INVOKED */</span>
+00261 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_stddef_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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..d5c94cd
--- /dev/null
+++ b/doc/html/a00314.html
@@ -0,0 +1,275 @@
+<!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>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tbb_thread.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_tbb_thread_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_thread_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00025 <span class="preprocessor"></span><span class="preprocessor">#include <windows.h></span>
+00026 <span class="preprocessor">#define __TBB_NATIVE_THREAD_ROUTINE unsigned WINAPI</span>
+00027 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) unsigned (WINAPI* r)( void* )</span>
+00028 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+00029 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NATIVE_THREAD_ROUTINE void*</span>
+00030 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) void* (*r)( void* )</span>
+00031 <span class="preprocessor"></span><span class="preprocessor">#include <pthread.h></span>
+00032 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
+00033 <span class="preprocessor"></span>
+00034 <span class="preprocessor">#include <iosfwd></span>
+00035 <span class="preprocessor">#include <exception></span>             <span class="comment">// Need std::terminate from here.</span>
+00036 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00037 <span class="preprocessor">#include "tick_count.h"</span>
+00038 
+00039 <span class="keyword">namespace </span>tbb {
+00040 
+00042 <span class="keyword">namespace </span>internal {
+00043     
+00044     <span class="keyword">class </span>tbb_thread_v3;
+00045 
+00046 } <span class="comment">// namespace internal</span>
+00047 
+00048 <span class="keywordtype">void</span> swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ); 
+00049 
+00050 <span class="keyword">namespace </span>internal {
+00051 
+00053     <span class="keywordtype">void</span>* <a class="code" href="a00279.html#a54">allocate_closure_v3</a>( size_t size );
+00055     <span class="keywordtype">void</span> <a class="code" href="a00279.html#a55">free_closure_v3</a>( <span class="keywordtype">void</span>* );
+00056    
+00057     <span class="keyword">struct </span>thread_closure_base {
+00058         <span class="keywordtype">void</span>* operator new( size_t size ) {<span class="keywordflow">return</span> <a class="code" href="a00279.html#a54">allocate_closure_v3</a>(size);}
+00059         <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* ptr ) {<a class="code" href="a00279.html#a55">free_closure_v3</a>(ptr);}
+00060     };
+00061 
+00062     <span class="keyword">template</span><<span class="keyword">class</span> F> <span class="keyword">struct </span>thread_closure_0: thread_closure_base {
+00063         F function;
+00064 
+00065         <span class="keyword">static</span> __TBB_NATIVE_THREAD_ROUTINE start_routine( <span class="keywordtype">void</span>* c ) {
+00066             thread_closure_0 *<span class="keyword">self</span> = static_cast<thread_closure_0*>(c);
+00067             <span class="keywordflow">try</span> {
+00068                 <span class="keyword">self</span>->function();
+00069             } <span class="keywordflow">catch</span> ( ... ) {
+00070                 std::terminate();
+00071             }
+00072             <span class="keyword">delete</span> <span class="keyword">self</span>;
+00073             <span class="keywordflow">return</span> 0;
+00074         }
+00075         thread_closure_0( <span class="keyword">const</span> F& f ) : function(f) {}
+00076     };
+<a name="l00078"></a><a class="code" href="a00235.html">00078</a>     <span class="keyword">template</span><<span class="keyword">class</span> F, <span class="keyword">class</span> X> <span class="keyword">struct </span><a class="code" href="a00235.html">thread_closure_1</a>: thread_closure_base {
+00079         F function;
+00080         X arg1;
+<a name="l00082"></a><a class="code" href="a00235.html#e0">00082</a>         <span class="keyword">static</span> __TBB_NATIVE_THREAD_ROUTINE start_routine( <span class="keywordtype">void</span>* c ) {
+00083             <a class="code" href="a00235.html">thread_closure_1</a> *<span class="keyword">self</span> = static_cast<thread_closure_1*>(c);
+00084             <span class="keywordflow">try</span> {
+00085                 <span class="keyword">self</span>->function(self->arg1);
+00086             } <span class="keywordflow">catch</span> ( ... ) {
+00087                 std::terminate();
+00088             }
+00089             <span class="keyword">delete</span> <span class="keyword">self</span>;
+00090             <span class="keywordflow">return</span> 0;
+00091         }
+00092         <a class="code" href="a00235.html">thread_closure_1</a>( <span class="keyword">const</span> F& f, <span class="keyword">const</span> X& x ) : function(f), arg1(x) {}
+00093     };
+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 {
+00095         F function;
+00096         X arg1;
+00097         Y arg2;
+00099         <span class="keyword">static</span> __TBB_NATIVE_THREAD_ROUTINE start_routine( <span class="keywordtype">void</span>* c ) {
+00100             thread_closure_2 *<span class="keyword">self</span> = static_cast<thread_closure_2*>(c);
+00101             <span class="keywordflow">try</span> {
+00102                 <span class="keyword">self</span>->function(self->arg1, self->arg2);
+00103             } <span class="keywordflow">catch</span> ( ... ) {
+00104                 std::terminate();
+00105             }
+00106             <span class="keyword">delete</span> <span class="keyword">self</span>;
+00107             <span class="keywordflow">return</span> 0;
+00108         }
+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) {}
+00110     };
+00111 
+<a name="l00113"></a><a class="code" href="a00234.html">00113</a>     <span class="keyword">class </span><a class="code" href="a00234.html">tbb_thread_v3</a> {
+00114         <a class="code" href="a00234.html">tbb_thread_v3</a>& operator=(<span class="keyword">const</span> <a class="code" href="a00234.html">tbb_thread_v3</a>&); <span class="comment">// Deny access</span>
+00115         <a class="code" href="a00234.html">tbb_thread_v3</a>(<span class="keyword">const</span> <a class="code" href="a00234.html">tbb_thread_v3</a>&); <span class="comment">// = delete;   // Deny access</span>
+00116     <span class="keyword">public</span>:
+00117 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00118 <span class="preprocessor"></span>        <span class="keyword">typedef</span> HANDLE native_handle_type; 
+00119 <span class="preprocessor">#else</span>
+00120 <span class="preprocessor"></span>        <span class="keyword">typedef</span> pthread_t native_handle_type; 
+00121 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
+00122 <span class="preprocessor"></span>
+00123         <span class="keyword">class </span>id;
+<a name="l00125"></a><a class="code" href="a00234.html#a0">00125</a>         <a class="code" href="a00234.html">tbb_thread_v3</a>() : my_handle(0)
+00126 #if _WIN32||_WIN64
+00127             , my_thread_id(0)
+00128 #endif <span class="comment">// _WIN32||_WIN64</span>
+00129         {}
+00130         
+<a name="l00132"></a><a class="code" href="a00234.html#a1">00132</a>         <span class="keyword">template</span> <<span class="keyword">class</span> F> <span class="keyword">explicit</span> <a class="code" href="a00234.html">tbb_thread_v3</a>(F f) {
+00133             <span class="keyword">typedef</span> internal::thread_closure_0<F> closure_type;
+00134             internal_start(closure_type::start_routine, <span class="keyword">new</span> closure_type(f));
+00135         }
+<a name="l00137"></a><a class="code" href="a00234.html#a2">00137</a>         <span class="keyword">template</span> <<span class="keyword">class</span> F, <span class="keyword">class</span> X> <a class="code" href="a00234.html">tbb_thread_v3</a>(F f, X x) {
+00138             <span class="keyword">typedef</span> <a class="code" href="a00235.html">internal::thread_closure_1<F,X></a> closure_type;
+00139             internal_start(closure_type::start_routine, <span class="keyword">new</span> closure_type(f,x));
+00140         }
+<a name="l00142"></a><a class="code" href="a00234.html#a3">00142</a>         <span class="keyword">template</span> <<span class="keyword">class</span> F, <span class="keyword">class</span> X, <span class="keyword">class</span> Y> <a class="code" href="a00234.html">tbb_thread_v3</a>(F f, X x, Y y) {
+00143             <span class="keyword">typedef</span> internal::thread_closure_2<F,X,Y> closure_type;
+00144             internal_start(closure_type::start_routine, <span class="keyword">new</span> closure_type(f,x,y));
+00145         }
+00146 
+00147         <span class="keywordtype">bool</span> joinable()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_handle!=0; }
+00149         <span class="keywordtype">void</span> join();
+00151         <span class="keywordtype">void</span> detach();
+00152         ~tbb_thread_v3() {<span class="keywordflow">if</span>( joinable() ) detach();}
+00153         <span class="keyword">inline</span> <span class="keywordtype">id</span> get_id() <span class="keyword">const</span>;
+00154         native_handle_type native_handle() { <span class="keywordflow">return</span> my_handle; }
+00155     
+00157         <span class="keyword">static</span> <span class="keywordtype">unsigned</span> hardware_concurrency();
+00158     <span class="keyword">private</span>:
+00159         native_handle_type my_handle; 
+00160 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00161 <span class="preprocessor"></span>        DWORD my_thread_id;
+00162 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
+00163 <span class="preprocessor"></span>
+00165         <span class="keywordtype">void</span> internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), 
+00166                              <span class="keywordtype">void</span>* closure );
+00167         <span class="keyword">friend</span> <span class="keywordtype">void</span> move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 );
+00168         <span class="keyword">friend</span> <span class="keywordtype">void</span> tbb::swap( tbb_thread_v3& t1, tbb_thread_v3& t2 ); 
+00169     };
+00170         
+00171     <span class="keyword">class </span>tbb_thread_v3::id { 
+00172 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00173 <span class="preprocessor"></span>        DWORD my_id;
+00174         id( DWORD my_id ) : my_id(my_id) {}
+00175 <span class="preprocessor">#else</span>
+00176 <span class="preprocessor"></span>        pthread_t my_id;
+00177         id( pthread_t my_id ) : my_id(my_id) {}
+00178 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
+00179 <span class="preprocessor"></span>        <span class="keyword">friend</span> <span class="keyword">class </span>tbb_thread_v3;
+00180     <span class="keyword">public</span>:
+00181         id() : my_id(0) {}
+00182 
+00183         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( tbb_thread_v3::id x, tbb_thread_v3::id y );
+00184         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( tbb_thread_v3::id x, tbb_thread_v3::id y );
+00185         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<( tbb_thread_v3::id x, tbb_thread_v3::id y );
+00186         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<=( tbb_thread_v3::id x, tbb_thread_v3::id y );
+00187         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator>( tbb_thread_v3::id x, tbb_thread_v3::id y );
+00188         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator>=( tbb_thread_v3::id x, tbb_thread_v3::id y );
+00189         
+00190         <span class="keyword">template</span><<span class="keyword">class</span> <span class="keywordtype">char</span>T, <span class="keyword">class</span> traits>
+00191         <span class="keyword">friend</span> std::basic_ostream<charT, traits>&
+00192         operator<< (std::basic_ostream<charT, traits> &out, 
+00193                     tbb_thread_v3::id id)
+00194         {
+00195             out << <span class="keywordtype">id</span>.my_id;
+00196             <span class="keywordflow">return</span> out;
+00197         }
+00198         <span class="keyword">friend</span> tbb_thread_v3::id thread_get_id_v3();
+00199     }; <span class="comment">// tbb_thread_v3::id</span>
+00200 
+00201     tbb_thread_v3::id tbb_thread_v3::get_id()<span class="keyword"> const </span>{
+00202 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00203 <span class="preprocessor"></span>        <span class="keywordflow">return</span> id(my_thread_id);
+00204 <span class="preprocessor">#else</span>
+00205 <span class="preprocessor"></span>        <span class="keywordflow">return</span> id(my_handle);
+00206 <span class="preprocessor">#endif // _WIN32||_WIN64</span>
+00207 <span class="preprocessor"></span>    }
+00208     <span class="keywordtype">void</span> move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 );
+00209     tbb_thread_v3::id thread_get_id_v3();
+00210     <span class="keywordtype">void</span> thread_yield_v3();
+00211     <span class="keywordtype">void</span> thread_sleep_v3(<span class="keyword">const</span> tick_count::interval_t &i);
+00212 
+00213     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(tbb_thread_v3::id x, tbb_thread_v3::id y)
+00214     {
+00215         <span class="keywordflow">return</span> x.my_id == y.my_id;
+00216     }
+00217     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(tbb_thread_v3::id x, tbb_thread_v3::id y)
+00218     {
+00219         <span class="keywordflow">return</span> x.my_id != y.my_id;
+00220     }
+00221     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator<(tbb_thread_v3::id x, tbb_thread_v3::id y)
+00222     {
+00223         <span class="keywordflow">return</span> x.my_id < y.my_id;
+00224     }
+00225     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator<=(tbb_thread_v3::id x, tbb_thread_v3::id y)
+00226     {
+00227         <span class="keywordflow">return</span> x.my_id <= y.my_id;
+00228     }
+00229     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator>(tbb_thread_v3::id x, tbb_thread_v3::id y)
+00230     {
+00231         <span class="keywordflow">return</span> x.my_id > y.my_id;
+00232     }
+00233     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator>=(tbb_thread_v3::id x, tbb_thread_v3::id y)
+00234     {
+00235         <span class="keywordflow">return</span> x.my_id >= y.my_id;
+00236     }
+00237 
+00238 } <span class="comment">// namespace internal;</span>
+00239 
+<a name="l00241"></a><a class="code" href="a00278.html#a7">00241</a> <span class="keyword">typedef</span> <a class="code" href="a00234.html">internal::tbb_thread_v3</a> <a class="code" href="a00234.html">tbb_thread</a>;
+00242 
+00243 <span class="keyword">using</span> internal::operator==;
+00244 <span class="keyword">using</span> internal::operator!=;
+00245 <span class="keyword">using</span> internal::operator<;
+00246 <span class="keyword">using</span> internal::operator>;
+00247 <span class="keyword">using</span> internal::operator<=;
+00248 <span class="keyword">using</span> internal::operator>=;
+00249 
+00250 <span class="keyword">inline</span> <span class="keywordtype">void</span> move( tbb_thread& t1, tbb_thread& t2 ) {
+00251     internal::move_v3(t1, t2);
+00252 }
+00253 
+00254 <span class="keyword">inline</span> <span class="keywordtype">void</span> swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ) {
+00255     tbb::tbb_thread::native_handle_type h = t1.my_handle;
+00256     t1.my_handle = t2.my_handle;
+00257     t2.my_handle = h;
+00258 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00259 <span class="preprocessor"></span>    DWORD i = t1.my_thread_id;
+00260     t1.my_thread_id = t2.my_thread_id;
+00261     t2.my_thread_id = i;
+00262 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+00263 }
+00264 
+00265 <span class="keyword">namespace </span>this_tbb_thread {
+00266     <span class="keyword">inline</span> tbb_thread::id get_id() { <span class="keywordflow">return</span> internal::thread_get_id_v3(); }
+00268     <span class="keyword">inline</span> <span class="keywordtype">void</span> yield() { internal::thread_yield_v3(); }
+00270     <span class="keyword">inline</span> <span class="keywordtype">void</span> sleep(<span class="keyword">const</span> tick_count::interval_t &i) { 
+00271         internal::thread_sleep_v3(i);  
+00272     }
+00273 }  <span class="comment">// namespace this_tbb_thread</span>
+00274 
+00275 } <span class="comment">// namespace tbb</span>
+00276 
+00277 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_thread_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/a00315.html b/doc/html/a00315.html
new file mode 100644
index 0000000..4e4d234
--- /dev/null
+++ b/doc/html/a00315.html
@@ -0,0 +1,151 @@
+<!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>tick_count.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>tick_count.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
+00002 <span class="comment">    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.</span>
+00003 <span class="comment"></span>
+00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+00011 <span class="comment">    Intel's prior express written permission.</span>
+00012 <span class="comment"></span>
+00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+00018 <span class="comment">    writing.</span>
+00019 <span class="comment">*/</span>
+00020 
+00021 <span class="preprocessor">#ifndef __TBB_tick_count_H</span>
+00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tick_count_H</span>
+00023 <span class="preprocessor"></span>
+00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+00025 
+00026 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00027 <span class="preprocessor"></span><span class="preprocessor">#include <windows.h></span>
+00028 <span class="preprocessor">#elif __linux__</span>
+00029 <span class="preprocessor"></span><span class="preprocessor">#include <ctime></span>
+00030 <span class="preprocessor">#include <stdio.h></span>
+00031 <span class="preprocessor">#else </span><span class="comment">/* generic Unix */</span>
+00032 <span class="preprocessor">#include <sys/time.h></span>
+00033 <span class="preprocessor">#endif </span><span class="comment">/* (choice of OS) */</span>
+00034 
+00035 <span class="keyword">namespace </span>tbb {
+00036 
+00038 
+<a name="l00039"></a><a class="code" href="a00236.html">00039</a> <span class="keyword">class </span><a class="code" href="a00236.html">tick_count</a> {
+00040 <span class="keyword">public</span>:
+<a name="l00042"></a><a class="code" href="a00237.html">00042</a>     <span class="keyword">class </span><a class="code" href="a00237.html">interval_t</a> {
+00043         <span class="keywordtype">long</span> <span class="keywordtype">long</span> value;
+00044         <span class="keyword">explicit</span> <a class="code" href="a00237.html">interval_t</a>( <span class="keywordtype">long</span> <span class="keywordtype">long</span> value_ ) : value(value_) {}
+00045     <span class="keyword">public</span>:
+<a name="l00047"></a><a class="code" href="a00237.html#a0">00047</a>         <a class="code" href="a00237.html">interval_t</a>() : value(0) {};
+00048 
+00050         <span class="keyword">explicit</span> <a class="code" href="a00237.html">interval_t</a>( <span class="keywordtype">double</span> sec );
+00051 
+00053         <span class="keywordtype">double</span> seconds() <span class="keyword">const</span>;
+00054 
+00055         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00236.html">tbb::tick_count</a>;
+00056 
+00058         <span class="keyword">friend</span> <a class="code" href="a00237.html">interval_t</a> <a class="code" href="a00236.html#n0">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00236.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00236.html">tick_count</a>& t0 );
+00059 
+<a name="l00061"></a><a class="code" href="a00237.html#n2">00061</a>         <span class="keyword">friend</span> <a class="code" href="a00237.html">interval_t</a> operator+( <span class="keyword">const</span> <a class="code" href="a00237.html">interval_t</a>& i, <span class="keyword">const</span> <a class="code" href="a00237.html">interval_t</a>& j ) {
+00062             <span class="keywordflow">return</span> <a class="code" href="a00237.html">interval_t</a>(i.<a class="code" href="a00237.html#r0">value</a>+j.<a class="code" href="a00237.html#r0">value</a>);
+00063         }
+00064 
+<a name="l00066"></a><a class="code" href="a00237.html#n3">00066</a>         <span class="keyword">friend</span> <a class="code" href="a00237.html">interval_t</a> <a class="code" href="a00236.html#n0">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00237.html">interval_t</a>& i, <span class="keyword">const</span> <a class="code" href="a00237.html">interval_t</a>& j ) {
+00067             <span class="keywordflow">return</span> <a class="code" href="a00237.html">interval_t</a>(i.<a class="code" href="a00237.html#r0">value</a>-j.<a class="code" href="a00237.html#r0">value</a>);
+00068         }
+00069 
+<a name="l00071"></a><a class="code" href="a00237.html#a3">00071</a>         <a class="code" href="a00237.html">interval_t</a>& operator+=( <span class="keyword">const</span> <a class="code" href="a00237.html">interval_t</a>& i ) {value += i.<a class="code" href="a00237.html#r0">value</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>;}
+00072 
+<a name="l00074"></a><a class="code" href="a00237.html#a4">00074</a>         <a class="code" href="a00237.html">interval_t</a>& operator-=( <span class="keyword">const</span> <a class="code" href="a00237.html">interval_t</a>& i ) {value -= i.<a class="code" href="a00237.html#r0">value</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>;}
+00075     };
+00076     
+<a name="l00078"></a><a class="code" href="a00236.html#a0">00078</a>     <a class="code" href="a00236.html#a0">tick_count</a>() : my_count(0) {};
+00079 
+00081     <span class="keyword">static</span> <a class="code" href="a00236.html">tick_count</a> <a class="code" href="a00236.html#e0">now</a>();
+00082     
+00084     <span class="keyword">friend</span> interval_t <a class="code" href="a00236.html#n0">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00236.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00236.html">tick_count</a>& t0 );
+00085 
+00086 <span class="keyword">private</span>:
+00087     <span class="keywordtype">long</span> <span class="keywordtype">long</span> my_count;
+00088 };
+00089 
+<a name="l00090"></a><a class="code" href="a00236.html#e0">00090</a> <span class="keyword">inline</span> <a class="code" href="a00236.html">tick_count</a> <a class="code" href="a00236.html#e0">tick_count::now</a>() {
+00091     <a class="code" href="a00236.html">tick_count</a> result;
+00092 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00093 <span class="preprocessor"></span>    LARGE_INTEGER qpcnt;
+00094     QueryPerformanceCounter(&qpcnt);
+00095     result.<a class="code" href="a00236.html#r0">my_count</a> = qpcnt.QuadPart;
+00096 <span class="preprocessor">#elif __linux__</span>
+00097 <span class="preprocessor"></span>    <span class="keyword">struct </span>timespec ts;
+00098 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00099 <span class="preprocessor"></span>    <span class="keywordtype">int</span> status = 
+00100 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00101         clock_gettime( CLOCK_REALTIME, &ts );
+00102     __TBB_ASSERT( status==0, <span class="stringliteral">"CLOCK_REALTIME not supported"</span> );
+00103     result.<a class="code" href="a00236.html#r0">my_count</a> = static_cast<long long>(1000000000UL)*static_cast<long long>(ts.tv_sec) + static_cast<long long>(ts.tv_nsec);
+00104 <span class="preprocessor">#else </span><span class="comment">/* generic Unix */</span>
+00105     <span class="keyword">struct </span>timeval tv;
+00106 <span class="preprocessor">#if TBB_DO_ASSERT</span>
+00107 <span class="preprocessor"></span>    <span class="keywordtype">int</span> status = 
+00108 <span class="preprocessor">#endif </span><span class="comment">/* TBB_DO_ASSERT */</span>
+00109         gettimeofday(&tv, NULL);
+00110     __TBB_ASSERT( status==0, <span class="stringliteral">"gettimeofday failed"</span> );
+00111     result.<a class="code" href="a00236.html#r0">my_count</a> = static_cast<long long>(1000000)*static_cast<long long>(tv.tv_sec) + static_cast<long long>(tv.tv_usec);
+00112 <span class="preprocessor">#endif </span><span class="comment">/*(choice of OS) */</span>
+00113     <span class="keywordflow">return</span> result;
+00114 }
+00115 
+<a name="l00116"></a><a class="code" href="a00237.html#a1">00116</a> <span class="keyword">inline</span> tick_count::interval_t::interval_t( <span class="keywordtype">double</span> sec )
+00117 {
+00118 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00119 <span class="preprocessor"></span>    LARGE_INTEGER qpfreq;
+00120     QueryPerformanceFrequency(&qpfreq);
+00121     value = static_cast<long long>(sec*qpfreq.QuadPart);
+00122 <span class="preprocessor">#elif __linux__</span>
+00123 <span class="preprocessor"></span>    value = static_cast<long long>(sec*1E9);
+00124 <span class="preprocessor">#else </span><span class="comment">/* generic Unix */</span>
+00125     value = static_cast<long long>(sec*1E6);
+00126 <span class="preprocessor">#endif </span><span class="comment">/* (choice of OS) */</span>
+00127 }
+00128 
+<a name="l00129"></a><a class="code" href="a00236.html#n0">00129</a> <span class="keyword">inline</span> <a class="code" href="a00237.html">tick_count::interval_t</a> <a class="code" href="a00236.html#n0">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00236.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00236.html">tick_count</a>& t0 ) {
+00130     <span class="keywordflow">return</span> <a class="code" href="a00237.html">tick_count::interval_t</a>( t1.<a class="code" href="a00236.html#r0">my_count</a>-t0.<a class="code" href="a00236.html#r0">my_count</a> );
+00131 }
+00132 
+<a name="l00133"></a><a class="code" href="a00237.html#a2">00133</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> tick_count::interval_t::seconds()<span class="keyword"> const </span>{
+00134 <span class="preprocessor">#if _WIN32||_WIN64</span>
+00135 <span class="preprocessor"></span>    LARGE_INTEGER qpfreq;
+00136     QueryPerformanceFrequency(&qpfreq);
+00137     <span class="keywordflow">return</span> value/(double)qpfreq.QuadPart;
+00138 <span class="preprocessor">#elif __linux__</span>
+00139 <span class="preprocessor"></span>    <span class="keywordflow">return</span> value*1E-9;
+00140 <span class="preprocessor">#else </span><span class="comment">/* generic Unix */</span>
+00141     <span class="keywordflow">return</span> value*1E-6;
+00142 <span class="preprocessor">#endif </span><span class="comment">/* (choice of OS) */</span>
+00143 }
+00144 
+00145 } <span class="comment">// namespace tbb</span>
+00146 
+00147 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tick_count_H */</span>
+00148 
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2008 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/annotated.html b/doc/html/annotated.html
new file mode 100644
index 0000000..5b12c6d
--- /dev/null
+++ b/doc/html/annotated.html
@@ -0,0 +1,99 @@
+<!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>Class List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindexHL" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<h1>Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
+  <tr><td class="indexkey"><a class="el" href="a00162.html">tbb::affinity_partitioner</a></td><td class="indexvalue">An affinity partitioner </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a></td><td class="indexvalue">Defines entry points into tbb run-time library; </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00164.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="a00165.html">tbb::atomic< T ></a></td><td class="indexvalue">Primary template for atomic </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00166.html">tbb::internal::AtomicBackoff</a></td><td class="indexvalue">Class that implements exponential backoff </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00167.html">tbb::auto_partitioner</a></td><td class="indexvalue">An auto partitioner </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00168.html">tbb::bad_last_alloc</a></td><td class="indexvalue">Exception for concurrent containers </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00169.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="a00170.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="a00171.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="a00172.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="a00173.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="a00174.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="a00175.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="a00176.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="a00177.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="a00178.html">tbb::internal::concurrent_queue_base_v3</a></td><td class="indexvalue">For internal use only </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00179.html">tbb::internal::concurrent_queue_base_v3::page</a></td><td class="indexvalue">Prefix on a page </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a></td><td class="indexvalue">Meets requirements of a forward iterator for STL </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a></td><td class="indexvalue">Type-independent portion of <a class="el" href="a00180.html">concurrent_queue_iterator</a> </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a></td><td class="indexvalue">Concurrent vector container </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a></td><td class="indexvalue">Base class of concurrent vector implementation </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00184.html">tbb::internal::concurrent_vector_base_v3::internal_segments_table</a></td><td class="indexvalue">Internal structure for compact() </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00185.html">tbb::internal::do_group_task_forward< Iterator, Body, Item ></a></td><td class="indexvalue">For internal use only </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00186.html">tbb::internal::do_iteration_task< Body, Item ></a></td><td class="indexvalue">For internal use only </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00187.html">tbb::internal::do_task_iter< Iterator, Body, Item ></a></td><td class="indexvalue">For internal use only </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00188.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="a00189.html">tbb::filter</a></td><td class="indexvalue">A stage in a pipeline </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00190.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="a00191.html">tbb::internal::final_sum< Range, Body ></a></td><td class="indexvalue">Performs final scan for a leaf </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00192.html">tbb::internal::finish_reduce< Body ></a></td><td class="indexvalue">Task type use to combine the partial results of parallel_reduce </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00193.html">tbb::internal::finish_reduce_with_affinity< Body ></a></td><td class="indexvalue">Task type use to combine the partial results of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a> </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a></td><td class="indexvalue">Combine partial results </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00195.html">tbb::internal::hash_map_base</a></td><td class="indexvalue">Base class of <a class="el" href="a00174.html">concurrent_hash_map</a> </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a></td><td class="indexvalue">Meets requirements of a forward iterator for STL */ </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a></td><td class="indexvalue">Range class used with <a class="el" href="a00174.html">concurrent_hash_map</a> </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00198.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="a00199.html">tbb::mutex::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00200.html">tbb::internal::no_copy</a></td><td class="indexvalue">Base class for types that should not be copied or assigned </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00201.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="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a></td><td class="indexvalue">For internal use only </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00203.html">tbb::internal::parallel_do_operator_selector< Body, Item ></a></td><td class="indexvalue">For internal use only </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00204.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="a00205.html">tbb::internal::partition_type_base</a></td><td class="indexvalue">Provides default methods for partition objects without affinity </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00206.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="a00207.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="a00208.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="a00209.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="a00210.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="a00211.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="a00212.html">tbb::internal::quick_sort_body< RandomAccessIterator, Compare ></a></td><td class="indexvalue">Body class used to sort elements in a range that is smaller than the grainsize </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a></td><td class="indexvalue">Range used in quicksort to split elements into subranges based on a value </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00214.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="a00215.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="a00216.html">tbb::simple_partitioner</a></td><td class="indexvalue">A simple partitioner </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00217.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="a00218.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="a00219.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="a00220.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="a00221.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="a00222.html">tbb::internal::start_for< Range, Body, Partitioner ></a></td><td class="indexvalue">Task type used in parallel_for </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00223.html">tbb::internal::start_reduce< Range, Body, Partitioner ></a></td><td class="indexvalue">Task type used to split the work of parallel_reduce </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00224.html">tbb::internal::start_reduce_with_affinity< Range, Body ></a></td><td class="indexvalue">Task type used to split the work of parallel_reduce with <a class="el" href="a00162.html">affinity_partitioner</a> </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a></td><td class="indexvalue">Initial task to split the work </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00226.html">tbb::internal::strip< T ></a></td><td class="indexvalue">Strips its template type argument from 'cv' and '&' qualifiers </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a></td><td class="indexvalue">Split work to be done in the scan </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00228.html">tbb::task</a></td><td class="indexvalue">Base class for user-defined tasks </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00229.html">tbb::task_list</a></td><td class="indexvalue">A list of children </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00230.html">tbb::internal::task_prefix</a></td><td class="indexvalue">Memory prefix to a task object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00231.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="a00232.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="a00233.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="a00234.html">tbb::internal::tbb_thread_v3</a></td><td class="indexvalue">Versioned thread class </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a></td><td class="indexvalue">Structure used to pass user function with 1 argument to thread </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00236.html">tbb::tick_count</a></td><td class="indexvalue">Absolute timestamp </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00237.html">tbb::tick_count::interval_t</a></td><td class="indexvalue">Relative time interval </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a></td><td class="indexvalue">Meets requirements of a forward iterator for STL and a Value for a <a class="el" href="a00169.html">blocked_range</a>.*/ </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00239.html">tbb::internal::version_tag_v3</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00240.html">tbb::internal::while_group_task< Body ></a></td><td class="indexvalue">For internal use only </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00241.html">tbb::internal::while_iteration_task< Body ></a></td><td class="indexvalue">For internal use only </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00242.html">tbb::internal::while_task< Stream, Body ></a></td><td class="indexvalue">For internal use only </td></tr>
+</table>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/concepts.html b/doc/html/concepts.html
new file mode 100644
index 0000000..65c3761
--- /dev/null
+++ b/doc/html/concepts.html
@@ -0,0 +1,20 @@
+<!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 concepts</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1><a class="anchor" name="concepts">TBB concepts</a></h1>A concept is a set of requirements to a type, which are necessary and sufficient for the type to model a particular behavior or a set of behaviors. Some concepts are specific to a particular algorithm (e.g. algorithm body), while other ones are common to several algorithms (e.g. range concept).<p>
+All TBB algorithms make use of different classes implementing various concepts. Implementation classes are supplied by the user as type arguments of template parameters and/or as objects passed as function call arguments. The library provides predefined implementations of some concepts (e.g. several kinds of <a class="el" href="range_req.html">ranges</a>), while other ones must always be implemented by the user.<p>
+TBB defines a set of minimal requirements each concept must conform to. Here is the list of different concepts hyperlinked to the corresponding requirements specifications:<ul>
+<li>range_req</li><li>parallel_do_body_req</li><li>parallel_for_body_req</li><li>parallel_reduce_body_req</li><li>parallel_scan_body_req</li><li>parallel_sort_iter_req </li></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/doxygen.css b/doc/html/doxygen.css
new file mode 100644
index 0000000..1d4d631
--- /dev/null
+++ b/doc/html/doxygen.css
@@ -0,0 +1,271 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+H1 {
+	text-align: center;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+DIV.nav {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+A.qindex {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D;
+}
+A.qindex:visited {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D
+}
+A.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+}
+A.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
+A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
+A.codeRef:link { font-weight: normal; color: #0000FF}
+A.codeRef:visited { font-weight: normal; color: #0000FF}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+.fragment {
+       font-family: monospace
+}
+PRE.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md { background-color: #F4F4FB; font-weight: bold; }
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 14px }
+BODY {
+	background: white;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+TD.indexkey {
+	background-color: #eeeeff;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+	background-color: #eeeeff;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TR.memlist {
+   background-color: #f0f0f0; 
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword       { color: #008000 }
+SPAN.keywordtype   { color: #604020 }
+SPAN.keywordflow   { color: #e08000 }
+SPAN.comment       { color: #800000 }
+SPAN.preprocessor  { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral   { color: #008080 }
+.mdTable {
+	border: 1px solid #868686;
+	background-color: #F4F4FB;
+}
+.mdRow {
+	padding: 8px 10px;
+}
+.mdescLeft {
+       padding: 0px 8px 4px 8px;
+	font-size: 12px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+       padding: 0px 8px 4px 8px;
+	font-size: 12px;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 12px;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 13px;
+}
+.memTemplItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 12px;
+}
+.memTemplItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 13px;
+}
+.memTemplParams {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+       color: #606060;
+	background-color: #FAFAFA;
+	font-size: 12px;
+}
+.search     { color: #003399;
+              font-weight: bold;
+}
+FORM.search {
+              margin-bottom: 0px;
+              margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+               color: #000080;
+               font-weight: normal;
+               background-color: #eeeeff;
+}
+TD.tiny      { font-size: 75%;
+}
+a {
+	color: #252E78;
+}
+a:visited {
+	color: #3D2185;
+}
diff --git a/doc/html/files.html b/doc/html/files.html
new file mode 100644
index 0000000..327daa9
--- /dev/null
+++ b/doc/html/files.html
@@ -0,0 +1,52 @@
+<!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>File Index</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindexHL" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<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="a00282.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>aligned_space.h</b> <a href="a00283.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>atomic.h</b> <a href="a00284.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>blocked_range.h</b> <a href="a00285.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>blocked_range2d.h</b> <a href="a00286.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>blocked_range3d.h</b> <a href="a00287.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>cache_aligned_allocator.h</b> <a href="a00288.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>concurrent_hash_map.h</b> <a href="a00289.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>concurrent_queue.h</b> <a href="a00290.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>concurrent_vector.h</b> <a href="a00291.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>mutex.h</b> <a href="a00292.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_do.h</b> <a href="a00293.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_for.h</b> <a href="a00294.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_reduce.h</b> <a href="a00295.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_scan.h</b> <a href="a00296.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_sort.h</b> <a href="a00297.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_while.h</b> <a href="a00298.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>partitioner.h</b> <a href="a00299.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>pipeline.h</b> <a href="a00300.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>queuing_mutex.h</b> <a href="a00301.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>queuing_rw_mutex.h</b> <a href="a00302.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>recursive_mutex.h</b> <a href="a00303.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>scalable_allocator.h</b> <a href="a00304.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>spin_mutex.h</b> <a href="a00305.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>spin_rw_mutex.h</b> <a href="a00306.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>task.h</b> <a href="a00307.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>task_scheduler_init.h</b> <a href="a00308.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>task_scheduler_observer.h</b> <a href="a00309.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_allocator.h</b> <a href="a00310.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_exception.h</b> <a href="a00311.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_machine.h</b> <a href="a00312.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_stddef.h</b> <a href="a00313.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_thread.h</b> <a href="a00314.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tick_count.h</b> <a href="a00315.html">[code]</a></td><td class="indexvalue"></td></tr>
+</table>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/functions.html b/doc/html/functions.html
new file mode 100644
index 0000000..658e110
--- /dev/null
+++ b/doc/html/functions.html
@@ -0,0 +1,250 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Class Members</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindexHL" href="functions.htm [...]
+<div class="qindex"><a class="qindexHL" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a> | <a class="qindex" href="functions_type.html">Typedefs</a> | <a class="qindex" href="functions_enum.html">Enumerations</a> | <a class="qindex" href="functions_eval.html">Enumeration values</a> | <a class="qindex" href="functions_rela.html">Related Functions</a></div>
+<div class="qindex"><a class="qindex" href="#index_a">a</a> | <a class="qindex" href="#index_b">b</a> | <a class="qindex" href="#index_c">c</a> | <a class="qindex" href="#index_d">d</a> | <a class="qindex" href="#index_e">e</a> | <a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_g">g</a> | <a class="qindex" href="#index_h">h</a> | <a class="qindex" href="#index_i">i</a> | <a class="qindex" href="#index_j">j</a> | <a class="qindex" href="#index_m">m</a> | <a class=" [...]
+
+<p>
+
+<p>
+Here is a list of all documented class members with links to the class documentation for each member:<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
+<li>acquire()
+: <a class="el" href="a00220.html#a3">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a2">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a3">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a3">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a3">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a3">tbb::mutex::scoped_lock</a><li>add()
+: <a class="el" href="a00204.html#a3">tbb::parallel_while< Body ></a>, <a class="el" href="a00201.html#a0">tbb::parallel_do_feeder< Item ></a><li>add_filter()
+: <a class="el" href="a00206.html#a2">tbb::pipeline</a><li>add_to_depth()
+: <a class="el" href="a00228.html#a12">tbb::task</a><li>advance()
+: <a class="el" href="a00181.html#b4">tbb::internal::concurrent_queue_iterator_base_v3</a><li>affinity()
+: <a class="el" href="a00228.html#a25">tbb::task</a><li>affinity_id
+: <a class="el" href="a00228.html#w1">tbb::task</a><li>allocate()
+: <a class="el" href="a00232.html#a5">tbb::tbb_allocator< T ></a>, <a class="el" href="a00172.html#a5">tbb::cache_aligned_allocator< T ></a><li>allocate_additional_child_of()
+: <a class="el" href="a00228.html#a4">tbb::task</a><li>allocate_child()
+: <a class="el" href="a00228.html#a3">tbb::task</a><li>allocate_continuation()
+: <a class="el" href="a00228.html#a2">tbb::task</a><li>allocate_page()
+: <a class="el" href="a00178.html#b8">tbb::internal::concurrent_queue_base_v3</a><li>allocate_root()
+: <a class="el" href="a00228.html#e0">tbb::task</a><li>allocated
+: <a class="el" href="a00228.html#w8w5">tbb::task</a><li>allocator_type
+: <a class="el" href="a00232.html#e0">tbb::tbb_allocator< T ></a>, <a class="el" href="a00177.html#w1">tbb::concurrent_queue< T, A ></a><li>assign()
+: <a class="el" href="a00182.html#a38">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00181.html#b3">tbb::internal::concurrent_queue_iterator_base_v3</a><li>at()
+: <a class="el" href="a00182.html#a15">tbb::concurrent_vector< T, A ></a><li>automatic
+: <a class="el" href="a00231.html#s0">tbb::task_scheduler_init</a></ul>
+<h3><a class="anchor" name="index_b">- b -</a></h3><ul>
+<li>back()
+: <a class="el" href="a00182.html#a35">tbb::concurrent_vector< T, A ></a><li>begin()
+: <a class="el" href="a00182.html#a26">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00169.html#a2">tbb::blocked_range< Value ></a>, <a class="el" href="a00164.html#a0">tbb::aligned_space< T, N ></a><li>blocked_range()
+: <a class="el" href="a00169.html#a8">tbb::blocked_range< Value ></a></ul>
+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>
+<li>capacity()
+: <a class="el" href="a00182.html#a20">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a8">tbb::concurrent_queue< T, A ></a><li>clear()
+: <a class="el" href="a00229.html#a5">tbb::task_list</a>, <a class="el" href="a00206.html#a4">tbb::pipeline</a>, <a class="el" href="a00182.html#a40">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a11">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00174.html#a4">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>cols()
+: <a class="el" href="a00171.html#a7">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00170.html#a6">tbb::blocked_range2d< RowValue, ColValue ></a><li>compact()
+: <a class="el" href="a00182.html#a22">tbb::concurrent_vector< T, A ></a><li>concurrent_hash_map()
+: <a class="el" href="a00174.html#a2">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>concurrent_queue()
+: <a class="el" href="a00177.html#a0">tbb::concurrent_queue< T, A ></a><li>concurrent_queue_iterator()
+: <a class="el" href="a00180.html#a1">tbb::internal::concurrent_queue_iterator< Container, Value ></a><li>concurrent_queue_iterator_base_v3()
+: <a class="el" href="a00181.html#b2">tbb::internal::concurrent_queue_iterator_base_v3</a><li>concurrent_vector()
+: <a class="el" href="a00182.html#a5">tbb::concurrent_vector< T, A ></a><li>const_accessor()
+: <a class="el" href="a00176.html#a4">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>const_iterator
+: <a class="el" href="a00169.html#w0">tbb::blocked_range< Value ></a><li>const_reference
+: <a class="el" href="a00177.html#w3">tbb::concurrent_queue< T, A ></a><li>construct()
+: <a class="el" href="a00232.html#a8">tbb::tbb_allocator< T ></a>, <a class="el" href="a00172.html#a8">tbb::cache_aligned_allocator< T ></a><li>count()
+: <a class="el" href="a00174.html#a19">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></ul>
+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
+<li>deallocate()
+: <a class="el" href="a00232.html#a6">tbb::tbb_allocator< T ></a>, <a class="el" href="a00172.html#a6">tbb::cache_aligned_allocator< T ></a><li>deallocate_page()
+: <a class="el" href="a00178.html#b9">tbb::internal::concurrent_queue_base_v3</a><li>default_num_threads()
+: <a class="el" href="a00231.html#e0">tbb::task_scheduler_init</a><li>deferred
+: <a class="el" href="a00231.html#s1">tbb::task_scheduler_init</a><li>depth()
+: <a class="el" href="a00228.html#a10">tbb::task</a><li>depth_type
+: <a class="el" href="a00228.html#w0">tbb::task</a><li>destroy()
+: <a class="el" href="a00232.html#a9">tbb::tbb_allocator< T ></a>, <a class="el" href="a00228.html#a5">tbb::task</a>, <a class="el" href="a00172.html#a9">tbb::cache_aligned_allocator< T ></a><li>detach()
+: <a class="el" href="a00234.html#a6">tbb::internal::tbb_thread_v3</a><li>difference_type
+: <a class="el" href="a00177.html#w5">tbb::concurrent_queue< T, A ></a><li>downgrade_to_reader()
+: <a class="el" href="a00220.html#a6">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00211.html#a7">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="a00229.html#a2">tbb::task_list</a>, <a class="el" href="a00182.html#a19">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a7">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00174.html#a15">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00176.html#a0">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>, <a class="el" href="a00197.html#a0">tbb::internal::hash_map_range [...]
+: <a class="el" href="a00182.html#a27">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00169.html#a3">tbb::blocked_range< Value ></a>, <a class="el" href="a00164.html#a1">tbb::aligned_space< T, N ></a><li>erase()
+: <a class="el" href="a00174.html#a30">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>execute()
+: <a class="el" href="a00228.html#a1">tbb::task</a>, <a class="el" href="a00194.html#a0">tbb::internal::finish_scan< Range, Body ></a><li>executing
+: <a class="el" href="a00228.html#w8w2">tbb::task</a></ul>
+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
+<li>find()
+: <a class="el" href="a00174.html#a21">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>freed
+: <a class="el" href="a00228.html#w8w6">tbb::task</a><li>front()
+: <a class="el" href="a00182.html#a33">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="a00182.html#a36">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a10">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00174.html#a17">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>grainsize()
+: <a class="el" href="a00197.html#a7">tbb::internal::hash_map_range< Iterator ></a>, <a class="el" href="a00169.html#a5">tbb::blocked_range< Value ></a><li>grow_by()
+: <a class="el" href="a00182.html#a9">tbb::concurrent_vector< T, A ></a><li>grow_to_at_least()
+: <a class="el" href="a00182.html#a10">tbb::concurrent_vector< T, A ></a></ul>
+<h3><a class="anchor" name="index_h">- h -</a></h3><ul>
+<li>hardware_concurrency()
+: <a class="el" href="a00234.html#e0">tbb::internal::tbb_thread_v3</a><li>hash_map_iterator()
+: <a class="el" href="a00196.html#a0">tbb::internal::hash_map_iterator< Container, Value ></a><li>hash_map_range()
+: <a class="el" href="a00197.html#a4">tbb::internal::hash_map_range< Iterator ></a><li>hashcode_t
+: <a class="el" href="a00195.html#w3">tbb::internal::hash_map_base</a></ul>
+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
+<li>initialize()
+: <a class="el" href="a00231.html#a1">tbb::task_scheduler_init</a><li>insert()
+: <a class="el" href="a00174.html#a27">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>internal_array_op1
+: <a class="el" href="a00183.html#x2">tbb::internal::concurrent_vector_base_v3</a><li>internal_array_op2
+: <a class="el" href="a00183.html#x3">tbb::internal::concurrent_vector_base_v3</a><li>internal_finish_clear()
+: <a class="el" href="a00178.html#b10">tbb::internal::concurrent_queue_base_v3</a><li>internal_pop()
+: <a class="el" href="a00178.html#b3">tbb::internal::concurrent_queue_base_v3</a><li>internal_pop_if_present()
+: <a class="el" href="a00178.html#b5">tbb::internal::concurrent_queue_base_v3</a><li>internal_push()
+: <a class="el" href="a00178.html#b2">tbb::internal::concurrent_queue_base_v3</a><li>internal_push_if_not_full()
+: <a class="el" href="a00178.html#b4">tbb::internal::concurrent_queue_base_v3</a><li>internal_set_capacity()
+: <a class="el" href="a00178.html#b7">tbb::internal::concurrent_queue_base_v3</a><li>internal_size()
+: <a class="el" href="a00178.html#b6">tbb::internal::concurrent_queue_base_v3</a><li>internal_throw_exception()
+: <a class="el" href="a00178.html#b11">tbb::internal::concurrent_queue_base_v3</a><li>interval_t()
+: <a class="el" href="a00237.html#a1">tbb::tick_count::interval_t</a><li>is_divisible()
+: <a class="el" href="a00197.html#a1">tbb::internal::hash_map_range< Iterator ></a>, <a class="el" href="a00171.html#a3">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00170.html#a3">tbb::blocked_range2d< RowValue, ColValue ></a>, <a class="el" href="a00169.html#a7">tbb::blocked_range< Value ></a><li>is_owned_by_current_thread()
+: <a class="el" href="a00228.html#a23">tbb::task</a><li>is_serial()
+: <a class="el" href="a00189.html#a0">tbb::filter</a><li>is_stolen_task()
+: <a class="el" href="a00228.html#a20">tbb::task</a><li>item_size
+: <a class="el" href="a00178.html#p2">tbb::internal::concurrent_queue_base_v3</a><li>items_per_page
+: <a class="el" href="a00178.html#p1">tbb::internal::concurrent_queue_base_v3</a></ul>
+<h3><a class="anchor" name="index_j">- j -</a></h3><ul>
+<li>join()
+: <a class="el" href="a00234.html#a5">tbb::internal::tbb_thread_v3</a></ul>
+<h3><a class="anchor" name="index_m">- m -</a></h3><ul>
+<li>malloc_type
+: <a class="el" href="a00232.html#w9">tbb::tbb_allocator< T ></a><li>max_physical_size
+: <a class="el" href="a00195.html#s2">tbb::internal::hash_map_base</a><li>max_size()
+: <a class="el" href="a00232.html#a7">tbb::tbb_allocator< T ></a>, <a class="el" href="a00182.html#a23">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00174.html#a16">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00172.html#a7">tbb::cache_aligned_allocator< T ></a><li>mode
+: <a class="el" href="a00189.html#x2">tbb::filter</a><li>mutex()
+: <a class="el" href="a00198.html#a0">tbb::mutex</a><li>my_capacity
+: <a class="el" href="a00178.html#p0">tbb::internal::concurrent_queue_base_v3</a><li>my_early_size
+: <a class="el" href="a00183.html#p2">tbb::internal::concurrent_vector_base_v3</a><li>my_first_block
+: <a class="el" href="a00183.html#p1">tbb::internal::concurrent_vector_base_v3</a><li>my_item
+: <a class="el" href="a00181.html#p0">tbb::internal::concurrent_queue_iterator_base_v3</a><li>my_segment
+: <a class="el" href="a00183.html#p3">tbb::internal::concurrent_vector_base_v3</a><li>my_storage
+: <a class="el" href="a00183.html#p4">tbb::internal::concurrent_vector_base_v3</a></ul>
+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>
+<li>n_segment
+: <a class="el" href="a00195.html#s1">tbb::internal::hash_map_base</a><li>n_segment_bits
+: <a class="el" href="a00195.html#s0">tbb::internal::hash_map_base</a><li>no_copy()
+: <a class="el" href="a00200.html#a0">tbb::internal::no_copy</a><li>note_affinity()
+: <a class="el" href="a00228.html#a26">tbb::task</a><li>now()
+: <a class="el" href="a00236.html#e0">tbb::tick_count</a></ul>
+<h3><a class="anchor" name="index_o">- o -</a></h3><ul>
+<li>operator *()
+: <a class="el" href="a00180.html#a3">tbb::internal::concurrent_queue_iterator< Container, Value ></a>, <a class="el" href="a00175.html#a0">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00176.html#a2">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>operator()()
+: <a class="el" href="a00189.html#a1">tbb::filter</a><li>operator+
+: <a class="el" href="a00237.html#n2">tbb::tick_count::interval_t</a><li>operator++()
+: <a class="el" href="a00238.html#a11">tbb::internal::vector_iterator< Container, Value ></a>, <a class="el" href="a00180.html#a6">tbb::internal::concurrent_queue_iterator< Container, Value ></a>, <a class="el" href="a00196.html#a5">tbb::internal::hash_map_iterator< Container, Value ></a><li>operator+=()
+: <a class="el" href="a00237.html#a3">tbb::tick_count::interval_t</a><li>operator-
+: <a class="el" href="a00236.html#n0">tbb::tick_count</a>, <a class="el" href="a00237.html#n3">tbb::tick_count::interval_t</a><li>operator--()
+: <a class="el" href="a00238.html#a12">tbb::internal::vector_iterator< Container, Value ></a><li>operator-=()
+: <a class="el" href="a00237.html#a4">tbb::tick_count::interval_t</a><li>operator->()
+: <a class="el" href="a00175.html#a1">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00176.html#a3">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>operator=()
+: <a class="el" href="a00182.html#a7">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00180.html#a2">tbb::internal::concurrent_queue_iterator< Container, Value ></a>, <a class="el" href="a00174.html#a3">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>operator[]()
+: <a class="el" href="a00182.html#a13">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="a00171.html#w0">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>pages()
+: <a class="el" href="a00171.html#a5">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>parallel_while()
+: <a class="el" href="a00204.html#a0">tbb::parallel_while< Body ></a><li>parent()
+: <a class="el" href="a00228.html#a19">tbb::task</a><li>pause()
+: <a class="el" href="a00166.html#a1">tbb::internal::AtomicBackoff</a><li>pipeline()
+: <a class="el" href="a00206.html#a0">tbb::pipeline</a><li>pointers_per_short_table
+: <a class="el" href="a00183.html#x7x5">tbb::internal::concurrent_vector_base_v3</a><li>pop()
+: <a class="el" href="a00177.html#a3">tbb::concurrent_queue< T, A ></a><li>pop_front()
+: <a class="el" href="a00229.html#a4">tbb::task_list</a><li>pop_if_present()
+: <a class="el" href="a00177.html#a5">tbb::concurrent_queue< T, A ></a><li>push()
+: <a class="el" href="a00177.html#a2">tbb::concurrent_queue< T, A ></a><li>push_back()
+: <a class="el" href="a00229.html#a3">tbb::task_list</a>, <a class="el" href="a00182.html#a11">tbb::concurrent_vector< T, A ></a><li>push_if_not_full()
+: <a class="el" href="a00177.html#a4">tbb::concurrent_queue< T, A ></a></ul>
+<h3><a class="anchor" name="index_q">- q -</a></h3><ul>
+<li>queuing_mutex()
+: <a class="el" href="a00208.html#a0">tbb::queuing_mutex</a><li>queuing_rw_mutex()
+: <a class="el" href="a00210.html#a0">tbb::queuing_rw_mutex</a></ul>
+<h3><a class="anchor" name="index_r">- r -</a></h3><ul>
+<li>range()
+: <a class="el" href="a00182.html#a17">tbb::concurrent_vector< T, A ></a><li>rbegin()
+: <a class="el" href="a00182.html#a30">tbb::concurrent_vector< T, A ></a><li>ready
+: <a class="el" href="a00228.html#w8w4">tbb::task</a><li>recursive_mutex()
+: <a class="el" href="a00214.html#a0">tbb::recursive_mutex</a><li>recycle
+: <a class="el" href="a00228.html#w8w7">tbb::task</a><li>recycle_as_child_of()
+: <a class="el" href="a00228.html#a8">tbb::task</a><li>recycle_as_continuation()
+: <a class="el" href="a00228.html#a6">tbb::task</a><li>recycle_as_safe_continuation()
+: <a class="el" href="a00228.html#a7">tbb::task</a><li>recycle_to_reexecute()
+: <a class="el" href="a00228.html#a9">tbb::task</a><li>reexecute
+: <a class="el" href="a00228.html#w8w3">tbb::task</a><li>ref_count()
+: <a class="el" href="a00228.html#a22">tbb::task</a><li>reference
+: <a class="el" href="a00177.html#w2">tbb::concurrent_queue< T, A ></a><li>release()
+: <a class="el" href="a00220.html#a5">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a4">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a5">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a5">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a5">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a5">tbb::mutex::scoped_lock</a>, <a class="el" href="a00176.html#a1">tbb::concurrent_has [...]
+: <a class="el" href="a00182.html#a31">tbb::concurrent_vector< T, A ></a><li>reserve()
+: <a class="el" href="a00182.html#a21">tbb::concurrent_vector< T, A ></a><li>row_range_type
+: <a class="el" href="a00170.html#w0">tbb::blocked_range2d< RowValue, ColValue ></a><li>rows()
+: <a class="el" href="a00171.html#a6">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00170.html#a5">tbb::blocked_range2d< RowValue, ColValue ></a><li>run()
+: <a class="el" href="a00206.html#a3">tbb::pipeline</a>, <a class="el" href="a00204.html#a2">tbb::parallel_while< Body ></a></ul>
+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
+<li>scoped_lock()
+: <a class="el" href="a00220.html#a1">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a1">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a1">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a1">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a1">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a1">tbb::mutex::scoped_lock</a><li>seconds()
+: <a class="el" href="a00237.html#a2">tbb::tick_count::interval_t</a><li>self()
+: <a class="el" href="a00228.html#e3">tbb::task</a><li>set_affinity()
+: <a class="el" href="a00228.html#a24">tbb::task</a><li>set_capacity()
+: <a class="el" href="a00177.html#a9">tbb::concurrent_queue< T, A ></a><li>set_depth()
+: <a class="el" href="a00228.html#a11">tbb::task</a><li>set_ref_count()
+: <a class="el" href="a00228.html#a13">tbb::task</a><li>size()
+: <a class="el" href="a00182.html#a18">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a6">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00174.html#a14">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00169.html#a4">tbb::blocked_range< Value ></a><li>size_type
+: <a class="el" href="a00177.html#w4">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00197.html#w0">tbb::internal::hash_map_range< Iterator ></a>, <a class="el" href="a00169.html#w1">tbb::blocked_range< Value ></a><li>spawn()
+: <a class="el" href="a00228.html#a15">tbb::task</a><li>spawn_and_wait_for_all()
+: <a class="el" href="a00228.html#a17">tbb::task</a><li>spawn_root_and_wait()
+: <a class="el" href="a00228.html#e2">tbb::task</a><li>spin_mutex()
+: <a class="el" href="a00217.html#a0">tbb::spin_mutex</a><li>spin_rw_mutex_v3()
+: <a class="el" href="a00219.html#a0">tbb::spin_rw_mutex_v3</a><li>start_routine()
+: <a class="el" href="a00235.html#e0">tbb::internal::thread_closure_1< F, X ></a><li>state()
+: <a class="el" href="a00228.html#a21">tbb::task</a><li>state_type
+: <a class="el" href="a00228.html#w8">tbb::task</a><li>swap()
+: <a class="el" href="a00182.html#a39">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00174.html#a18">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></ul>
+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>
+<li>task()
+: <a class="el" href="a00228.html#b0">tbb::task</a><li>task_list()
+: <a class="el" href="a00229.html#a0">tbb::task_list</a><li>task_scheduler_init()
+: <a class="el" href="a00231.html#a3">tbb::task_scheduler_init</a><li>tbb_thread_v3()
+: <a class="el" href="a00234.html#a3">tbb::internal::tbb_thread_v3</a><li>terminate()
+: <a class="el" href="a00231.html#a2">tbb::task_scheduler_init</a><li>tick_count()
+: <a class="el" href="a00236.html#a0">tbb::tick_count</a><li>try_acquire()
+: <a class="el" href="a00220.html#a7">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a3">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a4">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a4">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a4">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a4">tbb::mutex::scoped_lock</a></ul>
+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
+<li>upgrade_to_writer()
+: <a class="el" href="a00220.html#a4">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00211.html#a6">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="a00204.html#w0">tbb::parallel_while< Body ></a>, <a class="el" href="a00177.html#w0">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00175.html#w0">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00176.html#w0">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>vector_allocator_ptr
+: <a class="el" href="a00183.html#p0">tbb::internal::concurrent_vector_base_v3</a><li>vector_iterator()
+: <a class="el" href="a00238.html#a0">tbb::internal::vector_iterator< Container, Value ></a></ul>
+<h3><a class="anchor" name="index_w">- w -</a></h3><ul>
+<li>wait_for_all()
+: <a class="el" href="a00228.html#a18">tbb::task</a></ul>
+<h3><a class="anchor" name="index_~">- ~ -</a></h3><ul>
+<li>~concurrent_hash_map()
+: <a class="el" href="a00174.html#a5">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>~concurrent_queue()
+: <a class="el" href="a00177.html#a1">tbb::concurrent_queue< T, A ></a><li>~concurrent_queue_iterator_base_v3()
+: <a class="el" href="a00181.html#b5">tbb::internal::concurrent_queue_iterator_base_v3</a><li>~concurrent_vector()
+: <a class="el" href="a00182.html#a41">tbb::concurrent_vector< T, A ></a><li>~const_accessor()
+: <a class="el" href="a00176.html#a5">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>~filter()
+: <a class="el" href="a00189.html#a2">tbb::filter</a><li>~parallel_while()
+: <a class="el" href="a00204.html#a1">tbb::parallel_while< Body ></a><li>~pipeline()
+: <a class="el" href="a00206.html#a1">tbb::pipeline</a><li>~queuing_rw_mutex()
+: <a class="el" href="a00210.html#a1">tbb::queuing_rw_mutex</a><li>~scoped_lock()
+: <a class="el" href="a00220.html#a2">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a5">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a2">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a2">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a2">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a2">tbb::mutex::scoped_lock</a><li>~task()
+: <a class="el" href="a00228.html#a0">tbb::task</a><li>~task_list()
+: <a class="el" href="a00229.html#a1">tbb::task_list</a><li>~task_scheduler_init()
+: <a class="el" href="a00231.html#a4">tbb::task_scheduler_init</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/functions_enum.html b/doc/html/functions_enum.html
new file mode 100644
index 0000000..bee7b1e
--- /dev/null
+++ b/doc/html/functions_enum.html
@@ -0,0 +1,24 @@
+<!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>Class Members - Enumerations</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindexHL" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a> | <a class="qindex" href="functions_type.html">Typedefs</a> | <a class="qindexHL" href="functions_enum.html">Enumerations</a> | <a class="qindex" href="functions_eval.html">Enumeration values</a> | <a class="qindex" href="functions_rela.html">Related Functions</a></div>
+
+<p>
+<ul>
+<li>malloc_type
+: <a class="el" href="a00232.html#w9">tbb::tbb_allocator< T ></a><li>mode
+: <a class="el" href="a00189.html#x2">tbb::filter</a><li>state_type
+: <a class="el" href="a00228.html#w8">tbb::task</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/functions_eval.html b/doc/html/functions_eval.html
new file mode 100644
index 0000000..ed731fb
--- /dev/null
+++ b/doc/html/functions_eval.html
@@ -0,0 +1,28 @@
+<!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>Class Members - Enumeration values</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindexHL" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a> | <a class="qindex" href="functions_type.html">Typedefs</a> | <a class="qindex" href="functions_enum.html">Enumerations</a> | <a class="qindexHL" href="functions_eval.html">Enumeration values</a> | <a class="qindex" href="functions_rela.html">Related Functions</a></div>
+
+<p>
+<ul>
+<li>allocated
+: <a class="el" href="a00228.html#w8w5">tbb::task</a><li>executing
+: <a class="el" href="a00228.html#w8w2">tbb::task</a><li>freed
+: <a class="el" href="a00228.html#w8w6">tbb::task</a><li>pointers_per_short_table
+: <a class="el" href="a00183.html#x7x5">tbb::internal::concurrent_vector_base_v3</a><li>ready
+: <a class="el" href="a00228.html#w8w4">tbb::task</a><li>recycle
+: <a class="el" href="a00228.html#w8w7">tbb::task</a><li>reexecute
+: <a class="el" href="a00228.html#w8w3">tbb::task</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/functions_func.html b/doc/html/functions_func.html
new file mode 100644
index 0000000..843f297
--- /dev/null
+++ b/doc/html/functions_func.html
@@ -0,0 +1,211 @@
+<!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>Class Members - Functions</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindexHL" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindexHL" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a> | <a class="qindex" href="functions_type.html">Typedefs</a> | <a class="qindex" href="functions_enum.html">Enumerations</a> | <a class="qindex" href="functions_eval.html">Enumeration values</a> | <a class="qindex" href="functions_rela.html">Related Functions</a></div>
+<div class="qindex"><a class="qindex" href="#index_a">a</a> | <a class="qindex" href="#index_b">b</a> | <a class="qindex" href="#index_c">c</a> | <a class="qindex" href="#index_d">d</a> | <a class="qindex" href="#index_e">e</a> | <a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_g">g</a> | <a class="qindex" href="#index_h">h</a> | <a class="qindex" href="#index_i">i</a> | <a class="qindex" href="#index_j">j</a> | <a class="qindex" href="#index_m">m</a> | <a class=" [...]
+
+<p>
+
+<p>
+<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
+<li>acquire()
+: <a class="el" href="a00220.html#a3">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a2">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a3">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a3">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a3">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a3">tbb::mutex::scoped_lock</a><li>add()
+: <a class="el" href="a00204.html#a3">tbb::parallel_while< Body ></a>, <a class="el" href="a00201.html#a0">tbb::parallel_do_feeder< Item ></a><li>add_filter()
+: <a class="el" href="a00206.html#a2">tbb::pipeline</a><li>add_to_depth()
+: <a class="el" href="a00228.html#a12">tbb::task</a><li>advance()
+: <a class="el" href="a00181.html#b4">tbb::internal::concurrent_queue_iterator_base_v3</a><li>affinity()
+: <a class="el" href="a00228.html#a25">tbb::task</a><li>allocate()
+: <a class="el" href="a00232.html#a5">tbb::tbb_allocator< T ></a>, <a class="el" href="a00172.html#a5">tbb::cache_aligned_allocator< T ></a><li>allocate_additional_child_of()
+: <a class="el" href="a00228.html#a4">tbb::task</a><li>allocate_child()
+: <a class="el" href="a00228.html#a3">tbb::task</a><li>allocate_continuation()
+: <a class="el" href="a00228.html#a2">tbb::task</a><li>allocate_page()
+: <a class="el" href="a00178.html#b8">tbb::internal::concurrent_queue_base_v3</a><li>allocate_root()
+: <a class="el" href="a00228.html#e0">tbb::task</a><li>allocator_type()
+: <a class="el" href="a00232.html#e0">tbb::tbb_allocator< T ></a>, <a class="el" href="a00177.html#w1">tbb::concurrent_queue< T, A ></a><li>assign()
+: <a class="el" href="a00182.html#a38">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00181.html#b3">tbb::internal::concurrent_queue_iterator_base_v3</a><li>at()
+: <a class="el" href="a00182.html#a15">tbb::concurrent_vector< T, A ></a></ul>
+<h3><a class="anchor" name="index_b">- b -</a></h3><ul>
+<li>back()
+: <a class="el" href="a00182.html#a35">tbb::concurrent_vector< T, A ></a><li>begin()
+: <a class="el" href="a00182.html#a26">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00169.html#a2">tbb::blocked_range< Value ></a>, <a class="el" href="a00164.html#a0">tbb::aligned_space< T, N ></a><li>blocked_range()
+: <a class="el" href="a00169.html#a8">tbb::blocked_range< Value ></a></ul>
+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>
+<li>capacity()
+: <a class="el" href="a00182.html#a20">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a8">tbb::concurrent_queue< T, A ></a><li>clear()
+: <a class="el" href="a00229.html#a5">tbb::task_list</a>, <a class="el" href="a00206.html#a4">tbb::pipeline</a>, <a class="el" href="a00182.html#a40">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a11">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00174.html#a4">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>cols()
+: <a class="el" href="a00171.html#a7">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00170.html#a6">tbb::blocked_range2d< RowValue, ColValue ></a><li>compact()
+: <a class="el" href="a00182.html#a22">tbb::concurrent_vector< T, A ></a><li>concurrent_hash_map()
+: <a class="el" href="a00174.html#a2">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>concurrent_queue()
+: <a class="el" href="a00177.html#a0">tbb::concurrent_queue< T, A ></a><li>concurrent_queue_iterator()
+: <a class="el" href="a00180.html#a1">tbb::internal::concurrent_queue_iterator< Container, Value ></a><li>concurrent_queue_iterator_base_v3()
+: <a class="el" href="a00181.html#b2">tbb::internal::concurrent_queue_iterator_base_v3</a><li>concurrent_vector()
+: <a class="el" href="a00182.html#a5">tbb::concurrent_vector< T, A ></a><li>const_accessor()
+: <a class="el" href="a00176.html#a4">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>construct()
+: <a class="el" href="a00232.html#a8">tbb::tbb_allocator< T ></a>, <a class="el" href="a00172.html#a8">tbb::cache_aligned_allocator< T ></a><li>count()
+: <a class="el" href="a00174.html#a19">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></ul>
+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
+<li>deallocate()
+: <a class="el" href="a00232.html#a6">tbb::tbb_allocator< T ></a>, <a class="el" href="a00172.html#a6">tbb::cache_aligned_allocator< T ></a><li>deallocate_page()
+: <a class="el" href="a00178.html#b9">tbb::internal::concurrent_queue_base_v3</a><li>default_num_threads()
+: <a class="el" href="a00231.html#e0">tbb::task_scheduler_init</a><li>depth()
+: <a class="el" href="a00228.html#a10">tbb::task</a><li>destroy()
+: <a class="el" href="a00232.html#a9">tbb::tbb_allocator< T ></a>, <a class="el" href="a00228.html#a5">tbb::task</a>, <a class="el" href="a00172.html#a9">tbb::cache_aligned_allocator< T ></a><li>detach()
+: <a class="el" href="a00234.html#a6">tbb::internal::tbb_thread_v3</a><li>downgrade_to_reader()
+: <a class="el" href="a00220.html#a6">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00211.html#a7">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="a00229.html#a2">tbb::task_list</a>, <a class="el" href="a00182.html#a19">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a7">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00174.html#a15">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00176.html#a0">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>, <a class="el" href="a00197.html#a0">tbb::internal::hash_map_range [...]
+: <a class="el" href="a00182.html#a27">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00169.html#a3">tbb::blocked_range< Value ></a>, <a class="el" href="a00164.html#a1">tbb::aligned_space< T, N ></a><li>erase()
+: <a class="el" href="a00174.html#a30">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>execute()
+: <a class="el" href="a00228.html#a1">tbb::task</a>, <a class="el" href="a00194.html#a0">tbb::internal::finish_scan< Range, Body ></a></ul>
+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
+<li>find()
+: <a class="el" href="a00174.html#a21">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>front()
+: <a class="el" href="a00182.html#a33">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="a00182.html#a36">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a10">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00174.html#a17">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>grainsize()
+: <a class="el" href="a00197.html#a7">tbb::internal::hash_map_range< Iterator ></a>, <a class="el" href="a00169.html#a5">tbb::blocked_range< Value ></a><li>grow_by()
+: <a class="el" href="a00182.html#a9">tbb::concurrent_vector< T, A ></a><li>grow_to_at_least()
+: <a class="el" href="a00182.html#a10">tbb::concurrent_vector< T, A ></a></ul>
+<h3><a class="anchor" name="index_h">- h -</a></h3><ul>
+<li>hardware_concurrency()
+: <a class="el" href="a00234.html#e0">tbb::internal::tbb_thread_v3</a><li>hash_map_iterator()
+: <a class="el" href="a00196.html#a0">tbb::internal::hash_map_iterator< Container, Value ></a><li>hash_map_range()
+: <a class="el" href="a00197.html#a4">tbb::internal::hash_map_range< Iterator ></a></ul>
+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
+<li>initialize()
+: <a class="el" href="a00231.html#a1">tbb::task_scheduler_init</a><li>insert()
+: <a class="el" href="a00174.html#a27">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>internal_finish_clear()
+: <a class="el" href="a00178.html#b10">tbb::internal::concurrent_queue_base_v3</a><li>internal_pop()
+: <a class="el" href="a00178.html#b3">tbb::internal::concurrent_queue_base_v3</a><li>internal_pop_if_present()
+: <a class="el" href="a00178.html#b5">tbb::internal::concurrent_queue_base_v3</a><li>internal_push()
+: <a class="el" href="a00178.html#b2">tbb::internal::concurrent_queue_base_v3</a><li>internal_push_if_not_full()
+: <a class="el" href="a00178.html#b4">tbb::internal::concurrent_queue_base_v3</a><li>internal_set_capacity()
+: <a class="el" href="a00178.html#b7">tbb::internal::concurrent_queue_base_v3</a><li>internal_size()
+: <a class="el" href="a00178.html#b6">tbb::internal::concurrent_queue_base_v3</a><li>internal_throw_exception()
+: <a class="el" href="a00178.html#b11">tbb::internal::concurrent_queue_base_v3</a><li>interval_t()
+: <a class="el" href="a00237.html#a1">tbb::tick_count::interval_t</a><li>is_divisible()
+: <a class="el" href="a00197.html#a1">tbb::internal::hash_map_range< Iterator ></a>, <a class="el" href="a00171.html#a3">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00170.html#a3">tbb::blocked_range2d< RowValue, ColValue ></a>, <a class="el" href="a00169.html#a7">tbb::blocked_range< Value ></a><li>is_owned_by_current_thread()
+: <a class="el" href="a00228.html#a23">tbb::task</a><li>is_serial()
+: <a class="el" href="a00189.html#a0">tbb::filter</a><li>is_stolen_task()
+: <a class="el" href="a00228.html#a20">tbb::task</a></ul>
+<h3><a class="anchor" name="index_j">- j -</a></h3><ul>
+<li>join()
+: <a class="el" href="a00234.html#a5">tbb::internal::tbb_thread_v3</a></ul>
+<h3><a class="anchor" name="index_m">- m -</a></h3><ul>
+<li>max_size()
+: <a class="el" href="a00232.html#a7">tbb::tbb_allocator< T ></a>, <a class="el" href="a00182.html#a23">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00174.html#a16">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00172.html#a7">tbb::cache_aligned_allocator< T ></a><li>mutex()
+: <a class="el" href="a00198.html#a0">tbb::mutex</a></ul>
+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>
+<li>no_copy()
+: <a class="el" href="a00200.html#a0">tbb::internal::no_copy</a><li>note_affinity()
+: <a class="el" href="a00228.html#a26">tbb::task</a><li>now()
+: <a class="el" href="a00236.html#e0">tbb::tick_count</a></ul>
+<h3><a class="anchor" name="index_o">- o -</a></h3><ul>
+<li>operator *()
+: <a class="el" href="a00180.html#a3">tbb::internal::concurrent_queue_iterator< Container, Value ></a>, <a class="el" href="a00175.html#a0">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00176.html#a2">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>operator()()
+: <a class="el" href="a00189.html#a1">tbb::filter</a><li>operator++()
+: <a class="el" href="a00238.html#a11">tbb::internal::vector_iterator< Container, Value ></a>, <a class="el" href="a00180.html#a6">tbb::internal::concurrent_queue_iterator< Container, Value ></a>, <a class="el" href="a00196.html#a5">tbb::internal::hash_map_iterator< Container, Value ></a><li>operator+=()
+: <a class="el" href="a00237.html#a3">tbb::tick_count::interval_t</a><li>operator--()
+: <a class="el" href="a00238.html#a12">tbb::internal::vector_iterator< Container, Value ></a><li>operator-=()
+: <a class="el" href="a00237.html#a4">tbb::tick_count::interval_t</a><li>operator->()
+: <a class="el" href="a00175.html#a1">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00176.html#a3">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>operator=()
+: <a class="el" href="a00182.html#a7">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00180.html#a2">tbb::internal::concurrent_queue_iterator< Container, Value ></a>, <a class="el" href="a00174.html#a3">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>operator[]()
+: <a class="el" href="a00182.html#a13">tbb::concurrent_vector< T, A ></a></ul>
+<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
+<li>pages()
+: <a class="el" href="a00171.html#a5">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>parallel_while()
+: <a class="el" href="a00204.html#a0">tbb::parallel_while< Body ></a><li>parent()
+: <a class="el" href="a00228.html#a19">tbb::task</a><li>pause()
+: <a class="el" href="a00166.html#a1">tbb::internal::AtomicBackoff</a><li>pipeline()
+: <a class="el" href="a00206.html#a0">tbb::pipeline</a><li>pop()
+: <a class="el" href="a00177.html#a3">tbb::concurrent_queue< T, A ></a><li>pop_front()
+: <a class="el" href="a00229.html#a4">tbb::task_list</a><li>pop_if_present()
+: <a class="el" href="a00177.html#a5">tbb::concurrent_queue< T, A ></a><li>push()
+: <a class="el" href="a00177.html#a2">tbb::concurrent_queue< T, A ></a><li>push_back()
+: <a class="el" href="a00229.html#a3">tbb::task_list</a>, <a class="el" href="a00182.html#a11">tbb::concurrent_vector< T, A ></a><li>push_if_not_full()
+: <a class="el" href="a00177.html#a4">tbb::concurrent_queue< T, A ></a></ul>
+<h3><a class="anchor" name="index_q">- q -</a></h3><ul>
+<li>queuing_mutex()
+: <a class="el" href="a00208.html#a0">tbb::queuing_mutex</a><li>queuing_rw_mutex()
+: <a class="el" href="a00210.html#a0">tbb::queuing_rw_mutex</a></ul>
+<h3><a class="anchor" name="index_r">- r -</a></h3><ul>
+<li>range()
+: <a class="el" href="a00182.html#a17">tbb::concurrent_vector< T, A ></a><li>rbegin()
+: <a class="el" href="a00182.html#a30">tbb::concurrent_vector< T, A ></a><li>recursive_mutex()
+: <a class="el" href="a00214.html#a0">tbb::recursive_mutex</a><li>recycle_as_child_of()
+: <a class="el" href="a00228.html#a8">tbb::task</a><li>recycle_as_continuation()
+: <a class="el" href="a00228.html#a6">tbb::task</a><li>recycle_as_safe_continuation()
+: <a class="el" href="a00228.html#a7">tbb::task</a><li>recycle_to_reexecute()
+: <a class="el" href="a00228.html#a9">tbb::task</a><li>ref_count()
+: <a class="el" href="a00228.html#a22">tbb::task</a><li>release()
+: <a class="el" href="a00220.html#a5">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a4">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a5">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a5">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a5">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a5">tbb::mutex::scoped_lock</a>, <a class="el" href="a00176.html#a1">tbb::concurrent_has [...]
+: <a class="el" href="a00182.html#a31">tbb::concurrent_vector< T, A ></a><li>reserve()
+: <a class="el" href="a00182.html#a21">tbb::concurrent_vector< T, A ></a><li>rows()
+: <a class="el" href="a00171.html#a6">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00170.html#a5">tbb::blocked_range2d< RowValue, ColValue ></a><li>run()
+: <a class="el" href="a00206.html#a3">tbb::pipeline</a>, <a class="el" href="a00204.html#a2">tbb::parallel_while< Body ></a></ul>
+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
+<li>scoped_lock()
+: <a class="el" href="a00220.html#a1">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a1">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a1">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a1">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a1">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a1">tbb::mutex::scoped_lock</a><li>seconds()
+: <a class="el" href="a00237.html#a2">tbb::tick_count::interval_t</a><li>self()
+: <a class="el" href="a00228.html#e3">tbb::task</a><li>set_affinity()
+: <a class="el" href="a00228.html#a24">tbb::task</a><li>set_capacity()
+: <a class="el" href="a00177.html#a9">tbb::concurrent_queue< T, A ></a><li>set_depth()
+: <a class="el" href="a00228.html#a11">tbb::task</a><li>set_ref_count()
+: <a class="el" href="a00228.html#a13">tbb::task</a><li>size()
+: <a class="el" href="a00182.html#a18">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00177.html#a6">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00174.html#a14">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>, <a class="el" href="a00169.html#a4">tbb::blocked_range< Value ></a><li>spawn()
+: <a class="el" href="a00228.html#a15">tbb::task</a><li>spawn_and_wait_for_all()
+: <a class="el" href="a00228.html#a17">tbb::task</a><li>spawn_root_and_wait()
+: <a class="el" href="a00228.html#e2">tbb::task</a><li>spin_mutex()
+: <a class="el" href="a00217.html#a0">tbb::spin_mutex</a><li>spin_rw_mutex_v3()
+: <a class="el" href="a00219.html#a0">tbb::spin_rw_mutex_v3</a><li>start_routine()
+: <a class="el" href="a00235.html#e0">tbb::internal::thread_closure_1< F, X ></a><li>state()
+: <a class="el" href="a00228.html#a21">tbb::task</a><li>swap()
+: <a class="el" href="a00182.html#a39">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00174.html#a18">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a></ul>
+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>
+<li>task()
+: <a class="el" href="a00228.html#b0">tbb::task</a><li>task_list()
+: <a class="el" href="a00229.html#a0">tbb::task_list</a><li>task_scheduler_init()
+: <a class="el" href="a00231.html#a3">tbb::task_scheduler_init</a><li>tbb_thread_v3()
+: <a class="el" href="a00234.html#a3">tbb::internal::tbb_thread_v3</a><li>terminate()
+: <a class="el" href="a00231.html#a2">tbb::task_scheduler_init</a><li>tick_count()
+: <a class="el" href="a00236.html#a0">tbb::tick_count</a><li>try_acquire()
+: <a class="el" href="a00220.html#a7">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a3">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a4">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a4">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a4">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a4">tbb::mutex::scoped_lock</a></ul>
+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
+<li>upgrade_to_writer()
+: <a class="el" href="a00220.html#a4">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00211.html#a6">tbb::queuing_rw_mutex::scoped_lock</a></ul>
+<h3><a class="anchor" name="index_v">- v -</a></h3><ul>
+<li>vector_iterator()
+: <a class="el" href="a00238.html#a0">tbb::internal::vector_iterator< Container, Value ></a></ul>
+<h3><a class="anchor" name="index_w">- w -</a></h3><ul>
+<li>wait_for_all()
+: <a class="el" href="a00228.html#a18">tbb::task</a></ul>
+<h3><a class="anchor" name="index_~">- ~ -</a></h3><ul>
+<li>~concurrent_hash_map()
+: <a class="el" href="a00174.html#a5">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a><li>~concurrent_queue()
+: <a class="el" href="a00177.html#a1">tbb::concurrent_queue< T, A ></a><li>~concurrent_queue_iterator_base_v3()
+: <a class="el" href="a00181.html#b5">tbb::internal::concurrent_queue_iterator_base_v3</a><li>~concurrent_vector()
+: <a class="el" href="a00182.html#a41">tbb::concurrent_vector< T, A ></a><li>~const_accessor()
+: <a class="el" href="a00176.html#a5">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a><li>~filter()
+: <a class="el" href="a00189.html#a2">tbb::filter</a><li>~parallel_while()
+: <a class="el" href="a00204.html#a1">tbb::parallel_while< Body ></a><li>~pipeline()
+: <a class="el" href="a00206.html#a1">tbb::pipeline</a><li>~queuing_rw_mutex()
+: <a class="el" href="a00210.html#a1">tbb::queuing_rw_mutex</a><li>~scoped_lock()
+: <a class="el" href="a00220.html#a2">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00218.html#a5">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00215.html#a2">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00211.html#a2">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00209.html#a2">tbb::queuing_mutex::scoped_lock</a>, <a class="el" href="a00199.html#a2">tbb::mutex::scoped_lock</a><li>~task()
+: <a class="el" href="a00228.html#a0">tbb::task</a><li>~task_list()
+: <a class="el" href="a00229.html#a1">tbb::task_list</a><li>~task_scheduler_init()
+: <a class="el" href="a00231.html#a4">tbb::task_scheduler_init</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/functions_rela.html b/doc/html/functions_rela.html
new file mode 100644
index 0000000..2ff3fe0
--- /dev/null
+++ b/doc/html/functions_rela.html
@@ -0,0 +1,23 @@
+<!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>Class Members - Related Functions</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindexHL" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a> | <a class="qindex" href="functions_type.html">Typedefs</a> | <a class="qindex" href="functions_enum.html">Enumerations</a> | <a class="qindex" href="functions_eval.html">Enumeration values</a> | <a class="qindexHL" href="functions_rela.html">Related Functions</a></div>
+
+<p>
+<ul>
+<li>operator+
+: <a class="el" href="a00237.html#n2">tbb::tick_count::interval_t</a><li>operator-
+: <a class="el" href="a00236.html#n0">tbb::tick_count</a>, <a class="el" href="a00237.html#n3">tbb::tick_count::interval_t</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/functions_type.html b/doc/html/functions_type.html
new file mode 100644
index 0000000..dc7f40b
--- /dev/null
+++ b/doc/html/functions_type.html
@@ -0,0 +1,35 @@
+<!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>Class Members - Typedefs</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindexHL" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindex" href="functions_vars.html">Variables</a> | <a class="qindexHL" href="functions_type.html">Typedefs</a> | <a class="qindex" href="functions_enum.html">Enumerations</a> | <a class="qindex" href="functions_eval.html">Enumeration values</a> | <a class="qindex" href="functions_rela.html">Related Functions</a></div>
+
+<p>
+<ul>
+<li>affinity_id
+: <a class="el" href="a00228.html#w1">tbb::task</a><li>allocator_type
+: <a class="el" href="a00232.html#e0">tbb::tbb_allocator< T ></a>, <a class="el" href="a00177.html#w1">tbb::concurrent_queue< T, A ></a><li>const_iterator
+: <a class="el" href="a00169.html#w0">tbb::blocked_range< Value ></a><li>const_reference
+: <a class="el" href="a00177.html#w3">tbb::concurrent_queue< T, A ></a><li>depth_type
+: <a class="el" href="a00228.html#w0">tbb::task</a><li>difference_type
+: <a class="el" href="a00177.html#w5">tbb::concurrent_queue< T, A ></a><li>hashcode_t
+: <a class="el" href="a00195.html#w3">tbb::internal::hash_map_base</a><li>internal_array_op1
+: <a class="el" href="a00183.html#x2">tbb::internal::concurrent_vector_base_v3</a><li>internal_array_op2
+: <a class="el" href="a00183.html#x3">tbb::internal::concurrent_vector_base_v3</a><li>page_range_type
+: <a class="el" href="a00171.html#w0">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>reference
+: <a class="el" href="a00177.html#w2">tbb::concurrent_queue< T, A ></a><li>row_range_type
+: <a class="el" href="a00170.html#w0">tbb::blocked_range2d< RowValue, ColValue ></a><li>size_type
+: <a class="el" href="a00177.html#w4">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00197.html#w0">tbb::internal::hash_map_range< Iterator ></a>, <a class="el" href="a00169.html#w1">tbb::blocked_range< Value ></a><li>value_type
+: <a class="el" href="a00204.html#w0">tbb::parallel_while< Body ></a>, <a class="el" href="a00177.html#w0">tbb::concurrent_queue< T, A ></a>, <a class="el" href="a00175.html#w0">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>, <a class="el" href="a00176.html#w0">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/functions_vars.html b/doc/html/functions_vars.html
new file mode 100644
index 0000000..aa6bdd5
--- /dev/null
+++ b/doc/html/functions_vars.html
@@ -0,0 +1,35 @@
+<!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>Class Members - Variables</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindexHL" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindex" href="functions_func.html">Functions</a> | <a class="qindexHL" href="functions_vars.html">Variables</a> | <a class="qindex" href="functions_type.html">Typedefs</a> | <a class="qindex" href="functions_enum.html">Enumerations</a> | <a class="qindex" href="functions_eval.html">Enumeration values</a> | <a class="qindex" href="functions_rela.html">Related Functions</a></div>
+
+<p>
+<ul>
+<li>automatic
+: <a class="el" href="a00231.html#s0">tbb::task_scheduler_init</a><li>deferred
+: <a class="el" href="a00231.html#s1">tbb::task_scheduler_init</a><li>item_size
+: <a class="el" href="a00178.html#p2">tbb::internal::concurrent_queue_base_v3</a><li>items_per_page
+: <a class="el" href="a00178.html#p1">tbb::internal::concurrent_queue_base_v3</a><li>max_physical_size
+: <a class="el" href="a00195.html#s2">tbb::internal::hash_map_base</a><li>my_capacity
+: <a class="el" href="a00178.html#p0">tbb::internal::concurrent_queue_base_v3</a><li>my_early_size
+: <a class="el" href="a00183.html#p2">tbb::internal::concurrent_vector_base_v3</a><li>my_first_block
+: <a class="el" href="a00183.html#p1">tbb::internal::concurrent_vector_base_v3</a><li>my_item
+: <a class="el" href="a00181.html#p0">tbb::internal::concurrent_queue_iterator_base_v3</a><li>my_segment
+: <a class="el" href="a00183.html#p3">tbb::internal::concurrent_vector_base_v3</a><li>my_storage
+: <a class="el" href="a00183.html#p4">tbb::internal::concurrent_vector_base_v3</a><li>n_segment
+: <a class="el" href="a00195.html#s1">tbb::internal::hash_map_base</a><li>n_segment_bits
+: <a class="el" href="a00195.html#s0">tbb::internal::hash_map_base</a><li>vector_allocator_ptr
+: <a class="el" href="a00183.html#p0">tbb::internal::concurrent_vector_base_v3</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/graph_legend.html b/doc/html/graph_legend.html
new file mode 100644
index 0000000..8c8e9d9
--- /dev/null
+++ b/doc/html/graph_legend.html
@@ -0,0 +1,78 @@
+<!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>Graph Legend</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>Graph Legend</h1>This page explains how to interpret the graphs that are generated by doxygen.<p>
+Consider the following example: <div class="fragment"><pre class="fragment"><span class="comment">/*! Invisible class because of truncation */</span>
+<span class="keyword">class </span>Invisible { };
+<span class="comment"></span>
+<span class="comment">/*! Truncated class, inheritance relation is hidden */</span>
+<span class="keyword">class </span>Truncated : <span class="keyword">public</span> Invisible { };
+
+<span class="comment">/* Class not documented with doxygen comments */</span>
+<span class="keyword">class </span>Undocumented { };
+<span class="comment"></span>
+<span class="comment">/*! Class that is inherited using public inheritance */</span>
+<span class="keyword">class </span>PublicBase : <span class="keyword">public</span> Truncated { };
+<span class="comment"></span>
+<span class="comment">/*! A template class */</span>
+<span class="keyword">template</span><<span class="keyword">class</span> T> <span class="keyword">class </span>Templ { };
+<span class="comment"></span>
+<span class="comment">/*! Class that is inherited using protected inheritance */</span>
+<span class="keyword">class </span>ProtectedBase { };
+<span class="comment"></span>
+<span class="comment">/*! Class that is inherited using private inheritance */</span>
+<span class="keyword">class </span>PrivateBase { };
+<span class="comment"></span>
+<span class="comment">/*! Class that is used by the Inherited class */</span>
+<span class="keyword">class </span>Used { };
+<span class="comment"></span>
+<span class="comment">/*! Super class that inherits a number of other classes */</span>
+<span class="keyword">class </span>Inherited : <span class="keyword">public</span> PublicBase,
+                  <span class="keyword">protected</span> ProtectedBase,
+                  <span class="keyword">private</span> PrivateBase,
+                  <span class="keyword">public</span> Undocumented
+                  <span class="keyword">public</span> Templ<int>
+{
+  <span class="keyword">private</span>:
+    Used *m_usedClass;
+};
+</pre></div>If the <code>MAX_DOT_GRAPH_HEIGHT</code> tag in the configuration file is set to 240 this will result in the following graph:<p>
+<center><div align="center">
+<img src="graph_legend.gif" alt="graph_legend.gif" alt>
+</div>
+</center> <p>
+The boxes in the above graph have the following meaning: <ul>
+<li>
+A filled black box represents the struct or class for which the graph is generated. </li>
+<li>
+A box with a black border denotes a documented struct or class. </li>
+<li>
+A box with a grey border denotes an undocumented struct or class. </li>
+<li>
+A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries. </li>
+</ul>
+The arrows have the following meaning: <ul>
+<li>
+A dark blue arrow is used to visualize a public inheritance relation between two classes. </li>
+<li>
+A dark green arrow is used for protected inheritance. </li>
+<li>
+A dark red arrow is used for private inheritance. </li>
+<li>
+A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible. </li>
+<li>
+A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li>
+</ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/hierarchy.html b/doc/html/hierarchy.html
new file mode 100644
index 0000000..fe2c92a
--- /dev/null
+++ b/doc/html/hierarchy.html
@@ -0,0 +1,118 @@
+<!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>Hierarchical Index</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindexHL" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<h1>Class Hierarchy</h1>This inheritance list is sorted roughly, but not completely, alphabetically:<ul>
+<li><a class="el" href="a00164.html">tbb::aligned_space< T, N ></a>
+<li><b>tbb::internal::allocate_additional_child_of_proxy</b><li><b>tbb::internal::allocate_child_proxy</b><li><b>tbb::internal::allocate_continuation_proxy</b><li><b>tbb::internal::allocate_root_proxy</b><li><b>tbb::internal::allocator_base< T, A ></b><li><a class="el" href="a00165.html">tbb::atomic< T ></a>
+<li><b>tbb::atomic< bool ></b><li><b>tbb::atomic< T * ></b><li><b>tbb::atomic< void * ></b><li><b>tbb::internal::atomic_base< I ></b><li><b>tbb::internal::atomic_base< int64_t ></b><li><b>tbb::internal::atomic_base< uint64_t ></b><li><b>tbb::internal::atomic_impl< I, D, Step ></b><li><b>tbb::internal::atomic_traits< Size, M ></b><li><b>tbb::internal::atomic_word< Size ></b><li><b>tbb::internal::atomic_word< 8 ></b><li><a class=" [...]
+<li><a class="el" href="a00167.html">tbb::auto_partitioner</a>
+<li><a class="el" href="a00168.html">tbb::bad_last_alloc</a>
+<li><a class="el" href="a00169.html">tbb::blocked_range< Value ></a>
+<li><a class="el" href="a00170.html">tbb::blocked_range2d< RowValue, ColValue ></a>
+<li><a class="el" href="a00171.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>
+<li><a class="el" href="a00169.html">tbb::blocked_range< I ></a>
+<li><a class="el" href="a00172.html">tbb::cache_aligned_allocator< T ></a>
+<li><b>tbb::cache_aligned_allocator< T >::rebind< U ></b><li><a class="el" href="a00173.html">tbb::cache_aligned_allocator< void ></a>
+<li><b>tbb::cache_aligned_allocator< void >::rebind< U ></b><li><a class="el" href="a00176.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor</a>
+<ul>
+<li><a class="el" href="a00175.html">tbb::concurrent_hash_map< Key, T, HashCompare, A >::accessor</a>
+</ul>
+<li><a class="el" href="a00179.html">tbb::internal::concurrent_queue_base_v3::page</a>
+<li><a class="el" href="a00181.html">tbb::internal::concurrent_queue_iterator_base_v3</a>
+<ul>
+<li><a class="el" href="a00180.html">tbb::internal::concurrent_queue_iterator< Container, Value ></a>
+</ul>
+<li><a class="el" href="a00183.html">tbb::internal::concurrent_vector_base_v3</a>
+<ul>
+<li><a class="el" href="a00182.html">tbb::concurrent_vector< T, A ></a>
+</ul>
+<li><a class="el" href="a00184.html">tbb::internal::concurrent_vector_base_v3::internal_segments_table</a>
+<li><b>tbb::internal::concurrent_vector_base_v3::segment_t</b><li><a class="el" href="a00189.html">tbb::filter</a>
+<li><a class="el" href="a00190.html">tbb::final_scan_tag</a>
+<li><a class="el" href="a00195.html">tbb::internal::hash_map_base</a>
+<ul>
+<li><a class="el" href="a00174.html">tbb::concurrent_hash_map< Key, T, HashCompare, A ></a>
+</ul>
+<li><a class="el" href="a00196.html">tbb::internal::hash_map_iterator< Container, Value ></a>
+<li><a class="el" href="a00197.html">tbb::internal::hash_map_range< Iterator ></a>
+<li><b>tbb::internal::hash_map_segment_base</b><li><a class="el" href="a00198.html">tbb::mutex</a>
+<li><a class="el" href="a00200.html">tbb::internal::no_copy</a>
+<ul>
+<li><b>tbb::internal::affinity_partition_type</b><li><a class="el" href="a00163.html">tbb::internal::affinity_partitioner_base_v3</a>
+<ul>
+<li><a class="el" href="a00162.html">tbb::affinity_partitioner</a>
+</ul>
+<li><a class="el" href="a00178.html">tbb::internal::concurrent_queue_base_v3</a>
+<ul>
+<li><a class="el" href="a00177.html">tbb::concurrent_queue< T, A ></a>
+</ul>
+<li><a class="el" href="a00199.html">tbb::mutex::scoped_lock</a>
+<li><a class="el" href="a00201.html">tbb::parallel_do_feeder< Item ></a>
+<ul>
+<li><a class="el" href="a00202.html">tbb::internal::parallel_do_feeder_impl< Body, Item ></a>
+</ul>
+<li><a class="el" href="a00204.html">tbb::parallel_while< Body ></a>
+<li><a class="el" href="a00209.html">tbb::queuing_mutex::scoped_lock</a>
+<li><a class="el" href="a00211.html">tbb::queuing_rw_mutex::scoped_lock</a>
+<li><a class="el" href="a00215.html">tbb::recursive_mutex::scoped_lock</a>
+<li><a class="el" href="a00218.html">tbb::spin_mutex::scoped_lock</a>
+<li><a class="el" href="a00220.html">tbb::spin_rw_mutex_v3::scoped_lock</a>
+<li><a class="el" href="a00228.html">tbb::task</a>
+<ul>
+<li><a class="el" href="a00188.html">tbb::empty_task</a>
+<li><a class="el" href="a00185.html">tbb::internal::do_group_task_forward< Iterator, Body, Item ></a>
+<li><b>tbb::internal::do_group_task_input</b><li><a class="el" href="a00186.html">tbb::internal::do_iteration_task< Body, Item ></a>
+<li><b>tbb::internal::do_iteration_task_iter</b><li><a class="el" href="a00187.html">tbb::internal::do_task_iter< Iterator, Body, Item ></a>
+<li><a class="el" href="a00191.html">tbb::internal::final_sum< Range, Body ></a>
+<li><a class="el" href="a00192.html">tbb::internal::finish_reduce< Body ></a>
+<li><a class="el" href="a00193.html">tbb::internal::finish_reduce_with_affinity< Body ></a>
+<li><a class="el" href="a00194.html">tbb::internal::finish_scan< Range, Body ></a>
+<li><a class="el" href="a00222.html">tbb::internal::start_for< Range, Body, Partitioner ></a>
+<li><a class="el" href="a00223.html">tbb::internal::start_reduce< Range, Body, Partitioner ></a>
+<li><a class="el" href="a00224.html">tbb::internal::start_reduce_with_affinity< Range, Body ></a>
+<li><a class="el" href="a00225.html">tbb::internal::start_scan< Range, Body, Partitioner ></a>
+<li><a class="el" href="a00227.html">tbb::internal::sum_node< Range, Body ></a>
+<li><a class="el" href="a00240.html">tbb::internal::while_group_task< Body ></a>
+<li><a class="el" href="a00241.html">tbb::internal::while_iteration_task< Body ></a>
+<li><a class="el" href="a00242.html">tbb::internal::while_task< Stream, Body ></a>
+</ul>
+<li><a class="el" href="a00229.html">tbb::task_list</a>
+<li><a class="el" href="a00231.html">tbb::task_scheduler_init</a>
+</ul>
+<li><a class="el" href="a00203.html">tbb::internal::parallel_do_operator_selector< Body, Item ></a>
+<li><a class="el" href="a00205.html">tbb::internal::partition_type_base</a>
+<li><a class="el" href="a00206.html">tbb::pipeline</a>
+<li><a class="el" href="a00207.html">tbb::pre_scan_tag</a>
+<li><a class="el" href="a00208.html">tbb::queuing_mutex</a>
+<li><a class="el" href="a00210.html">tbb::queuing_rw_mutex</a>
+<li><a class="el" href="a00212.html">tbb::internal::quick_sort_body< RandomAccessIterator, Compare ></a>
+<li><a class="el" href="a00213.html">tbb::internal::quick_sort_range< RandomAccessIterator, Compare ></a>
+<li><a class="el" href="a00214.html">tbb::recursive_mutex</a>
+<li><b>tbb::internal::scheduler</b><li><a class="el" href="a00216.html">tbb::simple_partitioner</a>
+<li><a class="el" href="a00217.html">tbb::spin_mutex</a>
+<li><a class="el" href="a00219.html">tbb::spin_rw_mutex_v3</a>
+<li><a class="el" href="a00221.html">tbb::split</a>
+<li><a class="el" href="a00226.html">tbb::internal::strip< T ></a>
+<li><b>tbb::internal::strip< const T & ></b><li><b>tbb::internal::strip< const T ></b><li><b>tbb::internal::strip< const volatile T & ></b><li><b>tbb::internal::strip< const volatile T ></b><li><b>tbb::internal::strip< T & ></b><li><b>tbb::internal::strip< volatile T & ></b><li><b>tbb::internal::strip< volatile T ></b><li><a class="el" href="a00230.html">tbb::internal::task_prefix</a>
+<li><b>tbb::internal::task_scheduler_observer_v3</b><li><a class="el" href="a00232.html">tbb::tbb_allocator< T ></a>
+<li><b>tbb::tbb_allocator< T >::rebind< U ></b><li><a class="el" href="a00233.html">tbb::tbb_allocator< void ></a>
+<li><b>tbb::tbb_allocator< void >::rebind< U ></b><li><a class="el" href="a00234.html">tbb::internal::tbb_thread_v3</a>
+<li><b>tbb::internal::tbb_thread_v3::id</b><li><b>tbb::internal::thread_closure_0< F ></b><li><a class="el" href="a00235.html">tbb::internal::thread_closure_1< F, X ></a>
+<li><b>tbb::internal::thread_closure_2< F, X, Y ></b><li><b>tbb::internal::thread_closure_base</b><li><a class="el" href="a00236.html">tbb::tick_count</a>
+<li><a class="el" href="a00237.html">tbb::tick_count::interval_t</a>
+<li><b>tbb::internal::type_with_alignment< N ></b><li><b>tbb::internal::type_with_alignment< 1 ></b><li><b>tbb::internal::type_with_alignment< 2 ></b><li><b>tbb::internal::type_with_alignment< 4 ></b><li><b>tbb::internal::type_with_alignment< 8 ></b><li><a class="el" href="a00238.html">tbb::internal::vector_iterator< Container, Value ></a>
+<li><a class="el" href="a00239.html">tbb::internal::version_tag_v3</a>
+</ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/index.html b/doc/html/index.html
new file mode 100644
index 0000000..bf97f43
--- /dev/null
+++ b/doc/html/index.html
@@ -0,0 +1,23 @@
+<!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>Main Page</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindexHL" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<h1>Main Page </h1>
+<p>
+Click the tabs above for information about the<ul>
+<li><a href="./modules.html">Modules</a> (groups of functionality) implemented by the library</li><li><a href="./annotated.html">Classes</a> provided by the library</li><li><a href="./files.html">Files</a> constituting the library.</li></ul>
+Please note that significant part of TBB functionality is implemented in the form of template functions, descriptions of which are not accessible on the <a href="./annotated.html">Classes</a> tab. Use <a href="./modules.html">Modules</a> or <a href="./namespacemembers.html">Namespace/Namespace Members</a> tabs to find them.<p>
+Additional pieces of information can be found here<ul>
+<li>concepts</li></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/modules.html b/doc/html/modules.html
new file mode 100644
index 0000000..e80a4f3
--- /dev/null
+++ b/doc/html/modules.html
@@ -0,0 +1,19 @@
+<!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>Module Index</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindexHL" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<h1>Modules</h1>Here is a list of all modules:<ul>
+<li><a class="el" href="a00281.html">Algorithms</a>
+</ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/namespacemembers.html b/doc/html/namespacemembers.html
new file mode 100644
index 0000000..0bde4df
--- /dev/null
+++ b/doc/html/namespacemembers.html
@@ -0,0 +1,77 @@
+<!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>Namespace Members</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindexHL" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<div class="qindex"><a class="qindexHL" href="namespacemembers.html">All</a> | <a class="qindex" href="namespacemembers_func.html">Functions</a> | <a class="qindex" href="namespacemembers_vars.html">Variables</a> | <a class="qindex" href="namespacemembers_type.html">Typedefs</a> | <a class="qindex" href="namespacemembers_enum.html">Enumerations</a> | <a class="qindex" href="namespacemembers_eval.html">Enumeration values</a></div>
+<div class="qindex"><a class="qindex" href="#index__">_</a> | <a class="qindex" href="#index_a">a</a> | <a class="qindex" href="#index_d">d</a> | <a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_i">i</a> | <a class="qindex" href="#index_m">m</a> | <a class="qindex" href="#index_n">n</a> | <a class="qindex" href="#index_p">p</a> | <a class="qindex" href="#index_r">r</a> | <a class="qindex" href="#index_s">s</a> | <a class="qindex" href="#index_t">t</a> | <a class=" [...]
+
+<p>
+
+<p>
+Here is a list of all documented namespace members with links to the namespaces they belong to:<h3><a class="anchor" name="index__">- _ -</a></h3><ul>
+<li>__TBB_full_fence
+: <a class="el" href="a00278.html#a37a0">tbb</a></ul>
+<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
+<li>acquire
+: <a class="el" href="a00278.html#a37a1">tbb</a><li>affinity_id
+: <a class="el" href="a00279.html#a12">tbb::internal</a><li>allocate_closure_v3()
+: <a class="el" href="a00279.html#a54">tbb::internal</a><li>allocate_via_handler_v3()
+: <a class="el" href="a00279.html#a42">tbb::internal</a><li>assertion_handler_type
+: <a class="el" href="a00278.html#a6">tbb</a></ul>
+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
+<li>deallocate_via_handler_v3()
+: <a class="el" href="a00279.html#a41">tbb::internal</a></ul>
+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
+<li>free_closure_v3()
+: <a class="el" href="a00279.html#a55">tbb::internal</a></ul>
+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
+<li>intptr
+: <a class="el" href="a00279.html#a14">tbb::internal</a><li>is_malloc_used_v3()
+: <a class="el" href="a00279.html#a43">tbb::internal</a><li>itt_load_pointer_with_acquire_v3()
+: <a class="el" href="a00279.html#a36">tbb::internal</a><li>itt_store_pointer_with_release_v3()
+: <a class="el" href="a00279.html#a35">tbb::internal</a></ul>
+<h3><a class="anchor" name="index_m">- m -</a></h3><ul>
+<li>memory_semantics
+: <a class="el" href="a00278.html#a37">tbb</a></ul>
+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>
+<li>NFS_Allocate()
+: <a class="el" href="a00279.html#a17">tbb::internal</a><li>NFS_Free()
+: <a class="el" href="a00279.html#a18">tbb::internal</a><li>NFS_GetLineSize()
+: <a class="el" href="a00279.html#a16">tbb::internal</a><li>NFS_MaxLineSize
+: <a class="el" href="a00279.html#a0">tbb::internal</a></ul>
+<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
+<li>parallel_do()
+: <a class="el" href="a00281.html#ga3">tbb</a><li>parallel_for()
+: <a class="el" href="a00281.html#ga6">tbb</a><li>parallel_quick_sort()
+: <a class="el" href="a00281.html#ga12">tbb::internal</a><li>parallel_reduce()
+: <a class="el" href="a00281.html#ga9">tbb</a><li>parallel_scan()
+: <a class="el" href="a00281.html#ga11">tbb</a><li>parallel_sort()
+: <a class="el" href="a00281.html#ga15">tbb</a></ul>
+<h3><a class="anchor" name="index_r">- r -</a></h3><ul>
+<li>reduction_context
+: <a class="el" href="a00279.html#a4">tbb::internal</a><li>reference_count
+: <a class="el" href="a00279.html#a11">tbb::internal</a><li>release
+: <a class="el" href="a00278.html#a37a2">tbb</a><li>run_parallel_do()
+: <a class="el" href="a00281.html#ga0">tbb::internal</a><li>runtime_warning()
+: <a class="el" href="a00279.html#a52">tbb::internal</a></ul>
+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
+<li>select_parallel_do()
+: <a class="el" href="a00281.html#ga2">tbb::internal</a></ul>
+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>
+<li>tbb_thread
+: <a class="el" href="a00278.html#a7">tbb</a></ul>
+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
+<li>uintptr
+: <a class="el" href="a00279.html#a13">tbb::internal</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/namespacemembers_enum.html b/doc/html/namespacemembers_enum.html
new file mode 100644
index 0000000..e68711d
--- /dev/null
+++ b/doc/html/namespacemembers_enum.html
@@ -0,0 +1,22 @@
+<!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>Namespace Members - Enumerations</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindexHL" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="namespacemembers.html">All</a> | <a class="qindex" href="namespacemembers_func.html">Functions</a> | <a class="qindex" href="namespacemembers_vars.html">Variables</a> | <a class="qindex" href="namespacemembers_type.html">Typedefs</a> | <a class="qindexHL" href="namespacemembers_enum.html">Enumerations</a> | <a class="qindex" href="namespacemembers_eval.html">Enumeration values</a></div>
+
+<p>
+<ul>
+<li>memory_semantics
+: <a class="el" href="a00278.html#a37">tbb</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/namespacemembers_eval.html b/doc/html/namespacemembers_eval.html
new file mode 100644
index 0000000..0f778e6
--- /dev/null
+++ b/doc/html/namespacemembers_eval.html
@@ -0,0 +1,24 @@
+<!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>Namespace Members - Enumeration values</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindexHL" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="namespacemembers.html">All</a> | <a class="qindex" href="namespacemembers_func.html">Functions</a> | <a class="qindex" href="namespacemembers_vars.html">Variables</a> | <a class="qindex" href="namespacemembers_type.html">Typedefs</a> | <a class="qindex" href="namespacemembers_enum.html">Enumerations</a> | <a class="qindexHL" href="namespacemembers_eval.html">Enumeration values</a></div>
+
+<p>
+<ul>
+<li>__TBB_full_fence
+: <a class="el" href="a00278.html#a37a0">tbb</a><li>acquire
+: <a class="el" href="a00278.html#a37a1">tbb</a><li>release
+: <a class="el" href="a00278.html#a37a2">tbb</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/namespacemembers_func.html b/doc/html/namespacemembers_func.html
new file mode 100644
index 0000000..60b56c1
--- /dev/null
+++ b/doc/html/namespacemembers_func.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Namespace Members - Functions</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindexHL" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="namespacemembers.html">All</a> | <a class="qindexHL" href="namespacemembers_func.html">Functions</a> | <a class="qindex" href="namespacemembers_vars.html">Variables</a> | <a class="qindex" href="namespacemembers_type.html">Typedefs</a> | <a class="qindex" href="namespacemembers_enum.html">Enumerations</a> | <a class="qindex" href="namespacemembers_eval.html">Enumeration values</a></div>
+
+<p>
+<ul>
+<li>allocate_closure_v3()
+: <a class="el" href="a00279.html#a54">tbb::internal</a><li>allocate_via_handler_v3()
+: <a class="el" href="a00279.html#a42">tbb::internal</a><li>deallocate_via_handler_v3()
+: <a class="el" href="a00279.html#a41">tbb::internal</a><li>free_closure_v3()
+: <a class="el" href="a00279.html#a55">tbb::internal</a><li>is_malloc_used_v3()
+: <a class="el" href="a00279.html#a43">tbb::internal</a><li>itt_load_pointer_with_acquire_v3()
+: <a class="el" href="a00279.html#a36">tbb::internal</a><li>itt_store_pointer_with_release_v3()
+: <a class="el" href="a00279.html#a35">tbb::internal</a><li>NFS_Allocate()
+: <a class="el" href="a00279.html#a17">tbb::internal</a><li>NFS_Free()
+: <a class="el" href="a00279.html#a18">tbb::internal</a><li>NFS_GetLineSize()
+: <a class="el" href="a00279.html#a16">tbb::internal</a><li>parallel_do()
+: <a class="el" href="a00281.html#ga3">tbb</a><li>parallel_for()
+: <a class="el" href="a00281.html#ga6">tbb</a><li>parallel_quick_sort()
+: <a class="el" href="a00281.html#ga12">tbb::internal</a><li>parallel_reduce()
+: <a class="el" href="a00281.html#ga9">tbb</a><li>parallel_scan()
+: <a class="el" href="a00281.html#ga11">tbb</a><li>parallel_sort()
+: <a class="el" href="a00281.html#ga15">tbb</a><li>run_parallel_do()
+: <a class="el" href="a00281.html#ga0">tbb::internal</a><li>runtime_warning()
+: <a class="el" href="a00279.html#a52">tbb::internal</a><li>select_parallel_do()
+: <a class="el" href="a00281.html#ga2">tbb::internal</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/namespacemembers_type.html b/doc/html/namespacemembers_type.html
new file mode 100644
index 0000000..73c3f9c
--- /dev/null
+++ b/doc/html/namespacemembers_type.html
@@ -0,0 +1,28 @@
+<!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>Namespace Members - Typedefs</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindexHL" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="namespacemembers.html">All</a> | <a class="qindex" href="namespacemembers_func.html">Functions</a> | <a class="qindex" href="namespacemembers_vars.html">Variables</a> | <a class="qindexHL" href="namespacemembers_type.html">Typedefs</a> | <a class="qindex" href="namespacemembers_enum.html">Enumerations</a> | <a class="qindex" href="namespacemembers_eval.html">Enumeration values</a></div>
+
+<p>
+<ul>
+<li>affinity_id
+: <a class="el" href="a00279.html#a12">tbb::internal</a><li>assertion_handler_type
+: <a class="el" href="a00278.html#a6">tbb</a><li>intptr
+: <a class="el" href="a00279.html#a14">tbb::internal</a><li>reduction_context
+: <a class="el" href="a00279.html#a4">tbb::internal</a><li>reference_count
+: <a class="el" href="a00279.html#a11">tbb::internal</a><li>tbb_thread
+: <a class="el" href="a00278.html#a7">tbb</a><li>uintptr
+: <a class="el" href="a00279.html#a13">tbb::internal</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/namespacemembers_vars.html b/doc/html/namespacemembers_vars.html
new file mode 100644
index 0000000..143fab7
--- /dev/null
+++ b/doc/html/namespacemembers_vars.html
@@ -0,0 +1,22 @@
+<!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>Namespace Members - Variables</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindexHL" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<div class="qindex"><a class="qindex" href="namespacemembers.html">All</a> | <a class="qindex" href="namespacemembers_func.html">Functions</a> | <a class="qindexHL" href="namespacemembers_vars.html">Variables</a> | <a class="qindex" href="namespacemembers_type.html">Typedefs</a> | <a class="qindex" href="namespacemembers_enum.html">Enumerations</a> | <a class="qindex" href="namespacemembers_eval.html">Enumeration values</a></div>
+
+<p>
+<ul>
+<li>NFS_MaxLineSize
+: <a class="el" href="a00279.html#a0">tbb::internal</a></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/namespaces.html b/doc/html/namespaces.html
new file mode 100644
index 0000000..9886162
--- /dev/null
+++ b/doc/html/namespaces.html
@@ -0,0 +1,20 @@
+<!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>Namespace Index</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindexHL" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.htm [...]
+<h1>Namespace List</h1>Here is a list of all documented namespaces with brief descriptions:<table>
+  <tr><td class="indexkey"><a class="el" href="a00278.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="a00279.html">tbb::internal</a></td><td class="indexvalue">INTERNAL </td></tr>
+</table>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/pages.html b/doc/html/pages.html
new file mode 100644
index 0000000..a63bd6e
--- /dev/null
+++ b/doc/html/pages.html
@@ -0,0 +1,32 @@
+<!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>Page Index</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1>Related Pages</h1>Here is a list of all related documentation pages:<ul>
+<li><a class="el" href="range_req.html">Requirements on range concept</a>
+
+<li><a class="el" href="parallel_do_body_req.html">Requirements on parallel_do body</a>
+
+<li><a class="el" href="parallel_for_body_req.html">Requirements on parallel_for body</a>
+
+<li><a class="el" href="parallel_reduce_body_req.html">Requirements on parallel_reduce body</a>
+
+<li><a class="el" href="parallel_scan_body_req.html">Requirements on parallel_scan body</a>
+
+<li><a class="el" href="parallel_sort_iter_req.html">Requirements on iterators for parallel_sort</a>
+
+<li><a class="el" href="concepts.html">TBB concepts</a>
+
+</ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/parallel_do_body_req.html b/doc/html/parallel_do_body_req.html
new file mode 100644
index 0000000..f719380
--- /dev/null
+++ b/doc/html/parallel_do_body_req.html
@@ -0,0 +1,31 @@
+<!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>Requirements on parallel_do body</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1><a class="anchor" name="parallel_do_body_req">Requirements on parallel_do body</a></h1>Class <code>Body</code> implementing the concept of parallel_do body must define:<ul>
+<li><div class="fragment"><pre class="fragment">        B::operator()( 
+                cv_item_type item,
+                parallel_do_feeder<item_type>& feeder
+        ) <span class="keyword">const</span>
+        
+        OR
+
+        B::operator()( cv_item_type& item ) <span class="keyword">const</span>
+</pre></div>Process item. May be invoked concurrently for the same <code>this</code> but different <code>item</code>.</li></ul>
+<p>
+<ul>
+<li><div class="fragment"><pre class="fragment"> item_type( <span class="keyword">const</span> item_type& ) 
+</pre></div>Copy a work item.</li><li><div class="fragment"><pre class="fragment"> ~item_type() 
+</pre></div>Destroy a work item </li></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/parallel_for_body_req.html b/doc/html/parallel_for_body_req.html
new file mode 100644
index 0000000..2c45f0a
--- /dev/null
+++ b/doc/html/parallel_for_body_req.html
@@ -0,0 +1,21 @@
+<!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>Requirements on parallel_for body</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1><a class="anchor" name="parallel_for_body_req">Requirements on parallel_for body</a></h1>Class <code>Body</code> implementing the concept of parallel_for body must define:<ul>
+<li><div class="fragment"><pre class="fragment"> Body::Body( <span class="keyword">const</span> Body& ); 
+</pre></div>Copy constructor</li><li><div class="fragment"><pre class="fragment"> Body::~Body(); 
+</pre></div>Destructor</li><li><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> Body::operator()( Range& r ) <span class="keyword">const</span>; 
+</pre></div>Function call operator applying the body to range <code>r</code>. </li></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/parallel_reduce_body_req.html b/doc/html/parallel_reduce_body_req.html
new file mode 100644
index 0000000..5a4bf3a
--- /dev/null
+++ b/doc/html/parallel_reduce_body_req.html
@@ -0,0 +1,22 @@
+<!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>Requirements on parallel_reduce body</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1><a class="anchor" name="parallel_reduce_body_req">Requirements on parallel_reduce body</a></h1>Class <code>Body</code> implementing the concept of parallel_reduce body must define:<ul>
+<li><div class="fragment"><pre class="fragment"> Body::Body( Body&, split ); 
+</pre></div>Splitting constructor. Must be able to run concurrently with operator() and method <code>join</code> </li><li><div class="fragment"><pre class="fragment"> Body::~Body(); 
+</pre></div>Destructor</li><li><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> Body::operator()( Range& r ); 
+</pre></div>Function call operator applying body to range <code>r</code> and accumulating the result</li><li><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> Body::join( Body& b ); 
+</pre></div>Join results. The result in <code>b</code> should be merged into the result of <code>this</code> </li></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/parallel_scan_body_req.html b/doc/html/parallel_scan_body_req.html
new file mode 100644
index 0000000..9dea790
--- /dev/null
+++ b/doc/html/parallel_scan_body_req.html
@@ -0,0 +1,23 @@
+<!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>Requirements on parallel_scan body</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1><a class="anchor" name="parallel_scan_body_req">Requirements on parallel_scan body</a></h1>Class <code>Body</code> implementing the concept of parallel_reduce body must define:<ul>
+<li><div class="fragment"><pre class="fragment"> Body::Body( Body&, split ); 
+</pre></div>Splitting constructor. Split <code>b</code> so that <code>this</code> and <code>b</code> can accumulate separately</li><li><div class="fragment"><pre class="fragment"> Body::~Body(); 
+</pre></div>Destructor</li><li><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> Body::operator()( <span class="keyword">const</span> Range& r, pre_scan_tag ); 
+</pre></div>Preprocess iterations for range <code>r</code> </li><li><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> Body::operator()( <span class="keyword">const</span> Range& r, final_scan_tag ); 
+</pre></div>Do final processing for iterations of range <code>r</code> </li><li><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> Body::reverse_join( Body& a ); 
+</pre></div>Merge preprocessing state of <code>a</code> into <code>this</code>, where <code>a</code> was created earlier from <code>b</code> by b's splitting constructor </li></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/parallel_sort_iter_req.html b/doc/html/parallel_sort_iter_req.html
new file mode 100644
index 0000000..f568870
--- /dev/null
+++ b/doc/html/parallel_sort_iter_req.html
@@ -0,0 +1,20 @@
+<!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>Requirements on iterators for parallel_sort</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1><a class="anchor" name="parallel_sort_iter_req">Requirements on iterators for parallel_sort</a></h1>Requirements on value type <code>T</code> of <code>RandomAccessIterator</code> for <code>parallel_sort:</code> <ul>
+<li><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> swap( T& x, T& y ) 
+</pre></div>Swaps <code>x</code> and <code>y</code> </li><li><div class="fragment"><pre class="fragment"> <span class="keywordtype">bool</span> Compare::operator()( <span class="keyword">const</span> T& x, <span class="keyword">const</span> T& y ) 
+</pre></div>True if x comes before y; </li></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/range_req.html b/doc/html/range_req.html
new file mode 100644
index 0000000..e737d1a
--- /dev/null
+++ b/doc/html/range_req.html
@@ -0,0 +1,23 @@
+<!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>Requirements on range concept</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.9.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html" [...]
+<h1><a class="anchor" name="range_req">Requirements on range concept</a></h1>Class <code>R</code> implementing the concept of range must define:<ul>
+<li><div class="fragment"><pre class="fragment"> R::R( <span class="keyword">const</span> R& ); 
+</pre></div>Copy constructor</li><li><div class="fragment"><pre class="fragment"> R::~R(); 
+</pre></div>Destructor</li><li><div class="fragment"><pre class="fragment"> <span class="keywordtype">bool</span> R::is_divisible() <span class="keyword">const</span>; 
+</pre></div>True if range can be partitioned into two subranges</li><li><div class="fragment"><pre class="fragment"> <span class="keywordtype">bool</span> R::empty() <span class="keyword">const</span>; 
+</pre></div>True if range is empty</li><li><div class="fragment"><pre class="fragment"> R::R( R& r, split ); 
+</pre></div>Split range <code>r</code> into two subranges. </li></ul>
+<hr>
+<p></p>
+Copyright © 2005-2008 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/examples/GettingStarted/sub_string_finder/Makefile b/examples/GettingStarted/sub_string_finder/Makefile
index 33ca08a..6adae0c 100644
--- a/examples/GettingStarted/sub_string_finder/Makefile
+++ b/examples/GettingStarted/sub_string_finder/Makefile
@@ -32,14 +32,14 @@
 all:	release test
 
 release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o sub_string_finder sub_string_finder.cpp -ltbb
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o sub_string_finder_extended sub_string_finder_extended.cpp -ltbb
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o sub_string_finder_pretty sub_string_finder_pretty.cpp -ltbb
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o sub_string_finder sub_string_finder.cpp -ltbb $(LIBS)
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o sub_string_finder_extended sub_string_finder_extended.cpp -ltbb $(LIBS)
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o sub_string_finder_pretty sub_string_finder_pretty.cpp -ltbb $(LIBS)
 
 debug: *.cpp
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o sub_string_finder sub_string_finder.cpp -ltbb_debug
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o sub_string_finder_extended sub_string_finder_extended.cpp -ltbb_debug
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o sub_string_finder_pretty sub_string_finder_pretty.cpp -ltbb_debug
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o sub_string_finder sub_string_finder.cpp -ltbb_debug $(LIBS)
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o sub_string_finder_extended sub_string_finder_extended.cpp -ltbb_debug $(LIBS)
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(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
diff --git a/examples/GettingStarted/sub_string_finder/Makefile.windows b/examples/GettingStarted/sub_string_finder/Makefile.windows
index 0d3953b..e8f4437 100644
--- a/examples/GettingStarted/sub_string_finder/Makefile.windows
+++ b/examples/GettingStarted/sub_string_finder/Makefile.windows
@@ -28,18 +28,18 @@
 
 # The C++ compiler options
 CXX = cl.exe
-MYCXXFLAGS=/TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
+MYCXXFLAGS = /TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
 MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
 
 all: release test
 release:
-	$(CXX) sub_string_finder.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS) /OUT:sub_string_finder.exe
-	$(CXX) sub_string_finder_extended.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS) /OUT:sub_string_finder_extended.exe
-	$(CXX) sub_string_finder_pretty.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS) /OUT:sub_string_finder_pretty.exe
+	$(CXX) sub_string_finder.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder.exe
+	$(CXX) sub_string_finder_extended.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder_extended.exe
+	$(CXX) sub_string_finder_pretty.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder_pretty.exe
 debug:
-	$(CXX) sub_string_finder.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS) /OUT:sub_string_finder.exe
-	$(CXX) sub_string_finder_extended.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS) /OUT:sub_string_finder_extended.exe
-	$(CXX) sub_string_finder_pretty.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS) /OUT:sub_string_finder_pretty.exe
+	$(CXX) sub_string_finder.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder.exe
+	$(CXX) sub_string_finder_extended.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder_extended.exe
+	$(CXX) sub_string_finder_pretty.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder_pretty.exe
 clean:
 	@cmd.exe /C del sub_string_finder*.exe *.obj *.?db *.manifest
 test:
diff --git a/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp b/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp
index 65d4db8..76944a3 100644
--- a/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp
+++ b/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp
@@ -65,7 +65,7 @@ class SubStringFinder {
   str(s), max_array(m), pos_array(p) { }										
 };				
 
-int main(size_t argc, char *argv[]) {
+int main(int argc, char *argv[]) {
  task_scheduler_init init;
 
  string str[N] = { string("a"), string("b") };
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 df95b64..6664fbb 100644
--- a/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp
+++ b/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp
@@ -84,7 +84,7 @@ class SubStringFinder {
   str(s), max_array(m), pos_array(p) { }										
 };				
 
-int main(size_t argc, char *argv[]) {
+int main(int argc, char *argv[]) {
  task_scheduler_init init;
 
  string str[N] = { string("a"), string("b") };
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 1b5e91f..98b9a67 100644
--- a/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp
+++ b/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp
@@ -63,7 +63,7 @@ class SubStringFinder {
   str(s), max_array(m), pos_array(p) { }										
 };				
 
-int main(size_t argc, char *argv[]) {
+int main(int argc, char *argv[]) {
  task_scheduler_init init;
 
  std::string str[N] = { std::string("a"), std::string("b") };
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 e3ad67f..89195c0 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -90,7 +90,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(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 b98e11c..84b3207 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -90,7 +90,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(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 4bbf8a5..047fb97 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -90,7 +90,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(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 9e992d7..51b858a 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -248,7 +248,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -276,7 +276,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -325,7 +325,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(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 1a9c4fe..acb653e 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -248,7 +248,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -276,7 +276,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -325,7 +325,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(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 5d1d9e2..09bbfb6 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -248,7 +248,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -276,7 +276,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -325,7 +325,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder.suo b/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder.suo
index 31049bb..dd4f01e 100644
Binary files a/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder.suo and b/examples/GettingStarted/sub_string_finder/vc9/sub_string_finder.suo differ
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 524a5a5..566265d 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -137,7 +137,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -167,7 +167,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -196,7 +196,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -215,7 +215,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -245,7 +245,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -273,7 +273,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -291,7 +291,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -322,7 +322,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(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 a74c0a5..806a846 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -137,7 +137,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -167,7 +167,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -196,7 +196,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -215,7 +215,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -245,7 +245,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -273,7 +273,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -291,7 +291,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -322,7 +322,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(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 1448a1f..869b944 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -137,7 +137,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -167,7 +167,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -196,7 +196,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -215,7 +215,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -245,7 +245,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -273,7 +273,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -291,7 +291,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -322,7 +322,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/GettingStarted/sub_string_finder/xcode/sub_string_finder.xcodeproj/project.pbxproj b/examples/GettingStarted/sub_string_finder/xcode/sub_string_finder.xcodeproj/project.pbxproj
index 0800395..7a384bc 100644
--- a/examples/GettingStarted/sub_string_finder/xcode/sub_string_finder.xcodeproj/project.pbxproj
+++ b/examples/GettingStarted/sub_string_finder/xcode/sub_string_finder.xcodeproj/project.pbxproj
@@ -265,7 +265,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -281,7 +281,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -330,7 +330,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -351,7 +351,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
diff --git a/examples/Makefile b/examples/Makefile
index 6be7e2c..c183e47 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -26,6 +26,13 @@
 
 # This file should be always located and called in $(tbb_root)/examples
 
+# Usage:
+#   make [all] [clean] [release] [debug] [test]
+#      executes specified targets for all examples.
+#   make {example's dir}/{target}
+#      calls specified example with specified target.
+#      For instance: make task/tree_sum/all
+
 tbb_root?=..
 BUILDING_PHASE:=0
 include ../build/common.inc
@@ -33,7 +40,7 @@ include ../build/common.inc
 ifneq ($(firstword is_abs_path$(subst /, ,$(tbb_root))),is_abs_path)
     # also changes related variables like work_dir
     override tbb_root := $(CWD)$(SLASH)..
-    export TBB20_INSTALL_DIR := $(tbb_root)
+    export TBB21_INSTALL_DIR := $(tbb_root)
 endif
 
 ifeq ($(tbb_os),windows)
@@ -66,6 +73,17 @@ else
             export CXXFLAGS += -m32
         endif
     endif
+    ifeq ($(compiler),suncc)
+    	export CXXFLAGS += -I$(tbb_root)$(SLASH)include -library=stlport4 -M$(tbb_root)/build/suncc.map.pause
+    endif
+    ifeq ($(tbb_os),SunOS)
+        ifeq ($(arch),em64t)
+            export CXXFLAGS += -m64
+        endif
+        ifeq ($(arch),ia32)
+            export CXXFLAGS += -m32
+        endif
+    endif
     ifeq ($(tbb_os),macos)
         ifeq ($(arch),em64t)
             # making GUI examples work in text console due to incompatible arch
@@ -84,16 +102,21 @@ else
 endif
 
 COMMON_TARGETS := all clean release debug test
-EXAMPLES_TARGETS := $(foreach T,$(COMMON_TARGETS),$(addsuffix _target.$(T),$(EXAMPLES)))
+# list of directories of examples
+EXAMPLES_DIRS := $(foreach T,$(EXAMPLES),$(dir $(T)))
+# targets to explicitly call example have format: {example's dir}/{example's target}
+EXAMPLES_TARGETS := $(foreach T,$(COMMON_TARGETS),$(addsuffix $(T),$(EXAMPLES_DIRS)))
 
 .PHONY: $(COMMON_TARGETS) $(EXAMPLES_TARGETS)
 
 .DEFAULT: all
 
-$(COMMON_TARGETS):: % : $(addsuffix _target.%,$(EXAMPLES))
+# execute standard targets for all examples
+$(COMMON_TARGETS):: % : $(addsuffix %,$(EXAMPLES_DIRS))
 
+# proxy rule for calling appropriate example
 $(EXAMPLES_TARGETS)::
-	-$(MAKE) -C $(@D)  -f $(EXAMPLE_MAKEFILE) $(subst .,,$(suffix $@)) CXX="$(CPLUS)"
+	-$(MAKE) -C $(@D)  -f $(EXAMPLE_MAKEFILE) $(notdir $@) CXX="$(CPLUS)"
 
 printenv:
 ifeq ($(tbb_os),windows)
diff --git a/examples/common/gui/convideo.cpp b/examples/common/gui/convideo.cpp
index f10c9d7..73bc79d 100644
--- a/examples/common/gui/convideo.cpp
+++ b/examples/common/gui/convideo.cpp
@@ -48,7 +48,7 @@ void video::win_load_accelerators(int idc)
 }
 #endif
 
-#elif __linux__ || __APPLE__
+#elif __linux__ || __APPLE__ || __FreeBSD__
 
 #include <sched.h>
 #include <sys/time.h>
@@ -101,14 +101,16 @@ video::~video()
 //! Count and display FPS count in titlebar
 bool video::next_frame()
 {
-	if(!g_fps) {
+    if(calc_fps){
+	    if(!g_fps) {
 #if _WIN32 || _WIN64
-        g_msec = GetTickCount();
+            g_msec = GetTickCount();
 #else
-        struct timezone tz; gettimeofday(&g_time, &tz);
+            struct timezone tz; gettimeofday(&g_time, &tz);
 #endif
-	}
-    g_fps++;
+	    }
+        g_fps++;
+    }
     return running;
 }
 
diff --git a/examples/common/gui/gdivideo.cpp b/examples/common/gui/gdivideo.cpp
index 064fc71..a77a45a 100644
--- a/examples/common/gui/gdivideo.cpp
+++ b/examples/common/gui/gdivideo.cpp
@@ -92,7 +92,7 @@ LRESULT CALLBACK InternalWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lPa
         case WM_RBUTTONUP:      g_video->on_mouse( (int)LOWORD(lParam), (int)HIWORD(lParam), -2); break;
         case WM_MBUTTONDOWN:    g_video->on_mouse( (int)LOWORD(lParam), (int)HIWORD(lParam), 3); break;
         case WM_MBUTTONUP:      g_video->on_mouse( (int)LOWORD(lParam), (int)HIWORD(lParam), -3); break;
-        case WM_CHAR:           g_video->on_key(wParam); break;
+        case WM_CHAR:           g_video->on_key( (int)wParam); break;
 
         // some useless stuff
         case WM_ERASEBKGND:     return 1;  // keeps erase-background events from happening, reduces chop
diff --git a/examples/common/index.html b/examples/common/index.html
index ba81e5b..0c4c036 100644
--- a/examples/common/index.html
+++ b/examples/common/index.html
@@ -18,7 +18,7 @@ This code is not intended to be used directly.  It is incorporated automatically
     <LI>X-windows (Linux* or Mac OS* X systems)
     </UL>
     See the examples that use the GUI
-    (<A HREF=../parallel_for/tacheon/index.html>tacheon</A> and <A HREF=../parallel_for/seismic/index.html>seismic</A>)
+    (<A HREF=../parallel_for/tachyon/index.html>tachyon</A> and <A HREF=../parallel_for/seismic/index.html>seismic</A>)
     for more details.
 </DL>
 
diff --git a/examples/concurrent_hash_map/count_strings/Makefile b/examples/concurrent_hash_map/count_strings/Makefile
index abe26d5..3619db9 100644
--- a/examples/concurrent_hash_map/count_strings/Makefile
+++ b/examples/concurrent_hash_map/count_strings/Makefile
@@ -30,18 +30,16 @@ PROG=count_strings
 # The C++ compiler
 #CXX=g++
 
-all:	release test
+all:   release test
 
 release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
 
 debug: *.cpp
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
 	rm -f $(PROG) *.o *.d
 
 test:
-	./$(PROG) 1
-	./$(PROG) 2
-	./$(PROG) 4
+	./$(PROG)
diff --git a/examples/concurrent_hash_map/count_strings/Makefile.windows b/examples/concurrent_hash_map/count_strings/Makefile.windows
index acf32b9..a791449 100644
--- a/examples/concurrent_hash_map/count_strings/Makefile.windows
+++ b/examples/concurrent_hash_map/count_strings/Makefile.windows
@@ -31,17 +31,15 @@ PROG=Count_Strings
 
 # The C++ compiler options
 CXX = cl.exe
-MYCXXFLAGS=/TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
-MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:$(PROG).exe $(LDFLAGS)
+MYCXXFLAGS = /TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
+MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
 
 all: release test
 release:
-	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe 
 debug:
-	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe 
 clean:
 	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
 test:
-	$(PROG)  1
-	$(PROG)  2
-	$(PROG)  4
+	$(PROG)
diff --git a/examples/concurrent_hash_map/count_strings/count_strings.cpp b/examples/concurrent_hash_map/count_strings/count_strings.cpp
index cc96a8f..7c89d01 100644
--- a/examples/concurrent_hash_map/count_strings/count_strings.cpp
+++ b/examples/concurrent_hash_map/count_strings/count_strings.cpp
@@ -26,49 +26,60 @@
     the GNU General Public License.
 */
 
+#include <string>
+#include <cstring>
+#include <cctype>
+#include <cstdlib>
 #include "tbb/concurrent_hash_map.h"
 #include "tbb/blocked_range.h"
 #include "tbb/parallel_for.h"
 #include "tbb/tick_count.h"
 #include "tbb/task_scheduler_init.h"
-#include <string>
-#include <cctype>
+#include "tbb/tbb_allocator.h"
+
+
+//! custom string
+typedef std::basic_string<char,std::char_traits<char>,tbb::tbb_allocator<char> > mystring;
 
 using namespace tbb;
 using namespace std;
 
 //! Set to true to counts.
 static bool Verbose = false;
+
 //! Working threads count
 static int NThread = 1;
+
 //! Problem size
 const size_t N = 1000000;
+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 string& x ) {
+    static size_t hash( const mystring& x ) {
         size_t h = 0;
         for( const char* s = x.c_str(); *s; s++ )
-            h = (h*17)^*s;
+            h = (h*16777179)^*s;
         return h;
     }
     //! True if strings are equal
-    static bool equal( const string& x, const string& y ) {
+    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<string,int,MyHashCompare> StringTable;
+typedef concurrent_hash_map<mystring,int,MyHashCompare> StringTable;
 
 //! Function object for counting occurrences of strings.
 struct Tally {
     StringTable& table;
     Tally( StringTable& table_ ) : table(table_) {}
-    void operator()( const blocked_range<string*> range ) const {
-        for( string* p=range.begin(); p!=range.end(); ++p ) {
+    void operator()( const blocked_range<mystring*> range ) const {
+        for( mystring* p=range.begin(); p!=range.end(); ++p ) {
             StringTable::accessor a;
             table.insert( a, *p );
             a->second += 1;
@@ -76,64 +87,130 @@ struct Tally {
     }
 };
 
-static string Data[N];
+static mystring Data[N];
 
 static void CountOccurrences(int nthreads) {
     StringTable table;
 
     tick_count t0 = tick_count::now();
-    parallel_for( blocked_range<string*>( Data, Data+N, 1000 ), Tally(table) );
+    parallel_for( blocked_range<mystring*>( Data, Data+N, 1000 ), Tally(table) );
     tick_count t1 = tick_count::now();
 
     int n = 0;
     for( StringTable::iterator i=table.begin(); i!=table.end(); ++i ) {
-        if( Verbose )
+        if( Verbose && nthreads )
             printf("%s %d\n",i->first.c_str(),i->second);
-        n+=i->second;
+        n += i->second;
     }
+
     if (is_number_of_threads_set) {
-        printf("threads = %d  total = %d  time = %g\n", nthreads, n, (t1-t0).seconds());
-    }else{
-        if ( nthreads == 1 ){
-            printf("serial run   total = %d  time = %g\n", n, (t1-t0).seconds());
-        }else{
-            printf("parallel run total = %d  time = %g\n", n, (t1-t0).seconds());
+        printf("threads = %d  total = %d  unique = %u  time = %g\n", nthreads, n, unsigned(table.size()), (t1-t0).seconds());
+    } else {
+        if ( nthreads == 1 ) {
+            printf("serial run   total = %d  unique = %u  time = %g\n", n, unsigned(table.size()), (t1-t0).seconds());
+        } else {
+            printf("parallel run total = %d  unique = %u  time = %g\n", n, unsigned(table.size()), (t1-t0).seconds());
         }
     }
 }
 
-static const string Adjective[] = {
-    "sour",
-    "sweet",
-    "bitter",
-    "salty",
-    "big",
-    "small"
-};
+/// Generator of random words
 
-static const string Noun[] = {
-    "apple",
-    "banana",
-    "cherry",
-    "date",
-    "eggplant",
-    "fig",
-    "grape",
-    "honeydew",
-    "icao",
-    "jujube"
+struct Sound {
+    const char *chars;
+    int rates[3];// begining, middle, ending
+};
+Sound Vowels[] = {
+    {"e", {445,6220,1762}}, {"a", {704,5262,514}}, {"i", {402,5224,162}}, {"o", {248,3726,191}},
+    {"u", {155,1669,23}}, {"y", {4,400,989}}, {"io", {5,512,18}}, {"ia", {1,329,111}},
+    {"ea", {21,370,16}}, {"ou", {32,298,4}}, {"ie", {0,177,140}}, {"ee", {2,183,57}},
+    {"ai", {17,206,7}}, {"oo", {1,215,7}}, {"au", {40,111,2}}, {"ua", {0,102,4}},
+    {"ui", {0,104,1}}, {"ei", {6,94,3}}, {"ue", {0,67,28}}, {"ay", {1,42,52}},
+    {"ey", {1,14,80}}, {"oa", {5,84,3}}, {"oi", {2,81,1}}, {"eo", {1,71,5}},
+    {"iou", {0,61,0}}, {"oe", {2,46,9}}, {"eu", {12,43,0}}, {"iu", {0,45,0}},
+    {"ya", {12,19,5}}, {"ae", {7,18,10}}, {"oy", {0,10,13}}, {"ye", {8,7,7}},
+    {"ion", {0,0,20}}, {"ing", {0,0,20}}, {"ium", {0,0,10}}, {"er", {0,0,20}}
 };
+Sound Consonants[] = {
+    {"r", {483,1414,1110}}, {"n", {312,1548,1114}}, {"t", {363,1653,251}}, {"l", {424,1341,489}},
+    {"c", {734,735,260}}, {"m", {732,785,161}}, {"d", {558,612,389}}, {"s", {574,570,405}},
+    {"p", {519,361,98}}, {"b", {528,356,30}}, {"v", {197,598,16}}, {"ss", {3,191,567}},
+    {"g", {285,430,42}}, {"st", {142,323,180}}, {"h", {470,89,30}}, {"nt", {0,350,231}},
+    {"ng", {0,117,442}}, {"f", {319,194,19}}, {"ll", {1,414,83}}, {"w", {249,131,64}},
+    {"k", {154,179,47}}, {"nd", {0,279,92}}, {"bl", {62,235,0}}, {"z", {35,223,16}},
+    {"sh", {112,69,79}}, {"ch", {139,95,25}}, {"th", {70,143,39}}, {"tt", {0,219,19}},
+    {"tr", {131,104,0}}, {"pr", {186,41,0}}, {"nc", {0,223,2}}, {"j", {184,32,1}},
+    {"nn", {0,188,20}}, {"rt", {0,148,51}}, {"ct", {0,160,29}}, {"rr", {0,182,3}},
+    {"gr", {98,87,0}}, {"ck", {0,92,86}}, {"rd", {0,81,88}}, {"x", {8,102,48}},
+    {"ph", {47,101,10}}, {"br", {115,43,0}}, {"cr", {92,60,0}}, {"rm", {0,131,18}},
+    {"ns", {0,124,18}}, {"sp", {81,55,4}}, {"sm", {25,29,85}}, {"sc", {53,83,1}},
+    {"rn", {0,100,30}}, {"cl", {78,42,0}}, {"mm", {0,116,0}}, {"pp", {0,114,2}},
+    {"mp", {0,99,14}}, {"rs", {0,96,16}}, /*{"q", {52,57,1}},*/ {"rl", {0,97,7}},
+    {"rg", {0,81,15}}, {"pl", {56,39,0}}, {"sn", {32,62,1}}, {"str", {38,56,0}},
+    {"dr", {47,44,0}}, {"fl", {77,13,1}}, {"fr", {77,11,0}}, {"ld", {0,47,38}},
+    {"ff", {0,62,20}}, {"lt", {0,61,19}}, {"rb", {0,75,4}}, {"mb", {0,72,7}},
+    {"rc", {0,76,1}}, {"gg", {0,74,1}}, {"pt", {1,56,10}}, {"bb", {0,64,1}},
+    {"sl", {48,17,0}}, {"dd", {0,59,2}}, {"gn", {3,50,4}}, {"rk", {0,30,28}},
+    {"nk", {0,35,20}}, {"gl", {40,14,0}}, {"wh", {45,6,0}}, {"ntr", {0,50,0}},
+    {"rv", {0,47,1}}, {"ght", {0,19,29}}, {"sk", {23,17,5}}, {"nf", {0,46,0}},
+    {"cc", {0,45,0}}, {"ln", {0,41,0}}, {"sw", {36,4,0}}, {"rp", {0,36,4}},
+    {"dn", {0,38,0}}, {"ps", {14,19,5}}, {"nv", {0,38,0}}, {"tch", {0,21,16}},
+    {"nch", {0,26,11}}, {"lv", {0,35,0}}, {"wn", {0,14,21}}, {"rf", {0,32,3}},
+    {"lm", {0,30,5}}, {"dg", {0,34,0}}, {"ft", {0,18,15}}, {"scr", {23,10,0}},
+    {"rch", {0,24,6}}, {"rth", {0,23,7}}, {"rh", {13,15,0}}, {"mpl", {0,29,0}},
+    {"cs", {0,1,27}}, {"gh", {4,10,13}}, {"ls", {0,23,3}}, {"ndr", {0,25,0}},
+    {"tl", {0,23,1}}, {"ngl", {0,25,0}}, {"lk", {0,15,9}}, {"rw", {0,23,0}},
+    {"lb", {0,23,1}}, {"tw", {15,8,0}}, /*{"sq", {15,8,0}},*/ {"chr", {18,4,0}},
+    {"dl", {0,23,0}}, {"ctr", {0,22,0}}, {"nst", {0,21,0}}, {"lc", {0,22,0}},
+    {"sch", {16,4,0}}, {"ths", {0,1,20}}, {"nl", {0,21,0}}, {"lf", {0,15,6}},
+    {"ssn", {0,20,0}}, {"xt", {0,18,1}}, {"xp", {0,20,0}}, {"rst", {0,15,5}},
+    {"nh", {0,19,0}}, {"wr", {14,5,0}}
+};
+const int VowelsNumber = sizeof(Vowels)/sizeof(Sound);
+const int ConsonantsNumber = sizeof(Consonants)/sizeof(Sound);
+int VowelsRatesSum[3] = {0,0,0}, ConsonantsRatesSum[3] = {0,0,0};
+
+int CountRateSum(Sound sounds[], const int num, const int part)
+{
+    int sum = 0;
+    for(int i = 0; i < num; i++)
+        sum += sounds[i].rates[part];
+    return sum;
+}
+
+const char *GetLetters(int type, const int part)
+{
+    Sound *sounds; int rate, i = 0;
+    if(type & 1)
+        sounds = Vowels, rate = rand() % VowelsRatesSum[part];
+    else
+        sounds = Consonants, rate = rand() % ConsonantsRatesSum[part];
+    do {
+        rate -= sounds[i++].rates[part];
+    } while(rate > 0);
+    return sounds[--i].chars;
+}
 
 static void CreateData() {
-    size_t n_adjective = sizeof(Adjective)/sizeof(Adjective[0]);
-    size_t n_noun = sizeof(Noun)/sizeof(Noun[0]);
+    for(int i = 0; i < 3; i++) {
+        ConsonantsRatesSum[i] = CountRateSum(Consonants, ConsonantsNumber, i);
+        VowelsRatesSum[i] = CountRateSum(Vowels, VowelsNumber, i);
+    }
     for( int i=0; i<N; ++i ) {
-        Data[i] = Adjective[rand()%n_adjective];
-        Data[i] += " ";
-        Data[i] += Noun[rand()%n_noun];
+        int type = rand();
+        Data[i] = GetLetters(type++, 0);
+        for( int j = 0; j < type%size_factor; ++j )
+            Data[i] += GetLetters(type++, 1);
+        Data[i] += GetLetters(type, 2);
     }
+    mystring planet = Data[12]; planet[0] = toupper(planet[0]);
+    mystring helloworld = Data[0]; helloworld[0] = toupper(helloworld[0]);
+    helloworld += ", "+Data[1]+" "+Data[2]+" "+Data[3]+" "+Data[4]+" "+Data[5];
+    printf("Message from planet '%s': %s!\nAnalyzing whole text...\n", planet.c_str(), helloworld.c_str());
 }
 
+/// Main Driver 
+
 static void ParseCommandLine( int argc, char* argv[] ) {
     int i = 1;
     if( i<argc && strcmp( argv[i], "verbose" )==0 ) {
@@ -153,19 +230,17 @@ static void ParseCommandLine( int argc, char* argv[] ) {
 int main( int argc, char* argv[] ) {
     srand(2);
     ParseCommandLine( argc, argv );
+    CreateData();
     if (is_number_of_threads_set) {
         task_scheduler_init init(NThread);
-        CreateData();
         CountOccurrences(NThread);
     } else { // Number of threads wasn't set explicitly. Run serial and parallel version
         { // serial run
             task_scheduler_init init_serial(1);
-            CreateData();
             CountOccurrences(1);
         }
         { // parallel run (number of threads is selected automatically)
             task_scheduler_init init_parallel;
-            CreateData();
             CountOccurrences(0);
         }
     }
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 f34b173..72ca945 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -90,7 +90,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(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 d804fcc..21fe0f5 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -248,7 +248,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -276,7 +276,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -325,7 +325,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/concurrent_hash_map/count_strings/vc9/count_strings.suo b/examples/concurrent_hash_map/count_strings/vc9/count_strings.suo
index b13c0fd..2aea0a3 100644
Binary files a/examples/concurrent_hash_map/count_strings/vc9/count_strings.suo and b/examples/concurrent_hash_map/count_strings/vc9/count_strings.suo differ
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 c460a14..e7b87c3 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -137,7 +137,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -167,7 +167,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -196,7 +196,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -215,11 +215,11 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
-				FixedBaseAddress="1"
 				TargetMachine="17"
+				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -240,9 +240,12 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -270,7 +273,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -288,12 +291,12 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
-				FixedBaseAddress="1"
 				TargetMachine="17"
+				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -314,9 +317,12 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/concurrent_hash_map/count_strings/xcode/count_strings.xcodeproj/project.pbxproj b/examples/concurrent_hash_map/count_strings/xcode/count_strings.xcodeproj/project.pbxproj
index 69385b8..9a29d3f 100644
--- a/examples/concurrent_hash_map/count_strings/xcode/count_strings.xcodeproj/project.pbxproj
+++ b/examples/concurrent_hash_map/count_strings/xcode/count_strings.xcodeproj/project.pbxproj
@@ -163,7 +163,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -179,7 +179,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -228,7 +228,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -249,7 +249,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
diff --git a/examples/index.html b/examples/index.html
index 5e80cb9..0e41249 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -10,6 +10,8 @@ This directory has example usages of Threading Building Blocks.
 <DD>Examples from the <A HREF="../doc/Getting_Started.pdf">Getting Started Guide</A>.
 <DT><A HREF="concurrent_hash_map/index.html">concurrent_hash_map</A>
 <DD>Examples using <CODE>concurrent_hash_map</CODE>.
+<DT><A HREF="parallel_do/index.html">parallel_do</A>
+<DD>Examples using <CODE>parallel_do</CODE>.
 <DT><A HREF="parallel_for/index.html">parallel_for</A>
 <DD>Examples using <CODE>parallel_for</CODE>.
 <DT><A HREF="parallel_reduce/index.html">parallel_reduce</A>
diff --git a/examples/parallel_for/index.html b/examples/parallel_do/index.html
similarity index 67%
copy from examples/parallel_for/index.html
copy to examples/parallel_do/index.html
index 254896e..aeb126d 100644
--- a/examples/parallel_for/index.html
+++ b/examples/parallel_do/index.html
@@ -2,14 +2,12 @@
 <BODY>
 
 <H2>Overview</H2>
-This directory has examples of the template <code>parallel_for</code>.
+This directory has examples of the template <code>parallel_do</code>.
 
 <H2>Directories</H2>
 <DL>
-<DT><A HREF="seismic/index.html">seismic</A>
-<DD>Parallel seismic wave simulation.
-<DT><A HREF="tacheon/index.html">tacheon</A>
-<DD>Parallel 2-D raytracer/renderer.
+<DT><A HREF="parallel_preorder/index.html">parallel_preorder</A>
+<DD>Parallel preorder traversal of a graph.
 </DL>
 
 <HR>
diff --git a/examples/parallel_while/parallel_preorder/Graph.cpp b/examples/parallel_do/parallel_preorder/Graph.cpp
similarity index 97%
copy from examples/parallel_while/parallel_preorder/Graph.cpp
copy to examples/parallel_do/parallel_preorder/Graph.cpp
index 9442d13..548025a 100644
--- a/examples/parallel_while/parallel_preorder/Graph.cpp
+++ b/examples/parallel_do/parallel_preorder/Graph.cpp
@@ -27,8 +27,11 @@
 */
 
 #include <cstdio>
+#include <cstdlib>
 #include "Graph.h"
 
+using namespace std;
+
 void Graph::create_random_dag( size_t number_of_nodes ) {
     my_vertex_set.resize(number_of_nodes);
     for( size_t k=0; k<number_of_nodes; ++k ) {
@@ -69,7 +72,7 @@ void Graph::print() {
     }
 }
 
-void Graph::get_root_set( std::vector<Cell*>& root_set ) {
+void Graph::get_root_set( vector<Cell*>& root_set ) {
     for( size_t k=0; k<my_vertex_set.size(); ++k ) {
         my_vertex_set[k].successor.clear();
     }
diff --git a/src/test/test_cache_aligned_allocator_STL.cpp b/examples/parallel_do/parallel_preorder/Graph.h
similarity index 54%
copy from src/test/test_cache_aligned_allocator_STL.cpp
copy to examples/parallel_do/parallel_preorder/Graph.h
index 9215391..241c068 100644
--- a/src/test/test_cache_aligned_allocator_STL.cpp
+++ b/examples/parallel_do/parallel_preorder/Graph.h
@@ -26,31 +26,65 @@
     the GNU General Public License.
 */
 
-// Test whether cache_aligned_allocator works with some of the host's STL containers.
+#include "Matrix.h"
+#include "tbb/atomic.h"
+#include <vector>
 
-#include "tbb/cache_aligned_allocator.h"
+namespace TBB = tbb;
 
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "test_allocator.h"
+enum OpKind {
+    // Use Cell's value
+    OP_VALUE,
+    // Unary negation
+    OP_NEGATE,
+    // Addition
+    OP_ADD,
+    // Subtraction
+    OP_SUB,
+    // Multiplication
+    OP_MUL
+};
 
-// Test whether an allocator works with some of the host's STL containers.
+static const int ArityOfOp[] = {0,1,2,2,2};
 
-#include <vector>
-#include <list>
-#include <deque>
-
-int main() {
-    TestContainer<std::vector<int,tbb::cache_aligned_allocator<int> > >();
-#if defined(_WIN64) && !defined(_CPPLIB_VER)
-    // Microsoft incorrectly typed the first argument to std::allocator<T>::deallocate
-    // as (void*), and depends upon this error in their early versions of list and deque.
-    printf("Warning: compatibility of cache_aligned_allocator with list and deque not tested\n"
-           "because they depend on error that Microsoft corrected later.\n");
-#else
-    TestContainer<std::list<int,tbb::cache_aligned_allocator<int> > >();
-    TestContainer<std::deque<int,tbb::cache_aligned_allocator<int> > >();
-#endif /* _WIN64 */
-    printf("done\n");
-    return 0;
-}
+class Cell {
+public:
+    //! Operation for this cell
+    OpKind op;
+
+    //! Inputs to this cell
+    Cell* input[2];
+   
+    //! Type of value stored in a Cell
+    typedef Matrix value_type;
+
+    //! Value associated with this Cell
+    value_type value;
+
+    //! Set of cells that use this Cell as an input
+    std::vector<Cell*> successor;
+
+    //! Reference count of number of inputs that are not yet updated.
+    TBB::atomic<int> ref_count;
+
+    //! Update the Cell's value.
+    void update();
+
+    //! Default construtor
+    Cell() {}
+};
+
+//! A directed graph where the vertices are Cells.
+class Graph {
+    std::vector<Cell> my_vertex_set;
+public:
+    //! Create a random acyclic directed graph
+    void create_random_dag( size_t number_of_nodes );
+
+    //! Print the graph
+    void print();
+
+    //! Get set of cells that have no inputs.
+    void get_root_set( std::vector<Cell*>& root_set );
+};
 
diff --git a/examples/parallel_while/parallel_preorder/Makefile b/examples/parallel_do/parallel_preorder/Makefile
similarity index 95%
copy from examples/parallel_while/parallel_preorder/Makefile
copy to examples/parallel_do/parallel_preorder/Makefile
index 64cc08a..8830701 100644
--- a/examples/parallel_while/parallel_preorder/Makefile
+++ b/examples/parallel_do/parallel_preorder/Makefile
@@ -33,10 +33,10 @@ PROG=parallel_preorder
 all:	release test
 
 release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
 
 debug: *.cpp
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
 	rm -f $(PROG) *.o *.d
diff --git a/examples/parallel_while/parallel_preorder/Makefile.windows b/examples/parallel_do/parallel_preorder/Makefile.windows
similarity index 82%
copy from examples/parallel_while/parallel_preorder/Makefile.windows
copy to examples/parallel_do/parallel_preorder/Makefile.windows
index a475998..67c87d9 100644
--- a/examples/parallel_while/parallel_preorder/Makefile.windows
+++ b/examples/parallel_do/parallel_preorder/Makefile.windows
@@ -31,14 +31,14 @@ PROG=Parallel_Preorder
 
 # The C++ compiler options
 CXX = cl.exe
-MYCXXFLAGS=/TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CRT_SECURE_NO_DEPRECATE /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
-MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:$(PROG).exe $(LDFLAGS)
+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) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 debug:
-	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 clean:
 	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
 test:
diff --git a/src/tbbmalloc/tbbmalloc.cpp b/examples/parallel_do/parallel_preorder/Matrix.h
similarity index 52%
copy from src/tbbmalloc/tbbmalloc.cpp
copy to examples/parallel_do/parallel_preorder/Matrix.h
index c39b551..cdb69f4 100644
--- a/src/tbbmalloc/tbbmalloc.cpp
+++ b/examples/parallel_do/parallel_preorder/Matrix.h
@@ -26,23 +26,43 @@
     the GNU General Public License.
 */
 
-//#define INSTANTIATE_ITT_NOTIFY 1
-//#include "tbb/itt_notify.h"
-#include "Customize.h"
-
-#ifdef _WIN32
-#include <windows.h>
-
-BOOL WINAPI DllMain( HINSTANCE hInst, DWORD callReason, LPVOID )
-{
-    if (callReason==DLL_THREAD_DETACH)
-    {
-        mallocThreadShutdownNotification(NULL);
+class Matrix {
+    static const int n = 10;
+    float array[n][n];
+public:
+    Matrix() {}
+    Matrix( float z ) {
+        for( int i=0; i<n; ++i )
+            for( int j=0; j<n; ++j )
+                array[i][j] = i==j ? z : 0;
+    }
+    friend Matrix operator-( const Matrix& x ) {
+        Matrix result;
+        for( int i=0; i<n; ++i )
+            for( int j=0; j<n; ++j )
+                result.array[i][j] = -x.array[i][j];
+        return result;
+    }
+    friend Matrix operator+( const Matrix& x, const Matrix& y ) {
+        Matrix result;
+        for( int i=0; i<n; ++i )
+            for( int j=0; j<n; ++j )
+                result.array[i][j] = x.array[i][j] + y.array[i][j];
+        return result;
+    }
+    friend Matrix operator-( const Matrix& x, const Matrix& y ) {
+        Matrix result;
+        for( int i=0; i<n; ++i )
+            for( int j=0; j<n; ++j )
+                result.array[i][j] = x.array[i][j] - y.array[i][j];
+        return result;
     }
-    else if (callReason==DLL_PROCESS_DETACH)
-    {
-        mallocProcessShutdownNotification();
+    friend Matrix operator*( const Matrix& x, const Matrix& y ) {
+        Matrix result(0);
+        for( int i=0; i<n; ++i ) 
+            for( int k=0; k<n; ++k )
+                for( int j=0; j<n; ++j )
+                    result.array[i][j] += x.array[i][k] * y.array[k][j];
+        return result;
     }
-    return TRUE;
-}
-#endif //_WIN32
+};
diff --git a/examples/parallel_do/parallel_preorder/index.html b/examples/parallel_do/parallel_preorder/index.html
new file mode 100644
index 0000000..9acd3ef
--- /dev/null
+++ b/examples/parallel_do/parallel_preorder/index.html
@@ -0,0 +1,94 @@
+<HTML>
+<BODY>
+
+<H2>Overview</H2>
+Example that uses parallel_do to do parallel preorder traversal of a sparse graph.
+<P>
+Each vertex in the graph is called a "cell".  
+Each cell has a value. 
+The value is a matrix. 
+Some of the cells have operators
+that compute the cell's value, using other cell's values as input.
+A cell that uses the value of cell x is called a successor of x.
+</P><P>
+The algorithm works as follows. 
+<OL>
+<LI> Compute the set of cells that have no inputs. This set is called <TT>root_set</TT>.
+<LI> Each cell has an associated field <TT>ref_count</TT> that is an atomic integer.
+     Initialize <TT>ref_count</TT> to the number of inputs for the Cell.
+<LI> Update each cell in <TT>root_set</TT>, by applying a <TT>parallel_do</TT> to a <TT>root_set</TT>
+<LI> After updating a cell, for each of its successors 
+<OL>
+<LI> Atomically decrement the successor's <TT>ref_count</TT>
+<LI> If the count became zero, add the cell to the set of cells to be updated,
+     by calling <TT>parallel_do_feeder_impl::add</TT>.
+</OL>
+</OL>
+</P><P>
+The times printed are for the traversal and update, 
+and do not include time for computing the root_set.
+</P>
+<B>NOTE: </B>It is important to understand that this example is unlikely to show speedup 
+if the cell values are changed to type "float".  The reason is twofold.
+<UL>
+<LI> The smaller value type causes each Cell to be significantly smaller than a cache line,
+     which leads to false sharing conflicts.
+<LI> The time to update the cells becomes very small, and consequently the overhead of
+     parallel_do swamps the useful work.
+</UL>
+
+<H2>Files</H2>
+<DL>
+<DT><A HREF="parallel_preorder.cpp">parallel_preorder.cpp</A>
+<DD>Source code for example.
+<DT><A HREF="Graph.cpp">Graph.cpp</A>
+<DD>Source code for example.
+<DT><A HREF="Graph.h">Graph.h</A>
+<DD>Source code for example.
+<DT><A HREF="Matrix.h">Matrix.h</A>
+<DD>Source code for example.
+<DT><A HREF="Makefile">Makefile</A>
+<DD>Makefile for building example.
+</DL>
+
+<H2>Directories</H2>
+<DL>
+<DT><A HREF="vc7.1">vc7.1</A>
+<DD>Contains Microsoft* Visual Studio* .NET 2003 workspace for building and running the example.
+<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.
+<DT><A HREF="xcode">xcode</A>
+<DD>Contains Xcode* IDE 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>.
+
+<H2>Usage</H2>
+<DL>
+<DT><TT>parallel_preorder [<I>M</I>[:<I>N</I>] [<I>Rounds</I> [<I>'pause'</I>]]]</TT>
+<DD><I>M</I> and <I>N</I> are a range of numbers of threads to be used.
+<DD><I>Rounds</I> is the number of rounds the example runs internally. Default value 
+    is 50; reduce it to shorten example run time.
+<DD>If 'pause' is specified, the application will wait for a user to hit return before it exits.
+<DT>To run a short version of this example, e.g., for use with Intel® Threading Tools:
+<DD>Build a <I>debug</I> version of the example
+    (see the <A HREF=../../index.html#build>build directions</A>).
+    <BR>Run it with the desired number of threads and smaller number of rounds, e.g., <TT>parallel_preorder 4 5</TT>.
+</DL>
+
+<HR>
+<A HREF="../index.html">Up to parent directory</A>
+<p></p>
+Copyright © 2005-2008 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/examples/parallel_while/parallel_preorder/parallel_preorder.cpp b/examples/parallel_do/parallel_preorder/parallel_preorder.cpp
similarity index 85%
copy from examples/parallel_while/parallel_preorder/parallel_preorder.cpp
copy to examples/parallel_do/parallel_preorder/parallel_preorder.cpp
index b84dcee..481ffa5 100644
--- a/examples/parallel_while/parallel_preorder/parallel_preorder.cpp
+++ b/examples/parallel_do/parallel_preorder/parallel_preorder.cpp
@@ -26,57 +26,45 @@
     the GNU General Public License.
 */
 
-/* Example program that shows how to use parallel_while to do parallel preorder 
+/* Example program that shows how to use parallel_do to do parallel preorder 
    traversal of a directed acyclic graph. */
 
-#include "tbb/parallel_while.h"
+#include "tbb/parallel_do.h"
 #include "tbb/atomic.h"
 #include <vector>
 #include <algorithm>
+#include <cstring>
 #include "Graph.h"
 
+using namespace std;
+
 //! Number of trials. Can be changed from command line
 int ntrial = 50;
 
 class Body {
-    tbb::parallel_while<Body>& my_while; 
 public:
-    Body( tbb::parallel_while<Body>& w ) : my_while(w) {};
+    Body() {};
 
     //------------------------------------------------------------------------
-    // Following signatures required by parallel_while
+    // Following signatures are required by parallel_do
     //------------------------------------------------------------------------
     typedef Cell* argument_type;
-    void operator()( Cell* c ) const {
+
+    void operator()( Cell* c, tbb::parallel_do_feeder<Cell*>& feeder ) const {
         c->update();
         // Restore ref_count in preparation for subsequent traversal.
         c->ref_count = ArityOfOp[c->op];
         for( size_t k=0; k<c->successor.size(); ++k ) {
             Cell* successor = c->successor[k];
             if( 0 == --(successor->ref_count) ) {
-                my_while.add( successor );
+                feeder.add( successor );
             }
         }
     }
 };   
 
-class Stream {
-    size_t k;
-    const std::vector<Cell*>& my_roots;
-public:
-    Stream( const std::vector<Cell*>& root_set ) : my_roots(root_set), k(0) {}
-    bool pop_if_present( Cell*& item ) {
-        bool result = k<my_roots.size();
-        if( result ) 
-            item = my_roots[k++];
-        return result;
-    }
-};    
-
-void ParallelPreorderTraversal( const std::vector<Cell*>& root_set ) {
-    tbb::parallel_while<Body> w;
-    Stream s(root_set);
-    w.run(s,Body(w));
+void ParallelPreorderTraversal( const vector<Cell*>& root_set ) {
+    tbb::parallel_do(root_set.begin(), root_set.end(),Body());
 }
 
 //------------------------------------------------------------------------
@@ -163,7 +151,7 @@ int main( int argc, char* argv[] ) {
         for( int trial=0; trial<ntrial; ++trial ) {
             Graph g;
             g.create_random_dag(1000);
-            std::vector<Cell*> root_set;
+            vector<Cell*> root_set;
             g.get_root_set(root_set);
             total_root_set_size += root_set.size();
 
diff --git a/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.sln b/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.sln
new file mode 100644
index 0000000..1cda54a
--- /dev/null
+++ b/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parallel_preorder", "parallel_preorder.vcproj", "{519446A2-AF27-429B-A5DF-625B8F034021}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{519446A2-AF27-429B-A5DF-625B8F034021}.Debug.ActiveCfg = Debug|Win32
+		{519446A2-AF27-429B-A5DF-625B8F034021}.Debug.Build.0 = Debug|Win32
+		{519446A2-AF27-429B-A5DF-625B8F034021}.Release.ActiveCfg = Release|Win32
+		{519446A2-AF27-429B-A5DF-625B8F034021}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.suo b/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.suo
new file mode 100644
index 0000000..b1af83e
Binary files /dev/null and b/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.suo differ
diff --git a/examples/parallel_while/parallel_preorder/vc7.1/parallel_preorder.vcproj b/examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.vcproj
similarity index 90%
copy from examples/parallel_while/parallel_preorder/vc7.1/parallel_preorder.vcproj
copy to examples/parallel_do/parallel_preorder/vc7.1/parallel_preorder.vcproj
index 7d05a1b..65d115f 100644
--- a/examples/parallel_while/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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -90,7 +90,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.sln b/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.sln
new file mode 100644
index 0000000..6b466e9
--- /dev/null
+++ b/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.sln
@@ -0,0 +1,25 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parallel_preorder", "parallel_preorder.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A252B}"
+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
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.Build.0 = Debug|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.ActiveCfg = Debug|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.Build.0 = Debug|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.ActiveCfg = Release|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.Build.0 = Release|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.ActiveCfg = Release|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.suo b/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.suo
new file mode 100644
index 0000000..958de8b
Binary files /dev/null and b/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.suo differ
diff --git a/examples/parallel_while/parallel_preorder/vc8/parallel_preorder.vcproj b/examples/parallel_do/parallel_preorder/vc8/parallel_preorder.vcproj
similarity index 90%
copy from examples/parallel_while/parallel_preorder/vc8/parallel_preorder.vcproj
copy to examples/parallel_do/parallel_preorder/vc8/parallel_preorder.vcproj
index 59e1fda..09c1f1f 100644
--- a/examples/parallel_while/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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -248,7 +248,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -276,7 +276,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -325,7 +325,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.sln b/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.sln
new file mode 100644
index 0000000..178fea0
--- /dev/null
+++ b/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.sln
@@ -0,0 +1,25 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parallel_preorder", "parallel_preorder.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A252B}"
+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
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.Build.0 = Debug|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.ActiveCfg = Debug|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.Build.0 = Debug|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.ActiveCfg = Release|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.Build.0 = Release|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.ActiveCfg = Release|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.suo b/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.suo
new file mode 100644
index 0000000..4721c27
Binary files /dev/null and b/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.suo differ
diff --git a/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.vcproj b/examples/parallel_do/parallel_preorder/vc9/parallel_preorder.vcproj
similarity index 90%
copy from examples/parallel_while/parallel_preorder/vc9/parallel_preorder.vcproj
copy to examples/parallel_do/parallel_preorder/vc9/parallel_preorder.vcproj
index 36c92cd..fc8aee1 100644
--- a/examples/parallel_while/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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -137,7 +137,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -167,7 +167,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -196,7 +196,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -215,7 +215,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -245,7 +245,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -273,7 +273,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -291,7 +291,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -322,7 +322,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_while/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj b/examples/parallel_do/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj
similarity index 98%
copy from examples/parallel_while/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj
copy to examples/parallel_do/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj
index 2da175e..c89f216 100644
--- a/examples/parallel_while/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj
+++ b/examples/parallel_do/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj
@@ -171,7 +171,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -187,7 +187,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -236,7 +236,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -257,7 +257,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
diff --git a/examples/parallel_for/index.html b/examples/parallel_for/index.html
index 254896e..f54ab6f 100644
--- a/examples/parallel_for/index.html
+++ b/examples/parallel_for/index.html
@@ -8,8 +8,10 @@ This directory has examples of the template <code>parallel_for</code>.
 <DL>
 <DT><A HREF="seismic/index.html">seismic</A>
 <DD>Parallel seismic wave simulation.
-<DT><A HREF="tacheon/index.html">tacheon</A>
+<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.
 </DL>
 
 <HR>
diff --git a/examples/parallel_for/seismic/Makefile b/examples/parallel_for/polygon_overlay/Makefile
similarity index 73%
copy from examples/parallel_for/seismic/Makefile
copy to examples/parallel_for/polygon_overlay/Makefile
index 5c3f53e..2fa726e 100644
--- a/examples/parallel_for/seismic/Makefile
+++ b/examples/parallel_for/polygon_overlay/Makefile
@@ -25,13 +25,13 @@
 # the GNU General Public License.
 
 # GNU Makefile that builds and runs example.
-NAME=seismic
+NAME=pover
 
 # The C++ compiler
 #CXX=g++
 
 # detecting x64
-ifeq ($(shell arch),x86_64)
+ifeq ($(shell uname -m),x86_64)
 x64 ?= 64
 endif
 # detecting UI ("mac", "x" or "con")
@@ -44,7 +44,7 @@ endif
 
 ifeq ($(UI),x)
 EXE=./$(NAME)
-CXXFLAGS += -I/usr/X11R6/include
+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)
@@ -55,17 +55,20 @@ endif # libXext
 else # ! X
 
 ifeq ($(UI),mac)
-TBBLIBS = /Library/Frameworks/TBB.framework/Libraries
-CXXFLAGS += -L$(TBBLIBS) -arch i386 -mmacosx-version-min=10.4 -fno-rtti -msse3 -ftree-vectorize
+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)
-PBXCP = /System/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -resolve-src-symlinks -exclude .DS_Store -exclude CVS
+# 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
+SRCFILES = polymain.cpp polyover.cpp
+GUIFILES = ../../common/gui/$(UI)video.cpp pover_video.cpp
 
 all:	release test
 
@@ -76,11 +79,11 @@ ifeq ($(UI),mac)
 	$(PBXCP) xcode/Info.plist $(APPRES)
 endif
 
-release: ../../common/gui/$(UI)video.cpp SeismicSimulation.cpp resources
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(EXE) $< *.cpp -ltbb $(LIBS)
+release: $(GUIFILES) $(SRCFILES) resources
+	$(CXX) -O3 -DNDEBUG $(CXXFLAGS) -o $(EXE) $< *.cpp -ltbb -ltbbmalloc $(LIBS)
 
-debug: ../../common/gui/$(UI)video.cpp SeismicSimulation.cpp resources
-	$(CXX) -g -O0 -DTBB_DO_ASSERT $(CXXFLAGS) -o $(EXE) $< *.cpp -ltbb_debug $(LIBS)
+debug:  $(GUIFILES) $(SRCFILES) resources
+	$(CXX) -g -O0 -DTBB_DO_ASSERT -D_DEBUG $(CXXFLAGS) -o $(EXE) $< *.cpp -ltbb_debug -ltbbmalloc_debug $(LIBS)
 
 clean:
 	rm -f $(EXE) *.o *.d
@@ -90,7 +93,7 @@ endif
 
 test:
 ifeq ($(UI),mac)
-	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBS)"; $(EXE) - 300
+	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; $(EXE)
 else
-	$(EXE) - 300
+	$(EXE)
 endif
diff --git a/examples/parallel_for/seismic/Makefile.windows b/examples/parallel_for/polygon_overlay/Makefile.windows
similarity index 86%
copy from examples/parallel_for/seismic/Makefile.windows
copy to examples/parallel_for/polygon_overlay/Makefile.windows
index 16ae5cc..9363ede 100644
--- a/examples/parallel_for/seismic/Makefile.windows
+++ b/examples/parallel_for/polygon_overlay/Makefile.windows
@@ -27,7 +27,7 @@
 # Common Makefile that builds and runs example.
 
 # Just specify your program basename
-PROG=Seismic
+PROG=Pover
 
 # The C++ compiler options
 CXX = cl.exe
@@ -51,10 +51,10 @@ MAKEINC = ../../common/gui/Makefile.win
 
 all: release test
 release:
-	@$(MAKE) -f $(MAKEINC) UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LFLAGS="$(LDFLAGS) tbb.lib" XARCH=$(XARCH) RCNAME=SeismicSimulation SOURCE=SeismicSimulation.cpp EXE=$(PROG).exe build_one
+	@$(MAKE) -f $(MAKEINC) UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LFLAGS="$(LDFLAGS) tbb.lib tbbmalloc.lib $(LIBS)" XARCH=$(XARCH) RCNAME=pover SOURCE=*.cpp EXE=$(PROG).exe build_one
 debug:
-	@$(MAKE) -f $(MAKEINC) UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) /D TBB_DO_ASSERT" LFLAGS="$(LDFLAGS) tbb_debug.lib" XARCH=$(XARCH) RCNAME=SeismicSimulation SOURCE=SeismicSimulation.cpp EXE=$(PROG).exe build_one
+	@$(MAKE) -f $(MAKEINC) UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) /D TBB_DO_ASSERT" LFLAGS="$(LDFLAGS) tbb_debug.lib tbbmalloc_debug.lib $(LIBS)" XARCH=$(XARCH) RCNAME=pover SOURCE=*.cpp EXE=$(PROG).exe build_one
 clean:
-	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest vc7.1\SeismicSimulation.res
+	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest vc7.1\pover.res
 test:
-	$(PROG) - 300
+	$(PROG)
diff --git a/examples/parallel_for/polygon_overlay/index.html b/examples/parallel_for/polygon_overlay/index.html
new file mode 100644
index 0000000..64a2fff
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/index.html
@@ -0,0 +1,133 @@
+<HTML>
+<BODY>
+
+<H2>Overview</H2>
+Polygon Overlay example that demonstrates the use of parallel_for.
+<P>
+This example is a simple implementation of polygon overlay, as described in 
+<a href="http://citeseer.ist.psu.edu/cache/papers/cs/11981/ftp:zSzzSzftp.cs.vu.nlzSzpubzSzbalzSzcowichanzSzPolygonzSzreport.pdf/langendoen95parallelizing.pdf">
+	<i>Parallelizing the Polygon Overlay Problem Using Orca</i>, by H.F. Langendoen</a>.
+</P>
+The solution was implemented in three forms:
+<UL>
+	<LI>The naive serial solution.
+	<LI>The naive parallel solution, by splitting list of polygons from one map and intersecting 
+	each sub-list against the entire list of polygons from the second map.
+	<LI>A parallel solution where each map is split into submaps, with each resulting submap being
+	intersected against the corresponding submap from the other map.  This solution requires some
+	redundancy (some polygons are members of more than one submap).  To prevent multiple copies
+	of a polygon from being placed in the solution map, if both polygons are duplicated (that is,
+	if they both appear in more than one map), they are intersected but the result is not placed
+	in the solution map.
+</UL>
+The only optimization in each solution is that the area of the generated sub-polygons are subtracted from
+the original area of one of the source polygons.  When the remaining area is zero, the intersection process
+is halted.
+<P>
+<i>A word about the speedup of the submap case.</i>  One may get superlinear speedup in this case (for instance a 
+laptop with Intel® Core(TM) Duo processor got a speedup of about 20 percent over serial.)  This results from two effects:
+</P>
+<UL>
+	<LI>the number of threads used, and
+	<LI>the fact that for each submap, the number of polygons is smaller than that for the other two cases.
+</UL>
+If there are, say, 400 polygons in each map, then on average the number of intersections calculated is 
+approximately 80,000 (400 * 200, where 200 is the average number of polygons examined before stopping.)  
+If the maps are split into 2 submaps, the time for each submap is about 200*100, or 20,000.  So even
+comparing the two sets of submaps serially should result in a speedup somewhere around 2.  This number 
+is affected by the number of redundant polygons being compared; this effect would eventually swamp the gain
+from comparing smaller numbers of polygons per submap.  And remember the submaps are created by intersecting each
+map with a rectangular polygon covering the submap being generated, which is additional work taking about N * O(400)
+in the case above, where N is the number of submaps generated, that can be done in parallel.
+<P>
+Running the default release pover while varying the number of submaps from 1 to 1000, the speedup on the submap 
+case for a 2-processor system looks like<br>
+<img src="speedup.gif" alt="Table of speedup for the algorithm"><br>
+</P>
+<P>
+One further optimization would be to sort one map, say <b>map1</b>, by maxY, and sort the other map (<b>map2</b>) 
+by minY.  For <b>p1</b> in <b>map1</b>, start testing for intersection at the first <b>p2</b> in <b>map2</b> 
+that intersected the last polygon tested in <b>map1</b>.  This would speed up the intersection process greatly, 
+but the optimization would apply to all the methods, and the sort would have to be accounted for in the timing.
+</P>
+<P>
+The source maps are generated pseudo-randomly in the manner described in the paper above.  That is, if
+we need N polygons, then N "boxes" are chosen at random, then one-at-a-time the areas are expanded in
+one of fours directions until the area hits an adjacent polygon.  When this process is finished, the
+resulting map is inspected and any remaining unoccupied "boxes" are made into additional polygons, as
+large as possible in each case.  So the actual number of polygons in each map will in general be larger
+than the number of polygons requested (sometimes by 10% or more.)
+</P>
+<P>
+One limitation of the program is that if the number of polygons in the source map is greater than the number of
+"boxes" (pixels in the GUI case), the maps cannot be generated.
+</P>
+
+<H2>Files</H2>
+<DL>
+<DT><A HREF="polyover.cpp">polyover.cpp</A>
+<DD>Source code for main program.
+<DT><A HREF="polyover.h">polyover.h</A>
+<DD>Global variables, classes and enums.
+<DT><A HREF="pover_video.cpp">pover_video.cpp</A>
+<DD>Source code for the GUI interface.
+<DT><A HREF="pover_video.h">pover_video.h</A>
+<DD>Defines for the GUI version.
+<DT><A HREF="Makefile">Makefile</A>
+<DD>Makefile for building example.
+</DL>
+
+<H2>Directories</H2>
+<DL>
+<DT><A HREF="vc7.1">vc7.1</A>
+<DD>Contains Microsoft* Visual Studio* .NET 2003 workspace for building and running the example.
+<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.
+<DT><A HREF="xcode">xcode</A>
+<DD>Contains Mac OS* Xcode* 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>.  For the various UI options, see the <A HREF="../../common/index.html">common GUI code</A> build instructions.
+
+<P>
+For Windows* systems, Microsoft* Visual Studio* projects are provided for each of the above versions.
+</P>
+
+<H2>Usage</H2>
+Building via the above make commands, or via Visual Studio projects on Windows* systems, produces executable files
+named pover.exe.  To run these executables directly, use one or more of the following commands.
+<DL>
+<DT><TT>pover.exe</TT>
+<DD>Run this version (release or debug).
+<DT><TT>pover.exe n:m</TT>
+<DD>Run this version (release or debug) (m-n+1) times, with n threads to m threads inclusive.
+<DT>To run a short version of this example, e.g., for use with Intel® Threading Tools:
+<DD>Build a <I>debug</I> version with the GUI turned off
+    (e.g., <TT>make UI=con debug</TT>; see also the build directions above).
+    <BR>Run it with a small dataset, e.g., <TT>pover.exe --polys 10 --size 5x5</TT>.
+</DL>
+
+<H2>Notes</H2>
+<UL>
+<LI>While running with the GUI display should yield reasonable performance in most cases, <I>running with no GUI
+    display is strongly recommended</I> in order to demonstrate the full performance and scalability of the example.
+<LI>If using the X-windows (X11) GUI on Mac OS* systems, X11 might not be installed on the system by default.
+    To install X11 on Mac OS* systems, use the operating system install disk, choose "Optional installs" and select X11 from
+    the "Applications" list.  Alternatively, if X11 is not available, build without the GUI (see build targets above).
+</UL>
+
+<HR>
+<A HREF="../index.html">Up to parent directory</A>
+<p></p>
+Copyright © 2005-2008 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/examples/parallel_for/polygon_overlay/polymain.cpp b/examples/parallel_for/polygon_overlay/polymain.cpp
new file mode 100644
index 0000000..c24c8fa
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/polymain.cpp
@@ -0,0 +1,625 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+// Polygon overlay
+//
+// Don't want warnings about deprecated sscanf, getenv
+#ifndef _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE
+#endif
+#define _MAIN_C_ 1
+#include <iostream>
+#include <iomanip>
+#include <algorithm>
+#include <cstring>
+
+#include "tbb/tick_count.h"
+#include "tbb/task_scheduler_init.h"
+#include "pover_global.h"
+#include "polyover.h"
+#include "pover_video.h"
+#include "polymain.h"
+
+using namespace std;
+
+#if _DEBUG
+char *faceNames[] = { "North", "East", "South", "West" };
+#endif
+
+/** 
+**/
+int main( int argc, char **argv) {
+    pover_video poly;
+    poly.threaded = true;
+    gVideo = &poly;
+
+    if(!initializeVideo(argc, argv)) {
+        return 1;
+    }
+
+    gIsGraphicalVersion = poly.graphic_display();
+    if(argc > 1) {
+        if(!ParseCmdLine(argc, argv)) {
+            if(gIsGraphicalVersion) rt_sleep(10000);
+            // if graphical, we haven't opened the console window so all the error messages we
+            // so carefully wrote out disappeared into the ether.  :(
+            exit(1);
+        }
+    }
+
+    if(gCsvFilename != NULL) {
+#define BUFLEN 1000
+        std::string fname_buf = gCsvFilename;
+        fname_buf += ".csv";
+        gCsvFile.open(fname_buf.c_str());
+    }
+
+    // we have gMapXSize and gMapYSize determining the number of "squares"
+    // we have g_xwinsize and g_ywinsize the total size of the window
+    // we also have BORDER_SIZE the size of the border between maps
+    // we need to determine
+    //      g_polyBoxSize -- the number of pixels on each size of each square
+
+    if(gIsGraphicalVersion) {
+        int xpixelsPerMap = (g_xwinsize - 4*BORDER_SIZE) / 3;  // three maps, with borders between and outside
+        gMapXSize = xpixelsPerMap;   // make the boxes one per pixel
+        gPolyXBoxSize = xpixelsPerMap / gMapXSize;
+        int ypixelsPerMap = (g_ywinsize - 2*BORDER_SIZE);       // one map vertically
+        gMapYSize = ypixelsPerMap;   // one pixel per box, rather.
+
+        gPolyYBoxSize = ypixelsPerMap / gMapYSize;
+        if((gPolyXBoxSize == 0) || (gPolyYBoxSize == 0)) {
+            cout << "The display window is not large enough to show the maps" << std::endl;
+            int minxSize = 4*BORDER_SIZE + 3*gMapXSize;
+            int minySize = 2*BORDER_SIZE + gMapYSize;
+            cout << "  Should be at least " << minxSize << " x " << minySize << "." << std::endl;
+            return 1;
+        }
+        map2XLoc = 2*BORDER_SIZE + gMapXSize * gPolyXBoxSize;
+        maprXLoc = 3*BORDER_SIZE + 2 * gMapXSize * gPolyXBoxSize;
+
+    }
+    else {  // not gIsGraphicalVersion
+        // gMapXSize, gMapYSize, gNPolygons defined in pover_global.h
+    }
+
+    // create two polygon maps
+    SetRandomSeed(gMyRandomSeed);  // for repeatability
+
+    gVideo->main_loop();
+}
+
+void Usage(int argc, char **argv) {
+    char *cmdTail = strrchr(*argv, '\\');
+    if(cmdTail == NULL)  {
+        cmdTail = *argv;
+    }
+    else { 
+        cmdTail++;
+    }
+    cout << cmdTail << " [threads[:threads2]] [--polys npolys] [--size nnnxnnn] [--seed nnn]" << std::endl;
+    cout << "Create polygon maps and overlay them." << std::endl << std::endl;
+    cout << "Parameters:" << std::endl;
+    cout << "   threads[:threads2] - number of threads to run" << std::endl;
+    cout << "   --polys npolys - number of polygons in each map" << std::endl;
+    cout << "   --size nnnxnnn - size of each map (X x Y)" << std::endl;
+    cout << "   --seed nnn - initial value of random number generator" << std::endl;
+    cout << "   --csv filename - write timing data to CSV-format file" << std::endl;
+    cout << "   --grainsize n - set grainsize to n" << std::endl;
+    cout << "   --use_malloc - allocate polygons with malloc instead of scalable allocator" << std::endl;
+    cout << std::endl;
+    cout << "npolys must be smaller than the size of the map" << std::endl;
+    cout << std::endl;
+    exit(1);
+}
+
+bool ParseCmdLine(int argc, char **argv ) {
+    bool error_found = false;
+    bool nPolysSpecified = false;
+    bool nMapSizeSpecified = false;
+    bool nSeedSpecified = false;
+    bool csvSpecified = false;
+    bool grainsizeSpecified = false;
+    bool mallocSpecified = false;
+    int origArgc = argc;
+    char** origArgv = argv;
+    unsigned int newnPolygons = gNPolygons;
+    unsigned int newSeed = gMyRandomSeed;
+    unsigned int newX = gMapXSize;
+    unsigned int newY = gMapYSize;
+    unsigned int newGrainSize = gGrainSize;
+    argc--; argv++;
+    if(argc > 0 && isdigit((*argv)[0])) {
+        // first argument is one or two numbers, specifying how mny threads to run
+        char* end; gThreadsHigh = gThreadsLow = (int)strtol(argv[0],&end,0);
+        switch( *end) {
+            case ':': gThreadsHigh = (int)strtol(end+1,0,0); break;
+            case '\0': break;
+            default: cout << "Unexpected character in thread specifier: " << *end << std::endl; break;
+        }
+        if(gThreadsLow > gThreadsHigh) {
+            int t = gThreadsLow;
+            gThreadsLow = gThreadsHigh;
+            gThreadsHigh = t;
+        }
+        argv++; argc--;
+    }
+    while(argc > 0) {
+        // format 1: --size nnnxnnn, where nnn in {0 .. 9}+ -- size of map in "squares"
+        if(!strncmp("--size", *argv, (size_t)6)) {
+            if(nMapSizeSpecified) {
+                cout << " Error: map size multiply specified" << std::endl;
+                error_found = true;
+            }
+            else  {
+                argv++; argc--;
+                if(argc == 0) {
+                    error_found = true;
+                    cout << " Error: --size must have a value" << std::endl;
+                }
+                if(strchr(*argv, 'x') != strrchr(*argv,'x')) {
+                    // more than one 'x'
+                    cout << "Error: map size should be nnnxnnn (" << *argv << ")" << std::endl;
+                    error_found = true;
+                }
+                else {
+                    int rval;
+                    rval = sscanf(*argv, "%ux%u", &newX, &newY);
+                    if(rval != 2) {
+                        cout << "Error parsing map size (format should be nnnxnnn (" << *argv << ")" << std::endl;
+                        error_found = true;
+                    }
+                    if(newX == 0 || newY == 0) {
+                        cout << "Error: size of map should be greater than 0 (" << *argv << ")" << std::endl;
+                        error_found = true;
+                    }
+                }
+            }
+            argc--; argv++;
+        }
+        // format 2: --seed nnn -- initial random number seed
+        else if(!strncmp("--seed", *argv, (size_t)6)) {
+            argv++; argc--;
+            if(nSeedSpecified) {
+                cout << "Error: new seed multiply specified" << std::endl;
+                error_found = true;
+            }
+            else {
+                nSeedSpecified = true;
+                int rtval = sscanf(*argv, "%u", &newSeed);
+                if(rtval == 0) {
+                    cout << "Error: --seed should be an unsigned number (instead of " << *argv << ")" << std::endl;
+                    error_found = true;
+                }
+            }
+            argv++; argc--;
+        }
+        // format 3: --polys n[n] -- number of polygons in each map
+        else if(!strncmp("--polys", *argv, (size_t)7)) {
+            //unsigned int newnPolygons;
+            argv++; argc--;
+            if(nPolysSpecified) {
+                cout << "Error: number of polygons multiply-specified" << std::endl;
+                error_found = true;
+            }else {
+                int rtval = sscanf(*argv, "%u", &newnPolygons);
+                if(newnPolygons == 0) {
+                    cout << "Error: number of polygons must be greater than 0 (" << *argv << ")" << std::endl;
+                }
+            }
+            argv++; argc--;
+        }
+        // format 4: --csv <fileroot> -- name of CSV output file ("xxx" for "xxx.csv")
+        else if(!strncmp("--csv", *argv, (size_t)5)) {
+            argv++; argc--;
+            if(csvSpecified) {
+                cout << "Error: Multiple specification of CSV file" << std::endl;
+                error_found = true;
+            }
+            else {
+                gCsvFilename = *argv;
+                argv++; argc--;
+                csvSpecified = true;
+            }
+        }
+        else if(!strncmp("--grainsize", *argv, (size_t)11)) {
+            argv++; argc--;
+            if(grainsizeSpecified) {
+                cout << "Error: Multiple specification of grainsize" << std::endl;
+                error_found = true;
+            }
+            else {
+                int grval = sscanf(*argv, "%u", &newGrainSize);
+                grainsizeSpecified = true;
+                if(newGrainSize == 0) {
+                    cout << "Error: grainsize must be greater than 0" << std::endl;
+                    error_found = true;
+                }
+            }
+            argv++; argc--;
+        }
+        else if(!strncmp("--use_malloc", *argv, (size_t)12)) {
+            argv++; argc--;
+            if(mallocSpecified) {
+                cout << "Error: --use_malloc multiply-specified" << std::endl;
+                error_found = true;
+            }
+            else {
+                mallocSpecified = true;
+                gMBehavior = UseMalloc;
+            }
+        }
+        else {
+            cout << "Error: unrecognized argument: " << *argv << std::endl;
+            error_found = true;
+            argv++; argc--;
+        }
+    }
+    if(!error_found) {
+        if(newX * newY < newnPolygons) {
+            error_found = true;
+            cout << "Error: map size should not be smaller than the number of polygons (gNPolygons = " << newnPolygons << ", map size " << newX << "x" << newY << ")" << std::endl;
+        }
+    }
+    if(!error_found) {
+        gMapXSize = newX;
+        gMapYSize = newY;
+        gNPolygons = newnPolygons;
+        gMyRandomSeed = newSeed;
+        gGrainSize = (int)newGrainSize;
+    }
+    else {
+        Usage(origArgc, origArgv);
+    }
+    return !error_found;
+}
+
+// create a polygon map with at least gNPolygons polygons.
+// Usually more than gNPolygons polygons will be generated, because the
+// process of growing the polygons results in holes.
+bool GenerateMap(Polygon_map_t **newMap, int xSize, int ySize, int gNPolygons, colorcomp_t maxR, colorcomp_t maxG, colorcomp_t maxB) {
+    bool error_found = false;
+    int  *validPolys;
+    int  *validSide;
+    int maxSides;
+    RPolygon *newPoly;
+
+    if(xSize <= 0) {
+        cout << "xSize (" << xSize << ") should be > 0." << std::endl;
+        error_found = true;
+    }
+    if(ySize <= 0) {
+        cout << "ySize (" << ySize << ") should be > 0." << std::endl;
+        error_found = true;
+    }
+    if(gNPolygons > (xSize * ySize)) {
+        cout << "gNPolygons (" << gNPolygons << ") should be less than " << (xSize * ySize) << std::endl;
+        error_found = true;
+    }
+    if(error_found) return false;
+    // the whole map is [xSize x ySize] squares
+    // the way we create the map is to
+    //    1) pick nPolygon discrete squares on an [xSize x ySize] grid
+    //    2) while there are unused squares on the grid
+    //        3) pick a polygon with a side that has unused squares on a side
+    //        4) expand the polygon by 1 to occupy the unused squares
+    //
+    // Continue until every square on the grid is occupied by a polygon
+    int *tempMap;
+    tempMap = (int *)malloc(xSize * ySize * sizeof(int));
+    for(int i=0;i < xSize; i++) {
+        for(int j=0;j < ySize; j++) {
+            tempMap[i*ySize + j] = 0;
+        }
+    }
+
+    // *newMap = new vector<RPolygon>;
+    *newMap = new Polygon_map_t;
+    (*newMap)->reserve(gNPolygons + 1);  // how much bigger does this need to be on average?
+    newPoly = RPolygon::alloc_RPolygon(0,0,xSize-1, ySize-1);
+    (*newMap)->push_back(newPoly);
+    for(int i=0; i < gNPolygons; i++) {
+        int nX;
+        int nY;
+        do {    // look for an empty square.
+            nX = NextRan(xSize);
+            nY = NextRan(ySize);
+        } while(tempMap[nX * ySize + nY] != 0);
+        int nR = (maxR * NextRan(1000)) / 999;
+        int nG = (maxG * NextRan(1000)) / 999;
+        int nB = (maxB * NextRan(1000)) / 999;
+        newPoly = RPolygon::alloc_RPolygon(nX,nY,nX,nY,nR,nG,nB);
+        (*newMap)->push_back(newPoly);
+        tempMap[nX * ySize + nY] = i+1;     // index of this polygon + 1
+    }
+    // now have to grow polygons to fill the space.
+    validPolys = (int *)malloc(4*gNPolygons * sizeof(int));
+    validSide = (int *)malloc(4*gNPolygons * sizeof(int));
+    for(int i=0;i<gNPolygons;i++) {
+        validPolys[4*i] = validPolys[4*i + 1] = validPolys[4*i + 2] = validPolys[4*i + 3] = i + 1;
+        validSide[4*i] = NORTH_SIDE;
+        validSide[4*i+1] = EAST_SIDE;
+        validSide[4*i+2] = SOUTH_SIDE;
+        validSide[4*i+3] = WEST_SIDE;
+    }
+    maxSides = 4*gNPolygons;
+    while(maxSides > 0) {
+        int indx = NextRan(maxSides);
+        int polyIndx = validPolys[indx];
+        int checkSide = validSide[indx];
+        int xlow, xhigh, ylow, yhigh;
+        int xlnew, xhnew, ylnew, yhnew;
+        (**newMap)[polyIndx]->get(&xlow,&ylow,&xhigh,&yhigh);
+        xlnew = xlow;
+        xhnew = xhigh;
+        ylnew = ylow; 
+        yhnew = yhigh;
+        // can this polygon be expanded along the chosen side?
+        switch(checkSide) {
+        case NORTH_SIDE:
+            // y-1 from xlow to xhigh
+            ylow = yhigh = (ylow - 1);
+            ylnew--;
+            break;
+        case EAST_SIDE:
+            // x+1 from ylow to yhigh
+            xlow = xhigh = (xhigh + 1);
+            xhnew++;
+            break;
+        case SOUTH_SIDE:
+            // y+1 from xlow to xhigh
+            ylow = yhigh = (yhigh+1);
+            yhnew++;
+            break;
+        case WEST_SIDE:
+            // x-1 from ylow to yhigh
+            xlow = xhigh = (xlow - 1);
+            xlnew--;
+            break;
+        }
+        bool okay_to_extend = !(((xlow < 0) || (xlow >= xSize)) || ((ylow < 0) || (ylow >= ySize)));
+        for(int ii = xlow; (ii <= xhigh) && okay_to_extend; ii++) {
+            for(int jj=ylow; (jj <= yhigh) && okay_to_extend; jj++) {
+                okay_to_extend = tempMap[ii*ySize + jj] == 0;
+            }
+        }
+        if(okay_to_extend) {
+            (**newMap)[polyIndx]->set(xlnew,ylnew,xhnew,yhnew);
+            for(int ii = xlow; ii <= xhigh; ii++) {
+                for(int jj=ylow; jj <= yhigh && okay_to_extend; jj++) {
+                    tempMap[ii*ySize + jj] = polyIndx;
+                }
+            }
+        }
+        else {
+            // once we cannot expand along a side, we will never be able to; remove from the list.
+            for(int i=indx + 1; i < maxSides; i++) {
+                validPolys[i-1] = validPolys[i];
+                validSide[i-1] = validSide[i];
+            }
+            maxSides--;
+        }
+    }
+
+    // Once no polygons can be grown, look for unused squares, and fill them with polygons.
+    for(int j=0;j<ySize;j++) {
+        for(int i=0;i<xSize;i++) {
+            if(tempMap[i*ySize+j] == 0) {
+                // try to grow in the x direction, then the y direction
+                int ilen = i;
+                int jlen = j;
+                while(ilen < (xSize - 1) && tempMap[(ilen+1)*ySize + jlen] == 0) {
+                    ilen++;
+                }
+                bool yok = true;
+                while(yok && jlen < (ySize - 1)) {
+                    for(int ii = i; ii <= ilen && yok; ii++) {
+                        yok = (tempMap[ii*ySize + jlen + 1] == 0);
+                    }
+                    if(yok) {
+                        jlen++;
+                    }
+                }
+
+                // create new polygon and push it on our list.
+                int nR = (maxR * NextRan(1000)) / 999;
+                int nG = (maxG * NextRan(1000)) / 999;
+                int nB = (maxB * NextRan(1000)) / 999;
+                newPoly = RPolygon::alloc_RPolygon(i,j,ilen,jlen,nR,nG,nB);
+                (*newMap)->push_back(newPoly);
+                gNPolygons++;
+                for(int ii=i; ii<=ilen;ii++) {
+                    for(int jj=j;jj<=jlen;jj++) {
+                        tempMap[ii*ySize + jj] = gNPolygons;
+                    }
+                }
+            }
+        }
+    }
+
+#if _DEBUG
+    if(!gIsGraphicalVersion) {
+        cout << std::endl << "Final Map:" << std::endl;
+        for(int j=0; j < ySize; j++ ) {
+            cout << "Row " << setw(2) << j << ":";
+            for(int i=0;i<xSize;i++) {
+                int it = tempMap[i*ySize + j];
+                if(it<10) {
+                    cout << setw(2) << it;
+                }
+                else {
+                    char ct = (int)'a' + it - 10;
+                    cout << " " << ct;
+                }
+            }
+            cout << std::endl;
+        }
+    }
+#endif  // _DEBUG
+    return true;
+}
+
+void CheckPolygonMap(Polygon_map_t *checkMap) {
+#define indx(i,j) (i*gMapYSize + j)
+#define rangeCheck(str,n,limit) if(((n)<0)||((n)>=limit)) {cout << "checkMap error: " << str << " out of range (" << n << ")" << std::endl;anError=true;}
+#define xRangeCheck(str,n) rangeCheck(str,n,gMapXSize)
+#define yRangeCheck(str,n) rangeCheck(str,n,gMapYSize)
+    // The first polygon is the whole map.
+    bool anError = false;
+    int *cArray;
+    if(checkMap->size() <= 0) {
+        cout << "checkMap error: no polygons in map" << std::endl;
+        return;
+    }
+    // mapXhigh and mapYhigh are inclusive, that is, if the map is 5x5, those values would be 4.
+    int mapXhigh, mapYhigh, mapLowX, mapLowY;
+    int gMapXSize, gMapYSize;
+    checkMap->at(0)->get(&mapLowX, &mapLowY, &mapXhigh, &mapYhigh);
+    if((mapLowX !=0) || (mapLowY != 0)) {
+        cout << "checkMap error: map origin not (0,0) (X=" << mapLowX << ", Y=" << mapLowY << ")" << std::endl;
+        anError = true;
+    }
+    if((mapXhigh < 0) || (mapYhigh < 0)) {
+        cout << "checkMap error: no area in map (X=" << mapXhigh << ", Y=" << mapYhigh << ")" << std::endl;
+        anError = true;
+    }
+    if(anError) return;
+    // bounds for array.
+    gMapXSize = mapXhigh + 1;
+    gMapYSize = mapYhigh + 1;
+    cArray = (int *)malloc(sizeof(int)*(gMapXSize*gMapYSize));
+
+    for(int i=0; i<gMapXSize; i++) {
+        for(int j=0; j< gMapYSize; j++) {
+            cArray[indx(i,j)] = 0;
+        }
+    }
+
+    int xlow, xhigh, ylow, yhigh;
+    for(int p=1; p < int(checkMap->size()) && !anError; p++) {
+        checkMap->at(p)->get(&xlow, &ylow, &xhigh, &yhigh);
+        xRangeCheck("xlow", xlow);
+        yRangeCheck("ylow", ylow);
+        xRangeCheck("xhigh", xhigh);
+        yRangeCheck("yhigh", yhigh);
+        if(xlow>xhigh) {
+            cout << "checkMap error: xlow > xhigh (" << xlow << "," << xhigh << ")" << std::endl;
+            anError = true;
+        }
+        if(ylow>yhigh) {
+            cout << "checkMap error: ylow > yhigh (" << ylow << "," << yhigh << ")" << std::endl;
+            anError = true;
+        }
+        for(int ii = xlow; ii <= xhigh; ii++) {
+            for(int jj = ylow; jj <= yhigh; jj++) {
+                if(cArray[indx(ii,jj)] != 0) {
+                    cout << "checkMap error: polygons " << cArray[indx(ii,jj)] << " and " << p << " intersect" << std::endl;
+                    anError = true;
+                }
+                cArray[indx(ii,jj)] = p;
+            }
+        }
+    }
+    for(int ii=0; ii < gMapXSize; ii++) {
+        for(int jj=0; jj < gMapYSize; jj++) {
+            if(cArray[indx(ii,jj)] == 0) {
+                cout << "checkMap error: block(" << ii << ", " << jj << ") not in any polygon" << std::endl;
+                anError = true;
+            }
+        }
+    }
+}
+
+bool CompOnePolygon(RPolygon *p1, RPolygon *p2) {
+    int xl1, xh1, yl1, yh1;
+    int xl2, xh2, yl2, yh2;
+    p1->get(&xl1, &yl1, &xh1, &yh1);
+    p2->get(&xl2, &yl2, &xh2, &yh2);
+    if(yl1>yl2) return true;
+    if(yl1<yl2) return false;
+    return (xl1 > xl2);
+}
+
+bool PolygonsEqual(RPolygon *p1, RPolygon *p2) {
+    int xl1, xh1, yl1, yh1;
+    int xl2, xh2, yl2, yh2;
+    p1->get(&xl1, &yl1, &xh1, &yh1);
+    p2->get(&xl2, &yl2, &xh2, &yh2);
+    return ((xl1 == xl2) && (yl1==yl2) && (xh1 == xh2) && (yh1 == yh2));
+}
+
+bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2) {
+    // create two new polygon maps, copy the pointers from the original to these.
+    // we have to skip the first polygon, which is the size of the whole map
+    Polygon_map_t *t1, *t2;
+    bool is_ok = true;
+    t1 = new Polygon_map_t;
+    t1->reserve(map1->size());
+    for(unsigned int i=1;i<map1->size(); i++) {
+        t1->push_back(map1->at(i));
+    }
+    t2 = new Polygon_map_t;
+    t2->reserve(map2->size());
+    for(unsigned int i=1;i<map2->size();i++) {
+        t2->push_back(map2->at(i));
+    }
+    // sort the two created maps by (xlow, ylow)
+    sort(t1->begin(), t1->end(), CompOnePolygon);
+    sort(t2->begin(), t2->end(), CompOnePolygon);
+    // compare each element of both maps.
+    if(t1->size() != t2->size()) {
+        cout << "Error: maps not the same size ( " << int(t1->size()) << " vs " << int(t2->size()) << ")." << std::endl;
+    }
+    int maxSize = (int)((t1->size() < t2->size()) ? t1->size() : t2->size());
+    for(int i=0; i < maxSize; i++) {
+        if(!PolygonsEqual(t1->at(i), t2->at(i))) {
+            cout << "Error: polygons unequal (" << *(t1->at(i)) << " vs " << (*t2->at(i)) << std::endl;
+            is_ok = false;
+        }
+    }
+    return is_ok;
+}
+
+void SetRandomSeed(int newSeed) {
+    srand((unsigned)newSeed);
+}
+
+int NextRan(int n) {
+    // assert(n > 1);
+    // if we are given 1, we will just return 0
+    //assert(n < RAND_MAX);
+    int rrand = rand() << 15 | rand();
+    if(rrand < 0) rrand = -rrand;
+    return rrand % n;
+}
+
+std::ostream& operator<<(std::ostream& s, const RPolygon &p) {
+    int xl, yl, xh, yh;
+    p.get(&xl, &yl, &xh, &yh);
+    return s << "[(" << xl << "," << yl << ")-(" << xh << "," << yh << ")] ";
+}
diff --git a/src/tbb/concurrent_hash_map.cpp b/examples/parallel_for/polygon_overlay/polymain.h
similarity index 62%
copy from src/tbb/concurrent_hash_map.cpp
copy to examples/parallel_for/polygon_overlay/polymain.h
index 3de140f..f2890d3 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/examples/parallel_for/polygon_overlay/polymain.h
@@ -26,20 +26,28 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#include "pover_global.h"  // for declaration of DEFINE and INIT
 
-namespace tbb {
+DEFINE Polygon_map_t *gPolymap1 INIT(0);
+DEFINE Polygon_map_t *gPolymap2 INIT(0);
+DEFINE Polygon_map_t *gResultMap INIT(0);
 
-namespace internal {
+extern void Usage(int argc, char **argv);
 
-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;
-}
+extern bool ParseCmdLine(int argc, char **argv );
 
-} // namespace internal
+extern bool GenerateMap(Polygon_map_t **newMap, int xSize, int ySize, int gNPolygons, colorcomp_t maxR, colorcomp_t maxG, colorcomp_t maxB);
 
-} // namespace tbb
+extern bool PolygonsOverlap(RPolygon *p1, RPolygon *p2, int &xl, int &yl, int &xh, int &yh);
 
+extern void CheckPolygonMap(Polygon_map_t *checkMap);
+
+extern bool CompOnePolygon(RPolygon *p1, RPolygon *p2);
+
+extern bool PolygonsEqual(RPolygon *p1, RPolygon *p2);
+
+extern bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2);
+
+extern void SetRandomSeed(int newSeed);
+
+extern int NextRan(int n);
diff --git a/examples/parallel_for/polygon_overlay/polyover.cpp b/examples/parallel_for/polygon_overlay/polyover.cpp
new file mode 100644
index 0000000..c1f06ff
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/polyover.cpp
@@ -0,0 +1,405 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+// Polygon overlay
+//
+#include <iostream>
+#include <algorithm>
+#include <string.h>
+#include <cstdlib>
+#include <assert.h>
+#include "tbb/tick_count.h"
+#include "tbb/blocked_range.h"
+#include "tbb/task_scheduler_init.h"
+#include "tbb/parallel_for.h"
+#include "tbb/mutex.h"
+#include "tbb/spin_mutex.h"
+#include "polyover.h"
+#include "polymain.h"
+#include "pover_video.h"
+
+using namespace std;
+
+/*!
+* @brief intersects a polygon with a map, adding any results to output map
+*
+* @param[out] resultMap output map (must be allocated)
+* @param[in] polygon to be intersected
+* @param[in] map intersected against
+* @param[in] lock to use when adding output polygons to result map
+*
+*/
+void OverlayOnePolygonWithMap(Polygon_map_t *resultMap, RPolygon *myPoly, Polygon_map_t *map2, tbb::spin_mutex *rMutex) {
+    int r1, g1, b1, r2, g2, b2;
+    int myr=0;
+    int myg=0;
+    int myb=0;
+    int p1Area = myPoly->area();
+    for(unsigned int j=1; (j < map2->size()) && (p1Area > 0); j++) {
+        RPolygon *p2 = (*map2)[j];
+        RPolygon *pnew;
+        int newxMin, newxMax, newyMin, newyMax;
+        myPoly->getColor(&r1, &g1, &b1);
+        if(PolygonsOverlap(myPoly, p2, newxMin, newyMin, newxMax, newyMax)) {
+            p2->getColor(&r2, &g2, &b2);
+            myr = r1 + r2;
+            myg = g1 + g2;
+            myb = b1 + b2;
+            pnew = RPolygon::alloc_RPolygon(newxMin, newyMin, newxMax, newyMax, myr, myg, myb);
+            p1Area -= pnew->area(); // when all the area of the polygon is accounted for, we can quit.
+            if(rMutex) {
+                tbb::spin_mutex::scoped_lock lock(*rMutex);
+#if _DEBUG
+                pnew->print(int(resultMap->size()));
+#endif
+                resultMap->push_back(pnew);
+            }
+            else {
+#ifdef _DEBUG
+                pnew->print(int(resultMap->size()));
+#endif
+                resultMap->push_back(pnew);
+            }
+        }
+    }
+}
+
+/*!
+* @brief Serial version of polygon overlay
+* @param[out] output map
+* @param[in]  first map (map that individual polygons are taken from)
+* @param[in]  second map (map passed to OverlayOnePolygonWithMap)
+*/
+void SerialOverlayMaps(Polygon_map_t **resultMap, Polygon_map_t *map1, Polygon_map_t *map2) {
+    cout << "SerialOverlayMaps called" << std::endl;
+    *resultMap = new Polygon_map_t;
+
+    RPolygon *p0 = (*map1)[0];
+    int mapxSize, mapySize, ignore1, ignore2;
+    p0->get(&ignore1, &ignore2, &mapxSize, &mapySize);
+    (*resultMap)->reserve(mapxSize*mapySize); // can't be any bigger than this
+    // push the map size as the first polygon,
+    p0 = RPolygon::alloc_RPolygon(0,0,mapxSize, mapySize);
+    (*resultMap)->push_back(p0);
+    for(unsigned int i=1; i < map1->size(); i++) {
+        RPolygon *p1 = (*map1)[i];
+        OverlayOnePolygonWithMap(*resultMap, p1, map2, NULL);
+    }
+}
+
+/*!
+* @class ApplyOverlay
+* @brief Simple version of parallel overlay (make parallel on polygons in map1)
+*/
+class ApplyOverlay {
+    Polygon_map_t *m_map1, *m_map2, *m_resultMap;
+    tbb::spin_mutex *m_rMutex;
+public:
+    /*!
+    * @brief functor to apply
+    * @param[in] r range of polygons to intersect from map1
+    */
+    void operator()( const tbb::blocked_range<int> & r) const {
+        PRINT_DEBUG("From " << r.begin() << " to " << r.end());
+        for(int i=r.begin(); i != r.end(); i++) {
+            RPolygon *myPoly = (*m_map1)[i];
+            OverlayOnePolygonWithMap(m_resultMap, myPoly, m_map2, m_rMutex);
+        }
+    }
+    ApplyOverlay(Polygon_map_t *resultMap, Polygon_map_t *map1, Polygon_map_t *map2, tbb::spin_mutex *rmutex) :
+    m_resultMap(resultMap), m_map1(map1), m_map2(map2), m_rMutex(rmutex) {}
+};
+
+/*!
+* @brief apply the parallel algorithm
+* @param[out] result_map generated map
+* @param[in] polymap1 first map to be applied (algorithm is parallel on this map)
+* @param[in] polymap2 second map.
+*/
+void NaiveParallelOverlay(Polygon_map_t *&result_map, Polygon_map_t &polymap1, Polygon_map_t &polymap2) {
+// -----------------------------------
+    bool automatic_threadcount = false;
+
+    if(gThreadsLow == THREADS_UNSET || gThreadsLow == tbb::task_scheduler_init::automatic) {
+        gThreadsLow = gThreadsHigh = tbb::task_scheduler_init::automatic;
+        automatic_threadcount = true;
+    }
+    result_map = new Polygon_map_t;
+
+    RPolygon *p0 = polymap1[0];
+    int mapxSize, mapySize, ignore1, ignore2;
+    p0->get(&ignore1, &ignore2, &mapxSize, &mapySize);
+    result_map->reserve(mapxSize*mapySize); // can't be any bigger than this
+    // push the map size as the first polygon,
+    tbb::spin_mutex *resultMutex = new tbb::spin_mutex();
+    int grain_size = gGrainSize;
+
+    for(int nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) {
+        tbb::task_scheduler_init init(nthreads);
+        if(gIsGraphicalVersion) {
+            RPolygon *xp = RPolygon::alloc_RPolygon(0, 0, gMapXSize-1, gMapYSize-1, 0, 0, 0);  // Clear the output space
+            RPolygon::free_RPolygon( xp );
+        }
+        // put size polygon in result map
+        p0 = RPolygon::alloc_RPolygon(0,0,mapxSize, mapySize);
+        result_map->push_back(p0);
+
+        tbb::tick_count t0 = tbb::tick_count::now();
+        tbb::parallel_for (tbb::blocked_range<int>(1,(int)(polymap1.size()),grain_size), ApplyOverlay(result_map, &polymap1, &polymap2, resultMutex));
+        tbb::tick_count t1 = tbb::tick_count::now();
+
+        double naiveParallelTime = (t1-t0).seconds() * 1000;
+        cout << "Naive parallel with spin lock and ";
+        if(automatic_threadcount) cout << "automatic";
+        else cout << nthreads;
+        cout << ((nthreads == 1) ? " thread" : " threads");
+        cout << " took " << naiveParallelTime << " msec : speedup over serial " << (gSerialTime / naiveParallelTime) << std::endl;
+        if(gCsvFile.is_open()) {
+            gCsvFile << "," << naiveParallelTime;
+        }
+#if _DEBUG
+        CheckPolygonMap(result_map);
+        ComparePolygonMaps(result_map, gResultMap);
+#endif
+        for(int i=0; i<int(result_map->size());i++) {
+            RPolygon::free_RPolygon(result_map->at(i));
+        }
+        result_map->clear();
+    }
+    if(gCsvFile.is_open()) {
+        gCsvFile << std::endl;
+    }
+// -----------------------------------
+}
+
+/*!
+* @class ApplySplitOverlay
+* @brief parallel by columnar strip
+*/
+
+class ApplySplitOverlay {
+    Polygon_map_t *m_map1, *m_map2, *m_resultMap;
+    tbb::spin_mutex *m_rMutex;
+public:
+    /*!
+    * @brief functor for columnar parallel version
+    * @param[in] r range of map to be operated on
+    */
+    void operator()(const tbb::blocked_range<int> & r) const {
+#ifdef _DEBUG
+        // if we are debugging, serialize the method.  That way we can
+        // see what is happening in each strip without the interleaving
+        // confusing things.
+        tbb::spin_mutex::scoped_lock lock(*m_rMutex);
+        cout << unitbuf << "From " << r.begin() << " to " << r.end()-1 << std::endl;
+#endif
+        // instead of handing out subsets of polygons from map1 to intersect
+        // with the polygons in map2, we are handed a strip of the map from
+        // [(r.begin(),0)-(r.end()-1,yMapSize)].
+        //
+        // make a polygon with those values, and intersect with all the polygons
+        // in map1 and map2, creating flagged polygon lists fmap1 and fmap2.
+        // There are four possiblities:
+        //
+        //   1) a polygon is contained entirely within the strip.  We just
+        //      add the polygon to our flagged map.
+        //   2) the polygon will be partly contained in our strip, and partly
+        //      in the strip to our right (higher x values).  Add the polygon
+        //      to our flagged map.
+        //   3) the polygon is partly contained in our map, and partly in the
+        //      strip to our left.  Add the polygon to our map, but flag it as
+        //      a duplicate.
+        //   4) the polygons do not intersect. Don't add to flagged map.
+        //
+
+        // get yMapSize
+        int r1, g1, b1, r2, g2, b2;
+        int myr=-1;
+        int myg=-1;
+        int myb=-1;
+        int i1, i2, i3, yMapSize;
+        m_map1->at(0)->get(&i1, &i2, &i3, &yMapSize);
+        RPolygon *slicePolygon = RPolygon::alloc_RPolygon(r.begin(), 0, r.end() - 1, yMapSize);
+
+        Flagged_map_t *fmap1, *fmap2;
+        fmap1 = new std::vector<RPolygon_flagged>;
+        fmap1->reserve(m_map1->size());
+        fmap2 = new Flagged_map_t;
+        fmap2->reserve(m_map2->size());
+
+        PRINT_DEBUG(std::endl << "Map1 -------------------");
+        for(unsigned int i=1; i<m_map1->size(); i++) {
+            int xl, yl, xh, yh;
+            RPolygon *px = m_map1->at(i);
+            if(PolygonsOverlap(slicePolygon, px, xl, yl, xh, yh)) {
+                bool is_duplicate = false;
+                int pxl, pyl, pxh, pyh;
+                int indx = (int)(fmap1->size());
+                fmap1->resize(indx+1);
+                fmap1->at(indx).setp(px);
+                px->get(&pxl, &pyl, &pxh, &pyh);
+                if(pxl < xl) {
+                    is_duplicate = true;
+                }
+                //fmap1->at(indx).setp(px);
+                fmap1->at(indx).setDuplicate(is_duplicate);
+                PRINT_DEBUG(" Polygon " << *px << " is in map, is_duplicate=" << is_duplicate);
+
+            }
+        }
+
+        PRINT_DEBUG(std::endl << "Map2 -------------------");
+
+        for(unsigned int i=1; i<m_map2->size(); i++) {
+            int xl, yl, xh, yh;
+            RPolygon *px = m_map2->at(i);
+
+            if(PolygonsOverlap(slicePolygon, px, xl, yl, xh, yh)) {
+                bool is_duplicate = false;
+                int pxl, pyl, pxh, pyh;
+                int indx = (int)(fmap2->size());
+                fmap2->resize(indx+1);
+                fmap2->at(indx).setp(px);
+                px->get(&pxl, &pyl, &pxh, &pyh);
+                if(pxl < xl) {
+                    is_duplicate = true;
+                }
+                fmap2->at(indx).setDuplicate(is_duplicate);
+                PRINT_DEBUG(" Polygon " << *px << " is in map, is_duplicate=" << is_duplicate);
+            }
+        }
+
+        // When intersecting polygons from fmap1 and fmap2, if BOTH are flagged
+        // as duplicate, don't add the result to the output map.  We can still
+        // intersect them, because we are keeping track of how much of the polygon
+        // is left over from intersecting, and quitting when the polygon is
+        // used up.
+
+        for(unsigned int ii=0; ii < fmap1->size(); ii++) {
+            RPolygon *p1 = fmap1->at(ii).p();
+            bool is_dup = fmap1->at(ii).isDuplicate();
+            int parea = p1->area();
+            p1->getColor(&r1, &g1, &b1);
+            for(unsigned int jj=0;(jj < fmap2->size()) && (parea > 0); jj++) {
+                int xl, yl, xh, yh;
+                RPolygon *p2 = fmap2->at(jj).p();
+                if(PolygonsOverlap(p1, p2, xl, yl, xh, yh)) {
+                    if(!(is_dup && fmap2->at(jj).isDuplicate())) {
+                        p2->getColor(&r2, &g2, &b2);
+                        myr = r1 + r2;
+                        myg = g1 + g2;
+                        myb = b1 + b2;
+                        RPolygon *pnew = RPolygon::alloc_RPolygon(xl, yl, xh, yh, myr, myg, myb);
+#ifdef _DEBUG
+#else
+                        tbb::spin_mutex::scoped_lock lock(*m_rMutex);
+#endif
+                        (*m_resultMap).push_back(pnew);
+                    }
+                    parea -= (xh-xl+1)*(yh-yl+1);
+                }
+            }
+        }
+
+        delete fmap1;
+        delete fmap2;
+    }
+
+    ApplySplitOverlay(Polygon_map_t *resultMap, Polygon_map_t *map1, Polygon_map_t *map2, tbb::spin_mutex *rmutex) :
+    m_resultMap(resultMap), m_map1(map1), m_map2(map2), m_rMutex(rmutex) {}
+};
+
+
+/*!
+* @brief intersects two maps strip-wise
+*
+* @param[out] resultMap output map (must be allocated)
+* @param[in] polymap1 map to be intersected
+* @param[in] polymap2 map to be intersected
+*/
+void SplitParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2) {
+    int nthreads;
+    bool automatic_threadcount = false;
+    double domainSplitParallelTime;
+    tbb::tick_count t0, t1;
+    tbb::spin_mutex *resultMutex;
+    if(gThreadsLow == THREADS_UNSET || gThreadsLow == tbb::task_scheduler_init::automatic ) {
+        gThreadsLow = gThreadsHigh = tbb::task_scheduler_init::automatic;
+        automatic_threadcount = true;
+    }
+    *result_map = new Polygon_map_t;
+
+    RPolygon *p0 = (*polymap1)[0];
+    int mapxSize, mapySize, ignore1, ignore2;
+    p0->get(&ignore1, &ignore2, &mapxSize, &mapySize);
+    (*result_map)->reserve(mapxSize*mapySize); // can't be any bigger than this
+    resultMutex = new tbb::spin_mutex();
+
+    int grain_size;
+#ifdef _DEBUG
+    grain_size = gMapXSize / 4;
+#else
+    grain_size = gGrainSize;
+#endif
+
+    for(nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) {
+        tbb::task_scheduler_init init(nthreads);
+        if(gIsGraphicalVersion) {
+            RPolygon *xp = RPolygon::alloc_RPolygon(0, 0, gMapXSize-1, gMapYSize-1, 0, 0, 0);  // Clear the output space
+            RPolygon::free_RPolygon( xp );
+        }
+        // push the map size as the first polygon,
+        p0 = RPolygon::alloc_RPolygon(0,0,mapxSize, mapySize);
+        (*result_map)->push_back(p0);
+        t0 = tbb::tick_count::now();
+        tbb::parallel_for (tbb::blocked_range<int>(0,(int)(mapxSize+1),grain_size), ApplySplitOverlay((*result_map), polymap1, polymap2, resultMutex));
+        t1 = tbb::tick_count::now();
+        domainSplitParallelTime = (t1-t0).seconds()*1000;
+        cout << "Splitting parallel with spin lock and ";
+        if(automatic_threadcount) cout << "automatic";
+        else cout << nthreads;
+        cout << ((nthreads == 1) ? " thread" : " threads");
+        cout << " took " << domainSplitParallelTime <<  " msec : speedup over serial " << (gSerialTime / domainSplitParallelTime) << std::endl;
+        if(gCsvFile.is_open()) {
+            gCsvFile << "," << domainSplitParallelTime;
+        }
+#if _DEBUG
+        CheckPolygonMap(*result_map);
+        ComparePolygonMaps(*result_map, gResultMap);
+#endif
+        for(int i=0; i<int((*result_map)->size());i++) {
+            RPolygon::free_RPolygon((*result_map)->at(i));
+        }
+        (*result_map)->clear();
+
+    }
+    if(gCsvFile.is_open()) {
+        gCsvFile << std::endl;
+    }
+
+}
diff --git a/src/tbb/concurrent_hash_map.cpp b/examples/parallel_for/polygon_overlay/polyover.h
similarity index 62%
copy from src/tbb/concurrent_hash_map.cpp
copy to examples/parallel_for/polygon_overlay/polyover.h
index 3de140f..bc4226b 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/examples/parallel_for/polygon_overlay/polyover.h
@@ -26,20 +26,22 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+/*!
+ * polyover.h : extern declarations for polyover.cpp
+*/
+#include "rpolygon.h"
+#include "tbb/mutex.h"
+#include "tbb/spin_mutex.h"
 
-namespace tbb {
+extern void OverlayOnePolygonWithMap(Polygon_map_t *resultMap, RPolygon *myPoly, Polygon_map_t  *map2, tbb::spin_mutex *rMutex);
 
-namespace internal {
+extern void SerialOverlayMaps(Polygon_map_t **resultMap, Polygon_map_t *map1, Polygon_map_t *map2);
 
-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;
-}
+// extern void NaiveParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2);
+extern void NaiveParallelOverlay(Polygon_map_t *&result_map, Polygon_map_t &polymap1, Polygon_map_t &polymap2);
 
-} // namespace internal
+extern void SplitParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2);
 
-} // namespace tbb
+extern void CheckPolygonMap(Polygon_map_t *checkMap);
+extern bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2);
 
diff --git a/examples/parallel_for/polygon_overlay/pover_global.h b/examples/parallel_for/polygon_overlay/pover_global.h
new file mode 100644
index 0000000..240f249
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/pover_global.h
@@ -0,0 +1,101 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+//
+// pover_global.h
+//
+#ifndef _POVER_GLOBAL_H_
+#define _POVER_GLOBAL_H_
+
+#ifdef _MAIN_C_
+#define DEFINE // nothing
+#define STATIC static
+#define INIT(n) = n
+#else // not in main file
+#define DEFINE extern
+#define STATIC  // nothing
+#define INIT(n) // nothing
+#endif  // _MAIN_C_
+
+#include <iostream>
+#include <fstream>
+
+#ifdef _WINDOWS
+#include <windows.h>
+#endif
+
+// this Polygon class only supports rectangles
+DEFINE int gDrawXOffset INIT(0);   // used for drawing polygons
+DEFINE int gDrawYOffset INIT(0);
+DEFINE int gPolyXBoxSize INIT(0);  // number of pixels orresponding to one "square" (x)
+DEFINE int gPolyYBoxSize INIT(0);  // number of pixels orresponding to one "square" (y)
+DEFINE bool gDoDraw INIT(false);       // render the boxes
+
+#define THREADS_UNSET 0
+DEFINE int gThreadsLow INIT(THREADS_UNSET);
+DEFINE int gThreadsHigh INIT(THREADS_UNSET);
+
+DEFINE std::ofstream gCsvFile;
+DEFINE double gSerialTime;
+DEFINE char *gCsvFilename INIT(NULL);
+
+#define BORDER_SIZE 10  // number of pixels between maps
+
+// The map size and the number of polygons depends on the version we are compiling.
+// If DEBUG then it is small; else it is large.
+
+#ifdef _DEBUG
+DEFINE int gNPolygons INIT(30);  // default number of polygons in map
+DEFINE int gMapXSize INIT(30);
+DEFINE int gMapYSize INIT(30);
+DEFINE int gGrainSize INIT(5);
+#else
+DEFINE int gNPolygons INIT(50000);    // default number of polygons in map
+DEFINE int gMapXSize INIT(1000);
+DEFINE int gMapYSize INIT(1000);
+DEFINE int gGrainSize INIT(20);
+#endif
+DEFINE int gMyRandomSeed INIT(2453185);
+
+DEFINE bool gIsGraphicalVersion INIT(false);
+
+typedef enum {
+    NORTH_SIDE,
+    EAST_SIDE,
+    SOUTH_SIDE,
+    WEST_SIDE
+} allSides;
+
+#if _DEBUG
+#define PRINT_DEBUG(x) (cout << x << std::endl)
+#else
+#define PRINT_DEBUG(x)
+#endif
+
+
+#endif // _POVER_GLOBAL_H_
diff --git a/examples/parallel_for/polygon_overlay/pover_video.cpp b/examples/parallel_for/polygon_overlay/pover_video.cpp
new file mode 100644
index 0000000..e83e76a
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/pover_video.cpp
@@ -0,0 +1,160 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+// Support for GUI display for Polygon overlay demo
+
+#define VIDEO_WINMAIN_ARGS
+#include <iostream>
+#include "polyover.h"
+#include "polymain.h"
+#include "pover_video.h"
+#include "tbb/tick_count.h"
+#include "tbb/task_scheduler_init.h"
+#ifndef _WIN32
+#include <sys/time.h>
+#include <unistd.h>
+
+void rt_sleep(int msec) {
+    usleep(msec*1000);
+}
+
+#else //_WIN32
+
+#undef OLDUNIXTIME
+#undef STDTIME
+
+#include <windows.h>
+
+void rt_sleep(int msec) {
+    Sleep(msec);
+}
+
+#endif  /*  _WIN32  */
+
+using namespace std;
+
+bool g_next_frame() {
+    if(++n_next_frame_calls >= frame_skips) {
+        n_next_frame_calls = 0; 
+        return gVideo->next_frame();
+    } 
+    return gVideo->running;
+}
+
+bool g_last_frame() {
+    if(n_next_frame_calls) return gVideo->next_frame(); 
+    return gVideo->running;
+}
+
+bool initializeVideo(int argc, char **argv) {
+    //pover_video *l_video = new pover_video();
+    //gVideo = l_video;
+    gVideo->init_console();  // don't check return code.
+    gVideo->title = g_windowTitle;
+    g_useGraphics = gVideo->init_window(g_xwinsize, g_ywinsize);
+    return true;
+}
+
+void pover_video::on_process() {
+    tbb::tick_count t0, t1;
+    double naiveParallelTime, domainSplitParallelTime;
+    // create map1  These could be done in parallel, if the pseudorandom number generator were re-seeded.
+    GenerateMap(&gPolymap1, gMapXSize, gMapYSize, gNPolygons, /*red*/255, /*green*/0, /*blue*/127);
+    // create map2
+    GenerateMap(&gPolymap2, gMapXSize, gMapYSize, gNPolygons, /*red*/0, /*green*/255, /*blue*/127);
+        //
+        // Draw source maps
+    gDrawXOffset = map1XLoc;
+    gDrawYOffset = map1YLoc;
+        for(int i=0; i < int(gPolymap1->size()); i++) {
+            gPolymap1->at(i)->drawPoly();
+        }
+    gDrawXOffset = map2XLoc;
+    gDrawYOffset = map2YLoc;
+        for(int i=0; i < int(gPolymap2->size()) ;i++) {
+            gPolymap2->at(i)->drawPoly();
+        }
+        gDoDraw = true;
+
+    // run serial map generation
+    gDrawXOffset = maprXLoc;
+    gDrawYOffset = maprYLoc;
+    {
+        RPolygon *xp = RPolygon::alloc_RPolygon(0, 0, gMapXSize-1, gMapYSize-1, 0, 0, 0);  // Clear the output space
+        RPolygon::free_RPolygon( xp );
+        t0 = tbb::tick_count::now();
+        SerialOverlayMaps(&gResultMap, gPolymap1, gPolymap2);
+        t1 = tbb::tick_count::now();
+        cout << "Serial overlay took " << (t1-t0).seconds()*1000 << " msec" << std::endl;
+        gSerialTime = (t1-t0).seconds()*1000;
+#if _DEBUG
+        CheckPolygonMap(gResultMap);
+        // keep the map for comparison purposes.
+#else
+        for(int i=0; i<int(gResultMap->size());i++) {
+            RPolygon::free_RPolygon(gResultMap->at(i));
+        }
+        delete gResultMap;
+#endif
+        if(gCsvFile.is_open()) {
+            gCsvFile << "Serial Time," << gSerialTime << std::endl;
+            gCsvFile << "Threads,";
+            if(gThreadsLow == THREADS_UNSET || gThreadsLow == tbb::task_scheduler_init::automatic) {
+                gCsvFile << "Threads,Automatic";
+            }
+            else {
+                for(int i=gThreadsLow; i <= gThreadsHigh; i++) {
+                    gCsvFile << i;
+                    if(i < gThreadsHigh) gCsvFile << ",";
+                }
+            }
+            gCsvFile << std::endl;
+        }
+        if(gIsGraphicalVersion) rt_sleep(2000);
+    }
+    // run naive parallel map generation
+    {
+        Polygon_map_t *resultMap;
+        if(gCsvFile.is_open()) {
+            gCsvFile << "Naive Time";
+        }
+        NaiveParallelOverlay(resultMap, *gPolymap1, *gPolymap2);
+        delete resultMap;
+        if(gIsGraphicalVersion) rt_sleep(2000);
+    }
+    // run split map generation
+    {
+        Polygon_map_t *resultMap;
+        if(gCsvFile.is_open()) {
+            gCsvFile << "Split Time";
+        }
+        SplitParallelOverlay(&resultMap, gPolymap1, gPolymap2);
+        delete resultMap;
+        if(gIsGraphicalVersion) rt_sleep(10000);
+    }
+}
diff --git a/include/tbb/aligned_space.h b/examples/parallel_for/polygon_overlay/pover_video.h
similarity index 56%
copy from include/tbb/aligned_space.h
copy to examples/parallel_for/polygon_overlay/pover_video.h
index 4421c33..31f039a 100644
--- a/include/tbb/aligned_space.h
+++ b/examples/parallel_for/polygon_overlay/pover_video.h
@@ -26,39 +26,47 @@
     the GNU General Public License.
 */
 
-#ifndef __TBB_aligned_space_H
-#define __TBB_aligned_space_H
-
-#include "tbb_stddef.h"
-
-namespace tbb {
-
-//! Block of space aligned sufficiently to construct an array T with N elements.
-/** The elements are not constructed or destroyed by this class.
-    @ingroup memory_allocation */
-template<typename T,size_t N>
-class aligned_space {
-private:
-    union element_type {
-        size_t s;
-        long z;
-#if  _MSC_VER
-        __int64 l;
-#else
-        long long l;
-#endif /*  _MSC_VER */
-        long double x;
-        double y;
-    };
-    element_type array[(sizeof(T)*N+sizeof(element_type)-1)/sizeof(element_type)];
-public:
-    //! Pointer to beginning of array
-    T* begin() {return reinterpret_cast<T*>(this);}
+// support for GUI for polygon overlay demo
+//
+#ifndef _POVER_VIDEO_H_
+#define _POVER_VIDEO_H_
+#include "../../common/gui/video.h"
+
+#include "pover_global.h"  // for declaration of DEFINE and INIT
 
-    //! Pointer to one past last element in array.
-    T* end() {return begin()+N;}
+DEFINE class video *gVideo INIT(0);
+
+DEFINE int n_next_frame_calls INIT(0);
+DEFINE int frame_skips INIT(10);
+extern bool g_next_frame();
+extern bool g_last_frame();
+
+class pover_video: public video {
+    void on_process();
+public:
+#ifdef _WINDOWS
+    bool graphic_display(){return video::win_hInstance != (HINSTANCE)NULL;}
+#else
+    bool graphic_display() { return true;} // fix this for Linux
+#endif
+    //void on_key(int key);
 };
 
-} // namespace tbb 
+DEFINE int g_xwinsize INIT(1024);
+DEFINE int g_ywinsize INIT(768);
+
+DEFINE int map1XLoc INIT(10);
+DEFINE int map1YLoc INIT(10);
+DEFINE int map2XLoc INIT(270);
+DEFINE int map2YLoc INIT(10);
+DEFINE int maprXLoc INIT(530);
+DEFINE int maprYLoc INIT(10);
+
+DEFINE const char *g_windowTitle INIT("Polygon Overlay");
+DEFINE bool g_useGraphics INIT(true);
+
+extern bool initializeVideo(int argc, char **argv);
+
+extern void rt_sleep(int msec);
 
-#endif /* __TBB_aligned_space_H */
+#endif  // _POVER_VIDEO_H_
diff --git a/examples/parallel_for/polygon_overlay/rpolygon.h b/examples/parallel_for/polygon_overlay/rpolygon.h
new file mode 100644
index 0000000..2c3ed6a
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/rpolygon.h
@@ -0,0 +1,175 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+// rpolygon.h
+//
+#ifndef _RPOLYGON_H_
+#define _RPOLYGON_H_
+#include <vector>
+#include <iostream>
+#include "pover_video.h"
+
+#include "tbb/scalable_allocator.h"
+
+using namespace std;
+
+using namespace tbb;
+
+class RPolygon;
+typedef scalable_allocator<RPolygon> RPolygon_allocator;
+DEFINE RPolygon_allocator rAlloc;
+
+enum MallocBehavior {
+    UseMalloc,
+    UseScalableAllocator,
+};
+
+DEFINE MallocBehavior gMBehavior INIT(UseScalableAllocator);
+
+class RPolygon {
+public:
+    RPolygon() {m_XMin = m_YMin = m_XMax = m_YMax = 0;
+        m_r = m_g = m_b = 0;
+    }
+    RPolygon(int xMin, int yMin, int xMax, int yMax, int r=-1, int g=-1, int b=-1) : m_XMin(xMin), m_YMin(yMin), m_XMax(xMax), m_YMax(yMax) {
+        if( r >= 0) {
+            m_r=(colorcomp_t)r; m_g=(colorcomp_t)g; m_b=(colorcomp_t)b;
+                        if(gDoDraw) drawPoly();
+        }
+    }
+
+    static RPolygon *alloc_RPolygon(int xMin, int yMin, int xMax, int yMax, int r=-1, int g=-1, int b=-1) {
+        switch(gMBehavior) {
+            case UseScalableAllocator: {
+                RPolygon *my_p = rAlloc.allocate(1);
+                my_p->set_nodraw(xMin,yMin,xMax,yMax);
+                my_p->setColor(r,g,b);
+                if( r >= 0 && gDoDraw) {
+                    my_p->drawPoly();
+                }
+                return my_p;
+            }
+            case UseMalloc: {
+                RPolygon *my_p = new RPolygon(xMin,yMin,xMax,yMax,r,g,b);
+                return my_p;
+            }
+        }
+        return NULL;
+    }
+
+    static void free_RPolygon(RPolygon *p) { 
+        switch(gMBehavior) {
+            case UseScalableAllocator: {
+                rAlloc.deallocate(p, 1);
+                break;
+            }
+            case UseMalloc: {
+                delete p;
+                break;
+            }
+        }
+    }
+
+    void set_nodraw(int xMin, int yMin, int xMax, int yMax) {m_XMin=xMin; m_YMin=yMin; m_XMax=xMax; m_YMax=yMax;}
+
+    RPolygon &intersect(RPolygon &otherPoly);
+    void set(int xMin, int yMin, int xMax, int yMax) {
+         set_nodraw(xMin,yMin,xMax,yMax);
+         if(gDoDraw) {
+            drawPoly();
+         }
+    }
+    void get(int *xMin, int *yMin, int *xMax, int *yMax) const {*xMin=m_XMin;*yMin=m_YMin;*xMax=m_XMax;*yMax=m_YMax;}
+    void setColor(colorcomp_t newr, colorcomp_t newg, colorcomp_t newb) {m_r = newr; m_g=newg; m_b=newb;}
+    void getColor(int *myr, int *myg, int *myb) {*myr=m_r; *myg=m_g; *myb=m_b;}
+    color_t myColor() {return gVideo->get_color(m_r, m_g, m_b);}
+    void drawPoly() {
+        if(gVideo->running) {
+            if(g_next_frame()) {    // Shouldn't call next_frame each time
+                drawing_area ldrawing(
+                    gDrawXOffset+m_XMin*gPolyXBoxSize,         //x
+                    gDrawYOffset+m_YMin*gPolyYBoxSize,         //y
+                    (m_XMax-m_XMin+1)*gPolyXBoxSize,           //sizex
+                    (m_YMax-m_YMin+1)*gPolyYBoxSize);          //sizey
+                for(int y=0; y<ldrawing.size_y; y++) {
+                    ldrawing.set_pos(0,y);
+                    color_t my_color = myColor();
+                    for(int x=0;x < ldrawing.size_x; x++) {
+                         ldrawing.put_pixel(my_color);
+                    }
+                }
+            }
+        }
+    }
+    int  area() {return ((m_XMax-m_XMin+1)*(m_YMax-m_YMin+1));}
+    void print(int i) { cout << "RPolygon " << i << " (" << m_XMin << ", " << m_YMin << ")-(" << m_XMax << ", " << m_YMax << ") " << endl; fflush(stdout);}
+private:
+    int m_XMin;
+    int m_YMin;
+    int m_XMax;
+    int m_YMax;
+    colorcomp_t m_r;
+    colorcomp_t m_g;
+    colorcomp_t m_b;
+};
+
+extern ostream& operator<<(ostream& s, const RPolygon &p);
+
+class RPolygon_flagged {
+    RPolygon *myPoly;
+    bool is_duplicate;
+public:
+    RPolygon_flagged() {myPoly = NULL; is_duplicate = false;}
+    bool isDuplicate() {return is_duplicate;}
+    void setDuplicate(bool newValue) {is_duplicate = newValue;}
+    RPolygon *p() {return myPoly;}
+    void setp(RPolygon *newp) {myPoly = newp;}
+};
+
+typedef class vector<RPolygon *> Polygon_map_t;
+typedef class vector<RPolygon_flagged> Flagged_map_t; // we'll make shallow copies
+
+inline bool PolygonsOverlap(RPolygon *p1, RPolygon *p2, int &xl, int &yl, int &xh, int &yh) {
+    int xl1, yl1, xh1, yh1, xl2, yl2, xh2, yh2;
+#if _DEBUG
+     rt_sleep(1);   // slow down the process so we can see it.
+#endif
+    p1->get(&xl1, &yl1, &xh1, &yh1);
+    p2->get(&xl2, &yl2, &xh2, &yh2);
+    if(xl1 > xh2) return false;
+    if(xh1 < xl2) return false;
+    if(yl1 > yh2) return false;
+    if(yh1 < yl2) return false;
+    xl = (xl1 < xl2) ? xl2 : xl1;
+    xh = (xh1 < xh2) ? xh1 : xh2;
+    yl = (yl1 < yl2) ? yl2 : yl1;
+    yh = (yh1 < yh2) ? yh1 : yh2;
+    return true;
+}
+
+#endif // _RPOLYGON_H_
diff --git a/examples/parallel_for/polygon_overlay/speedup.gif b/examples/parallel_for/polygon_overlay/speedup.gif
new file mode 100644
index 0000000..04d6d87
Binary files /dev/null and b/examples/parallel_for/polygon_overlay/speedup.gif differ
diff --git a/examples/parallel_for/tacheon/vc7.1/gui.rc b/examples/parallel_for/polygon_overlay/vc7.1/pover.rc
similarity index 59%
copy from examples/parallel_for/tacheon/vc7.1/gui.rc
copy to examples/parallel_for/polygon_overlay/vc7.1/pover.rc
index 5a13d04..3eee795 100644
--- a/examples/parallel_for/tacheon/vc7.1/gui.rc
+++ b/examples/parallel_for/polygon_overlay/vc7.1/pover.rc
@@ -7,9 +7,7 @@
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
+#include "afxres.h"
 
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
@@ -18,21 +16,8 @@
 // English (U.S.) resources
 
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+LANGUAGE 9, 1
 #pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_GUI   ICON                    "gui.ico"
-IDI_SMALL               ICON                    "small.ico"
-
 
 #ifdef APSTUDIO_INVOKED
 /////////////////////////////////////////////////////////////////////////////
@@ -40,20 +25,18 @@ IDI_SMALL               ICON                    "small.ico"
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE 
+1 TEXTINCLUDE  
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE 
+2 TEXTINCLUDE  
 BEGIN
-    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
-    "#include ""windows.h""\r\n"
-    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+    "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE 
+3 TEXTINCLUDE  
 BEGIN
     "\r\n"
     "\0"
@@ -61,18 +44,6 @@ END
 
 #endif    // APSTUDIO_INVOKED
 
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE 
-BEGIN
-    IDS_APP_TITLE           "gui"
-    IDC_GUI   "GUI"
-END
-
 #endif    // English (U.S.) resources
 /////////////////////////////////////////////////////////////////////////////
 
diff --git a/examples/parallel_for/polygon_overlay/vc7.1/pover.sln b/examples/parallel_for/polygon_overlay/vc7.1/pover.sln
new file mode 100644
index 0000000..8efff51
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/vc7.1/pover.sln
@@ -0,0 +1,35 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pover", "pover.vcproj", "{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Debug GDI = Debug GDI
+		Debug DD = Debug DD
+		Release = Release
+		Release GDI = Release GDI
+		Release DD = Release DD
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Debug.ActiveCfg = Debug|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Debug.Build.0 = Debug|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Debug GDI.ActiveCfg = Debug GDI|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Debug GDI.Build.0 = Debug GDI|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Debug DD.ActiveCfg = Debug DD|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Debug DD.Build.0 = Debug DD|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Release.ActiveCfg = Release|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Release.Build.0 = Release|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Release GDI.ActiveCfg = Release GDI|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Release GDI.Build.0 = Release GDI|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Release DD.ActiveCfg = Release DD|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.Release DD.Build.0 = Release DD|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/parallel_for/polygon_overlay/vc7.1/pover.suo b/examples/parallel_for/polygon_overlay/vc7.1/pover.suo
new file mode 100644
index 0000000..b2f2d28
Binary files /dev/null and b/examples/parallel_for/polygon_overlay/vc7.1/pover.suo differ
diff --git a/examples/parallel_for/polygon_overlay/vc7.1/pover.vcproj b/examples/parallel_for/polygon_overlay/vc7.1/pover.vcproj
new file mode 100644
index 0000000..8241760
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/vc7.1/pover.vcproj
@@ -0,0 +1,494 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="pover"
+	ProjectGUID="{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="TRUE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				GlobalOptimizations="TRUE"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="TRUE"
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_CONSOLE"
+				RuntimeLibrary="3"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				TargetMachine="1"
+				FixedBaseAddress="1"/>
+			<Tool
+				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)"
+"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="TRUE">
+			<Tool
+				Name="VCCLCompilerTool"
+				GlobalOptimizations="TRUE"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="TRUE"
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="TRUE"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+				FixedBaseAddress="1"/>
+			<Tool
+				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)"
+"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release GDI|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="TRUE">
+			<Tool
+				Name="VCCLCompilerTool"
+				GlobalOptimizations="TRUE"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="TRUE"
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="TRUE"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+				FixedBaseAddress="1"/>
+			<Tool
+				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)"
+"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug GDI|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="TRUE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				GlobalOptimizations="FALSE"
+				InlineFunctionExpansion="0"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="TRUE"
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="3"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				TargetMachine="1"
+				FixedBaseAddress="1"/>
+			<Tool
+				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)"
+"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug DD|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="TRUE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				GlobalOptimizations="FALSE"
+				InlineFunctionExpansion="0"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="TRUE"
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="3"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				TargetMachine="1"
+				FixedBaseAddress="1"/>
+			<Tool
+				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)"
+"/>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\..\..\common\gui\dxcheck.bat"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release DD|Win32"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="TRUE">
+			<Tool
+				Name="VCCLCompilerTool"
+				GlobalOptimizations="TRUE"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="TRUE"
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				Detect64BitPortabilityProblems="TRUE"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+				FixedBaseAddress="1"/>
+			<Tool
+				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)"
+"/>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\..\..\common\gui\dxcheck.bat"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath="..\polymain.cpp">
+			</File>
+			<File
+				RelativePath="..\polyover.cpp">
+			</File>
+			<File
+				RelativePath="..\pover_video.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File
+				RelativePath="..\polymain.h">
+			</File>
+			<File
+				RelativePath="..\polyover.h">
+			</File>
+			<File
+				RelativePath="..\pover_global.h">
+			</File>
+			<File
+				RelativePath="..\pover_video.h">
+			</File>
+			<File
+				RelativePath="..\rpolygon.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+		<Filter
+			Name="Video Layer"
+			Filter="">
+			<File
+				RelativePath="..\..\..\common\gui\convideo.cpp">
+				<FileConfiguration
+					Name="Release GDI|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug GDI|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release DD|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug DD|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\common\gui\gdivideo.cpp">
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug DD|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release DD|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\common\gui\ddvideo.cpp">
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug GDI|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release GDI|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\common\gui\video.h">
+			</File>
+			<File
+				RelativePath="..\..\..\common\gui\winvideo.h">
+			</File>
+		</Filter>
+		<File
+			RelativePath="..\index.html">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/parallel_for/polygon_overlay/vc7.1/resource.h b/examples/parallel_for/polygon_overlay/vc7.1/resource.h
new file mode 100644
index 0000000..e70b4ea
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/vc7.1/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by pover.rc
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        101
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
diff --git a/examples/parallel_for/tacheon/vc7.1/gui.rc b/examples/parallel_for/polygon_overlay/vc8/pover.rc
similarity index 59%
copy from examples/parallel_for/tacheon/vc7.1/gui.rc
copy to examples/parallel_for/polygon_overlay/vc8/pover.rc
index 5a13d04..3eee795 100644
--- a/examples/parallel_for/tacheon/vc7.1/gui.rc
+++ b/examples/parallel_for/polygon_overlay/vc8/pover.rc
@@ -7,9 +7,7 @@
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
+#include "afxres.h"
 
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
@@ -18,21 +16,8 @@
 // English (U.S.) resources
 
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+LANGUAGE 9, 1
 #pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_GUI   ICON                    "gui.ico"
-IDI_SMALL               ICON                    "small.ico"
-
 
 #ifdef APSTUDIO_INVOKED
 /////////////////////////////////////////////////////////////////////////////
@@ -40,20 +25,18 @@ IDI_SMALL               ICON                    "small.ico"
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE 
+1 TEXTINCLUDE  
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE 
+2 TEXTINCLUDE  
 BEGIN
-    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
-    "#include ""windows.h""\r\n"
-    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+    "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE 
+3 TEXTINCLUDE  
 BEGIN
     "\r\n"
     "\0"
@@ -61,18 +44,6 @@ END
 
 #endif    // APSTUDIO_INVOKED
 
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE 
-BEGIN
-    IDS_APP_TITLE           "gui"
-    IDC_GUI   "GUI"
-END
-
 #endif    // English (U.S.) resources
 /////////////////////////////////////////////////////////////////////////////
 
diff --git a/examples/parallel_for/polygon_overlay/vc8/pover.sln b/examples/parallel_for/polygon_overlay/vc8/pover.sln
new file mode 100644
index 0000000..4168381
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/vc8/pover.sln
@@ -0,0 +1,37 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pover", "pover.vcproj", "{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		DD Debug|Win32 = DD Debug|Win32
+		DD Debug|x64 = DD Debug|x64
+		DD Release|Win32 = DD Release|Win32
+		DD Release|x64 = DD Release|x64
+		GDI Debug|Win32 = GDI Debug|Win32
+		GDI Debug|x64 = GDI Debug|x64
+		GDI Release|Win32 = GDI Release|Win32
+		GDI Release|x64 = GDI Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|Win32.ActiveCfg = DD Debug|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|Win32.Build.0 = DD Debug|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|x64.ActiveCfg = DD Debug|x64
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|x64.Build.0 = DD Debug|x64
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|Win32.ActiveCfg = DD Release|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|Win32.Build.0 = DD Release|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|x64.ActiveCfg = DD Release|x64
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|x64.Build.0 = DD Release|x64
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|Win32.ActiveCfg = Debug|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|Win32.Build.0 = Debug|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|x64.ActiveCfg = Debug|x64
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|x64.Build.0 = Debug|x64
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Release|Win32.ActiveCfg = Release|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Release|Win32.Build.0 = Release|Win32
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Release|x64.ActiveCfg = Release|x64
+		{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/examples/parallel_for/polygon_overlay/vc8/pover.suo b/examples/parallel_for/polygon_overlay/vc8/pover.suo
new file mode 100644
index 0000000..5121ea0
Binary files /dev/null and b/examples/parallel_for/polygon_overlay/vc8/pover.suo differ
diff --git a/examples/parallel_for/seismic/vc8/SeismicSimulation.vcproj b/examples/parallel_for/polygon_overlay/vc8/pover.vcproj
similarity index 79%
copy from examples/parallel_for/seismic/vc8/SeismicSimulation.vcproj
copy to examples/parallel_for/polygon_overlay/vc8/pover.vcproj
index 9f6bbf2..b1108a0 100644
--- a/examples/parallel_for/seismic/vc8/SeismicSimulation.vcproj
+++ b/examples/parallel_for/polygon_overlay/vc8/pover.vcproj
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="windows-1251"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
-	Version="8,00"
-	Name="SeismicSimulation"
-	ProjectGUID="{3AA40693-F93D-4D4B-B32E-068F511A2527}"
-	RootNamespace="SeismicSimulation"
+	Version="8.00"
+	Name="pover"
+	ProjectGUID="{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}"
+	RootNamespace="pover"
 	Keyword="Win32Proj"
 	>
 	<Platforms>
@@ -46,7 +46,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -65,9 +65,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB21_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 "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -129,7 +129,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -147,9 +147,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -178,8 +178,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -211,7 +211,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -229,9 +229,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -261,8 +261,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -295,7 +295,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -312,9 +312,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -344,8 +344,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -378,7 +378,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -396,9 +396,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -428,8 +428,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -463,7 +463,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -480,9 +480,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -512,8 +512,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -545,7 +545,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -564,9 +564,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="1"
@@ -595,8 +595,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -629,7 +629,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -647,9 +647,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -678,8 +678,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
@@ -692,31 +692,43 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath="..\SeismicSimulation.cpp"
+				RelativePath="..\polymain.cpp"
 				>
 			</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=".\resource.h"
+				RelativePath="..\polymain.h"
 				>
 			</File>
 			<File
-				RelativePath=".\SeismicSimulation.ico"
+				RelativePath="..\polyover.cpp"
 				>
 			</File>
 			<File
-				RelativePath=".\SeismicSimulation.rc"
+				RelativePath="..\polyover.h"
 				>
 			</File>
 			<File
-				RelativePath=".\small.ico"
+				RelativePath="..\pover_global.h"
 				>
 			</File>
+			<File
+				RelativePath="..\pover_video.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\pover_video.h"
+				>
+			</File>
+			<File
+				RelativePath="..\rpolygon.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}"
+			>
 		</Filter>
 		<Filter
 			Name="Video Layer"
diff --git a/examples/parallel_for/polygon_overlay/vc8/resource.h b/examples/parallel_for/polygon_overlay/vc8/resource.h
new file mode 100644
index 0000000..e70b4ea
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/vc8/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by pover.rc
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        101
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
diff --git a/examples/parallel_for/tacheon/vc7.1/gui.rc b/examples/parallel_for/polygon_overlay/vc9/pover.rc
similarity index 59%
copy from examples/parallel_for/tacheon/vc7.1/gui.rc
copy to examples/parallel_for/polygon_overlay/vc9/pover.rc
index 5a13d04..3eee795 100644
--- a/examples/parallel_for/tacheon/vc7.1/gui.rc
+++ b/examples/parallel_for/polygon_overlay/vc9/pover.rc
@@ -7,9 +7,7 @@
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
+#include "afxres.h"
 
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
@@ -18,21 +16,8 @@
 // English (U.S.) resources
 
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+LANGUAGE 9, 1
 #pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_GUI   ICON                    "gui.ico"
-IDI_SMALL               ICON                    "small.ico"
-
 
 #ifdef APSTUDIO_INVOKED
 /////////////////////////////////////////////////////////////////////////////
@@ -40,20 +25,18 @@ IDI_SMALL               ICON                    "small.ico"
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE 
+1 TEXTINCLUDE  
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE 
+2 TEXTINCLUDE  
 BEGIN
-    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
-    "#include ""windows.h""\r\n"
-    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+    "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE 
+3 TEXTINCLUDE  
 BEGIN
     "\r\n"
     "\0"
@@ -61,18 +44,6 @@ END
 
 #endif    // APSTUDIO_INVOKED
 
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE 
-BEGIN
-    IDS_APP_TITLE           "gui"
-    IDC_GUI   "GUI"
-END
-
 #endif    // English (U.S.) resources
 /////////////////////////////////////////////////////////////////////////////
 
diff --git a/examples/parallel_for/polygon_overlay/vc9/pover.sln b/examples/parallel_for/polygon_overlay/vc9/pover.sln
new file mode 100644
index 0000000..dfcc3ee
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/vc9/pover.sln
@@ -0,0 +1,37 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pover", "pover.vcproj", "{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		DD Debug|Win32 = DD Debug|Win32
+		DD Debug|x64 = DD Debug|x64
+		DD Release|Win32 = DD Release|Win32
+		DD Release|x64 = DD Release|x64
+		GDI Debug|Win32 = GDI Debug|Win32
+		GDI Debug|x64 = GDI Debug|x64
+		GDI Release|Win32 = GDI Release|Win32
+		GDI Release|x64 = GDI Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.ActiveCfg = DD Debug|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.Build.0 = DD Debug|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.ActiveCfg = DD Debug|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.Build.0 = DD Debug|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.ActiveCfg = DD Release|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.Build.0 = DD Release|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.ActiveCfg = DD Release|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.Build.0 = DD Release|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|Win32.ActiveCfg = Debug|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|Win32.Build.0 = Debug|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.ActiveCfg = Debug|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.Build.0 = Debug|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Release|Win32.ActiveCfg = Release|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Release|Win32.Build.0 = Release|Win32
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Release|x64.ActiveCfg = Release|x64
+		{3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/examples/parallel_for/polygon_overlay/vc9/pover.suo b/examples/parallel_for/polygon_overlay/vc9/pover.suo
new file mode 100644
index 0000000..9b5cbe8
Binary files /dev/null and b/examples/parallel_for/polygon_overlay/vc9/pover.suo differ
diff --git a/examples/parallel_for/seismic/vc9/SeismicSimulation.vcproj b/examples/parallel_for/polygon_overlay/vc9/pover.vcproj
similarity index 79%
copy from examples/parallel_for/seismic/vc9/SeismicSimulation.vcproj
copy to examples/parallel_for/polygon_overlay/vc9/pover.vcproj
index 3d0d2e2..f36d3d2 100644
--- a/examples/parallel_for/seismic/vc9/SeismicSimulation.vcproj
+++ b/examples/parallel_for/polygon_overlay/vc9/pover.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="9.00"
-	Name="SeismicSimulation"
-	ProjectGUID="{3AA40693-F93D-4D4B-B32E-068F511A2527}"
-	RootNamespace="SeismicSimulation"
+	Name="pover"
+	ProjectGUID="{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}"
+	RootNamespace="pover"
 	Keyword="Win32Proj"
 	TargetFrameworkVersion="131072"
 	>
@@ -47,7 +47,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -65,9 +65,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB21_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 "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -128,7 +128,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -145,9 +145,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -176,8 +176,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -210,7 +210,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -227,9 +227,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -258,8 +258,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -291,7 +291,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -309,9 +309,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -339,8 +339,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -372,7 +372,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -390,9 +390,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -421,8 +421,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -455,7 +455,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -472,9 +472,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -504,8 +504,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -539,7 +539,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -556,9 +556,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
+				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -588,8 +588,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 		<Configuration
@@ -622,7 +622,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -640,9 +640,9 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb_debug.lib"
+				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -671,8 +671,8 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				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)""
 			/>
 		</Configuration>
 	</Configurations>
@@ -685,31 +685,43 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath="..\SeismicSimulation.cpp"
+				RelativePath="..\polymain.cpp"
 				>
 			</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=".\resource.h"
+				RelativePath="..\polymain.h"
 				>
 			</File>
 			<File
-				RelativePath=".\SeismicSimulation.ico"
+				RelativePath="..\polyover.cpp"
 				>
 			</File>
 			<File
-				RelativePath=".\SeismicSimulation.rc"
+				RelativePath="..\polyover.h"
 				>
 			</File>
 			<File
-				RelativePath=".\small.ico"
+				RelativePath="..\pover_global.h"
 				>
 			</File>
+			<File
+				RelativePath="..\pover_video.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\pover_video.h"
+				>
+			</File>
+			<File
+				RelativePath="..\rpolygon.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}"
+			>
 		</Filter>
 		<Filter
 			Name="Video Layer"
diff --git a/examples/parallel_for/polygon_overlay/vc9/resource.h b/examples/parallel_for/polygon_overlay/vc9/resource.h
new file mode 100644
index 0000000..e70b4ea
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/vc9/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by pover.rc
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        101
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
diff --git a/examples/parallel_for/tacheon/xcode/English.lproj/InfoPlist.strings b/examples/parallel_for/polygon_overlay/xcode/English.lproj/InfoPlist.strings
similarity index 100%
copy from examples/parallel_for/tacheon/xcode/English.lproj/InfoPlist.strings
copy to examples/parallel_for/polygon_overlay/xcode/English.lproj/InfoPlist.strings
diff --git a/examples/parallel_for/tacheon/xcode/English.lproj/main.nib/classes.nib b/examples/parallel_for/polygon_overlay/xcode/English.lproj/main.nib/classes.nib
similarity index 100%
copy from examples/parallel_for/tacheon/xcode/English.lproj/main.nib/classes.nib
copy to examples/parallel_for/polygon_overlay/xcode/English.lproj/main.nib/classes.nib
diff --git a/examples/parallel_for/tacheon/xcode/English.lproj/main.nib/info.nib b/examples/parallel_for/polygon_overlay/xcode/English.lproj/main.nib/info.nib
similarity index 100%
copy from examples/parallel_for/tacheon/xcode/English.lproj/main.nib/info.nib
copy to examples/parallel_for/polygon_overlay/xcode/English.lproj/main.nib/info.nib
diff --git a/examples/parallel_for/tacheon/xcode/English.lproj/main.nib/objects.xib b/examples/parallel_for/polygon_overlay/xcode/English.lproj/main.nib/objects.xib
similarity index 97%
copy from examples/parallel_for/tacheon/xcode/English.lproj/main.nib/objects.xib
copy to examples/parallel_for/polygon_overlay/xcode/English.lproj/main.nib/objects.xib
index 6cf03e0..99f4f8a 100644
--- a/examples/parallel_for/tacheon/xcode/English.lproj/main.nib/objects.xib
+++ b/examples/parallel_for/polygon_overlay/xcode/English.lproj/main.nib/objects.xib
@@ -10,7 +10,7 @@
       <array count="3" name="items">
         <object class="IBCarbonMenuItem" id="210">
           <boolean name="updateSingleItem">TRUE</boolean>
-          <string name="title">Tacheon</string>
+          <string name="title">PolygonOverlay</string>
           <object name="submenu" class="IBCarbonMenu" id="211">
             <string name="title">Seismic Simulation</string>
             <array count="7" name="items">
@@ -54,7 +54,7 @@
               </object>
               <object class="IBCarbonMenuItem" id="212">
                 <boolean name="updateSingleItem">TRUE</boolean>
-                <string name="title">About Tacheon</string>
+                <string name="title">About PolygonOverlay</string>
                 <int name="keyEquivalentModifier">0</int>
                 <ostype name="command">abou</ostype>
               </object>
@@ -115,7 +115,7 @@
     <reference idRef="131"/>
     <object class="IBCarbonWindow" id="166">
       <string name="windowRect">338 353 698 833 </string>
-      <string name="title">Tacheon</string>
+      <string name="title">PolygonOverlay</string>
       <object name="rootControl" class="IBCarbonRootControl" id="167">
         <string name="bounds">0 0 360 480 </string>
         <string name="viewFrame">0 0 480 360 </string>
diff --git a/examples/parallel_for/tacheon/xcode/Info.plist b/examples/parallel_for/polygon_overlay/xcode/Info.plist
similarity index 93%
copy from examples/parallel_for/tacheon/xcode/Info.plist
copy to examples/parallel_for/polygon_overlay/xcode/Info.plist
index 147266c..8ed9e6b 100644
--- a/examples/parallel_for/tacheon/xcode/Info.plist
+++ b/examples/parallel_for/polygon_overlay/xcode/Info.plist
@@ -9,7 +9,7 @@
 	<key>CFBundleIconFile</key>
 	<string></string>
 	<key>CFBundleIdentifier</key>
-	<string>com.intel.tbb.tacheon</string>
+	<string>com.intel.tbb.PolygonOverlay</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
diff --git a/examples/parallel_for/polygon_overlay/xcode/PolygonOverlay.pch b/examples/parallel_for/polygon_overlay/xcode/PolygonOverlay.pch
new file mode 100644
index 0000000..17ad8b0
--- /dev/null
+++ b/examples/parallel_for/polygon_overlay/xcode/PolygonOverlay.pch
@@ -0,0 +1,5 @@
+//
+// Prefix header for all source files of the 'PolygonOverlay' target in the 'PolygonOverlay' project.
+//
+
+#include <Carbon/Carbon.h>
diff --git a/examples/parallel_for/seismic/xcode/SeismicSimulation.xcodeproj/project.pbxproj b/examples/parallel_for/polygon_overlay/xcode/PolygonOverlay.xcodeproj/project.pbxproj
similarity index 70%
copy from examples/parallel_for/seismic/xcode/SeismicSimulation.xcodeproj/project.pbxproj
copy to examples/parallel_for/polygon_overlay/xcode/PolygonOverlay.xcodeproj/project.pbxproj
index b0515d3..a37d924 100644
--- a/examples/parallel_for/seismic/xcode/SeismicSimulation.xcodeproj/project.pbxproj
+++ b/examples/parallel_for/polygon_overlay/xcode/PolygonOverlay.xcodeproj/project.pbxproj
@@ -7,16 +7,20 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		6A6DAA960DA2C0B3008D95BD /* polymain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6A6DAA8E0DA2C0B3008D95BD /* polymain.cpp */; };
+		6A6DAA980DA2C0B3008D95BD /* polyover.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6A6DAA900DA2C0B3008D95BD /* polyover.cpp */; };
+		6A6DAA9B0DA2C0B3008D95BD /* pover_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6A6DAA930DA2C0B3008D95BD /* pover_video.cpp */; };
 		8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; };
 		8D0C4E8E0486CD37000505A6 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 02345980000FD03B11CA0E72 /* main.nib */; };
 		A12649490B8392750091D5AD /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1E3E7BC0B3AD4EC007C3AB5 /* OpenGL.framework */; };
 		A126495E0B83936D0091D5AD /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8D0C4E960486CD37000505A6 /* Info.plist */; };
 		A18D2A340B861B99007D8D2C /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A18D2A330B861B99007D8D2C /* libtbb.dylib */; };
+		A1976ADA0DF6A6910032C3EA /* libtbbmalloc.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1976AD90DF6A6910032C3EA /* libtbbmalloc.dylib */; };
+		A1976ADF0DF6A6E10032C3EA /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1976AD90DF6A6910032C3EA /* libtbbmalloc.dylib */; };
 		A1A8F41E0B8B4DBE001C55B1 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1A8F41D0B8B4DBE001C55B1 /* AGL.framework */; };
 		A1A8F4310B8B4EA8001C55B1 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1A8F4300B8B4EA8001C55B1 /* Carbon.framework */; };
 		A1D44D9A0B861E8A0006E401 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A18D2A330B861B99007D8D2C /* libtbb.dylib */; };
 		A1E3E7BD0B3AD4EC007C3AB5 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1E3E7BC0B3AD4EC007C3AB5 /* OpenGL.framework */; };
-		A1F591A90B8DFC7100073279 /* SeismicSimulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F591A80B8DFC7100073279 /* SeismicSimulation.cpp */; };
 		A1F591AC0B8DFC9600073279 /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F591AA0B8DFC9600073279 /* macvideo.cpp */; };
 /* End PBXBuildFile section */
 
@@ -27,6 +31,7 @@
 			dstPath = "";
 			dstSubfolderSpec = 16;
 			files = (
+				A1976ADA0DF6A6910032C3EA /* libtbbmalloc.dylib in CopyFiles */,
 				A1D44D9A0B861E8A0006E401 /* libtbb.dylib in CopyFiles */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -36,14 +41,22 @@
 /* Begin PBXFileReference section */
 		0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = "<group>"; };
-		32DBCF6D0370B57F00C91783 /* SeismicSimulation.pch */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SeismicSimulation.pch; sourceTree = "<group>"; };
+		32DBCF6D0370B57F00C91783 /* PolygonOverlay.pch */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PolygonOverlay.pch; sourceTree = "<group>"; };
+		6A6DAA8E0DA2C0B3008D95BD /* polymain.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = polymain.cpp; path = ../polymain.cpp; sourceTree = SOURCE_ROOT; };
+		6A6DAA8F0DA2C0B3008D95BD /* polymain.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = polymain.h; path = ../polymain.h; sourceTree = SOURCE_ROOT; };
+		6A6DAA900DA2C0B3008D95BD /* polyover.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = polyover.cpp; path = ../polyover.cpp; sourceTree = SOURCE_ROOT; };
+		6A6DAA910DA2C0B3008D95BD /* polyover.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = polyover.h; path = ../polyover.h; sourceTree = SOURCE_ROOT; };
+		6A6DAA920DA2C0B3008D95BD /* pover_global.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pover_global.h; path = ../pover_global.h; sourceTree = SOURCE_ROOT; };
+		6A6DAA930DA2C0B3008D95BD /* pover_video.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = pover_video.cpp; path = ../pover_video.cpp; sourceTree = SOURCE_ROOT; };
+		6A6DAA940DA2C0B3008D95BD /* pover_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pover_video.h; path = ../pover_video.h; sourceTree = SOURCE_ROOT; };
+		6A6DAA950DA2C0B3008D95BD /* rpolygon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = rpolygon.h; path = ../rpolygon.h; sourceTree = SOURCE_ROOT; };
 		8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
-		8D0C4E970486CD37000505A6 /* SeismicSimulation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SeismicSimulation.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		8D0C4E970486CD37000505A6 /* PolygonOverlay.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PolygonOverlay.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		A18D2A330B861B99007D8D2C /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = /Library/Frameworks/TBB.framework/Libraries/libtbb.dylib; sourceTree = "<absolute>"; };
+		A1976AD90DF6A6910032C3EA /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = /Library/Frameworks/TBB.framework/Libraries/libtbbmalloc.dylib; sourceTree = "<absolute>"; };
 		A1A8F41D0B8B4DBE001C55B1 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
 		A1A8F4300B8B4EA8001C55B1 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
 		A1E3E7BC0B3AD4EC007C3AB5 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
-		A1F591A80B8DFC7100073279 /* SeismicSimulation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SeismicSimulation.cpp; path = ../SeismicSimulation.cpp; sourceTree = SOURCE_ROOT; };
 		A1F591AA0B8DFC9600073279 /* macvideo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = macvideo.cpp; path = ../../../common/gui/macvideo.cpp; sourceTree = SOURCE_ROOT; };
 		A1F591AB0B8DFC9600073279 /* video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = video.h; path = ../../../common/gui/video.h; sourceTree = SOURCE_ROOT; };
 /* End PBXFileReference section */
@@ -56,6 +69,7 @@
 				A1E3E7BD0B3AD4EC007C3AB5 /* OpenGL.framework in Frameworks */,
 				A12649490B8392750091D5AD /* OpenGL.framework in Frameworks */,
 				A18D2A340B861B99007D8D2C /* libtbb.dylib in Frameworks */,
+				A1976ADF0DF6A6E10032C3EA /* libtbbmalloc.dylib in Frameworks */,
 				A1A8F41E0B8B4DBE001C55B1 /* AGL.framework in Frameworks */,
 				A1A8F4310B8B4EA8001C55B1 /* Carbon.framework in Frameworks */,
 			);
@@ -67,12 +81,12 @@
 		195DF8CFFE9D517E11CA2CBB /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				8D0C4E970486CD37000505A6 /* SeismicSimulation.app */,
+				8D0C4E970486CD37000505A6 /* PolygonOverlay.app */,
 			);
 			name = Products;
 			sourceTree = "<group>";
 		};
-		20286C29FDCF999611CA2CEA /* SeismicSimulation */ = {
+		20286C29FDCF999611CA2CEA /* PolygonOverlay */ = {
 			isa = PBXGroup;
 			children = (
 				20286C2AFDCF999611CA2CEA /* Sources */,
@@ -80,16 +94,23 @@
 				20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */,
 				195DF8CFFE9D517E11CA2CBB /* Products */,
 			);
-			name = SeismicSimulation;
+			name = PolygonOverlay;
 			sourceTree = "<group>";
 		};
 		20286C2AFDCF999611CA2CEA /* Sources */ = {
 			isa = PBXGroup;
 			children = (
-				A1F591A80B8DFC7100073279 /* SeismicSimulation.cpp */,
+				6A6DAA8E0DA2C0B3008D95BD /* polymain.cpp */,
+				6A6DAA8F0DA2C0B3008D95BD /* polymain.h */,
+				6A6DAA900DA2C0B3008D95BD /* polyover.cpp */,
+				6A6DAA910DA2C0B3008D95BD /* polyover.h */,
+				6A6DAA920DA2C0B3008D95BD /* pover_global.h */,
+				6A6DAA930DA2C0B3008D95BD /* pover_video.cpp */,
+				6A6DAA940DA2C0B3008D95BD /* pover_video.h */,
+				6A6DAA950DA2C0B3008D95BD /* rpolygon.h */,
 				A1F591AA0B8DFC9600073279 /* macvideo.cpp */,
 				A1F591AB0B8DFC9600073279 /* video.h */,
-				32DBCF6D0370B57F00C91783 /* SeismicSimulation.pch */,
+				32DBCF6D0370B57F00C91783 /* PolygonOverlay.pch */,
 			);
 			name = Sources;
 			sourceTree = "<group>";
@@ -107,6 +128,7 @@
 		20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
 			isa = PBXGroup;
 			children = (
+				A1976AD90DF6A6910032C3EA /* libtbbmalloc.dylib */,
 				A18D2A330B861B99007D8D2C /* libtbb.dylib */,
 				A1A8F4300B8B4EA8001C55B1 /* Carbon.framework */,
 				A1A8F41D0B8B4DBE001C55B1 /* AGL.framework */,
@@ -118,9 +140,9 @@
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
-		8D0C4E890486CD37000505A6 /* SeismicSimulation */ = {
+		8D0C4E890486CD37000505A6 /* PolygonOverlay */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = C0E91AC508A95435008D54AB /* Build configuration list for PBXNativeTarget "SeismicSimulation" */;
+			buildConfigurationList = C0E91AC508A95435008D54AB /* Build configuration list for PBXNativeTarget "PolygonOverlay" */;
 			buildPhases = (
 				8D0C4E8C0486CD37000505A6 /* Resources */,
 				8D0C4E8F0486CD37000505A6 /* Sources */,
@@ -131,10 +153,10 @@
 			);
 			dependencies = (
 			);
-			name = SeismicSimulation;
+			name = PolygonOverlay;
 			productInstallPath = "$(HOME)/Applications";
-			productName = SeismicSimulation;
-			productReference = 8D0C4E970486CD37000505A6 /* SeismicSimulation.app */;
+			productName = PolygonOverlay;
+			productReference = 8D0C4E970486CD37000505A6 /* PolygonOverlay.app */;
 			productType = "com.apple.product-type.application";
 		};
 /* End PBXNativeTarget section */
@@ -142,12 +164,12 @@
 /* Begin PBXProject section */
 		20286C28FDCF999611CA2CEA /* Project object */ = {
 			isa = PBXProject;
-			buildConfigurationList = C0E91AC908A95435008D54AB /* Build configuration list for PBXProject "SeismicSimulation" */;
+			buildConfigurationList = C0E91AC908A95435008D54AB /* Build configuration list for PBXProject "PolygonOverlay" */;
 			hasScannedForEncodings = 1;
-			mainGroup = 20286C29FDCF999611CA2CEA /* SeismicSimulation */;
+			mainGroup = 20286C29FDCF999611CA2CEA /* PolygonOverlay */;
 			projectDirPath = "";
 			targets = (
-				8D0C4E890486CD37000505A6 /* SeismicSimulation */,
+				8D0C4E890486CD37000505A6 /* PolygonOverlay */,
 			);
 		};
 /* End PBXProject section */
@@ -170,8 +192,10 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				A1F591A90B8DFC7100073279 /* SeismicSimulation.cpp in Sources */,
 				A1F591AC0B8DFC9600073279 /* macvideo.cpp in Sources */,
+				6A6DAA960DA2C0B3008D95BD /* polymain.cpp in Sources */,
+				6A6DAA980DA2C0B3008D95BD /* polyover.cpp in Sources */,
+				6A6DAA9B0DA2C0B3008D95BD /* pover_video.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -211,7 +235,7 @@
 					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
 				);
 				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/TBB.framework/Libraries\"";
-				PRODUCT_NAME = SeismicSimulation;
+				PRODUCT_NAME = PolygonOverlay;
 			};
 			name = Debug;
 		};
@@ -226,7 +250,7 @@
 					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
 				);
 				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/TBB.framework/Libraries\"";
-				PRODUCT_NAME = SeismicSimulation;
+				PRODUCT_NAME = PolygonOverlay;
 			};
 			name = Release;
 		};
@@ -235,7 +259,7 @@
 			buildSettings = {
 				ARCHS = i386;
 				GCC_AUTO_VECTORIZATION = YES;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_ENABLE_SSE3_EXTENSIONS = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_OPTIMIZATION_LEVEL = 0;
@@ -254,7 +278,7 @@
 			buildSettings = {
 				ARCHS = i386;
 				GCC_AUTO_VECTORIZATION = YES;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_ENABLE_SSE3_EXTENSIONS = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_OPTIMIZATION_LEVEL = 3;
@@ -271,7 +295,7 @@
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
-		C0E91AC508A95435008D54AB /* Build configuration list for PBXNativeTarget "SeismicSimulation" */ = {
+		C0E91AC508A95435008D54AB /* Build configuration list for PBXNativeTarget "PolygonOverlay" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				C0E91AC608A95435008D54AB /* Debug */,
@@ -280,7 +304,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		C0E91AC908A95435008D54AB /* Build configuration list for PBXProject "SeismicSimulation" */ = {
+		C0E91AC908A95435008D54AB /* Build configuration list for PBXProject "PolygonOverlay" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				C0E91ACA08A95435008D54AB /* Debug */,
diff --git a/examples/parallel_for/seismic/Makefile b/examples/parallel_for/seismic/Makefile
index 5c3f53e..3883a82 100644
--- a/examples/parallel_for/seismic/Makefile
+++ b/examples/parallel_for/seismic/Makefile
@@ -31,7 +31,7 @@ NAME=seismic
 #CXX=g++
 
 # detecting x64
-ifeq ($(shell arch),x86_64)
+ifeq ($(shell uname -m),x86_64)
 x64 ?= 64
 endif
 # detecting UI ("mac", "x" or "con")
@@ -55,12 +55,13 @@ endif # libXext
 else # ! X
 
 ifeq ($(UI),mac)
-TBBLIBS = /Library/Frameworks/TBB.framework/Libraries
-CXXFLAGS += -L$(TBBLIBS) -arch i386 -mmacosx-version-min=10.4 -fno-rtti -msse3 -ftree-vectorize
+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)
-PBXCP = /System/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -resolve-src-symlinks -exclude .DS_Store -exclude CVS
+# 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)
@@ -77,10 +78,10 @@ ifeq ($(UI),mac)
 endif
 
 release: ../../common/gui/$(UI)video.cpp SeismicSimulation.cpp resources
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(EXE) $< *.cpp -ltbb $(LIBS)
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(EXE) $< SeismicSimulation.cpp -ltbb $(LIBS)
 
 debug: ../../common/gui/$(UI)video.cpp SeismicSimulation.cpp resources
-	$(CXX) -g -O0 -DTBB_DO_ASSERT $(CXXFLAGS) -o $(EXE) $< *.cpp -ltbb_debug $(LIBS)
+	$(CXX) -g -O0 -DTBB_DO_ASSERT $(CXXFLAGS) -o $(EXE) $< SeismicSimulation.cpp -ltbb_debug $(LIBS)
 
 clean:
 	rm -f $(EXE) *.o *.d
@@ -90,7 +91,7 @@ endif
 
 test:
 ifeq ($(UI),mac)
-	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBS)"; $(EXE) - 300
+	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; $(EXE) - 300
 else
 	$(EXE) - 300
 endif
diff --git a/examples/parallel_for/seismic/Makefile.windows b/examples/parallel_for/seismic/Makefile.windows
index 16ae5cc..fcfb08f 100644
--- a/examples/parallel_for/seismic/Makefile.windows
+++ b/examples/parallel_for/seismic/Makefile.windows
@@ -51,9 +51,9 @@ MAKEINC = ../../common/gui/Makefile.win
 
 all: release test
 release:
-	@$(MAKE) -f $(MAKEINC) UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LFLAGS="$(LDFLAGS) tbb.lib" XARCH=$(XARCH) RCNAME=SeismicSimulation SOURCE=SeismicSimulation.cpp EXE=$(PROG).exe build_one
+	@$(MAKE) -f $(MAKEINC) UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LFLAGS="$(LDFLAGS) tbb.lib $(LIBS)" XARCH=$(XARCH) RCNAME=SeismicSimulation SOURCE=SeismicSimulation.cpp EXE=$(PROG).exe build_one
 debug:
-	@$(MAKE) -f $(MAKEINC) UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) /D TBB_DO_ASSERT" LFLAGS="$(LDFLAGS) tbb_debug.lib" XARCH=$(XARCH) RCNAME=SeismicSimulation SOURCE=SeismicSimulation.cpp EXE=$(PROG).exe build_one
+	@$(MAKE) -f $(MAKEINC) UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) /D TBB_DO_ASSERT" LFLAGS="$(LDFLAGS) tbb_debug.lib $(LIBS)" XARCH=$(XARCH) RCNAME=SeismicSimulation SOURCE=SeismicSimulation.cpp EXE=$(PROG).exe build_one
 clean:
 	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest vc7.1\SeismicSimulation.res
 test:
diff --git a/examples/parallel_for/seismic/SeismicSimulation.cpp b/examples/parallel_for/seismic/SeismicSimulation.cpp
index 97036ac..c36126e 100644
--- a/examples/parallel_for/seismic/SeismicSimulation.cpp
+++ b/examples/parallel_for/seismic/SeismicSimulation.cpp
@@ -40,6 +40,8 @@
 #include "tbb/parallel_for.h"
 #include "tbb/tick_count.h"
 
+using namespace std;
+
 #ifdef _MSC_VER
 // warning C4068: unknown pragma
 #pragma warning(disable: 4068)
@@ -52,13 +54,32 @@ const size_t MAX_HEIGHT = 512;
 
 int UniverseHeight=MAX_HEIGHT;
 int UniverseWidth=MAX_WIDTH;
-int GrainSize = 32;
 
 typedef float value;
+
+//! Velocity at each grid point
 static value V[MAX_HEIGHT][MAX_WIDTH];
+
+//! Horizontal stress
 static value S[MAX_HEIGHT][MAX_WIDTH];
+
+//! Vertical stress
 static value T[MAX_HEIGHT][MAX_WIDTH];
-static value M[MAX_HEIGHT];
+
+//! Coefficient related to modulus
+static value M[MAX_HEIGHT][MAX_WIDTH];
+
+//! Coefficient related to lightness
+static value L[MAX_HEIGHT][MAX_WIDTH];
+
+//! Damping coefficients
+static value D[MAX_HEIGHT][MAX_WIDTH];
+
+/** Affinity is an argument to parallel_for to hint that an iteration of a loop 
+    is best replayed on the same processor for each execution of the loop. 
+    It is a global object because it must remember where the iterations happened
+    in previous executions. */
+static tbb::affinity_partitioner Affinity;
 
 enum MaterialType {
     WATER=0,
@@ -67,7 +88,7 @@ enum MaterialType {
 };
 
 //! Values are MaterialType, cast to an unsigned char to save space.
-static unsigned char Material[MAX_HEIGHT];
+static unsigned char Material[MAX_HEIGHT][MAX_WIDTH];
 
 static const colorcomp_t MaterialColor[4][3] = { // BGR
     {96,0,0},     // WATER
@@ -76,7 +97,6 @@ static const colorcomp_t MaterialColor[4][3] = { // BGR
 };
 
 static const int DamperSize = 32;
-static value Damper[DamperSize];
 
 static const int ColorMapSize = 1024;
 static color_t ColorMap[4][ColorMapSize];
@@ -96,7 +116,7 @@ int threads_low = 0, threads_high = tbb::task_scheduler_init::automatic;
 static void UpdatePulse() {
     if( PulseCounter>0 ) {
         value t = (PulseCounter-PulseTime/2)*0.05f;
-        V[PulseY][PulseX] += 64*sqrt(M[PulseY])*exp(-t*t);
+        V[PulseY][PulseX] += 64*sqrt(M[PulseY][PulseX])*exp(-t*t);
         --PulseCounter;
     }
 }
@@ -104,15 +124,15 @@ static void UpdatePulse() {
 static void SerialUpdateStress() {
     drawing_area drawing(0, 0, UniverseWidth, UniverseHeight);
     for( int i=1; i<UniverseHeight-1; ++i ) {
-        color_t* c = ColorMap[Material[i]];
         drawing.set_pos(1, i);
 #pragma ivdep
         for( int j=1; j<UniverseWidth-1; ++j ) {
-            S[i][j] += (V[i][j+1]-V[i][j]);
-            T[i][j] += (V[i+1][j]-V[i][j]);
+            S[i][j] += M[i][j]*(V[i][j+1]-V[i][j]);
+            T[i][j] += M[i][j]*(V[i+1][j]-V[i][j]);
             int index = (int)(V[i][j]*(ColorMapSize/2)) + ColorMapSize/2;
             if( index<0 ) index = 0;
             if( index>=ColorMapSize ) index = ColorMapSize-1;
+            color_t* c = ColorMap[Material[i][j]];
             drawing.put_pixel(c[index]);
         }
     }
@@ -123,15 +143,15 @@ struct UpdateStressBody {
         drawing_area drawing(0, range.begin(), UniverseWidth, range.end()-range.begin());
         int i_end = range.end();
         for( int y = 0, i=range.begin(); i!=i_end; ++i,y++ ) {
-            color_t* c = ColorMap[Material[i]];
             drawing.set_pos(1, y);
 #pragma ivdep
             for( int j=1; j<UniverseWidth-1; ++j ) {
-                S[i][j] += (V[i][j+1]-V[i][j]);
-                T[i][j] += (V[i+1][j]-V[i][j]);
+                S[i][j] += M[i][j]*(V[i][j+1]-V[i][j]);
+                T[i][j] += M[i][j]*(V[i+1][j]-V[i][j]);
                 int index = (int)(V[i][j]*(ColorMapSize/2)) + ColorMapSize/2;
                 if( index<0 ) index = 0;
                 if( index>=ColorMapSize ) index = ColorMapSize-1;
+                color_t* c = ColorMap[Material[i][j]];
                 drawing.put_pixel(c[index]);
             }
         }
@@ -139,60 +159,44 @@ struct UpdateStressBody {
 };
 
 static void ParallelUpdateStress() {
-    tbb::parallel_for( tbb::blocked_range<int>( 1, UniverseHeight-1, GrainSize ), UpdateStressBody() );
+    tbb::parallel_for( tbb::blocked_range<int>( 1, UniverseHeight-1 ), // Index space for loop
+                       UpdateStressBody(),                             // Body of loop
+                       Affinity );                                     // Affinity hint
 }
 
 static void SerialUpdateVelocity() {
     for( int i=1; i<UniverseHeight-1; ++i ) 
 #pragma ivdep
-        for( int j=1; j<UniverseWidth-1; ++j ) {
-            V[i][j] += (S[i][j] - S[i][j-1] + T[i][j] - T[i-1][j])*M[i];
-        }
+        for( int j=1; j<UniverseWidth-1; ++j ) 
+            V[i][j] = D[i][j]*(V[i][j] + L[i][j]*(S[i][j] - S[i][j-1] + T[i][j] - T[i-1][j]));
 }
 
 struct UpdateVelocityBody {
     void operator()( const tbb::blocked_range<int>& range ) const {
         int i_end = range.end();
-        for( int i=range.begin(); i!=i_end; ++i ) {
+        for( int i=range.begin(); i!=i_end; ++i ) 
 #pragma ivdep
-            for( int j=1; j<UniverseWidth-1; ++j ) {
-                V[i][j] += (S[i][j] - S[i][j-1] + T[i][j] - T[i-1][j])*M[i];
-            }
-        }
+            for( int j=1; j<UniverseWidth-1; ++j ) 
+                V[i][j] = D[i][j]*(V[i][j] + L[i][j]*(S[i][j] - S[i][j-1] + T[i][j] - T[i-1][j]));
     }
 };
 
 static void ParallelUpdateVelocity() {
-    tbb::parallel_for( tbb::blocked_range<int>( 1, UniverseHeight-1, GrainSize ), UpdateVelocityBody() );
-}
-
-static void DrainEnergyFromBorders() {
-#pragma ivdep
-    for( int k=1; k<=DamperSize-1; ++k ) {
-        value d = Damper[k];
-        for( int j=1; j<UniverseWidth-1; ++j ) {
-            V[k][j] *= d;
-            V[UniverseHeight-k][j] *= d;
-        }
-        for( int i=1; i<UniverseHeight-1; ++i ) {
-            V[i][k] *= d;
-            V[i][UniverseWidth-k] *= d;
-        }
-    }
+    tbb::parallel_for( tbb::blocked_range<int>( 1, UniverseHeight-1 ), // Index space for loop
+                       UpdateVelocityBody(),                           // Body of loop
+                       Affinity );                                     // Affinity hint
 }
 
 void SerialUpdateUniverse() {
     UpdatePulse();
     SerialUpdateStress();
     SerialUpdateVelocity();
-    DrainEnergyFromBorders();
 }
 
 void ParallelUpdateUniverse() {
     UpdatePulse();
     ParallelUpdateStress();
     ParallelUpdateVelocity();
-    DrainEnergyFromBorders();
 }
 
 class seismic_video : public video
@@ -234,17 +238,29 @@ void InitializeUniverse() {
             T[i][j] = S[i][j] = V[i][j] = value(1.0E-6);
         }
     for( int i=1; i<UniverseHeight-1; ++i ) {
-        value t = (value)i/UniverseHeight;
-        MaterialType m = SANDSTONE;
-        M[i] = 1.0/8;
-        if( t<0.3f ) {
-            m = WATER;
-            M[i] = 1.0/32;
-        } else if( 0.5<=t && t<=0.7 ) {
-            m = SHALE; 
-            M[i] = 1.0/2;
+        for( int j=1; j<UniverseWidth-1; ++j ) {
+            float x = float(j-UniverseWidth/2)/(UniverseWidth/2);
+            value t = (value)i/UniverseHeight;
+            MaterialType m;
+            D[i][j] = 1.0;
+            // Coefficient values are fictitious, and chosen to visually exaggerate 
+            // physical effects such as Rayleigh waves.  The fabs/exp line generates
+            // a shale layer with a gentle upwards slope and an anticline.
+            if( t<0.3f ) {
+                m = WATER;
+                M[i][j] = 0.125;
+                L[i][j] = 0.125;
+            } else if( fabs(t-0.7+0.2*exp(-8*x*x)+0.025*x)<=0.1 ) {
+                m = SHALE;
+                M[i][j] = 0.5;
+                L[i][j] = 0.6;
+            } else {
+                m = SANDSTONE;
+                M[i][j] = 0.3;
+                L[i][j] = 0.4;
+            } 
+            Material[i][j] = m;
         }
-        Material[i] = m;
     }
     value scale = 2.0f/ColorMapSize;
     for( int k=0; k<4; ++k ) {
@@ -261,10 +277,18 @@ void InitializeUniverse() {
             ColorMap[k][i] = video.get_color(c[2], c[1], c[0]);
         }
     }
+    // Set damping coefficients around border to reduce reflections from boundaries.
     value d = 1.0;
-    for( int k=0; k<DamperSize; ++k ) {
+    for( int k=DamperSize-1; k>0; --k ) {
         d *= 1-1.0f/(DamperSize*DamperSize);
-        Damper[DamperSize-1-k] = d;
+        for( int j=1; j<UniverseWidth-1; ++j ) {
+            D[k][j] *= d;
+            D[UniverseHeight-k][j] *= d;
+        }
+        for( int i=1; i<UniverseHeight-1; ++i ) {
+            D[i][k] *= d;
+            D[i][UniverseWidth-k] *= d;
+        }
     }
 }
 
diff --git a/examples/parallel_for/seismic/vc7.1/SeismicSimulation.rc b/examples/parallel_for/seismic/vc7.1/SeismicSimulation.rc
index 2be8fab..67d1158 100644
--- a/examples/parallel_for/seismic/vc7.1/SeismicSimulation.rc
+++ b/examples/parallel_for/seismic/vc7.1/SeismicSimulation.rc
@@ -83,9 +83,9 @@ CAPTION "About"
 FONT 8, "System"
 BEGIN
     ICON            IDI_SEISMICSIMULATION,IDC_MYICON,14,9,16,16
-    LTEXT           "SeismicSimulation Version 1.0",IDC_STATIC,49,10,119,8,
+    LTEXT           "SeismicSimulation Version 1.1",IDC_STATIC,49,10,119,8,
                     SS_NOPREFIX
-    LTEXT           "Copyright (C) 2005",IDC_STATIC,49,20,119,8
+    LTEXT           "Copyright (C) 2005-2008",IDC_STATIC,49,20,119,8
     DEFPUSHBUTTON   "OK",IDOK,195,6,30,11,WS_GROUP
 END
 
diff --git a/examples/parallel_for/seismic/vc7.1/SeismicSimulation.vcproj b/examples/parallel_for/seismic/vc7.1/SeismicSimulation.vcproj
index c6dcb8d..2cd94da 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=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="TRUE"
@@ -38,7 +38,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				TargetMachine="1"
@@ -48,7 +48,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -79,7 +79,7 @@
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -91,7 +91,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -102,7 +102,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -133,7 +133,7 @@
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -145,7 +145,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -156,7 +156,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"
 				CommandLine="..\..\..\common\gui\dxcheck.bat"/>
@@ -189,7 +189,7 @@
 				InlineFunctionExpansion="2"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="TRUE"
@@ -202,7 +202,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				TargetMachine="1"
@@ -212,7 +212,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"
 				CommandLine="..\..\..\common\gui\dxcheck.bat"/>
diff --git a/examples/parallel_for/seismic/vc8/SeismicSimulation.rc b/examples/parallel_for/seismic/vc8/SeismicSimulation.rc
index acef197..c200334 100644
--- a/examples/parallel_for/seismic/vc8/SeismicSimulation.rc
+++ b/examples/parallel_for/seismic/vc8/SeismicSimulation.rc
@@ -83,8 +83,8 @@ CAPTION "About"
 FONT 8, "System"
 BEGIN
     ICON            IDI_SEISMICSIMULATION,IDC_MYICON,14,9,16,16
-    LTEXT           "SeismicSimulation Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
-    LTEXT           "Copyright (C) 2005",IDC_STATIC,49,20,119,8
+    LTEXT           "SeismicSimulation Version 1.1",IDC_STATIC,49,10,119,8,SS_NOPREFIX
+    LTEXT           "Copyright (C) 2005-2008",IDC_STATIC,49,20,119,8
     DEFPUSHBUTTON   "OK",IDOK,195,6,30,11,WS_GROUP
 END
 
diff --git a/examples/parallel_for/seismic/vc8/SeismicSimulation.vcproj b/examples/parallel_for/seismic/vc8/SeismicSimulation.vcproj
index 9f6bbf2..44b0fd2 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=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -67,7 +67,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="1"
@@ -97,7 +97,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -129,7 +129,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -149,7 +149,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -179,7 +179,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -211,7 +211,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -231,7 +231,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -262,7 +262,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -295,7 +295,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -314,7 +314,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -345,7 +345,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -378,7 +378,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -398,7 +398,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -429,7 +429,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -463,7 +463,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -482,7 +482,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -513,7 +513,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -545,7 +545,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -566,7 +566,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="1"
@@ -596,7 +596,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -629,7 +629,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -649,7 +649,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -679,7 +679,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/seismic/vc9/SeismicSimulation.rc b/examples/parallel_for/seismic/vc9/SeismicSimulation.rc
index acef197..c200334 100644
--- a/examples/parallel_for/seismic/vc9/SeismicSimulation.rc
+++ b/examples/parallel_for/seismic/vc9/SeismicSimulation.rc
@@ -83,8 +83,8 @@ CAPTION "About"
 FONT 8, "System"
 BEGIN
     ICON            IDI_SEISMICSIMULATION,IDC_MYICON,14,9,16,16
-    LTEXT           "SeismicSimulation Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
-    LTEXT           "Copyright (C) 2005",IDC_STATIC,49,20,119,8
+    LTEXT           "SeismicSimulation Version 1.1",IDC_STATIC,49,10,119,8,SS_NOPREFIX
+    LTEXT           "Copyright (C) 2005-2008",IDC_STATIC,49,20,119,8
     DEFPUSHBUTTON   "OK",IDOK,195,6,30,11,WS_GROUP
 END
 
diff --git a/examples/parallel_for/seismic/vc9/SeismicSimulation.suo b/examples/parallel_for/seismic/vc9/SeismicSimulation.suo
index c1c5138..9fc65f4 100644
Binary files a/examples/parallel_for/seismic/vc9/SeismicSimulation.suo and b/examples/parallel_for/seismic/vc9/SeismicSimulation.suo differ
diff --git a/examples/parallel_for/seismic/vc9/SeismicSimulation.vcproj b/examples/parallel_for/seismic/vc9/SeismicSimulation.vcproj
index 3d0d2e2..97d8b8b 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=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -67,7 +67,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -96,7 +96,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -128,7 +128,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -147,7 +147,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -177,7 +177,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -210,7 +210,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -229,7 +229,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -259,7 +259,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -291,7 +291,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -311,7 +311,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -340,7 +340,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -372,7 +372,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -392,7 +392,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -422,7 +422,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -455,7 +455,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -474,7 +474,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -505,7 +505,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -539,7 +539,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -558,7 +558,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -589,7 +589,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -622,7 +622,7 @@
 				Optimization="0"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=""$(TBB20_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
+				AdditionalIncludeDirectories=""$(TBB21_INSTALL_DIR)\include";"$(DXSDK_DIR)\include""
 				PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				EnableFunctionLevelLinking="true"
@@ -642,7 +642,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				TargetMachine="17"
@@ -672,7 +672,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/seismic/xcode/SeismicSimulation.xcodeproj/project.pbxproj b/examples/parallel_for/seismic/xcode/SeismicSimulation.xcodeproj/project.pbxproj
index b0515d3..5d9071d 100644
--- a/examples/parallel_for/seismic/xcode/SeismicSimulation.xcodeproj/project.pbxproj
+++ b/examples/parallel_for/seismic/xcode/SeismicSimulation.xcodeproj/project.pbxproj
@@ -235,7 +235,7 @@
 			buildSettings = {
 				ARCHS = i386;
 				GCC_AUTO_VECTORIZATION = YES;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_ENABLE_SSE3_EXTENSIONS = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_OPTIMIZATION_LEVEL = 0;
@@ -254,7 +254,7 @@
 			buildSettings = {
 				ARCHS = i386;
 				GCC_AUTO_VECTORIZATION = YES;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_ENABLE_SSE3_EXTENSIONS = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_OPTIMIZATION_LEVEL = 3;
diff --git a/examples/parallel_for/tacheon/vc7.1/tacheon.threads.vcproj b/examples/parallel_for/tacheon/vc7.1/tacheon.threads.vcproj
deleted file mode 100644
index 0b1ea69..0000000
--- a/examples/parallel_for/tacheon/vc7.1/tacheon.threads.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="tacheon.threads"
-	ProjectGUID="{1D7176EE-63B6-48F2-AB83-FFAD2148C25D}"
-	RootNamespace="tacheon.threads"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="TRUE"
-				PreprocessorDefinitions="EMULATE_PTHREADS;WIN32;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				EnableFunctionLevelLinking="TRUE"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)/$(InputName).pdb"
-				WarningLevel="2"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
-				SubSystem="2"
-				TargetMachine="1"
-				FixedBaseAddress="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="EMULATE_PTHREADS;WIN32;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="TRUE"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)/$(InputName).pdb"
-				WarningLevel="2"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-				FixedBaseAddress="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="DD Release|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="EMULATE_PTHREADS;WIN32;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="TRUE"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)/$(InputName).pdb"
-				WarningLevel="2"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x86"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-				FixedBaseAddress="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="DD Debug|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="TRUE"
-				PreprocessorDefinitions="EMULATE_PTHREADS;WIN32;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				EnableFunctionLevelLinking="TRUE"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)/$(InputName).pdb"
-				WarningLevel="2"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x86"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
-				SubSystem="2"
-				TargetMachine="1"
-				FixedBaseAddress="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-		<ProjectReference
-			ReferencedProjectIdentifier="{1D7176EE-63B6-48F2-AB83-FFAD2149C25E}"
-			Name="tacheon.common"/>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\src\trace.threads.cpp">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/examples/parallel_for/tacheon/vc8/tacheon.threads.vcproj b/examples/parallel_for/tacheon/vc8/tacheon.threads.vcproj
deleted file mode 100644
index d92a06e..0000000
--- a/examples/parallel_for/tacheon/vc8/tacheon.threads.vcproj
+++ /dev/null
@@ -1,691 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="tacheon.threads"
-	ProjectGUID="{924517DF-2B6A-47D5-8A11-CC247CC4D8E9}"
-	RootNamespace="tacheon.threads"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				LinkTimeCodeGeneration="1"
-				TargetMachine="1"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				LinkTimeCodeGeneration="1"
-				TargetMachine="17"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			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"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="17"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DD 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"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x86"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DD Release|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x64"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="17"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DD Debug|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x86"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				LinkTimeCodeGeneration="1"
-				TargetMachine="1"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DD Debug|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x64"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				LinkTimeCodeGeneration="1"
-				TargetMachine="17"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-		<ProjectReference
-			ReferencedProjectIdentifier="{924517DF-2B6A-47D5-8A11-CC247CC4D810}"
-			CopyLocal="false"
-			CopyLocalDependencies="false"
-			CopyLocalSatelliteAssemblies="false"
-			RelativePathToProject=".\tacheon.vcproj"
-		/>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\src\trace.threads.cpp"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/examples/parallel_for/tacheon/vc9/tacheon.suo b/examples/parallel_for/tacheon/vc9/tacheon.suo
deleted file mode 100644
index 25abb9f..0000000
Binary files a/examples/parallel_for/tacheon/vc9/tacheon.suo and /dev/null differ
diff --git a/examples/parallel_for/tacheon/vc9/tacheon.threads.vcproj b/examples/parallel_for/tacheon/vc9/tacheon.threads.vcproj
deleted file mode 100644
index 5849be8..0000000
--- a/examples/parallel_for/tacheon/vc9/tacheon.threads.vcproj
+++ /dev/null
@@ -1,687 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="tacheon.threads"
-	ProjectGUID="{924517DF-2B6A-47D5-8A11-CC247CC4D8E9}"
-	RootNamespace="tacheon.threads"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				LinkTimeCodeGeneration="1"
-				TargetMachine="1"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				LinkTimeCodeGeneration="1"
-				TargetMachine="17"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			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"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="17"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DD 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"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x86"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DD Release|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x64"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="17"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DD Debug|Win32"
-			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x86"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				LinkTimeCodeGeneration="1"
-				TargetMachine="1"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="DD Debug|x64"
-			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				PreprocessorDefinitions="EMULATE_PTHREADS;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				ProgramDataBaseFileName="$(IntDir)\$(InputName).pdb"
-				WarningLevel="2"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(DXSDK_DIR)\lib\x64"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				LinkTimeCodeGeneration="1"
-				TargetMachine="17"
-				FixedBaseAddress="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-		<ProjectReference
-			ReferencedProjectIdentifier="{924517DF-2B6A-47D5-8A11-CC247CC4D810}"
-			CopyLocal="false"
-			CopyLocalDependencies="false"
-			CopyLocalSatelliteAssemblies="false"
-			RelativePathToProject=".\tacheon.vcproj"
-		/>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\src\trace.threads.cpp"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/examples/parallel_for/tacheon/xcode/tacheon.pch b/examples/parallel_for/tacheon/xcode/tacheon.pch
deleted file mode 100644
index a620cdb..0000000
--- a/examples/parallel_for/tacheon/xcode/tacheon.pch
+++ /dev/null
@@ -1,5 +0,0 @@
-//
-// Prefix header for all source files of the 'tacheon' target in the 'tacheon' project.
-//
-
-#include <Carbon/Carbon.h>
diff --git a/examples/parallel_for/tacheon/Makefile b/examples/parallel_for/tachyon/Makefile
similarity index 89%
rename from examples/parallel_for/tacheon/Makefile
rename to examples/parallel_for/tachyon/Makefile
index 60d328d..47e2086 100644
--- a/examples/parallel_for/tacheon/Makefile
+++ b/examples/parallel_for/tachyon/Makefile
@@ -25,7 +25,7 @@
 # the GNU General Public License.
 
 # The original source for this example is
-# Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+# Copyright (c) 1994-2008 John E. Stone
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -36,10 +36,7 @@
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in the
 #    documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by John E. Stone
-# 4. The name of the author may not be used to endorse or promote products
+# 3. The name of the author may not be used to endorse or promote products
 #    derived from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -55,7 +52,7 @@
 # SUCH DAMAGE.
 
 # GNU Makefile that builds and runs example.
-NAME:=tacheon
+NAME:=tachyon
 
 # The C++ compiler
 #CXX = g++
@@ -66,7 +63,7 @@ export DATASET = balls
 export ARGS =
 
 # detecting x64
-ifeq ($(shell arch),x86_64)
+ifeq ($(shell uname -m),x86_64)
 x64 ?= 64
 endif
 # detecting UI ("mac", "x" or "con")
@@ -77,7 +74,7 @@ UI ?= $(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libX11.so -o -f /usr/lib$(x64)/li
 endif
 
 MYCXXFLAGS = -DX_FULLSYNC
-LIBS = -lm
+LIBS ?= -lm
 
 # Platform-specific settings
 ifeq ($(UI),x)
@@ -95,12 +92,13 @@ endif
 else
 
 ifeq ($(UI),mac)
-TBBLIBS = /Library/Frameworks/TBB.framework/Libraries
-CXXFLAGS += -arch i386 -mmacosx-version-min=10.4 -fno-rtti -msse3 -ftree-vectorize
-LIBS += -framework OpenGL -framework AGL -framework Carbon -L$(TBBLIBS)
+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)
-PBXCP = /System/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -resolve-src-symlinks -exclude .DS_Store -exclude CVS
+# 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
@@ -181,7 +179,7 @@ build_one:	$(EXE)
 
 run_one:
 ifeq ($(UI),mac)
-	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBS)"; ./$(EXE) $(ARGS) dat/$(DATASET).dat
+	export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; ./$(EXE) $(ARGS) dat/$(DATASET).dat
 else
 	./$(EXE) $(ARGS) dat/$(DATASET).dat
 endif
diff --git a/examples/parallel_for/tacheon/Makefile.windows b/examples/parallel_for/tachyon/Makefile.windows
similarity index 85%
rename from examples/parallel_for/tacheon/Makefile.windows
rename to examples/parallel_for/tachyon/Makefile.windows
index 5b4820f..0a10fa8 100644
--- a/examples/parallel_for/tacheon/Makefile.windows
+++ b/examples/parallel_for/tachyon/Makefile.windows
@@ -25,7 +25,7 @@
 # the GNU General Public License.
 
 # The original source for this example is
-# Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+# Copyright (c) 1994-2008 John E. Stone
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -36,10 +36,7 @@
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in the
 #    documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by John E. Stone
-# 4. The name of the author may not be used to endorse or promote products
+# 3. The name of the author may not be used to endorse or promote products
 #    derived from this software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -81,11 +78,11 @@ ARGS =
 
 # Add these for tbb/tbb1d release builds
 CXXFLAGS_TBB_NDEBUG = $(CXXFLAGS)
-LIBS_TBB_NDEBUG = tbb.lib
+LIBS_TBB_NDEBUG = tbb.lib $(LIBS)
 
 # Add these for tbb/tbb1d debug builds
 CXXFLAGS_TBB_DEBUG = $(CXXFLAGS) /D TBB_DO_ASSERT
-LIBS_TBB_DEBUG = tbb_debug.lib
+LIBS_TBB_DEBUG =  tbb_debug.lib $(LIBS)
 
 
 MAKEINC = ../../common/gui/Makefile.win
@@ -109,26 +106,26 @@ tbb1d: build_tbb1d run_tbb1d
 tbb1d_debug: build_tbb1d_debug run_tbb1d
 
 build_serial:
-	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.serial.cpp $(SOURCE)" EXE=tacheon.serial.exe RCNAME=gui UI=$(UI) CXX="$(CXX)" CXXFLAGS=$(CXXFLAGS) XARCH=$(XARCH) build_one
+	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.serial.cpp $(SOURCE)" EXE=tachyon.serial.exe RCNAME=gui UI=$(UI) CXX="$(CXX)" CXXFLAGS=$(CXXFLAGS) XARCH=$(XARCH) build_one
 build_serial_debug:
-	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.serial.cpp $(SOURCE)" EXE=tacheon.serial.exe RCNAME=gui UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS=$(CXXFLAGS) XARCH=$(XARCH) build_one
+	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.serial.cpp $(SOURCE)" EXE=tachyon.serial.exe RCNAME=gui UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS=$(CXXFLAGS) XARCH=$(XARCH) build_one
 run_serial:
-	-.\tacheon.serial.exe $(ARGS) dat\$(DATASET).dat
+	-.\tachyon.serial.exe $(ARGS) dat\$(DATASET).dat
 
 build_tbb:
-	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb.cpp $(SOURCE)" EXE=tacheon.tbb.exe RCNAME=gui UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_NDEBUG)" LFLAGS="$(LIBS_TBB_NDEBUG)" XARCH=$(XARCH) build_one
+	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb.cpp $(SOURCE)" EXE=tachyon.tbb.exe RCNAME=gui UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_NDEBUG)" LFLAGS="$(LIBS_TBB_NDEBUG)" XARCH=$(XARCH) build_one
 build_tbb_debug:
-	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb.cpp $(SOURCE)" EXE=tacheon.tbb.exe RCNAME=gui UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_DEBUG)" LFLAGS="$(LIBS_TBB_DEBUG)" XARCH=$(XARCH) build_one
+	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb.cpp $(SOURCE)" EXE=tachyon.tbb.exe RCNAME=gui UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_DEBUG)" LFLAGS="$(LIBS_TBB_DEBUG)" XARCH=$(XARCH) build_one
 run_tbb:
-	-.\tacheon.tbb.exe $(ARGS) dat\$(DATASET).dat
+	-.\tachyon.tbb.exe $(ARGS) dat\$(DATASET).dat
 
 build_tbb1d:
-	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb1d.cpp $(SOURCE)" EXE=tacheon.tbb1d.exe RCNAME=gui UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_NDEBUG)" LFLAGS="$(LIBS_TBB_NDEBUG)" XARCH=$(XARCH) build_one
+	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb1d.cpp $(SOURCE)" EXE=tachyon.tbb1d.exe RCNAME=gui UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_NDEBUG)" LFLAGS="$(LIBS_TBB_NDEBUG)" XARCH=$(XARCH) build_one
 build_tbb1d_debug:
-	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb1d.cpp $(SOURCE)" EXE=tacheon.tbb1d.exe RCNAME=gui UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_DEBUG)" LFLAGS="$(LIBS_TBB_DEBUG)" XARCH=$(XARCH) build_one
+	@$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb1d.cpp $(SOURCE)" EXE=tachyon.tbb1d.exe RCNAME=gui UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_DEBUG)" LFLAGS="$(LIBS_TBB_DEBUG)" XARCH=$(XARCH) build_one
 run_tbb1d:
-	-.\tacheon.tbb1d.exe $(ARGS) dat\$(DATASET).dat
+	-.\tachyon.tbb1d.exe $(ARGS) dat\$(DATASET).dat
 
 
 clean:
-	@cmd.exe /C del tacheon.* *.manifest *.obj vc7.1\gui.res *.?db
+	@cmd.exe /C del tachyon.* *.manifest *.obj vc7.1\gui.res *.?db
diff --git a/examples/parallel_for/tacheon/dat/820spheres.dat b/examples/parallel_for/tachyon/dat/820spheres.dat
similarity index 100%
rename from examples/parallel_for/tacheon/dat/820spheres.dat
rename to examples/parallel_for/tachyon/dat/820spheres.dat
diff --git a/examples/parallel_for/tacheon/dat/balls.dat b/examples/parallel_for/tachyon/dat/balls.dat
similarity index 100%
rename from examples/parallel_for/tacheon/dat/balls.dat
rename to examples/parallel_for/tachyon/dat/balls.dat
diff --git a/examples/parallel_for/tacheon/dat/balls3.dat b/examples/parallel_for/tachyon/dat/balls3.dat
similarity index 100%
rename from examples/parallel_for/tacheon/dat/balls3.dat
rename to examples/parallel_for/tachyon/dat/balls3.dat
diff --git a/examples/parallel_for/tacheon/dat/lattice.dat b/examples/parallel_for/tachyon/dat/lattice.dat
similarity index 100%
rename from examples/parallel_for/tacheon/dat/lattice.dat
rename to examples/parallel_for/tachyon/dat/lattice.dat
diff --git a/examples/parallel_for/tacheon/dat/model2.dat b/examples/parallel_for/tachyon/dat/model2.dat
similarity index 100%
rename from examples/parallel_for/tacheon/dat/model2.dat
rename to examples/parallel_for/tachyon/dat/model2.dat
diff --git a/examples/parallel_for/tacheon/dat/teapot.dat b/examples/parallel_for/tachyon/dat/teapot.dat
similarity index 100%
rename from examples/parallel_for/tacheon/dat/teapot.dat
rename to examples/parallel_for/tachyon/dat/teapot.dat
diff --git a/examples/parallel_for/tacheon/dat/trypsin4pti.dat b/examples/parallel_for/tachyon/dat/trypsin4pti.dat
similarity index 100%
rename from examples/parallel_for/tacheon/dat/trypsin4pti.dat
rename to examples/parallel_for/tachyon/dat/trypsin4pti.dat
diff --git a/examples/parallel_for/tacheon/index.html b/examples/parallel_for/tachyon/index.html
similarity index 94%
rename from examples/parallel_for/tacheon/index.html
rename to examples/parallel_for/tachyon/index.html
index 854419a..3675275 100644
--- a/examples/parallel_for/tacheon/index.html
+++ b/examples/parallel_for/tachyon/index.html
@@ -126,19 +126,19 @@ Here, <<I>version</I>> is one of the above versions of the example, i.e.,
 
 <H2>Usage</H2>
 Building via the above make commands, or via Visual Studio projects on Windows* systems, produces executable files
-named tacheon.<<I>version</I>>.exe.  To run these executables directly, use one or more of the following commands.
+named tachyon.<<I>version</I>>.exe.  To run these executables directly, use one or more of the following commands.
 <DL>
-<DT><TT>tacheon.<<I>version</I>>.exe <<I>dataset</I>></TT>
+<DT><TT>tachyon.<<I>version</I>>.exe <<I>dataset</I>></TT>
 <DD>Run this version (release or debug), where <<I>dataset</I>> is the path/name of
     one of the *.dat files in the <A HREF="dat">dat</A> directory for the example.
-<DT><TT>tacheon.<<I>version</I>>.exe -D <<I>dataset</I>></TT>
+<DT><TT>tachyon.<<I>version</I>>.exe -D <<I>dataset</I>></TT>
 <DD>Run this version (release or debug), but run with disabled run-time display updating
     for use in making performance measurements
     <I>(strongly recommended when measuring performance or scalability; see note below)</I>.
 <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 <TT>tbb</TT> example with the GUI turned off
     (e.g., <TT>make UI=con tbb_debug</TT>; see also the build directions above).
-    <BR>Run it with a small dataset, e.g., <TT>tacheon.tbb.exe -D dat/820spheres.dat</TT>.
+    <BR>Run it with a small dataset, e.g., <TT>tachyon.tbb.exe -D dat/820spheres.dat</TT>.
 </DL>
 
 <H2>Notes</H2>
@@ -163,8 +163,8 @@ subsidiaries in the United States and other countries.
 
 <I>
 <P>
-<A NAME=copyright>The original source</A> for this example is<BR>
-Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+The original source for this example is
+Copyright (c) 1994-2008 John E. Stone
 All rights reserved.
 </P>
 
@@ -172,19 +172,16 @@ All rights reserved.
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:
-</P>
 <OL>
 <LI>Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
 <LI>Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.
-<LI>All advertising materials mentioning features or use of this software
-   must display the following acknowledgement:
-     This product includes software developed by John E. Stone
 <LI>The name of the author may not be used to endorse or promote products
    derived from this software without specific prior written permission.
 </OL>
+</P>
 
 <P>
 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/api.cpp b/examples/parallel_for/tachyon/src/api.cpp
similarity index 96%
rename from examples/parallel_for/tacheon/src/api.cpp
rename to examples/parallel_for/tachyon/src/api.cpp
index c74b2cd..a875cee 100644
--- a/examples/parallel_for/tacheon/src/api.cpp
+++ b/examples/parallel_for/tachyon/src/api.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -62,7 +59,7 @@
  * api.c - This file contains all of the API calls that are defined for
  *         external driver code to use.  
  * 
- *  $Id: api.cpp,v 1.5.2.1 2007-06-04 19:23:39 dpoulsen Exp $
+ *  $Id: api.cpp,v 1.5 2007-02-22 17:54:14 dpoulsen Exp $
  */
 
 #include "machine.h"
@@ -164,7 +161,7 @@ void rt_camerasetup(SceneHandle voidscene, apiflt zoom, apiflt aspectratio,
   scene->camupvec=newupvec;
 }
 
-void rt_outputfile(SceneHandle voidscene, char * outname) {
+void rt_outputfile(SceneHandle voidscene, const char * outname) {
   scenedef * scene = (scenedef *) voidscene;
   strcpy((char *) &scene->outfilename, outname);
 }
diff --git a/examples/parallel_for/tacheon/src/api.h b/examples/parallel_for/tachyon/src/api.h
similarity index 95%
rename from examples/parallel_for/tacheon/src/api.h
rename to examples/parallel_for/tachyon/src/api.h
index 85e29c3..32dcec3 100644
--- a/examples/parallel_for/tacheon/src/api.h
+++ b/examples/parallel_for/tachyon/src/api.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -131,7 +128,7 @@ void rt_finalize(void); /* close down for good.. */
 SceneHandle rt_newscene(void);        /* allocate new scene */
 void rt_deletescene(SceneHandle); /* delete a scene */
 void rt_renderscene(SceneHandle); /* raytrace the current scene */  
-void rt_outputfile(SceneHandle, char * outname); 
+void rt_outputfile(SceneHandle, const char * outname); 
 void rt_resolution(SceneHandle, int hres, int vres);
 void rt_verbose(SceneHandle, int v);
 void rt_rawimage(SceneHandle, unsigned char *rawimage);
diff --git a/examples/parallel_for/tacheon/src/apigeom.cpp b/examples/parallel_for/tachyon/src/apigeom.cpp
similarity index 96%
rename from examples/parallel_for/tacheon/src/apigeom.cpp
rename to examples/parallel_for/tachyon/src/apigeom.cpp
index 95193bb..f46239a 100644
--- a/examples/parallel_for/tacheon/src/apigeom.cpp
+++ b/examples/parallel_for/tachyon/src/apigeom.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/apitrigeom.cpp b/examples/parallel_for/tachyon/src/apitrigeom.cpp
similarity index 96%
rename from examples/parallel_for/tacheon/src/apitrigeom.cpp
rename to examples/parallel_for/tachyon/src/apitrigeom.cpp
index 12cdc6a..556b149 100644
--- a/examples/parallel_for/tacheon/src/apitrigeom.cpp
+++ b/examples/parallel_for/tachyon/src/apitrigeom.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/apitrigeom.h b/examples/parallel_for/tachyon/src/apitrigeom.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/apitrigeom.h
rename to examples/parallel_for/tachyon/src/apitrigeom.h
index 7d1c029..b816535 100644
--- a/examples/parallel_for/tacheon/src/apitrigeom.h
+++ b/examples/parallel_for/tachyon/src/apitrigeom.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/bndbox.cpp b/examples/parallel_for/tachyon/src/bndbox.cpp
similarity index 94%
rename from examples/parallel_for/tacheon/src/bndbox.cpp
rename to examples/parallel_for/tachyon/src/bndbox.cpp
index b9d6877..443c3b9 100644
--- a/examples/parallel_for/tacheon/src/bndbox.cpp
+++ b/examples/parallel_for/tachyon/src/bndbox.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -61,7 +58,7 @@
 /* 
  * bndbox.c - This file contains the functions for dealing with bounding boxes.
  *
- *  $Id: bndbox.cpp,v 1.2.2.1 2007-06-04 19:23:39 dpoulsen Exp $
+ *  $Id: bndbox.cpp,v 1.2 2007-02-22 17:54:15 dpoulsen Exp $
  */
  
 #include "machine.h"
diff --git a/examples/parallel_for/tacheon/src/bndbox.h b/examples/parallel_for/tachyon/src/bndbox.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/bndbox.h
rename to examples/parallel_for/tachyon/src/bndbox.h
index 9d68745..ad428c0 100644
--- a/examples/parallel_for/tacheon/src/bndbox.h
+++ b/examples/parallel_for/tachyon/src/bndbox.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/box.cpp b/examples/parallel_for/tachyon/src/box.cpp
similarity index 94%
rename from examples/parallel_for/tacheon/src/box.cpp
rename to examples/parallel_for/tachyon/src/box.cpp
index 89ab31d..f54a3af 100644
--- a/examples/parallel_for/tacheon/src/box.cpp
+++ b/examples/parallel_for/tachyon/src/box.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/box.h b/examples/parallel_for/tachyon/src/box.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/box.h
rename to examples/parallel_for/tachyon/src/box.h
index 0734be1..7aa4fe6 100644
--- a/examples/parallel_for/tacheon/src/box.h
+++ b/examples/parallel_for/tachyon/src/box.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/camera.cpp b/examples/parallel_for/tachyon/src/camera.cpp
similarity index 94%
rename from examples/parallel_for/tacheon/src/camera.cpp
rename to examples/parallel_for/tachyon/src/camera.cpp
index 9c25961..afa6c9a 100644
--- a/examples/parallel_for/tacheon/src/camera.cpp
+++ b/examples/parallel_for/tachyon/src/camera.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/camera.h b/examples/parallel_for/tachyon/src/camera.h
similarity index 90%
rename from examples/parallel_for/tacheon/src/camera.h
rename to examples/parallel_for/tachyon/src/camera.h
index 6b1c8f4..b38e809 100644
--- a/examples/parallel_for/tacheon/src/camera.h
+++ b/examples/parallel_for/tachyon/src/camera.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/coordsys.cpp b/examples/parallel_for/tachyon/src/coordsys.cpp
similarity index 92%
rename from examples/parallel_for/tacheon/src/coordsys.cpp
rename to examples/parallel_for/tachyon/src/coordsys.cpp
index 9705001..fa5cf1f 100644
--- a/examples/parallel_for/tacheon/src/coordsys.cpp
+++ b/examples/parallel_for/tachyon/src/coordsys.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/coordsys.h b/examples/parallel_for/tachyon/src/coordsys.h
similarity index 90%
rename from examples/parallel_for/tacheon/src/coordsys.h
rename to examples/parallel_for/tachyon/src/coordsys.h
index 321650a..aa2bdca 100644
--- a/examples/parallel_for/tacheon/src/coordsys.h
+++ b/examples/parallel_for/tachyon/src/coordsys.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/cylinder.cpp b/examples/parallel_for/tachyon/src/cylinder.cpp
similarity index 96%
rename from examples/parallel_for/tacheon/src/cylinder.cpp
rename to examples/parallel_for/tachyon/src/cylinder.cpp
index 30d2f2e..8179376 100644
--- a/examples/parallel_for/tacheon/src/cylinder.cpp
+++ b/examples/parallel_for/tachyon/src/cylinder.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/cylinder.h b/examples/parallel_for/tachyon/src/cylinder.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/cylinder.h
rename to examples/parallel_for/tachyon/src/cylinder.h
index fe69e0e..ba46461 100644
--- a/examples/parallel_for/tacheon/src/cylinder.h
+++ b/examples/parallel_for/tachyon/src/cylinder.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/extvol.cpp b/examples/parallel_for/tachyon/src/extvol.cpp
similarity index 96%
rename from examples/parallel_for/tacheon/src/extvol.cpp
rename to examples/parallel_for/tachyon/src/extvol.cpp
index 3adfe6f..a532786 100644
--- a/examples/parallel_for/tacheon/src/extvol.cpp
+++ b/examples/parallel_for/tachyon/src/extvol.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/extvol.h b/examples/parallel_for/tachyon/src/extvol.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/extvol.h
rename to examples/parallel_for/tachyon/src/extvol.h
index 1e36a08..74d9779 100644
--- a/examples/parallel_for/tacheon/src/extvol.h
+++ b/examples/parallel_for/tachyon/src/extvol.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/getargs.cpp b/examples/parallel_for/tachyon/src/getargs.cpp
similarity index 95%
rename from examples/parallel_for/tacheon/src/getargs.cpp
rename to examples/parallel_for/tachyon/src/getargs.cpp
index ad1bf68..e981050 100644
--- a/examples/parallel_for/tacheon/src/getargs.cpp
+++ b/examples/parallel_for/tachyon/src/getargs.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/getargs.h b/examples/parallel_for/tachyon/src/getargs.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/getargs.h
rename to examples/parallel_for/tachyon/src/getargs.h
index 382f508..09f651e 100644
--- a/examples/parallel_for/tacheon/src/getargs.h
+++ b/examples/parallel_for/tachyon/src/getargs.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/global.cpp b/examples/parallel_for/tachyon/src/global.cpp
similarity index 91%
rename from examples/parallel_for/tacheon/src/global.cpp
rename to examples/parallel_for/tachyon/src/global.cpp
index 9ef549c..cb0394f 100644
--- a/examples/parallel_for/tacheon/src/global.cpp
+++ b/examples/parallel_for/tachyon/src/global.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/global.h b/examples/parallel_for/tachyon/src/global.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/global.h
rename to examples/parallel_for/tachyon/src/global.h
index c5cca22..869c6bf 100644
--- a/examples/parallel_for/tacheon/src/global.h
+++ b/examples/parallel_for/tachyon/src/global.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/grid.cpp b/examples/parallel_for/tachyon/src/grid.cpp
similarity index 98%
rename from examples/parallel_for/tacheon/src/grid.cpp
rename to examples/parallel_for/tachyon/src/grid.cpp
index 78a6c43..3811f60 100644
--- a/examples/parallel_for/tacheon/src/grid.cpp
+++ b/examples/parallel_for/tachyon/src/grid.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/grid.h b/examples/parallel_for/tachyon/src/grid.h
similarity index 94%
rename from examples/parallel_for/tacheon/src/grid.h
rename to examples/parallel_for/tachyon/src/grid.h
index cd11ab8..7c948e4 100644
--- a/examples/parallel_for/tacheon/src/grid.h
+++ b/examples/parallel_for/tachyon/src/grid.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/imageio.cpp b/examples/parallel_for/tachyon/src/imageio.cpp
similarity index 94%
rename from examples/parallel_for/tacheon/src/imageio.cpp
rename to examples/parallel_for/tachyon/src/imageio.cpp
index e61cbda..81000ce 100644
--- a/examples/parallel_for/tacheon/src/imageio.cpp
+++ b/examples/parallel_for/tachyon/src/imageio.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/imageio.h b/examples/parallel_for/tachyon/src/imageio.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/imageio.h
rename to examples/parallel_for/tachyon/src/imageio.h
index 0ba943d..d8f2974 100644
--- a/examples/parallel_for/tacheon/src/imageio.h
+++ b/examples/parallel_for/tachyon/src/imageio.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/imap.cpp b/examples/parallel_for/tachyon/src/imap.cpp
similarity index 94%
rename from examples/parallel_for/tacheon/src/imap.cpp
rename to examples/parallel_for/tachyon/src/imap.cpp
index 5a62aff..753a647 100644
--- a/examples/parallel_for/tacheon/src/imap.cpp
+++ b/examples/parallel_for/tachyon/src/imap.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/imap.h b/examples/parallel_for/tachyon/src/imap.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/imap.h
rename to examples/parallel_for/tachyon/src/imap.h
index 029dabc..21d4ac5 100644
--- a/examples/parallel_for/tacheon/src/imap.h
+++ b/examples/parallel_for/tachyon/src/imap.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/intersect.cpp b/examples/parallel_for/tachyon/src/intersect.cpp
similarity index 94%
rename from examples/parallel_for/tacheon/src/intersect.cpp
rename to examples/parallel_for/tachyon/src/intersect.cpp
index ef7efe0..dd185af 100644
--- a/examples/parallel_for/tacheon/src/intersect.cpp
+++ b/examples/parallel_for/tachyon/src/intersect.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/intersect.h b/examples/parallel_for/tachyon/src/intersect.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/intersect.h
rename to examples/parallel_for/tachyon/src/intersect.h
index 433800c..64efbf2 100644
--- a/examples/parallel_for/tacheon/src/intersect.h
+++ b/examples/parallel_for/tachyon/src/intersect.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/jpeg.cpp b/examples/parallel_for/tachyon/src/jpeg.cpp
similarity index 95%
rename from examples/parallel_for/tacheon/src/jpeg.cpp
rename to examples/parallel_for/tachyon/src/jpeg.cpp
index d034d35..142cadf 100644
--- a/examples/parallel_for/tacheon/src/jpeg.cpp
+++ b/examples/parallel_for/tachyon/src/jpeg.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/jpeg.h b/examples/parallel_for/tachyon/src/jpeg.h
similarity index 90%
rename from examples/parallel_for/tacheon/src/jpeg.h
rename to examples/parallel_for/tachyon/src/jpeg.h
index 207bcc3..b5f0c22 100644
--- a/examples/parallel_for/tacheon/src/jpeg.h
+++ b/examples/parallel_for/tachyon/src/jpeg.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/light.cpp b/examples/parallel_for/tachyon/src/light.cpp
similarity index 93%
rename from examples/parallel_for/tacheon/src/light.cpp
rename to examples/parallel_for/tachyon/src/light.cpp
index 8782b89..052c635 100644
--- a/examples/parallel_for/tacheon/src/light.cpp
+++ b/examples/parallel_for/tachyon/src/light.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/light.h b/examples/parallel_for/tachyon/src/light.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/light.h
rename to examples/parallel_for/tachyon/src/light.h
index ef7d09b..cdccaa6 100644
--- a/examples/parallel_for/tacheon/src/light.h
+++ b/examples/parallel_for/tachyon/src/light.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/machine.h b/examples/parallel_for/tachyon/src/machine.h
similarity index 90%
rename from examples/parallel_for/tacheon/src/machine.h
rename to examples/parallel_for/tachyon/src/machine.h
index fe7d682..e66fd87 100644
--- a/examples/parallel_for/tacheon/src/machine.h
+++ b/examples/parallel_for/tachyon/src/machine.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -65,11 +62,13 @@
  */
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <string.h>
 #include <math.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 
+using namespace std;
+
 #define STDTIME
diff --git a/examples/parallel_for/tacheon/src/macros.h b/examples/parallel_for/tachyon/src/macros.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/macros.h
rename to examples/parallel_for/tachyon/src/macros.h
index 7f92742..a21c172 100644
--- a/examples/parallel_for/tacheon/src/macros.h
+++ b/examples/parallel_for/tachyon/src/macros.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/objbound.cpp b/examples/parallel_for/tachyon/src/objbound.cpp
similarity index 97%
rename from examples/parallel_for/tacheon/src/objbound.cpp
rename to examples/parallel_for/tachyon/src/objbound.cpp
index 93e12d5..7e68d92 100644
--- a/examples/parallel_for/tacheon/src/objbound.cpp
+++ b/examples/parallel_for/tachyon/src/objbound.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/objbound.h b/examples/parallel_for/tachyon/src/objbound.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/objbound.h
rename to examples/parallel_for/tachyon/src/objbound.h
index 559fd3d..c1650b7 100644
--- a/examples/parallel_for/tacheon/src/objbound.h
+++ b/examples/parallel_for/tachyon/src/objbound.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/parse.cpp b/examples/parallel_for/tachyon/src/parse.cpp
similarity index 97%
rename from examples/parallel_for/tacheon/src/parse.cpp
rename to examples/parallel_for/tachyon/src/parse.cpp
index 4d35859..61917d6 100644
--- a/examples/parallel_for/tacheon/src/parse.cpp
+++ b/examples/parallel_for/tachyon/src/parse.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -83,7 +80,7 @@ static int numtextures;         /* number of TEXDEF textures               */
 static int numobjectsparsed;    /* total number of objects parsed so far   */
 static color scenebackcol;   /* scene background color                  */
 
-static int stringcmp(char * a, char * b) {
+static int stringcmp(const char * a, const char * b) {
   int i, s, l;
 
   s=strlen(a);
@@ -192,7 +189,7 @@ static void Trans3d(vector * trans, vector * vec) {
   vec->z+=trans->z;
 }
 
-static errcode GetString(FILE * dfile, char * string) {
+static errcode GetString(FILE * dfile, const char * string) {
   char data[255];
 
   fscanf(dfile,"%s",data);
diff --git a/examples/parallel_for/tacheon/src/parse.h b/examples/parallel_for/tachyon/src/parse.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/parse.h
rename to examples/parallel_for/tachyon/src/parse.h
index a1abd91..d263ba2 100644
--- a/examples/parallel_for/tacheon/src/parse.h
+++ b/examples/parallel_for/tachyon/src/parse.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -94,7 +91,7 @@ typedef struct {
 typedef unsigned int errcode;
 
 static errcode add_texture(void * tex, char name[TEXNAMELEN]);
-static errcode GetString(FILE *, char *);
+static errcode GetString(FILE *, const char *);
 static errcode GetScenedefs(FILE *, SceneHandle);
 static errcode GetColor(FILE *, color *);
 static errcode GetVector(FILE *, vector *);
diff --git a/examples/parallel_for/tacheon/src/plane.cpp b/examples/parallel_for/tachyon/src/plane.cpp
similarity index 92%
rename from examples/parallel_for/tacheon/src/plane.cpp
rename to examples/parallel_for/tachyon/src/plane.cpp
index 1d5e0f2..4b48e08 100644
--- a/examples/parallel_for/tacheon/src/plane.cpp
+++ b/examples/parallel_for/tachyon/src/plane.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/plane.h b/examples/parallel_for/tachyon/src/plane.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/plane.h
rename to examples/parallel_for/tachyon/src/plane.h
index 870f9e5..aab961a 100644
--- a/examples/parallel_for/tacheon/src/plane.h
+++ b/examples/parallel_for/tachyon/src/plane.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/ppm.cpp b/examples/parallel_for/tachyon/src/ppm.cpp
similarity index 93%
rename from examples/parallel_for/tacheon/src/ppm.cpp
rename to examples/parallel_for/tachyon/src/ppm.cpp
index 1a3d928..5e764aa 100644
--- a/examples/parallel_for/tacheon/src/ppm.cpp
+++ b/examples/parallel_for/tachyon/src/ppm.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/ppm.h b/examples/parallel_for/tachyon/src/ppm.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/ppm.h
rename to examples/parallel_for/tachyon/src/ppm.h
index 64d8904..8b52ed1 100644
--- a/examples/parallel_for/tacheon/src/ppm.h
+++ b/examples/parallel_for/tachyon/src/ppm.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/pthread.cpp b/examples/parallel_for/tachyon/src/pthread.cpp
similarity index 94%
rename from examples/parallel_for/tacheon/src/pthread.cpp
rename to examples/parallel_for/tachyon/src/pthread.cpp
index d6c3092..e4c60f2 100644
--- a/examples/parallel_for/tacheon/src/pthread.cpp
+++ b/examples/parallel_for/tachyon/src/pthread.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/pthread.h b/examples/parallel_for/tachyon/src/pthread.h
similarity index 93%
rename from examples/parallel_for/tacheon/src/pthread.h
rename to examples/parallel_for/tachyon/src/pthread.h
index e50e4fb..c183c98 100644
--- a/examples/parallel_for/tacheon/src/pthread.h
+++ b/examples/parallel_for/tachyon/src/pthread.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/quadric.cpp b/examples/parallel_for/tachyon/src/quadric.cpp
similarity index 94%
rename from examples/parallel_for/tacheon/src/quadric.cpp
rename to examples/parallel_for/tachyon/src/quadric.cpp
index 9a25d92..6bd5be7 100644
--- a/examples/parallel_for/tacheon/src/quadric.cpp
+++ b/examples/parallel_for/tachyon/src/quadric.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/quadric.h b/examples/parallel_for/tachyon/src/quadric.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/quadric.h
rename to examples/parallel_for/tachyon/src/quadric.h
index 6833f41..0d983c4 100644
--- a/examples/parallel_for/tacheon/src/quadric.h
+++ b/examples/parallel_for/tachyon/src/quadric.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/render.cpp b/examples/parallel_for/tachyon/src/render.cpp
similarity index 91%
rename from examples/parallel_for/tacheon/src/render.cpp
rename to examples/parallel_for/tachyon/src/render.cpp
index 3039b45..172a91e 100644
--- a/examples/parallel_for/tacheon/src/render.cpp
+++ b/examples/parallel_for/tachyon/src/render.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -61,7 +58,7 @@
 /* 
  * render.c - This file contains the main program and driver for the raytracer.
  *
- *  $Id: render.cpp,v 1.5.2.1 2007-06-04 19:23:39 dpoulsen Exp $
+ *  $Id: render.cpp,v 1.5 2007-02-22 18:17:51 amalakho Exp $
  */
 
 #include "machine.h"
diff --git a/examples/parallel_for/tacheon/src/render.h b/examples/parallel_for/tachyon/src/render.h
similarity index 90%
rename from examples/parallel_for/tacheon/src/render.h
rename to examples/parallel_for/tachyon/src/render.h
index 9fc6c12..bdacc9d 100644
--- a/examples/parallel_for/tacheon/src/render.h
+++ b/examples/parallel_for/tachyon/src/render.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/ring.cpp b/examples/parallel_for/tachyon/src/ring.cpp
similarity index 93%
rename from examples/parallel_for/tacheon/src/ring.cpp
rename to examples/parallel_for/tachyon/src/ring.cpp
index 1c205ae..54f40ef 100644
--- a/examples/parallel_for/tacheon/src/ring.cpp
+++ b/examples/parallel_for/tachyon/src/ring.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/ring.h b/examples/parallel_for/tachyon/src/ring.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/ring.h
rename to examples/parallel_for/tachyon/src/ring.h
index 977689e..0193967 100644
--- a/examples/parallel_for/tacheon/src/ring.h
+++ b/examples/parallel_for/tachyon/src/ring.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/shade.cpp b/examples/parallel_for/tachyon/src/shade.cpp
similarity index 96%
rename from examples/parallel_for/tacheon/src/shade.cpp
rename to examples/parallel_for/tachyon/src/shade.cpp
index 194d415..0fd381e 100644
--- a/examples/parallel_for/tacheon/src/shade.cpp
+++ b/examples/parallel_for/tachyon/src/shade.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/shade.h b/examples/parallel_for/tachyon/src/shade.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/shade.h
rename to examples/parallel_for/tachyon/src/shade.h
index 565289e..7721fa6 100644
--- a/examples/parallel_for/tacheon/src/shade.h
+++ b/examples/parallel_for/tachyon/src/shade.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/sphere.cpp b/examples/parallel_for/tachyon/src/sphere.cpp
similarity index 93%
rename from examples/parallel_for/tacheon/src/sphere.cpp
rename to examples/parallel_for/tachyon/src/sphere.cpp
index c2c1a4a..cc11af8 100644
--- a/examples/parallel_for/tacheon/src/sphere.cpp
+++ b/examples/parallel_for/tachyon/src/sphere.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/sphere.h b/examples/parallel_for/tachyon/src/sphere.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/sphere.h
rename to examples/parallel_for/tachyon/src/sphere.h
index cb23c6a..7a8ab77 100644
--- a/examples/parallel_for/tacheon/src/sphere.h
+++ b/examples/parallel_for/tachyon/src/sphere.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/texture.cpp b/examples/parallel_for/tachyon/src/texture.cpp
similarity index 95%
rename from examples/parallel_for/tacheon/src/texture.cpp
rename to examples/parallel_for/tachyon/src/texture.cpp
index 3a79ab1..39cfe58 100644
--- a/examples/parallel_for/tacheon/src/texture.cpp
+++ b/examples/parallel_for/tachyon/src/texture.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -307,9 +304,9 @@ int Noise(flt x, flt y, flt z) {
   y=fabs(y);
   z=fabs(z);
 
-  ix=((int) x) % NMAX;
-  iy=((int) y) % NMAX;
-  iz=((int) z) % NMAX;
+  ix=((int) x) % (NMAX-1);
+  iy=((int) y) % (NMAX-1);
+  iz=((int) z) % (NMAX-1);
 
   ox=(x - ((int) x));
   oy=(y - ((int) y));
diff --git a/examples/parallel_for/tacheon/src/texture.h b/examples/parallel_for/tachyon/src/texture.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/texture.h
rename to examples/parallel_for/tachyon/src/texture.h
index e97f195..b0b0b88 100644
--- a/examples/parallel_for/tacheon/src/texture.h
+++ b/examples/parallel_for/tachyon/src/texture.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/tgafile.cpp b/examples/parallel_for/tachyon/src/tgafile.cpp
similarity index 96%
rename from examples/parallel_for/tacheon/src/tgafile.cpp
rename to examples/parallel_for/tachyon/src/tgafile.cpp
index ff6cda3..f697946 100644
--- a/examples/parallel_for/tacheon/src/tgafile.cpp
+++ b/examples/parallel_for/tachyon/src/tgafile.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/tgafile.h b/examples/parallel_for/tachyon/src/tgafile.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/tgafile.h
rename to examples/parallel_for/tachyon/src/tgafile.h
index e35391c..e9955b4 100644
--- a/examples/parallel_for/tacheon/src/tgafile.h
+++ b/examples/parallel_for/tachyon/src/tgafile.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/trace.h b/examples/parallel_for/tachyon/src/trace.h
similarity index 92%
rename from examples/parallel_for/tacheon/src/trace.h
rename to examples/parallel_for/tachyon/src/trace.h
index ea723b2..a081987 100644
--- a/examples/parallel_for/tacheon/src/trace.h
+++ b/examples/parallel_for/tachyon/src/trace.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/trace.serial.cpp b/examples/parallel_for/tachyon/src/trace.serial.cpp
similarity index 92%
rename from examples/parallel_for/tacheon/src/trace.serial.cpp
rename to examples/parallel_for/tachyon/src/trace.serial.cpp
index c5c7a78..98a7c39 100644
--- a/examples/parallel_for/tacheon/src/trace.serial.cpp
+++ b/examples/parallel_for/tachyon/src/trace.serial.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -116,9 +113,9 @@ static color_t render_one_pixel (int x, int y, unsigned int *local_mbox, unsigne
             sample.serial = serial; 
 
             {
-                sample.d.x+=((rand() % 100) - 50) / jitterscale;
-                sample.d.y+=((rand() % 100) - 50) / jitterscale;
-                sample.d.z+=((rand() % 100) - 50) / jitterscale;
+                sample.d.x+=((std::rand() % 100) - 50) / jitterscale;
+                sample.d.y+=((std::rand() % 100) - 50) / jitterscale;
+                sample.d.z+=((std::rand() % 100) - 50) / jitterscale;
             }
 
             avcol=trace(&sample);  
diff --git a/examples/parallel_for/tacheon/src/trace.tbb.cpp b/examples/parallel_for/tachyon/src/trace.tbb.cpp
similarity index 95%
rename from examples/parallel_for/tacheon/src/trace.tbb.cpp
rename to examples/parallel_for/tachyon/src/trace.tbb.cpp
index 4597692..5f7001a 100644
--- a/examples/parallel_for/tacheon/src/trace.tbb.cpp
+++ b/examples/parallel_for/tachyon/src/trace.tbb.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/trace.tbb1d.cpp b/examples/parallel_for/tachyon/src/trace.tbb1d.cpp
similarity index 95%
rename from examples/parallel_for/tacheon/src/trace.tbb1d.cpp
rename to examples/parallel_for/tachyon/src/trace.tbb1d.cpp
index ea41cde..f64b154 100644
--- a/examples/parallel_for/tacheon/src/trace.tbb1d.cpp
+++ b/examples/parallel_for/tachyon/src/trace.tbb1d.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/trace_rest.cpp b/examples/parallel_for/tachyon/src/trace_rest.cpp
similarity index 94%
rename from examples/parallel_for/tacheon/src/trace_rest.cpp
rename to examples/parallel_for/tachyon/src/trace_rest.cpp
index 6f6cfca..987137d 100644
--- a/examples/parallel_for/tacheon/src/trace_rest.cpp
+++ b/examples/parallel_for/tachyon/src/trace_rest.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/triangle.cpp b/examples/parallel_for/tachyon/src/triangle.cpp
similarity index 95%
rename from examples/parallel_for/tacheon/src/triangle.cpp
rename to examples/parallel_for/tachyon/src/triangle.cpp
index 879b684..76b5a77 100644
--- a/examples/parallel_for/tacheon/src/triangle.cpp
+++ b/examples/parallel_for/tachyon/src/triangle.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -61,7 +58,7 @@
 /* 
  * triangle.c - This file contains the functions for dealing with triangles.
  *
- *  $Id: triangle.cpp,v 1.3.2.1 2007-06-04 19:23:39 dpoulsen Exp $
+ *  $Id: triangle.cpp,v 1.3 2007-02-22 17:54:16 dpoulsen Exp $
  */
  
 #include "machine.h"
diff --git a/examples/parallel_for/tacheon/src/triangle.h b/examples/parallel_for/tachyon/src/triangle.h
similarity index 93%
rename from examples/parallel_for/tacheon/src/triangle.h
rename to examples/parallel_for/tachyon/src/triangle.h
index e494b58..d9eb339 100644
--- a/examples/parallel_for/tacheon/src/triangle.h
+++ b/examples/parallel_for/tachyon/src/triangle.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/types.h b/examples/parallel_for/tachyon/src/types.h
similarity index 97%
rename from examples/parallel_for/tacheon/src/types.h
rename to examples/parallel_for/tachyon/src/types.h
index 89052e3..29fff7d 100644
--- a/examples/parallel_for/tacheon/src/types.h
+++ b/examples/parallel_for/tachyon/src/types.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -61,6 +58,8 @@
 #ifdef _WIN32
 #include <malloc.h>
 #define alloca _alloca
+#elif __FreeBSD__
+#include <stdlib.h>
 #else
 #include <alloca.h>
 #endif
diff --git a/examples/parallel_for/tacheon/src/ui.cpp b/examples/parallel_for/tachyon/src/ui.cpp
similarity index 89%
rename from examples/parallel_for/tacheon/src/ui.cpp
rename to examples/parallel_for/tachyon/src/ui.cpp
index a3796cb..c76cc80 100644
--- a/examples/parallel_for/tacheon/src/ui.cpp
+++ b/examples/parallel_for/tachyon/src/ui.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -70,11 +67,11 @@
 #include "util.h"
 #include "ui.h"
 
-static void (* rt_static_ui_message) (int, char *) = NULL;
+static void (* rt_static_ui_message) (int, const char *) = NULL;
 static void (* rt_static_ui_progress) (int) = NULL;
 static int (* rt_static_ui_checkaction) (void) = NULL;
 
-void set_rt_ui_message(void (* func) (int, char *)) {
+void set_rt_ui_message(void (* func) (int, const char *)) {
   rt_static_ui_message = func;
 }
 
@@ -82,7 +79,7 @@ void set_rt_ui_progress(void (* func) (int)) {
   rt_static_ui_progress = func;
 }
 
-void rt_ui_message(int level, char * msg) {
+void rt_ui_message(int level, const char * msg) {
   if (rt_static_ui_message == NULL) {
     fprintf(stderr, "%s\n", msg);
     fflush (stderr);
diff --git a/examples/parallel_for/tacheon/src/ui.h b/examples/parallel_for/tachyon/src/ui.h
similarity index 90%
rename from examples/parallel_for/tacheon/src/ui.h
rename to examples/parallel_for/tachyon/src/ui.h
index 24a02b2..2cd88e2 100644
--- a/examples/parallel_for/tacheon/src/ui.h
+++ b/examples/parallel_for/tachyon/src/ui.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -74,6 +71,6 @@
 #define MSG_ERR    200
 #define MSG_ABORT  300
 
-void rt_ui_message(int, char *);
+void rt_ui_message(int, const char *);
 void rt_ui_progress(int);
 int  rt_ui_checkaction(void);
diff --git a/examples/parallel_for/tacheon/src/util.cpp b/examples/parallel_for/tachyon/src/util.cpp
similarity index 93%
rename from examples/parallel_for/tacheon/src/util.cpp
rename to examples/parallel_for/tachyon/src/util.cpp
index 145bdc8..3d21f60 100644
--- a/examples/parallel_for/tacheon/src/util.cpp
+++ b/examples/parallel_for/tachyon/src/util.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -191,7 +188,7 @@ unsigned int rt_freemem(void * addr) {
   return bytes;
 }
 
-void rtbomb(char * msg) {
+void rtbomb(const char * msg) {
     rt_ui_message(MSG_ERR, msg);
     rt_ui_message(MSG_ABORT, "Rendering Aborted.");
 
@@ -199,6 +196,6 @@ void rtbomb(char * msg) {
   exit(1);
 }
 
-void rtmesg(char * msg) {
+void rtmesg(const char * msg) {
     rt_ui_message(MSG_0, msg);
 }
diff --git a/examples/parallel_for/tacheon/src/util.h b/examples/parallel_for/tachyon/src/util.h
similarity index 89%
rename from examples/parallel_for/tacheon/src/util.h
rename to examples/parallel_for/tachyon/src/util.h
index 7516be9..35661e5 100644
--- a/examples/parallel_for/tacheon/src/util.h
+++ b/examples/parallel_for/tachyon/src/util.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -71,5 +68,5 @@ void rt_sleep(int);
 int rt_meminuse(void);
 void * rt_getmem(unsigned int);
 unsigned int rt_freemem(void *); 
-void rtbomb(char *);
-void rtmesg(char *);
+void rtbomb(const char *);
+void rtmesg(const char *);
diff --git a/examples/parallel_for/tacheon/src/vector.cpp b/examples/parallel_for/tachyon/src/vector.cpp
similarity index 93%
rename from examples/parallel_for/tacheon/src/vector.cpp
rename to examples/parallel_for/tachyon/src/vector.cpp
index 68c1cf5..c6ab1c1 100644
--- a/examples/parallel_for/tacheon/src/vector.cpp
+++ b/examples/parallel_for/tachyon/src/vector.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/vector.h b/examples/parallel_for/tachyon/src/vector.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/vector.h
rename to examples/parallel_for/tachyon/src/vector.h
index 8aefda3..8c92ee0 100644
--- a/examples/parallel_for/tacheon/src/vector.h
+++ b/examples/parallel_for/tachyon/src/vector.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/video.cpp b/examples/parallel_for/tachyon/src/video.cpp
similarity index 89%
rename from examples/parallel_for/tacheon/src/video.cpp
rename to examples/parallel_for/tachyon/src/video.cpp
index a990512..4ffff24 100644
--- a/examples/parallel_for/tacheon/src/video.cpp
+++ b/examples/parallel_for/tachyon/src/video.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
@@ -94,7 +91,7 @@ static char *window_title_string (int argc, char **argv)
     
     if(strrchr(argv[0], '\\')) strcpy (name, strrchr(argv[0], '\\')+1);
     else if(strrchr(argv[0], '/')) strcpy (name, strrchr(argv[0], '/')+1);
-    else strcpy (name, *argv[0]?argv[0]:"Tacheon");
+    else strcpy (name, *argv[0]?argv[0]:"Tachyon");
     for (i = 1; i < argc; i++) {
         strcat (name, " ");
         strcat (name, argv[i]);
@@ -157,12 +154,10 @@ static int main_init_parts (int argc, char **argv)
     global_ywinsize = global_ysize;  // add some here to leave extra blank space on bottom for status etc.
     global_usegraphics = (scene->displaymode == RT_DISPLAY_ENABLED);
 
-    rt_ui_message (MSG_0, "\nIncludes software developed by John E. Stone.\n");
-
     return 0;
 }
 
-class tacheon_video : public video
+class tachyon_video : public video
 {
     void on_process()
     {
@@ -199,23 +194,23 @@ int main (int argc, char **argv)
 {
     int rc;
 
-    tacheon_video tacheon;
-    tacheon.threaded = true;
-    tacheon.init_console();
+    tachyon_video tachyon;
+    tachyon.threaded = true;
+    tachyon.init_console();
 
     rc = main_init_parts (argc, argv);
     if (rc) return rc;
 
-    tacheon.title = global_window_title;
-    tacheon.updating = global_usegraphics;
+    tachyon.title = global_window_title;
+    tachyon.updating = global_usegraphics;
     // always using window even if(!global_usegraphics)
     global_usegraphics = 
-        tacheon.init_window(global_xwinsize, global_ywinsize);
-    if(!tacheon.running)
+        tachyon.init_window(global_xwinsize, global_ywinsize);
+    if(!tachyon.running)
         return -1;
 
-    video = &tacheon;
-    tacheon.main_loop();
+    video = &tachyon;
+    tachyon.main_loop();
 
     return 0;
 }
diff --git a/examples/parallel_for/tacheon/src/video.h b/examples/parallel_for/tachyon/src/video.h
similarity index 90%
rename from examples/parallel_for/tacheon/src/video.h
rename to examples/parallel_for/tachyon/src/video.h
index 83e11b4..0533611 100644
--- a/examples/parallel_for/tacheon/src/video.h
+++ b/examples/parallel_for/tachyon/src/video.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/vol.cpp b/examples/parallel_for/tachyon/src/vol.cpp
similarity index 96%
rename from examples/parallel_for/tacheon/src/vol.cpp
rename to examples/parallel_for/tachyon/src/vol.cpp
index 79e1ade..155c826 100644
--- a/examples/parallel_for/tacheon/src/vol.cpp
+++ b/examples/parallel_for/tachyon/src/vol.cpp
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/src/vol.h b/examples/parallel_for/tachyon/src/vol.h
similarity index 91%
rename from examples/parallel_for/tacheon/src/vol.h
rename to examples/parallel_for/tachyon/src/vol.h
index f831e74..761edc5 100644
--- a/examples/parallel_for/tacheon/src/vol.h
+++ b/examples/parallel_for/tachyon/src/vol.h
@@ -28,7 +28,7 @@
 
 /*
     The original source for this example is
-    Copyright (c) 1994, 1995, 1996, 1997  John E. Stone
+    Copyright (c) 1994-2008 John E. Stone
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -39,10 +39,7 @@
     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
-    3. All advertising materials mentioning features or use of this software
-       must display the following acknowledgement:
-	 This product includes software developed by John E. Stone
-    4. The name of the author may not be used to endorse or promote products
+    3. The name of the author may not be used to endorse or promote products
        derived from this software without specific prior written permission.
 
     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
diff --git a/examples/parallel_for/tacheon/vc7.1/gui.ico b/examples/parallel_for/tachyon/vc7.1/gui.ico
similarity index 100%
rename from examples/parallel_for/tacheon/vc7.1/gui.ico
rename to examples/parallel_for/tachyon/vc7.1/gui.ico
diff --git a/examples/parallel_for/tacheon/vc7.1/gui.rc b/examples/parallel_for/tachyon/vc7.1/gui.rc
similarity index 100%
rename from examples/parallel_for/tacheon/vc7.1/gui.rc
rename to examples/parallel_for/tachyon/vc7.1/gui.rc
diff --git a/examples/parallel_for/tacheon/vc7.1/resource.h b/examples/parallel_for/tachyon/vc7.1/resource.h
similarity index 100%
rename from examples/parallel_for/tacheon/vc7.1/resource.h
rename to examples/parallel_for/tachyon/vc7.1/resource.h
diff --git a/examples/parallel_for/tacheon/vc7.1/small.ico b/examples/parallel_for/tachyon/vc7.1/small.ico
similarity index 100%
rename from examples/parallel_for/tacheon/vc7.1/small.ico
rename to examples/parallel_for/tachyon/vc7.1/small.ico
diff --git a/examples/parallel_for/tacheon/vc7.1/tacheon.serial.vcproj b/examples/parallel_for/tachyon/vc7.1/tachyon.serial.vcproj
similarity index 98%
rename from examples/parallel_for/tacheon/vc7.1/tacheon.serial.vcproj
rename to examples/parallel_for/tachyon/vc7.1/tachyon.serial.vcproj
index 8a77053..2f7b170 100644
--- a/examples/parallel_for/tacheon/vc7.1/tacheon.serial.vcproj
+++ b/examples/parallel_for/tachyon/vc7.1/tachyon.serial.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="7.10"
-	Name="tacheon.serial"
+	Name="tachyon.serial"
 	ProjectGUID="{1D7176EE-63B6-48F2-AB83-FFAD2048C25D}"
-	RootNamespace="tacheon.serial"
+	RootNamespace="tachyon.serial"
 	Keyword="Win32Proj">
 	<Platforms>
 		<Platform
@@ -227,7 +227,7 @@
 	<References>
 		<ProjectReference
 			ReferencedProjectIdentifier="{1D7176EE-63B6-48F2-AB83-FFAD2149C25E}"
-			Name="tacheon.common"/>
+			Name="tachyon.common"/>
 	</References>
 	<Files>
 		<File
diff --git a/examples/parallel_for/tacheon/vc7.1/tacheon.sln b/examples/parallel_for/tachyon/vc7.1/tachyon.sln
similarity index 86%
rename from examples/parallel_for/tacheon/vc7.1/tacheon.sln
rename to examples/parallel_for/tachyon/vc7.1/tachyon.sln
index c657856..0dc481b 100644
--- a/examples/parallel_for/tacheon/vc7.1/tacheon.sln
+++ b/examples/parallel_for/tachyon/vc7.1/tachyon.sln
@@ -1,17 +1,17 @@
 Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.common", "tacheon.vcproj", "{1D7176EE-63B6-48F2-AB83-FFAD2149C25E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.common", "tachyon.vcproj", "{1D7176EE-63B6-48F2-AB83-FFAD2149C25E}"
 	ProjectSection(ProjectDependencies) = postProject
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.serial", "tacheon.serial.vcproj", "{1D7176EE-63B6-48F2-AB83-FFAD2048C25D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.serial", "tachyon.serial.vcproj", "{1D7176EE-63B6-48F2-AB83-FFAD2048C25D}"
 	ProjectSection(ProjectDependencies) = postProject
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.tbb1d", "tacheon.tbb1d.vcproj", "{1D7176EE-63B6-48F2-AB83-FFAD2348C25D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.tbb1d", "tachyon.tbb1d.vcproj", "{1D7176EE-63B6-48F2-AB83-FFAD2348C25D}"
 	ProjectSection(ProjectDependencies) = postProject
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.tbb", "tacheon.tbb.vcproj", "{1D7176EE-63B6-48F2-AB83-FFAD2448C25D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.tbb", "tachyon.tbb.vcproj", "{1D7176EE-63B6-48F2-AB83-FFAD2448C25D}"
 	ProjectSection(ProjectDependencies) = postProject
 	EndProjectSection
 EndProject
diff --git a/examples/parallel_for/tacheon/vc7.1/tacheon.suo b/examples/parallel_for/tachyon/vc7.1/tachyon.suo
similarity index 100%
rename from examples/parallel_for/tacheon/vc7.1/tacheon.suo
rename to examples/parallel_for/tachyon/vc7.1/tachyon.suo
diff --git a/examples/parallel_for/tacheon/vc7.1/tacheon.tbb.vcproj b/examples/parallel_for/tachyon/vc7.1/tachyon.tbb.vcproj
similarity index 89%
rename from examples/parallel_for/tacheon/vc7.1/tacheon.tbb.vcproj
rename to examples/parallel_for/tachyon/vc7.1/tachyon.tbb.vcproj
index 90a9ddb..172e54c 100644
--- a/examples/parallel_for/tacheon/vc7.1/tacheon.tbb.vcproj
+++ b/examples/parallel_for/tachyon/vc7.1/tachyon.tbb.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="7.10"
-	Name="tacheon.tbb"
+	Name="tachyon.tbb"
 	ProjectGUID="{1D7176EE-63B6-48F2-AB83-FFAD2448C25D}"
-	RootNamespace="tacheon.tbb"
+	RootNamespace="tachyon.tbb"
 	Keyword="Win32Proj">
 	<Platforms>
 		<Platform
@@ -23,7 +23,7 @@
 				Optimization="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -40,7 +40,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -51,7 +51,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -80,7 +80,7 @@
 				Name="VCCLCompilerTool"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -96,7 +96,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -107,7 +107,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -136,7 +136,7 @@
 				Name="VCCLCompilerTool"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -152,7 +152,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -163,7 +163,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -193,7 +193,7 @@
 				Optimization="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -210,7 +210,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -221,7 +221,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -243,7 +243,7 @@
 	<References>
 		<ProjectReference
 			ReferencedProjectIdentifier="{1D7176EE-63B6-48F2-AB83-FFAD2149C25E}"
-			Name="tacheon.common"/>
+			Name="tachyon.common"/>
 	</References>
 	<Files>
 		<File
diff --git a/examples/parallel_for/tacheon/vc7.1/tacheon.tbb1d.vcproj b/examples/parallel_for/tachyon/vc7.1/tachyon.tbb1d.vcproj
similarity index 88%
rename from examples/parallel_for/tacheon/vc7.1/tacheon.tbb1d.vcproj
rename to examples/parallel_for/tachyon/vc7.1/tachyon.tbb1d.vcproj
index f2e1a5f..6d0d716 100644
--- a/examples/parallel_for/tacheon/vc7.1/tacheon.tbb1d.vcproj
+++ b/examples/parallel_for/tachyon/vc7.1/tachyon.tbb1d.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="7.10"
-	Name="tacheon.tbb1d"
+	Name="tachyon.tbb1d"
 	ProjectGUID="{1D7176EE-63B6-48F2-AB83-FFAD2348C25D}"
-	RootNamespace="tacheon.tbb1d"
+	RootNamespace="tachyon.tbb1d"
 	Keyword="Win32Proj">
 	<Platforms>
 		<Platform
@@ -23,7 +23,7 @@
 				Optimization="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -40,7 +40,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -51,7 +51,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -80,7 +80,7 @@
 				Name="VCCLCompilerTool"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -96,7 +96,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -107,7 +107,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -136,7 +136,7 @@
 				Name="VCCLCompilerTool"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -152,7 +152,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -163,7 +163,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -193,7 +193,7 @@
 				Optimization="0"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -210,7 +210,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
 				SubSystem="2"
@@ -221,7 +221,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -243,7 +243,7 @@
 	<References>
 		<ProjectReference
 			ReferencedProjectIdentifier="{1D7176EE-63B6-48F2-AB83-FFAD2149C25E}"
-			Name="tacheon.common"/>
+			Name="tachyon.common"/>
 	</References>
 	<Files>
 		<File
diff --git a/examples/parallel_for/tacheon/vc7.1/tacheon.vcproj b/examples/parallel_for/tachyon/vc7.1/tachyon.vcproj
similarity index 99%
rename from examples/parallel_for/tacheon/vc7.1/tacheon.vcproj
rename to examples/parallel_for/tachyon/vc7.1/tachyon.vcproj
index 7c31310..28d5bc1 100644
--- a/examples/parallel_for/tacheon/vc7.1/tacheon.vcproj
+++ b/examples/parallel_for/tachyon/vc7.1/tachyon.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="7.10"
-	Name="tacheon.common"
+	Name="tachyon.common"
 	ProjectGUID="{1D7176EE-63B6-48F2-AB83-FFAD2149C25E}"
-	RootNamespace="tacheon.common"
+	RootNamespace="tachyon.common"
 	Keyword="Win32Proj">
 	<Platforms>
 		<Platform
diff --git a/examples/parallel_for/tacheon/vc8/tacheon.serial.vcproj b/examples/parallel_for/tachyon/vc8/tachyon.serial.vcproj
similarity index 99%
rename from examples/parallel_for/tacheon/vc8/tacheon.serial.vcproj
rename to examples/parallel_for/tachyon/vc8/tachyon.serial.vcproj
index 7934c86..fdca326 100644
--- a/examples/parallel_for/tacheon/vc8/tacheon.serial.vcproj
+++ b/examples/parallel_for/tachyon/vc8/tachyon.serial.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="8,00"
-	Name="tacheon.serial"
+	Name="tachyon.serial"
 	ProjectGUID="{924517DF-2B6A-47D5-8A11-CC047CC4D8E9}"
-	RootNamespace="tacheon.serial"
+	RootNamespace="tachyon.serial"
 	Keyword="Win32Proj"
 	>
 	<Platforms>
@@ -677,7 +677,7 @@
 			CopyLocal="false"
 			CopyLocalDependencies="false"
 			CopyLocalSatelliteAssemblies="false"
-			RelativePathToProject=".\tacheon.vcproj"
+			RelativePathToProject=".\tachyon.vcproj"
 		/>
 	</References>
 	<Files>
diff --git a/examples/parallel_for/tacheon/vc8/tacheon.sln b/examples/parallel_for/tachyon/vc8/tachyon.sln
similarity index 91%
rename from examples/parallel_for/tacheon/vc8/tacheon.sln
rename to examples/parallel_for/tachyon/vc8/tachyon.sln
index 48ab98d..6cf6081 100644
--- a/examples/parallel_for/tacheon/vc8/tacheon.sln
+++ b/examples/parallel_for/tachyon/vc8/tachyon.sln
@@ -1,12 +1,12 @@
 Microsoft Visual Studio Solution File, Format Version 9.00
 # Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.common", "tacheon.vcproj", "{924517DF-2B6A-47D5-8A11-CC247CC4D810}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.common", "tachyon.vcproj", "{924517DF-2B6A-47D5-8A11-CC247CC4D810}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.serial", "tacheon.serial.vcproj", "{924517DF-2B6A-47D5-8A11-CC047CC4D8E9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.serial", "tachyon.serial.vcproj", "{924517DF-2B6A-47D5-8A11-CC047CC4D8E9}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.tbb1d", "tacheon.tbb1d.vcproj", "{924517DF-2B6A-47D5-8A11-CC347CC4D8E9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.tbb1d", "tachyon.tbb1d.vcproj", "{924517DF-2B6A-47D5-8A11-CC347CC4D8E9}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.tbb", "tacheon.tbb.vcproj", "{6E9B1702-78E0-4D64-B771-8B274D963B58}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.tbb", "tachyon.tbb.vcproj", "{6E9B1702-78E0-4D64-B771-8B274D963B58}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -18,7 +18,7 @@ Global
 		GDI Debug|x64 = GDI Debug|x64
 		GDI Release|Win32 = GDI Release|Win32
 		GDI Release|x64 = GDI Release|x64
-		Description = Tacheon ray-tracer example
+		Description = Tachyon ray-tracer example
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|Win32.ActiveCfg = DD Debug|Win32
diff --git a/examples/parallel_for/tacheon/vc8/tacheon.suo b/examples/parallel_for/tachyon/vc8/tachyon.suo
similarity index 100%
rename from examples/parallel_for/tacheon/vc8/tacheon.suo
rename to examples/parallel_for/tachyon/vc8/tachyon.suo
diff --git a/examples/parallel_for/tacheon/vc8/tacheon.tbb.vcproj b/examples/parallel_for/tachyon/vc8/tachyon.tbb.vcproj
similarity index 90%
rename from examples/parallel_for/tacheon/vc8/tacheon.tbb.vcproj
rename to examples/parallel_for/tachyon/vc8/tachyon.tbb.vcproj
index 5d8c82a..84f9c74 100644
--- a/examples/parallel_for/tacheon/vc8/tacheon.tbb.vcproj
+++ b/examples/parallel_for/tachyon/vc8/tachyon.tbb.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="8,00"
-	Name="tacheon.tbb"
+	Name="tachyon.tbb"
 	ProjectGUID="{6E9B1702-78E0-4D64-B771-8B274D963B58}"
-	RootNamespace="tacheon.tbb"
+	RootNamespace="tachyon.tbb"
 	Keyword="Win32Proj"
 	>
 	<Platforms>
@@ -47,7 +47,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -71,7 +71,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -102,7 +102,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -135,7 +135,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -157,7 +157,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -188,7 +188,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -220,7 +220,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_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="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -274,7 +274,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -307,7 +307,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -328,7 +328,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -359,7 +359,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -391,7 +391,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -414,7 +414,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -445,7 +445,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -478,7 +478,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -499,7 +499,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -530,7 +530,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -562,7 +562,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -586,7 +586,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -617,7 +617,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -650,7 +650,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -672,7 +672,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -703,7 +703,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
@@ -713,7 +713,7 @@
 			CopyLocal="false"
 			CopyLocalDependencies="false"
 			CopyLocalSatelliteAssemblies="false"
-			RelativePathToProject=".\tacheon.vcproj"
+			RelativePathToProject=".\tachyon.vcproj"
 		/>
 	</References>
 	<Files>
diff --git a/examples/parallel_for/tacheon/vc8/tacheon.tbb1d.vcproj b/examples/parallel_for/tachyon/vc8/tachyon.tbb1d.vcproj
similarity index 90%
rename from examples/parallel_for/tacheon/vc8/tacheon.tbb1d.vcproj
rename to examples/parallel_for/tachyon/vc8/tachyon.tbb1d.vcproj
index 6351f0b..dbcf2de 100644
--- a/examples/parallel_for/tacheon/vc8/tacheon.tbb1d.vcproj
+++ b/examples/parallel_for/tachyon/vc8/tachyon.tbb1d.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="8,00"
-	Name="tacheon.tbb1d"
+	Name="tachyon.tbb1d"
 	ProjectGUID="{924517DF-2B6A-47D5-8A11-CC347CC4D8E9}"
-	RootNamespace="tacheon.tbb1d"
+	RootNamespace="tachyon.tbb1d"
 	Keyword="Win32Proj"
 	>
 	<Platforms>
@@ -47,7 +47,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -71,7 +71,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -102,7 +102,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -135,7 +135,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -157,7 +157,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -188,7 +188,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -220,7 +220,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_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="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -274,7 +274,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -307,7 +307,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -328,7 +328,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -359,7 +359,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -391,7 +391,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -414,7 +414,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -445,7 +445,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -478,7 +478,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -499,7 +499,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -530,7 +530,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -562,7 +562,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -586,7 +586,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc8\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -617,7 +617,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -650,7 +650,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -672,7 +672,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc8\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -703,7 +703,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
@@ -713,7 +713,7 @@
 			CopyLocal="false"
 			CopyLocalDependencies="false"
 			CopyLocalSatelliteAssemblies="false"
-			RelativePathToProject=".\tacheon.vcproj"
+			RelativePathToProject=".\tachyon.vcproj"
 		/>
 	</References>
 	<Files>
diff --git a/examples/parallel_for/tacheon/vc8/tacheon.vcproj b/examples/parallel_for/tachyon/vc8/tachyon.vcproj
similarity index 99%
rename from examples/parallel_for/tacheon/vc8/tacheon.vcproj
rename to examples/parallel_for/tachyon/vc8/tachyon.vcproj
index ee0d20e..5f48b4b 100644
--- a/examples/parallel_for/tacheon/vc8/tacheon.vcproj
+++ b/examples/parallel_for/tachyon/vc8/tachyon.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="8,00"
-	Name="tacheon.common"
+	Name="tachyon.common"
 	ProjectGUID="{924517DF-2B6A-47D5-8A11-CC247CC4D810}"
-	RootNamespace="tacheon.common"
+	RootNamespace="tachyon.common"
 	Keyword="Win32Proj"
 	>
 	<Platforms>
diff --git a/examples/parallel_for/tacheon/vc9/tacheon.serial.vcproj b/examples/parallel_for/tachyon/vc9/tachyon.serial.vcproj
similarity index 99%
rename from examples/parallel_for/tacheon/vc9/tacheon.serial.vcproj
rename to examples/parallel_for/tachyon/vc9/tachyon.serial.vcproj
index e3442d5..c9c8c8c 100644
--- a/examples/parallel_for/tacheon/vc9/tacheon.serial.vcproj
+++ b/examples/parallel_for/tachyon/vc9/tachyon.serial.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="9.00"
-	Name="tacheon.serial"
+	Name="tachyon.serial"
 	ProjectGUID="{924517DF-2B6A-47D5-8A11-CC047CC4D8E9}"
-	RootNamespace="tacheon.serial"
+	RootNamespace="tachyon.serial"
 	Keyword="Win32Proj"
 	TargetFrameworkVersion="131072"
 	>
diff --git a/examples/parallel_for/tacheon/vc9/tacheon.sln b/examples/parallel_for/tachyon/vc9/tachyon.sln
similarity index 91%
rename from examples/parallel_for/tacheon/vc9/tacheon.sln
rename to examples/parallel_for/tachyon/vc9/tachyon.sln
index d7657a9..1b379e3 100644
--- a/examples/parallel_for/tacheon/vc9/tacheon.sln
+++ b/examples/parallel_for/tachyon/vc9/tachyon.sln
@@ -1,12 +1,12 @@
 Microsoft Visual Studio Solution File, Format Version 10.00
 # Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.common", "tacheon.vcproj", "{924517DF-2B6A-47D5-8A11-CC247CC4D810}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.common", "tachyon.vcproj", "{924517DF-2B6A-47D5-8A11-CC247CC4D810}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.serial", "tacheon.serial.vcproj", "{924517DF-2B6A-47D5-8A11-CC047CC4D8E9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.serial", "tachyon.serial.vcproj", "{924517DF-2B6A-47D5-8A11-CC047CC4D8E9}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.tbb1d", "tacheon.tbb1d.vcproj", "{924517DF-2B6A-47D5-8A11-CC347CC4D8E9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.tbb1d", "tachyon.tbb1d.vcproj", "{924517DF-2B6A-47D5-8A11-CC347CC4D8E9}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tacheon.tbb", "tacheon.tbb.vcproj", "{6E9B1702-78E0-4D64-B771-8B274D963B58}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.tbb", "tachyon.tbb.vcproj", "{6E9B1702-78E0-4D64-B771-8B274D963B58}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -18,7 +18,7 @@ Global
 		GDI Debug|x64 = GDI Debug|x64
 		GDI Release|Win32 = GDI Release|Win32
 		GDI Release|x64 = GDI Release|x64
-		Description = Tacheon ray-tracer example
+		Description = Tachyon ray-tracer example
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|Win32.ActiveCfg = DD Debug|Win32
diff --git a/examples/parallel_for/tachyon/vc9/tachyon.suo b/examples/parallel_for/tachyon/vc9/tachyon.suo
new file mode 100644
index 0000000..866286b
Binary files /dev/null and b/examples/parallel_for/tachyon/vc9/tachyon.suo differ
diff --git a/examples/parallel_for/tacheon/vc9/tacheon.tbb.vcproj b/examples/parallel_for/tachyon/vc9/tachyon.tbb.vcproj
similarity index 90%
rename from examples/parallel_for/tacheon/vc9/tacheon.tbb.vcproj
rename to examples/parallel_for/tachyon/vc9/tachyon.tbb.vcproj
index 768ebe4..6456c86 100644
--- a/examples/parallel_for/tacheon/vc9/tacheon.tbb.vcproj
+++ b/examples/parallel_for/tachyon/vc9/tachyon.tbb.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="9.00"
-	Name="tacheon.tbb"
+	Name="tachyon.tbb"
 	ProjectGUID="{6E9B1702-78E0-4D64-B771-8B274D963B58}"
-	RootNamespace="tacheon.tbb"
+	RootNamespace="tachyon.tbb"
 	Keyword="Win32Proj"
 	TargetFrameworkVersion="131072"
 	>
@@ -48,7 +48,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -71,7 +71,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -101,7 +101,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -133,7 +133,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_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="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -185,7 +185,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -217,7 +217,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -239,7 +239,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -269,7 +269,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -301,7 +301,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -324,7 +324,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -354,7 +354,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -387,7 +387,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -409,7 +409,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -440,7 +440,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -473,7 +473,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -494,7 +494,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -525,7 +525,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -558,7 +558,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -579,7 +579,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -610,7 +610,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -643,7 +643,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -665,7 +665,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -696,7 +696,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/tacheon/vc9/tacheon.tbb1d.vcproj b/examples/parallel_for/tachyon/vc9/tachyon.tbb1d.vcproj
similarity index 90%
rename from examples/parallel_for/tacheon/vc9/tacheon.tbb1d.vcproj
rename to examples/parallel_for/tachyon/vc9/tachyon.tbb1d.vcproj
index 0913955..bb4d020 100644
--- a/examples/parallel_for/tacheon/vc9/tacheon.tbb1d.vcproj
+++ b/examples/parallel_for/tachyon/vc9/tachyon.tbb1d.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="9.00"
-	Name="tacheon.tbb1d"
+	Name="tachyon.tbb1d"
 	ProjectGUID="{924517DF-2B6A-47D5-8A11-CC347CC4D8E9}"
-	RootNamespace="tacheon.tbb1d"
+	RootNamespace="tachyon.tbb1d"
 	Keyword="Win32Proj"
 	TargetFrameworkVersion="131072"
 	>
@@ -48,7 +48,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -71,7 +71,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -101,7 +101,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -133,7 +133,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_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="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -185,7 +185,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -217,7 +217,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -239,7 +239,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -269,7 +269,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -301,7 +301,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN32;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -324,7 +324,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\ia32\vc9\lib";"$(DXSDK_DIR)\lib\x86""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -354,7 +354,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -387,7 +387,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -409,7 +409,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -440,7 +440,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -473,7 +473,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -494,7 +494,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -525,7 +525,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -558,7 +558,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -579,7 +579,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -610,7 +610,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -643,7 +643,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE;WIN64;_WINDOWS;_DEBUG"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -665,7 +665,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(TBB20_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
+				AdditionalLibraryDirectories=""$(TBB21_INSTALL_DIR)\em64t\vc9\lib";"$(DXSDK_DIR)\lib\x64""
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				LinkTimeCodeGeneration="1"
@@ -696,7 +696,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_for/tacheon/vc9/tacheon.vcproj b/examples/parallel_for/tachyon/vc9/tachyon.vcproj
similarity index 99%
rename from examples/parallel_for/tacheon/vc9/tacheon.vcproj
rename to examples/parallel_for/tachyon/vc9/tachyon.vcproj
index 3f15a48..249b8ce 100644
--- a/examples/parallel_for/tacheon/vc9/tacheon.vcproj
+++ b/examples/parallel_for/tachyon/vc9/tachyon.vcproj
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="9.00"
-	Name="tacheon.common"
+	Name="tachyon.common"
 	ProjectGUID="{924517DF-2B6A-47D5-8A11-CC247CC4D810}"
-	RootNamespace="tacheon.common"
+	RootNamespace="tachyon.common"
 	Keyword="Win32Proj"
 	TargetFrameworkVersion="131072"
 	>
diff --git a/examples/parallel_for/tacheon/xcode/English.lproj/InfoPlist.strings b/examples/parallel_for/tachyon/xcode/English.lproj/InfoPlist.strings
similarity index 100%
rename from examples/parallel_for/tacheon/xcode/English.lproj/InfoPlist.strings
rename to examples/parallel_for/tachyon/xcode/English.lproj/InfoPlist.strings
diff --git a/examples/parallel_for/tacheon/xcode/English.lproj/main.nib/classes.nib b/examples/parallel_for/tachyon/xcode/English.lproj/main.nib/classes.nib
similarity index 100%
rename from examples/parallel_for/tacheon/xcode/English.lproj/main.nib/classes.nib
rename to examples/parallel_for/tachyon/xcode/English.lproj/main.nib/classes.nib
diff --git a/examples/parallel_for/tacheon/xcode/English.lproj/main.nib/info.nib b/examples/parallel_for/tachyon/xcode/English.lproj/main.nib/info.nib
similarity index 100%
rename from examples/parallel_for/tacheon/xcode/English.lproj/main.nib/info.nib
rename to examples/parallel_for/tachyon/xcode/English.lproj/main.nib/info.nib
diff --git a/examples/parallel_for/tacheon/xcode/English.lproj/main.nib/objects.xib b/examples/parallel_for/tachyon/xcode/English.lproj/main.nib/objects.xib
similarity index 97%
rename from examples/parallel_for/tacheon/xcode/English.lproj/main.nib/objects.xib
rename to examples/parallel_for/tachyon/xcode/English.lproj/main.nib/objects.xib
index 6cf03e0..96b2990 100644
--- a/examples/parallel_for/tacheon/xcode/English.lproj/main.nib/objects.xib
+++ b/examples/parallel_for/tachyon/xcode/English.lproj/main.nib/objects.xib
@@ -10,7 +10,7 @@
       <array count="3" name="items">
         <object class="IBCarbonMenuItem" id="210">
           <boolean name="updateSingleItem">TRUE</boolean>
-          <string name="title">Tacheon</string>
+          <string name="title">Tachyon</string>
           <object name="submenu" class="IBCarbonMenu" id="211">
             <string name="title">Seismic Simulation</string>
             <array count="7" name="items">
@@ -54,7 +54,7 @@
               </object>
               <object class="IBCarbonMenuItem" id="212">
                 <boolean name="updateSingleItem">TRUE</boolean>
-                <string name="title">About Tacheon</string>
+                <string name="title">About Tachyon</string>
                 <int name="keyEquivalentModifier">0</int>
                 <ostype name="command">abou</ostype>
               </object>
@@ -115,7 +115,7 @@
     <reference idRef="131"/>
     <object class="IBCarbonWindow" id="166">
       <string name="windowRect">338 353 698 833 </string>
-      <string name="title">Tacheon</string>
+      <string name="title">Tachyon</string>
       <object name="rootControl" class="IBCarbonRootControl" id="167">
         <string name="bounds">0 0 360 480 </string>
         <string name="viewFrame">0 0 480 360 </string>
diff --git a/examples/parallel_for/tacheon/xcode/Info.plist b/examples/parallel_for/tachyon/xcode/Info.plist
similarity index 94%
rename from examples/parallel_for/tacheon/xcode/Info.plist
rename to examples/parallel_for/tachyon/xcode/Info.plist
index 147266c..4ff1738 100644
--- a/examples/parallel_for/tacheon/xcode/Info.plist
+++ b/examples/parallel_for/tachyon/xcode/Info.plist
@@ -9,7 +9,7 @@
 	<key>CFBundleIconFile</key>
 	<string></string>
 	<key>CFBundleIdentifier</key>
-	<string>com.intel.tbb.tacheon</string>
+	<string>com.intel.tbb.tachyon</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
diff --git a/examples/parallel_for/tachyon/xcode/tachyon.pch b/examples/parallel_for/tachyon/xcode/tachyon.pch
new file mode 100644
index 0000000..9d5e3ce
--- /dev/null
+++ b/examples/parallel_for/tachyon/xcode/tachyon.pch
@@ -0,0 +1,5 @@
+//
+// Prefix header for all source files of the 'tachyon' target in the 'tachyon' project.
+//
+
+#include <Carbon/Carbon.h>
diff --git a/examples/parallel_for/tacheon/xcode/tacheon.xcodeproj/project.pbxproj b/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/project.pbxproj
similarity index 96%
rename from examples/parallel_for/tacheon/xcode/tacheon.xcodeproj/project.pbxproj
rename to examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/project.pbxproj
index fcb1c39..37f6b04 100644
--- a/examples/parallel_for/tacheon/xcode/tacheon.xcodeproj/project.pbxproj
+++ b/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/project.pbxproj
@@ -171,18 +171,18 @@
 		0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = "<group>"; };
 		20286C33FDCF999611CA2CEA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
-		32DBCF6D0370B57F00C91783 /* tacheon.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tacheon.pch; sourceTree = "<group>"; };
+		32DBCF6D0370B57F00C91783 /* tachyon.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tachyon.pch; sourceTree = "<group>"; };
 		8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
 		A117DC7A0B8DC08100F62CED /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
 		A117DC7F0B8DC09300F62CED /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
 		A117DC830B8DC0DE00F62CED /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = /Library/Frameworks/TBB.framework/Libraries/libtbb.dylib; sourceTree = "<absolute>"; };
 		A1A8FB5D0B8CBB8D001C55B1 /* trace.tbb.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = trace.tbb.cpp; path = ../src/trace.tbb.cpp; sourceTree = SOURCE_ROOT; };
-		A1F58CD90B8DE90E00073279 /* tacheon-tbb.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tacheon-tbb.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		A1F58CD90B8DE90E00073279 /* tachyon-tbb.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tachyon-tbb.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		A1F58D3D0B8DEB8E00073279 /* trace.threads.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = trace.threads.cpp; path = ../src/trace.threads.cpp; sourceTree = SOURCE_ROOT; };
 		A1F58D8B0B8DEFD900073279 /* trace.tbb1d.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = trace.tbb1d.cpp; path = ../src/trace.tbb1d.cpp; sourceTree = SOURCE_ROOT; };
 		A1F58D8C0B8DEFE900073279 /* trace.serial.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = trace.serial.cpp; path = ../src/trace.serial.cpp; sourceTree = SOURCE_ROOT; };
-		A1F58D920B8DF03600073279 /* tacheon-tbb1d.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tacheon-tbb1d.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-		A1F58D9C0B8DF06700073279 /* tacheon-serial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tacheon-serial.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		A1F58D920B8DF03600073279 /* tachyon-tbb1d.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tachyon-tbb1d.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		A1F58D9C0B8DF06700073279 /* tachyon-serial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tachyon-serial.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		A1F590320B8DF7D100073279 /* api.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = api.h; path = ../src/api.h; sourceTree = SOURCE_ROOT; };
 		A1F590330B8DF7D100073279 /* apitrigeom.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = apitrigeom.h; path = ../src/apitrigeom.h; sourceTree = SOURCE_ROOT; };
 		A1F590340B8DF7D100073279 /* bndbox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = bndbox.h; path = ../src/bndbox.h; sourceTree = SOURCE_ROOT; };
@@ -295,7 +295,7 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
-		20286C29FDCF999611CA2CEA /* tacheon */ = {
+		20286C29FDCF999611CA2CEA /* tachyon */ = {
 			isa = PBXGroup;
 			children = (
 				20286C2AFDCF999611CA2CEA /* Sources */,
@@ -303,13 +303,13 @@
 				20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */,
 				A1F58CD30B8DE85300073279 /* Products */,
 			);
-			name = tacheon;
+			name = tachyon;
 			sourceTree = "<group>";
 		};
 		20286C2AFDCF999611CA2CEA /* Sources */ = {
 			isa = PBXGroup;
 			children = (
-				A1F590310B8DF75E00073279 /* Tacheon */,
+				A1F590310B8DF75E00073279 /* Tachyon */,
 				A1A8FB5F0B8CBB9E001C55B1 /* Render */,
 			);
 			name = Sources;
@@ -348,9 +348,9 @@
 		A1F58CD30B8DE85300073279 /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				A1F58CD90B8DE90E00073279 /* tacheon-tbb.app */,
-				A1F58D920B8DF03600073279 /* tacheon-tbb1d.app */,
-				A1F58D9C0B8DF06700073279 /* tacheon-serial.app */,
+				A1F58CD90B8DE90E00073279 /* tachyon-tbb.app */,
+				A1F58D920B8DF03600073279 /* tachyon-tbb1d.app */,
+				A1F58D9C0B8DF06700073279 /* tachyon-serial.app */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -443,24 +443,24 @@
 			name = Headers;
 			sourceTree = "<group>";
 		};
-		A1F590310B8DF75E00073279 /* Tacheon */ = {
+		A1F590310B8DF75E00073279 /* Tachyon */ = {
 			isa = PBXGroup;
 			children = (
 				A1F58D8C0B8DEFE900073279 /* trace.serial.cpp */,
 				A1F58D3D0B8DEB8E00073279 /* trace.threads.cpp */,
 				A1F58D8B0B8DEFD900073279 /* trace.tbb1d.cpp */,
 				A1A8FB5D0B8CBB8D001C55B1 /* trace.tbb.cpp */,
-				32DBCF6D0370B57F00C91783 /* tacheon.pch */,
+				32DBCF6D0370B57F00C91783 /* tachyon.pch */,
 			);
-			name = Tacheon;
+			name = Tachyon;
 			sourceTree = "<group>";
 		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
-		8D0C4E890486CD37000505A6 /* tacheon-tbb */ = {
+		8D0C4E890486CD37000505A6 /* tachyon-tbb */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = C0E91AC508A95435008D54AB /* Build configuration list for PBXNativeTarget "tacheon-tbb" */;
+			buildConfigurationList = C0E91AC508A95435008D54AB /* Build configuration list for PBXNativeTarget "tachyon-tbb" */;
 			buildPhases = (
 				8D0C4E8C0486CD37000505A6 /* Resources */,
 				8D0C4E8F0486CD37000505A6 /* Sources */,
@@ -471,15 +471,15 @@
 			);
 			dependencies = (
 			);
-			name = "tacheon-tbb";
+			name = "tachyon-tbb";
 			productInstallPath = "$(HOME)/Applications";
-			productName = tacheon;
-			productReference = A1F58CD90B8DE90E00073279 /* tacheon-tbb.app */;
+			productName = tachyon;
+			productReference = A1F58CD90B8DE90E00073279 /* tachyon-tbb.app */;
 			productType = "com.apple.product-type.application";
 		};
-		A1F58D910B8DF03600073279 /* tacheon-tbb1d */ = {
+		A1F58D910B8DF03600073279 /* tachyon-tbb1d */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = A1F58D950B8DF03600073279 /* Build configuration list for PBXNativeTarget "tacheon-tbb1d" */;
+			buildConfigurationList = A1F58D950B8DF03600073279 /* Build configuration list for PBXNativeTarget "tachyon-tbb1d" */;
 			buildPhases = (
 				A1F58D8E0B8DF03600073279 /* Resources */,
 				A1F58D8F0B8DF03600073279 /* Sources */,
@@ -490,14 +490,14 @@
 			);
 			dependencies = (
 			);
-			name = "tacheon-tbb1d";
-			productName = "tacheon-tbb1d";
-			productReference = A1F58D920B8DF03600073279 /* tacheon-tbb1d.app */;
+			name = "tachyon-tbb1d";
+			productName = "tachyon-tbb1d";
+			productReference = A1F58D920B8DF03600073279 /* tachyon-tbb1d.app */;
 			productType = "com.apple.product-type.application";
 		};
-		A1F58D9B0B8DF06700073279 /* tacheon-serial */ = {
+		A1F58D9B0B8DF06700073279 /* tachyon-serial */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = A1F58D9F0B8DF06700073279 /* Build configuration list for PBXNativeTarget "tacheon-serial" */;
+			buildConfigurationList = A1F58D9F0B8DF06700073279 /* Build configuration list for PBXNativeTarget "tachyon-serial" */;
 			buildPhases = (
 				A1F58D980B8DF06700073279 /* Resources */,
 				A1F58D990B8DF06700073279 /* Sources */,
@@ -507,9 +507,9 @@
 			);
 			dependencies = (
 			);
-			name = "tacheon-serial";
-			productName = "tacheon-serial";
-			productReference = A1F58D9C0B8DF06700073279 /* tacheon-serial.app */;
+			name = "tachyon-serial";
+			productName = "tachyon-serial";
+			productReference = A1F58D9C0B8DF06700073279 /* tachyon-serial.app */;
 			productType = "com.apple.product-type.application";
 		};
 /* End PBXNativeTarget section */
@@ -517,15 +517,15 @@
 /* Begin PBXProject section */
 		20286C28FDCF999611CA2CEA /* Project object */ = {
 			isa = PBXProject;
-			buildConfigurationList = C0E91AC908A95435008D54AB /* Build configuration list for PBXProject "tacheon" */;
+			buildConfigurationList = C0E91AC908A95435008D54AB /* Build configuration list for PBXProject "tachyon" */;
 			hasScannedForEncodings = 1;
-			mainGroup = 20286C29FDCF999611CA2CEA /* tacheon */;
+			mainGroup = 20286C29FDCF999611CA2CEA /* tachyon */;
 			productRefGroup = A1F58CD30B8DE85300073279 /* Products */;
 			projectDirPath = "";
 			targets = (
-				A1F58D9B0B8DF06700073279 /* tacheon-serial */,
-				A1F58D910B8DF03600073279 /* tacheon-tbb1d */,
-				8D0C4E890486CD37000505A6 /* tacheon-tbb */,
+				A1F58D9B0B8DF06700073279 /* tachyon-serial */,
+				A1F58D910B8DF03600073279 /* tachyon-tbb1d */,
+				8D0C4E890486CD37000505A6 /* tachyon-tbb */,
 			);
 		};
 /* End PBXProject section */
@@ -737,7 +737,7 @@
 				);
 				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/TBB.framework/Libraries\"";
 				PREBINDING = NO;
-				PRODUCT_NAME = "tacheon-tbb1d";
+				PRODUCT_NAME = "tachyon-tbb1d";
 				WRAPPER_EXTENSION = app;
 				ZERO_LINK = NO;
 			};
@@ -760,7 +760,7 @@
 				);
 				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/TBB.framework/Libraries\"";
 				PREBINDING = NO;
-				PRODUCT_NAME = "tacheon-tbb1d";
+				PRODUCT_NAME = "tachyon-tbb1d";
 				WRAPPER_EXTENSION = app;
 				ZERO_LINK = NO;
 			};
@@ -780,7 +780,7 @@
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
 				PREBINDING = NO;
-				PRODUCT_NAME = "tacheon-serial";
+				PRODUCT_NAME = "tachyon-serial";
 				WRAPPER_EXTENSION = app;
 				ZERO_LINK = NO;
 			};
@@ -798,7 +798,7 @@
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
 				PREBINDING = NO;
-				PRODUCT_NAME = "tacheon-serial";
+				PRODUCT_NAME = "tachyon-serial";
 				WRAPPER_EXTENSION = app;
 				ZERO_LINK = NO;
 			};
@@ -815,7 +815,7 @@
 				GCC_MODEL_TUNING = "";
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = tacheon.pch;
+				GCC_PREFIX_HEADER = tachyon.pch;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
 				LIBRARY_SEARCH_PATHS = (
@@ -823,7 +823,7 @@
 					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
 				);
 				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/TBB.framework/Libraries\"";
-				PRODUCT_NAME = "tacheon-tbb";
+				PRODUCT_NAME = "tachyon-tbb";
 				WRAPPER_EXTENSION = app;
 				ZERO_LINK = NO;
 			};
@@ -837,7 +837,7 @@
 				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
 				GCC_MODEL_TUNING = "";
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = tacheon.pch;
+				GCC_PREFIX_HEADER = tachyon.pch;
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
 				LIBRARY_SEARCH_PATHS = (
@@ -845,7 +845,7 @@
 					"$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
 				);
 				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/TBB.framework/Libraries\"";
-				PRODUCT_NAME = "tacheon-tbb";
+				PRODUCT_NAME = "tachyon-tbb";
 				WRAPPER_EXTENSION = app;
 				ZERO_LINK = NO;
 			};
@@ -855,10 +855,10 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				GCC_AUTO_VECTORIZATION = YES;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_ENABLE_SSE3_EXTENSIONS = YES;
 				GCC_MODEL_TUNING = "";
-				GCC_PREPROCESSOR_DEFINITIONS = "DEFAULT_MODELFILE=\"/Library/Frameworks/TBB.framework/Versions/Current/examples/parallel_for/tacheon/dat/balls.dat\"";
+				GCC_PREPROCESSOR_DEFINITIONS = "DEFAULT_MODELFILE=\"/Library/Frameworks/TBB.framework/Versions/Current/examples/parallel_for/tachyon/dat/balls.dat\"";
 				GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -872,10 +872,10 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				GCC_AUTO_VECTORIZATION = YES;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_ENABLE_SSE3_EXTENSIONS = YES;
 				GCC_MODEL_TUNING = "";
-				GCC_PREPROCESSOR_DEFINITIONS = "DEFAULT_MODELFILE=\"/Library/Frameworks/TBB.framework/Versions/Current/examples/parallel_for/tacheon/dat/balls.dat\"";
+				GCC_PREPROCESSOR_DEFINITIONS = "DEFAULT_MODELFILE=\"/Library/Frameworks/TBB.framework/Versions/Current/examples/parallel_for/tachyon/dat/balls.dat\"";
 				GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -888,7 +888,7 @@
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
-		A1F58D950B8DF03600073279 /* Build configuration list for PBXNativeTarget "tacheon-tbb1d" */ = {
+		A1F58D950B8DF03600073279 /* Build configuration list for PBXNativeTarget "tachyon-tbb1d" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				A1F58D960B8DF03600073279 /* Debug */,
@@ -897,7 +897,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		A1F58D9F0B8DF06700073279 /* Build configuration list for PBXNativeTarget "tacheon-serial" */ = {
+		A1F58D9F0B8DF06700073279 /* Build configuration list for PBXNativeTarget "tachyon-serial" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				A1F58DA00B8DF06700073279 /* Debug */,
@@ -906,7 +906,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		C0E91AC508A95435008D54AB /* Build configuration list for PBXNativeTarget "tacheon-tbb" */ = {
+		C0E91AC508A95435008D54AB /* Build configuration list for PBXNativeTarget "tachyon-tbb" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				C0E91AC608A95435008D54AB /* Debug */,
@@ -915,7 +915,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		C0E91AC908A95435008D54AB /* Build configuration list for PBXProject "tacheon" */ = {
+		C0E91AC908A95435008D54AB /* Build configuration list for PBXProject "tachyon" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				C0E91ACA08A95435008D54AB /* Debug */,
diff --git a/examples/parallel_reduce/convex_hull/Makefile b/examples/parallel_reduce/convex_hull/Makefile
index fe041be..3c71ea0 100644
--- a/examples/parallel_reduce/convex_hull/Makefile
+++ b/examples/parallel_reduce/convex_hull/Makefile
@@ -32,12 +32,12 @@
 all:	release test
 
 release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o convex_hull_sample convex_hull_sample.cpp -ltbb
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o convex_hull_bench convex_hull_bench.cpp -ltbb
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o convex_hull_sample convex_hull_sample.cpp -ltbb $(LIBS)
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o convex_hull_bench convex_hull_bench.cpp -ltbb $(LIBS)
 
 debug: *.cpp
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o convex_hull_sample convex_hull_sample.cpp -ltbb_debug
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o convex_hull_bench convex_hull_bench.cpp -ltbb_debug
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o convex_hull_sample convex_hull_sample.cpp -ltbb_debug $(LIBS)
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o convex_hull_bench convex_hull_bench.cpp -ltbb_debug $(LIBS)
 
 clean:
 	rm -f convex_hull_bench convex_hull_sample *.o *.d
diff --git a/examples/parallel_reduce/convex_hull/Makefile.windows b/examples/parallel_reduce/convex_hull/Makefile.windows
index 4697403..8851a48 100644
--- a/examples/parallel_reduce/convex_hull/Makefile.windows
+++ b/examples/parallel_reduce/convex_hull/Makefile.windows
@@ -29,17 +29,17 @@
 # Just specify your program basename
 
 # The C++ compiler options
-CXX=cl.exe
-MYCXXFLAGS=/TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
-MYLDFLAGS=/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:$(PROG).exe $(LDFLAGS)
+CXX = cl.exe
+MYCXXFLAGS = /TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
+MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
 
 all: release test
 release:
-	$(CXX) convex_hull_sample.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS) /OUT:convex_hull_sample.exe
-	$(CXX) convex_hull_bench.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS) /OUT:convex_hull_bench.exe
+	$(CXX) convex_hull_sample.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:convex_hull_sample.exe
+	$(CXX) convex_hull_bench.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:convex_hull_bench.exe
 debug:
-	$(CXX) convex_hull_sample.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS) /OUT:convex_hull_sample.exe
-	$(CXX) convex_hull_bench.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS) /OUT:convex_hull_bench.exe
+	$(CXX) convex_hull_sample.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:convex_hull_sample.exe
+	$(CXX) convex_hull_bench.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:convex_hull_bench.exe
 clean:
 	@cmd.exe /C del convex_hull*.exe *.obj *.?db *.manifest
 test:
diff --git a/examples/parallel_reduce/convex_hull/convex_hull.h b/examples/parallel_reduce/convex_hull/convex_hull.h
index 444429d..d14a296 100644
--- a/examples/parallel_reduce/convex_hull/convex_hull.h
+++ b/examples/parallel_reduce/convex_hull/convex_hull.h
@@ -30,26 +30,30 @@
 #define __CONVEX_HULL_H__
 
 #define _SCL_SECURE_NO_DEPRECATE
-#include <stdlib.h>
+#include <cstdlib>
 #include <iostream>
+#include <iomanip>
 #include <sstream>
 #include <vector>
 #include <string>
+#include <cstring>
 #include <algorithm>
 #include <functional>
 #include <assert.h>
 #include "tbb/tick_count.h"
 
+using namespace std;
+
 namespace cfg {
     // convex hull problem parameter defaults
     const long    NP = 5000000; // problem size
-    const size_t SNT = 1;        // minimal number of threads
-    const size_t ENT = 8;        // maximal number of threads
+    const int     SNT = 1;        // minimal number of threads
+    const int     ENT = 8;        // maximal number of threads
 
     // convex hull problem user set parameters
     long   MAXPOINTS         = NP;
-    size_t NUM_THREADS_START = SNT;
-    size_t NUM_THREADS_END   = ENT;
+    int    NUM_THREADS_START = SNT;
+    int    NUM_THREADS_END   = ENT;
 
     // convex hull grain sizes for 3 subproblems. Be sure 16*GS < 512Kb
     const size_t GENERATE_GS = 25000;
@@ -59,7 +63,7 @@ namespace cfg {
 
 namespace util {
     bool                     VERBOSE = false;
-    std::vector<std::string> OUTPUT;
+    vector<string> OUTPUT;
 
     // utility functionality
     void ParseInputArgs(int argc, char* argv[]) {
@@ -67,14 +71,14 @@ namespace util {
         if(argc>numArgs) {
             char delim = ':';
             if(!strcmp(argv[numArgs], "-h")) {
-                std::cout << " Program usage is:" << std::endl
+                cout << " Program usage is:" << endl
                     << " " << argv[0] << " [NP] [SNT" << delim << "ENT] [-v]"
-                    << std::endl << std::endl
-                    << " where:" << std::endl
-                    << " NP  - number of points" << std::endl
-                    << " SNT - start with this number of threads" << std::endl
-                    << " ENT - end with this number of threads" << std::endl
-                    << "  -v - turns verbose ON" << std::endl;
+                    << endl << endl
+                    << " where:" << endl
+                    << " NP  - number of points" << endl
+                    << " SNT - start with this number of threads" << endl
+                    << " ENT - end with this number of threads" << endl
+                    << "  -v - turns verbose ON" << endl;
                 exit(0);
             } else {
                 while(argc>numArgs) {
@@ -84,35 +88,35 @@ namespace util {
                     } else if(!strchr(argv[numArgs], delim)) {
                         cfg::MAXPOINTS = strtol(argv[numArgs], &endptr, 0);
                         if(*endptr!='\0') {
-                            std::cout << " wrong parameter format for Number of Points" << std::endl;
+                            cout << " wrong parameter format for Number of Points" << endl;
                             exit(1);
                         }
                         if(cfg::MAXPOINTS<=0) {
-                            std::cout
-                                << "  wrong value set for Number of Points" << std::endl
-                                << "  using default value: " << std::endl
-                                << "  Number of Points = " << cfg::NP << std::endl;
+                            cout
+                                << "  wrong value set for Number of Points" << endl
+                                << "  using default value: " << endl
+                                << "  Number of Points = " << cfg::NP << endl;
                             cfg::MAXPOINTS = cfg::NP;
                         }
                     } else {
-                        cfg::NUM_THREADS_START=strtol(argv[numArgs], &endptr, 0);
+                        cfg::NUM_THREADS_START=(int)strtol(argv[numArgs], &endptr, 0);
                         if(*endptr==delim) {
-                            cfg::NUM_THREADS_END = strtol(endptr+1, &endptr, 0);
+                            cfg::NUM_THREADS_END = (int)strtol(endptr+1, &endptr, 0);
                         } else {
-                            std::cout << " wrong parameter format for Number of Threads" << std::endl;
+                            cout << " wrong parameter format for Number of Threads" << endl;
                             exit(1);
                         }
                         if(*endptr!='\0') {
-                            std::cout << " wrong parameter format for Number of Threads" << std::endl;
+                            cout << " wrong parameter format for Number of Threads" << endl;
                             exit(1);
                         }    
                         if((cfg::NUM_THREADS_START<=0)
                             || (cfg::NUM_THREADS_END<cfg::NUM_THREADS_START)) {
-                                std::cout
-                                    << "  wrong values set for Number of Threads" << std::endl
-                                    << "  using default values: " << std::endl
-                                    << "  start NT = " << cfg::SNT << std::endl
-                                    << "  end   NT = " << cfg::ENT << std::endl;
+                                cout
+                                    << "  wrong values set for Number of Threads" << endl
+                                    << "  using default values: " << endl
+                                    << "  start NT = " << cfg::SNT << endl
+                                    << "  end   NT = " << cfg::ENT << endl;
                                 cfg::NUM_THREADS_START=cfg::SNT;
                                 cfg::NUM_THREADS_END  =cfg::ENT;
                         }
@@ -129,17 +133,18 @@ namespace util {
         T y;
         point() : x(T()), y(T()) {}
         point(T _x, T _y) : x(_x), y(_y) {}
-        point(const point<T>& _P) : x(_P.x), y(_P.y) {}
-    };
+        //why do we need below line? it fails to compile with suncc
+	    //point(const point<T>& _P) : x(_P.x), y(_P.y) {} 
+	};
 
     int random(unsigned int& rseed) {
-#if __linux__ || __APPLE__
+#if __linux__ || __APPLE__ || __FreeBSD__ 
             return rand_r(&rseed);
-#elif _WIN32
+#elif _WIN32 || __sun
             return rand();
 #else
 #error Unknown/unsupported OS?
-#endif // __linux__
+#endif // __linux__ || __APPLE__ || __FreeBSD__ 
     }
 
     template < typename T >
@@ -179,12 +184,12 @@ namespace util {
     };
 
     template <typename T>
-    std::ostream& operator <<(std::ostream& _ostr, point<T> _p) {
+    ostream& operator <<(ostream& _ostr, point<T> _p) {
         return _ostr << '(' << _p.x << ',' << _p.y << ')';
     }
 
     template <typename T>
-    std::istream& operator >>(std::istream& _istr, point<T> _p) {
+    istream& operator >>(istream& _istr, point<T> _p) {
         return _istr >> _p.x >> _p.y;
     }
 
@@ -214,19 +219,19 @@ namespace util {
         return (end-start).seconds();
     }
 
-    void WriteResults(size_t nthreads, double initTime, double calcTime) {
+    void WriteResults(int nthreads, double initTime, double calcTime) {
         if(VERBOSE) {
-            std::cout << " Step by step hull constuction:" << std::endl;
+            cout << " Step by step hull constuction:" << endl;
             for(size_t i = 0; i < OUTPUT.size(); ++i)
-                std::cout << OUTPUT[i] << std::endl;
+                cout << OUTPUT[i] << endl;
         }
 
-        std::cout
+        cout
             << "  Number of nodes:" << cfg::MAXPOINTS
-            << "  Number of threads:" << nthreads
-            << "  Initialization time:" << initTime
-            << "  Calculation time:" << calcTime
-            << std::endl;
+            << "  Number of threads:" << nthreads 
+            << "  Initialization time:" << setw(10) << setprecision(3) << initTime 
+            << "  Calculation time:" << setw(10) << setprecision(3) << calcTime
+            << endl;
     }
 };
 
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 6884723..379b9b8 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -31,7 +31,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,7 +41,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -67,7 +67,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -78,7 +78,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -89,7 +89,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(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 346bffc..710f7d4 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -31,7 +31,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -41,7 +41,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -67,7 +67,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -78,7 +78,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -89,7 +89,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(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 0c93fea..9dfa429 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -199,7 +199,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -249,7 +249,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -296,7 +296,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -327,7 +327,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(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 c6b6823..5af6ed6 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -199,7 +199,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -218,7 +218,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -249,7 +249,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -278,7 +278,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -296,7 +296,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -327,7 +327,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/convex_hull/vc9/convex_hull.suo b/examples/parallel_reduce/convex_hull/vc9/convex_hull.suo
index 2b1b86f..018a5f2 100644
Binary files a/examples/parallel_reduce/convex_hull/vc9/convex_hull.suo and b/examples/parallel_reduce/convex_hull/vc9/convex_hull.suo differ
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 524bb34..71e62f1 100644
--- a/examples/parallel_reduce/convex_hull/vc9/convex_hull_benchmark.vcproj
+++ b/examples/parallel_reduce/convex_hull/vc9/convex_hull_benchmark.vcproj
@@ -44,13 +44,11 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
-				Detect64BitPortabilityProblems="false"
 				DebugInformationFormat="3"
-				ShowIncludes="true"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -65,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -94,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +120,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -140,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -170,7 +168,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -199,7 +197,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -218,11 +216,11 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
-				FixedBaseAddress="1"
 				TargetMachine="17"
+				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -243,9 +241,12 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -274,7 +275,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -292,12 +293,12 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
-				FixedBaseAddress="1"
 				TargetMachine="17"
+				FixedBaseAddress="1"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -318,9 +319,12 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(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 b286125..cdee21d 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -120,7 +120,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -138,7 +138,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -168,7 +168,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -197,7 +197,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -216,7 +216,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -246,7 +246,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -275,7 +275,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="3"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -293,7 +293,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -324,7 +324,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy /Y "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy /Y "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/convex_hull/xcode/convex_hull.xcodeproj/project.pbxproj b/examples/parallel_reduce/convex_hull/xcode/convex_hull.xcodeproj/project.pbxproj
index ecd0d04..7c7f7d5 100644
--- a/examples/parallel_reduce/convex_hull/xcode/convex_hull.xcodeproj/project.pbxproj
+++ b/examples/parallel_reduce/convex_hull/xcode/convex_hull.xcodeproj/project.pbxproj
@@ -216,7 +216,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -232,7 +232,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -281,7 +281,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -302,7 +302,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
diff --git a/examples/parallel_reduce/primes/Makefile b/examples/parallel_reduce/primes/Makefile
index db0f5cc..ed74d86 100644
--- a/examples/parallel_reduce/primes/Makefile
+++ b/examples/parallel_reduce/primes/Makefile
@@ -33,10 +33,10 @@ PROG=primes
 all:	release test
 
 release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
 
 debug: *.cpp
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
 	rm -f $(PROG) *.o *.d
diff --git a/examples/parallel_reduce/primes/Makefile.windows b/examples/parallel_reduce/primes/Makefile.windows
index 1caba11..8325bf4 100644
--- a/examples/parallel_reduce/primes/Makefile.windows
+++ b/examples/parallel_reduce/primes/Makefile.windows
@@ -31,14 +31,14 @@ PROG=Primes
 
 # The C++ compiler options
 CXX = cl.exe
-MYCXXFLAGS=/TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
-MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:$(PROG).exe $(LDFLAGS)
+MYCXXFLAGS = /TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
+MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
 
 all: release test
 release:
-	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 debug:
-	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 clean:
 	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
 test:
diff --git a/examples/parallel_reduce/primes/vc7.1/primes.vcproj b/examples/parallel_reduce/primes/vc7.1/primes.vcproj
index ae6a3f8..0a64d5e 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -90,7 +90,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/parallel_reduce/primes/vc8/primes.vcproj b/examples/parallel_reduce/primes/vc8/primes.vcproj
index 4d37a26..f782c49 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -248,7 +248,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -276,7 +276,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -325,7 +325,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/primes/vc9/primes.suo b/examples/parallel_reduce/primes/vc9/primes.suo
index 95008f2..2d61b3d 100644
Binary files a/examples/parallel_reduce/primes/vc9/primes.suo and b/examples/parallel_reduce/primes/vc9/primes.suo differ
diff --git a/examples/parallel_reduce/primes/vc9/primes.vcproj b/examples/parallel_reduce/primes/vc9/primes.vcproj
index 07bba84..7713089 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -137,7 +137,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -167,7 +167,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -196,7 +196,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -215,7 +215,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -245,7 +245,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -273,7 +273,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -291,7 +291,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -322,7 +322,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_reduce/primes/xcode/primes.xcodeproj/project.pbxproj b/examples/parallel_reduce/primes/xcode/primes.xcodeproj/project.pbxproj
index 935eb89..02e2a41 100644
--- a/examples/parallel_reduce/primes/xcode/primes.xcodeproj/project.pbxproj
+++ b/examples/parallel_reduce/primes/xcode/primes.xcodeproj/project.pbxproj
@@ -163,7 +163,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -179,7 +179,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -228,7 +228,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -249,7 +249,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
diff --git a/examples/parallel_while/parallel_preorder/Graph.cpp b/examples/parallel_while/parallel_preorder/Graph.cpp
index 9442d13..548025a 100644
--- a/examples/parallel_while/parallel_preorder/Graph.cpp
+++ b/examples/parallel_while/parallel_preorder/Graph.cpp
@@ -27,8 +27,11 @@
 */
 
 #include <cstdio>
+#include <cstdlib>
 #include "Graph.h"
 
+using namespace std;
+
 void Graph::create_random_dag( size_t number_of_nodes ) {
     my_vertex_set.resize(number_of_nodes);
     for( size_t k=0; k<number_of_nodes; ++k ) {
@@ -69,7 +72,7 @@ void Graph::print() {
     }
 }
 
-void Graph::get_root_set( std::vector<Cell*>& root_set ) {
+void Graph::get_root_set( vector<Cell*>& root_set ) {
     for( size_t k=0; k<my_vertex_set.size(); ++k ) {
         my_vertex_set[k].successor.clear();
     }
diff --git a/examples/parallel_while/parallel_preorder/Makefile b/examples/parallel_while/parallel_preorder/Makefile
index 64cc08a..8830701 100644
--- a/examples/parallel_while/parallel_preorder/Makefile
+++ b/examples/parallel_while/parallel_preorder/Makefile
@@ -33,10 +33,10 @@ PROG=parallel_preorder
 all:	release test
 
 release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
 
 debug: *.cpp
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
 	rm -f $(PROG) *.o *.d
diff --git a/examples/parallel_while/parallel_preorder/Makefile.windows b/examples/parallel_while/parallel_preorder/Makefile.windows
index a475998..67c87d9 100644
--- a/examples/parallel_while/parallel_preorder/Makefile.windows
+++ b/examples/parallel_while/parallel_preorder/Makefile.windows
@@ -31,14 +31,14 @@ PROG=Parallel_Preorder
 
 # The C++ compiler options
 CXX = cl.exe
-MYCXXFLAGS=/TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CRT_SECURE_NO_DEPRECATE /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
-MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:$(PROG).exe $(LDFLAGS)
+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) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 debug:
-	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 clean:
 	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
 test:
diff --git a/examples/parallel_while/parallel_preorder/parallel_preorder.cpp b/examples/parallel_while/parallel_preorder/parallel_preorder.cpp
index b84dcee..88c53e4 100644
--- a/examples/parallel_while/parallel_preorder/parallel_preorder.cpp
+++ b/examples/parallel_while/parallel_preorder/parallel_preorder.cpp
@@ -33,8 +33,11 @@
 #include "tbb/atomic.h"
 #include <vector>
 #include <algorithm>
+#include <cstring>
 #include "Graph.h"
 
+using namespace std;
+
 //! Number of trials. Can be changed from command line
 int ntrial = 50;
 
@@ -62,9 +65,9 @@ public:
 
 class Stream {
     size_t k;
-    const std::vector<Cell*>& my_roots;
+    const vector<Cell*>& my_roots;
 public:
-    Stream( const std::vector<Cell*>& root_set ) : my_roots(root_set), k(0) {}
+    Stream( const vector<Cell*>& root_set ) : my_roots(root_set), k(0) {}
     bool pop_if_present( Cell*& item ) {
         bool result = k<my_roots.size();
         if( result ) 
@@ -73,7 +76,7 @@ public:
     }
 };    
 
-void ParallelPreorderTraversal( const std::vector<Cell*>& root_set ) {
+void ParallelPreorderTraversal( const vector<Cell*>& root_set ) {
     tbb::parallel_while<Body> w;
     Stream s(root_set);
     w.run(s,Body(w));
@@ -163,7 +166,7 @@ int main( int argc, char* argv[] ) {
         for( int trial=0; trial<ntrial; ++trial ) {
             Graph g;
             g.create_random_dag(1000);
-            std::vector<Cell*> root_set;
+            vector<Cell*> root_set;
             g.get_root_set(root_set);
             total_root_set_size += root_set.size();
 
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 7d05a1b..65d115f 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -90,7 +90,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(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 59e1fda..09c1f1f 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -248,7 +248,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -276,7 +276,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -325,7 +325,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.suo b/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.suo
index 35fa3d5..14402b5 100644
Binary files a/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.suo and b/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.suo differ
diff --git a/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.vcproj b/examples/parallel_while/parallel_preorder/vc9/parallel_preorder.vcproj
index 36c92cd..fc8aee1 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -137,7 +137,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -167,7 +167,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -196,7 +196,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -215,7 +215,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -245,7 +245,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -273,7 +273,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -291,7 +291,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -322,7 +322,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/parallel_while/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj b/examples/parallel_while/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj
index 2da175e..c89f216 100644
--- a/examples/parallel_while/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj
+++ b/examples/parallel_while/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj
@@ -171,7 +171,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -187,7 +187,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -236,7 +236,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -257,7 +257,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
diff --git a/examples/pipeline/text_filter/Makefile b/examples/pipeline/text_filter/Makefile
index 0522eef..8c02bca 100644
--- a/examples/pipeline/text_filter/Makefile
+++ b/examples/pipeline/text_filter/Makefile
@@ -33,16 +33,16 @@ PROG=text_filter
 all:	release test
 
 release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
 
 debug: *.cpp
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
 	rm -f $(PROG) *.o *.d input.txt output.txt
 
 test:
-	cat /usr/include/*.h >input.txt
-	./$(PROG) input.txt output.txt 1
-	./$(PROG) input.txt output.txt 2
-	./$(PROG) input.txt output.txt 4
+	@echo Constructing input.txt
+	@cat index.html > input.txt
+	@-csh -c "repeat 500 cat index.html >> input.txt" 2>/dev/null
+	./$(PROG) input.txt output.txt
diff --git a/examples/pipeline/text_filter/Makefile.windows b/examples/pipeline/text_filter/Makefile.windows
index 5b8d09c..a9f8f07 100644
--- a/examples/pipeline/text_filter/Makefile.windows
+++ b/examples/pipeline/text_filter/Makefile.windows
@@ -31,20 +31,19 @@ PROG=Text_Filter
 
 # The C++ compiler options
 CXX = cl.exe
-MYCXXFLAGS=/TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CRT_SECURE_NO_DEPRECATE /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
-MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:$(PROG).exe $(LDFLAGS)
+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) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 debug:
-	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 clean:
 	@cmd.exe /C del $(PROG).exe input.txt output.txt *.obj *.?db *.manifest
 input.txt:
 	@echo Constructing input.txt
-	@-cmd.exe /C "copy %WINDIR%\*.log input.txt >NUL"
+	@cmd.exe /C "@type index.html >input.txt"
+	@-cmd.exe /C "for /L %%a in (1,1,500) do @type index.html >> input.txt"
 test: input.txt
-	$(PROG) input.txt output.txt 1
-	$(PROG) input.txt output.txt 2
-	$(PROG) input.txt output.txt 4
+	$(PROG) input.txt output.txt
diff --git a/examples/pipeline/text_filter/text_filter.cpp b/examples/pipeline/text_filter/text_filter.cpp
index db4238a..197dd2d 100644
--- a/examples/pipeline/text_filter/text_filter.cpp
+++ b/examples/pipeline/text_filter/text_filter.cpp
@@ -110,7 +110,7 @@ MyTransformFilter::MyTransformFilter() :
     MyBuffer& b = *static_cast<MyBuffer*>(item);
     int prev_char_is_space = b.begin()[-1]==' ';
     for( char* s=b.begin(); s!=b.end(); ++s ) {
-        if( prev_char_is_space && islower(*s) )
+        if( prev_char_is_space && islower((unsigned char)*s) )
             *s = toupper(*s);
         prev_char_is_space = isspace((unsigned char)*s);
     }
@@ -145,35 +145,39 @@ static bool is_number_of_threads_set = false;
 void Usage()
 {
     fprintf( stderr, "Usage:\ttext_filter [input-file [output-file [nthread]]]\n");
-    exit(1);
 }
 
-void ParseCommandLine(  int argc, char* argv[] ) {
+int ParseCommandLine(  int argc, char* argv[] ) {
     // Parse command line
-    if( argc> 4 ) Usage();
+    if( argc> 4 ){
+        Usage();
+        return 0;
+    }
     if( argc>=2 ) InputFileName = argv[1];
     if( argc>=3 ) OutputFileName = argv[2];
     if( argc>=4 ) {
         NThread = strtol(argv[3],0,0);
         if( NThread<1 ) {
             fprintf(stderr,"nthread set to %d, but must be at least 1\n",NThread);
-            exit(1);
+            return 0;
         }
         is_number_of_threads_set = true; //Number of threads is set explicitly
     }
+    return 1;
 }
 
-void run_pipeline( int nthreads )
+int run_pipeline( int nthreads )
 {
     FILE* input_file = fopen(InputFileName,"r");
     if( !input_file ) {
         perror( InputFileName );
         Usage();
+        return 0;
     }
     FILE* output_file = fopen(OutputFileName,"w");
     if( !output_file ) {
         perror( OutputFileName );
-        exit(1);
+        return 0;
     }
 
     // Create the pipeline
@@ -211,22 +215,28 @@ void run_pipeline( int nthreads )
             printf("parallel run time = %g\n", (t1-t0).seconds());
         }
     }
+    return 1;
 }
 
 int main( int argc, char* argv[] ) {
-    ParseCommandLine( argc, argv );
+    if(!ParseCommandLine( argc, argv ))
+        return 1;
     if (is_number_of_threads_set) {
         // Start task scheduler
         tbb::task_scheduler_init init( NThread );
-        run_pipeline (NThread);
+        if(!run_pipeline (NThread))
+            return 1;
     } else { // Number of threads wasn't set explicitly. Run serial and parallel version
         { // serial run
             tbb::task_scheduler_init init_serial(1);
-            run_pipeline (1);
+            if(!run_pipeline (1))
+                return 1;
         }
         { // parallel run (number of threads is selected automatically)
             tbb::task_scheduler_init init_parallel;
-            run_pipeline (0);
+            if(!run_pipeline (0))
+                return 1;
         }
     }
+    return 0;
 }
diff --git a/examples/pipeline/text_filter/vc7.1/text_filter.vcproj b/examples/pipeline/text_filter/vc7.1/text_filter.vcproj
index 82dfad0..74ed993 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -29,13 +29,13 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" "$(OutDir)\input.txt" >NUL"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs=""$(OutDir)\input.txt""/>
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -45,7 +45,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -71,7 +71,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,13 +79,13 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" "$(OutDir)\input.txt" >NUL"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs=""$(OutDir)\input.txt""/>
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -96,7 +96,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(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 a101498..daeb67c 100644
--- a/examples/pipeline/text_filter/vc8/text_filter.vcproj
+++ b/examples/pipeline/text_filter/vc8/text_filter.vcproj
@@ -31,7 +31,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" input.txt >NUL"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs="input.txt"
 			/>
 			<Tool
@@ -46,7 +46,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -66,7 +66,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -96,7 +96,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -112,7 +112,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" input.txt >NUL"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs="input.txt"
 			/>
 			<Tool
@@ -128,7 +128,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -147,7 +147,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -177,7 +177,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -193,7 +193,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" input.txt >NUL"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs="input.txt"
 			/>
 			<Tool
@@ -207,7 +207,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -226,7 +226,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -257,7 +257,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -273,7 +273,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" input.txt >NUL"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs="input.txt"
 			/>
 			<Tool
@@ -288,7 +288,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_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="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -337,7 +337,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/pipeline/text_filter/vc9/text_filter.suo b/examples/pipeline/text_filter/vc9/text_filter.suo
index 4ebb193..b84c9a7 100644
Binary files a/examples/pipeline/text_filter/vc9/text_filter.suo and b/examples/pipeline/text_filter/vc9/text_filter.suo differ
diff --git a/examples/pipeline/text_filter/vc9/text_filter.vcproj b/examples/pipeline/text_filter/vc9/text_filter.vcproj
index a197042..d7c59b8 100644
--- a/examples/pipeline/text_filter/vc9/text_filter.vcproj
+++ b/examples/pipeline/text_filter/vc9/text_filter.vcproj
@@ -32,7 +32,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" input.txt >NUL&#x0D;&#x0A;"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs="input.txt"
 			/>
 			<Tool
@@ -47,7 +47,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -66,7 +66,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -95,7 +95,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -111,7 +111,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" input.txt >NUL&#x0D;&#x0A;"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs="input.txt"
 			/>
 			<Tool
@@ -125,7 +125,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -143,7 +143,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -173,7 +173,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -189,7 +189,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" input.txt >NUL"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs="input.txt"
 			/>
 			<Tool
@@ -205,7 +205,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -224,7 +224,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -254,7 +254,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -270,7 +270,7 @@
 			<Tool
 				Name="VCCustomBuildTool"
 				Description="Constructing input.txt"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\doc\*.txt"+"$(TBB20_INSTALL_DIR)\doc\html\*.html" input.txt >NUL"
+				CommandLine="type ..\index.html >input.txt&#x0D;&#x0A;for /L %%a in (1,1,500) do type ..\index.html >> input.txt"
 				Outputs="input.txt"
 			/>
 			<Tool
@@ -285,7 +285,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -303,7 +303,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -334,7 +334,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/pipeline/text_filter/xcode/text_filter.xcodeproj/project.pbxproj b/examples/pipeline/text_filter/xcode/text_filter.xcodeproj/project.pbxproj
index de0763e..af35b4e 100644
--- a/examples/pipeline/text_filter/xcode/text_filter.xcodeproj/project.pbxproj
+++ b/examples/pipeline/text_filter/xcode/text_filter.xcodeproj/project.pbxproj
@@ -127,7 +127,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "cat /usr/include/*.h >$TARGET_BUILD_DIR/input.txt";
+			shellScript = "cat ../../index.html >$TARGET_BUILD_DIR/input.txt; for ((a=1; a <= 500 ; a++)); do cat ../../index.html >>$TARGET_BUILD_DIR/input.txt; done";
 		};
 /* End PBXShellScriptBuildPhase section */
 
@@ -181,7 +181,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -197,7 +197,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -246,7 +246,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -267,7 +267,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
diff --git a/examples/task/tree_sum/Makefile b/examples/task/tree_sum/Makefile
index 41d7bd8..03d2873 100644
--- a/examples/task/tree_sum/Makefile
+++ b/examples/task/tree_sum/Makefile
@@ -25,7 +25,7 @@
 # the GNU General Public License.
 
 # GNU Makefile that builds and runs example.
-PROG=sum_tree
+PROG=tree_sum
 
 # The C++ compiler
 #CXX=g++
@@ -33,10 +33,10 @@ PROG=sum_tree
 all:	release test
 
 release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb -ltbbmalloc
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbbmalloc -ltbb $(LIBS)
 
 debug: *.cpp
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug -ltbbmalloc_debug
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbbmalloc_debug -ltbb_debug $(LIBS)
 
 clean:
 	rm -f $(PROG) *.o *.d
diff --git a/examples/task/tree_sum/Makefile.windows b/examples/task/tree_sum/Makefile.windows
index af93197..5b41230 100644
--- a/examples/task/tree_sum/Makefile.windows
+++ b/examples/task/tree_sum/Makefile.windows
@@ -31,14 +31,14 @@ PROG=Tree_sum
 
 # The C++ compiler options
 CXX = cl.exe
-MYCXXFLAGS=/TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
-MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:$(PROG).exe $(LDFLAGS)
+MYCXXFLAGS = /TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
+MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
 
 all: release test
 release:
-	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib tbbmalloc.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbbmalloc.lib tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 debug:
-	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib tbbmalloc_debug.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbbmalloc_debug.lib tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 clean:
 	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
 test:
diff --git a/examples/task/tree_sum/vc7.1/tree_sum.vcproj b/examples/task/tree_sum/vc7.1/tree_sum.vcproj
index e1182b1..0a5aa4c 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc_debug.dll" "$(OutDir)""/>
+				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)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -90,7 +90,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbbmalloc.dll" "$(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 4eda874..691b3f5 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -248,7 +248,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbbmalloc.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -276,7 +276,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_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="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -325,7 +325,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbbmalloc.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/task/tree_sum/vc9/tree_sum.suo b/examples/task/tree_sum/vc9/tree_sum.suo
index f5df34c..2daf57a 100644
Binary files a/examples/task/tree_sum/vc9/tree_sum.suo and b/examples/task/tree_sum/vc9/tree_sum.suo differ
diff --git a/examples/task/tree_sum/vc9/tree_sum.vcproj b/examples/task/tree_sum/vc9/tree_sum.vcproj
index 73dcfcd..6e7e348 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -137,7 +137,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -167,7 +167,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbbmalloc.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -196,7 +196,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -215,7 +215,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib tbbmalloc_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -245,7 +245,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll and tbbmalloc_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -273,7 +273,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -291,7 +291,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib tbbmalloc.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -322,7 +322,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll and tbbmalloc.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)" && copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)" && copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbbmalloc.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/task/tree_sum/xcode/tree_sum.xcodeproj/project.pbxproj b/examples/task/tree_sum/xcode/tree_sum.xcodeproj/project.pbxproj
index 2e977df..618ee0b 100644
--- a/examples/task/tree_sum/xcode/tree_sum.xcodeproj/project.pbxproj
+++ b/examples/task/tree_sum/xcode/tree_sum.xcodeproj/project.pbxproj
@@ -188,7 +188,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -204,7 +204,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -257,7 +257,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -278,7 +278,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
diff --git a/examples/test_all/fibonacci/Fibonacci.cpp b/examples/test_all/fibonacci/Fibonacci.cpp
index 8db4453..7f2abda 100644
--- a/examples/test_all/fibonacci/Fibonacci.cpp
+++ b/examples/test_all/fibonacci/Fibonacci.cpp
@@ -28,12 +28,18 @@
 
 /* Example program that computes Fibonacci numbers in different ways.
    Arguments are: [ Number [Threads [Repeats]]]
-   The defaults are Number=100 Threads=1:4 Repeats=1.
+   The defaults are Number=500 Threads=1:4 Repeats=1.
 
    The point of this program is to check that the library is working properly.
    Most of the computations are deliberately silly and not expected to
    show any speedup on multiprocessors.
 */
+
+// enable assertions
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
 #include <cstdio>
 #include <cstdlib>
 #include <cassert>
@@ -175,7 +181,7 @@ value SharedSerialFib(int n)
     return SharedB;
 }
 
-// *** Serial shared by concurrent hash *** //
+// *** Serial shared by concurrent hash map *** //
 
 //! Hash comparer
 struct IntHashCompare {
@@ -202,11 +208,9 @@ public:
                 assert(0);
             }
             value sum = f1->second + f2->second;
-            NumbersTable::accessor fsum;
-            if(Fib.insert(fsum, i)) // inserting. is new element?
-                fsum->second = sum; // new, assign value
-            else
-                assert( fsum->second == sum ); // no, check value
+            NumbersTable::const_accessor fsum;
+            Fib.insert(fsum, make_pair(i, sum)); // inserting
+            assert( fsum->second == sum ); // check value
         }
         return 0;
     }
@@ -216,20 +220,17 @@ public:
 value ConcurrentHashSerialFib(int n)
 {
     NumbersTable Fib; 
-    {   // We need to declare the accessor in a local block before using its values outside the block.
-        NumbersTable::accessor fref;
-        bool okay;
-        okay = Fib.insert(fref, 0); assert(okay); fref->second = 0; // assign initial values
-        okay = Fib.insert(fref, 1); assert(okay); fref->second = 1;
-        // Lifetime of fref ends here, which implicitly releases the write lock on what it points to.
-    }
+    bool okay;
+    okay = Fib.insert( make_pair(0, 0) ); assert(okay); // assign initial values
+    okay = Fib.insert( make_pair(1, 1) ); assert(okay);
+
     task_list list;
     // allocate tasks
     list.push_back(*new(task::allocate_root()) ConcurrentHashSerialFibTask(Fib, n));
     list.push_back(*new(task::allocate_root()) ConcurrentHashSerialFibTask(Fib, n));
     task::spawn_root_and_wait(list);
     NumbersTable::const_accessor fresult;
-    bool okay = Fib.find( fresult, n );
+    okay = Fib.find( fresult, n );
     assert(okay);
     return fresult->second;
 }
@@ -514,28 +515,33 @@ void IntRange::set_from_string( const char* s ) {
 //! Tick count for start
 static tick_count t0;
 
+//! Verbose output flag
+static bool Verbose = false;
+
 typedef value (*MeasureFunc)(int);
 //! Measure ticks count in loop [2..n]
 value Measure(const char *name, MeasureFunc func, int n)
 {
     value result;
-    printf(name); t0 = tick_count::now();
+    if(Verbose) printf(name);
+    t0 = tick_count::now();
     for(int number = 2; number <= n; number++)
         result = func(number);
-    printf("\t- in %f msec\n", (tick_count::now() - t0).seconds()*1000);
+    if(Verbose) printf("\t- in %f msec\n", (tick_count::now() - t0).seconds()*1000);
     return result;
 }
 
 //! program entry
 int main(int argc, char* argv[])
 {
-    int NumbersCount = argc>1 ? strtol(argv[1],0,0) : 100;
+    if(argc>1) Verbose = true;
+    int NumbersCount = argc>1 ? strtol(argv[1],0,0) : 500;
     IntRange NThread(1,4);// Number of threads to use.
     if(argc>2) NThread.set_from_string(argv[2]);
     unsigned long ntrial = argc>3? (unsigned long)strtoul(argv[3],0,0) : 1;
     value result, sum;
 
-    printf("Fibonacci numbers example. Generating %d numbers..\n",  NumbersCount);
+    if(Verbose) printf("Fibonacci numbers example. Generating %d numbers..\n",  NumbersCount);
 
     result = Measure("Serial loop", SerialFib, NumbersCount);
     sum = Measure("Serial matrix", SerialMatrixFib, NumbersCount); assert(result == sum);
@@ -543,9 +549,10 @@ int main(int argc, char* argv[])
     sum = Measure("Serial queue", SerialQueueFib, NumbersCount); assert(result == sum);
     // now in parallel
     for( unsigned long i=0; i<ntrial; ++i ) {
-        for(int threads = NThread.low; threads <= NThread.high; threads++)
+        for(int threads = NThread.low; threads <= NThread.high; threads *= 2)
         {
-            task_scheduler_init scheduler_init(threads); printf("Threads number is %d\n", threads);
+            task_scheduler_init scheduler_init(threads);
+            if(Verbose) printf("\nThreads number is %d\n", threads);
 
             sum = Measure("Shared serial (mutex)\t", SharedSerialFib<mutex>, NumbersCount); assert(result == sum);
             sum = Measure("Shared serial (spin_mutex)", SharedSerialFib<spin_mutex>, NumbersCount); assert(result == sum);
@@ -559,11 +566,12 @@ int main(int argc, char* argv[])
         }
 
     #ifdef __GNUC__
-        printf("Fibonacci number #%d modulo 2^64 is %lld\n\n", NumbersCount, result);
+        if(Verbose) printf("Fibonacci number #%d modulo 2^64 is %lld\n\n", NumbersCount, result);
     #else
-        printf("Fibonacci number #%d modulo 2^64 is %I64d\n\n", NumbersCount, result);
+        if(Verbose) printf("Fibonacci number #%d modulo 2^64 is %I64d\n\n", NumbersCount, result);
     #endif
     }
+    if(!Verbose) printf("TEST PASSED\n");
     return 0;
 }
 
diff --git a/examples/test_all/fibonacci/Makefile b/examples/test_all/fibonacci/Makefile
index 6e2cfe2..8cf4794 100644
--- a/examples/test_all/fibonacci/Makefile
+++ b/examples/test_all/fibonacci/Makefile
@@ -33,13 +33,13 @@ PROG=fibonacci
 all:	release test
 
 release: *.cpp
-	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb
+	$(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
 
 debug: *.cpp
-	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug
+	$(CXX) -O0 -g -DTBB_DO_ASSERT $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
 
 clean:
 	rm -f $(PROG) *.o *.d
 
 test:
-	./$(PROG) 500
+	./$(PROG)
diff --git a/examples/test_all/fibonacci/Makefile.windows b/examples/test_all/fibonacci/Makefile.windows
index d8d53ad..fc22e6c 100644
--- a/examples/test_all/fibonacci/Makefile.windows
+++ b/examples/test_all/fibonacci/Makefile.windows
@@ -31,15 +31,15 @@ PROG=Fibonacci
 
 # The C++ compiler options
 CXX = cl.exe
-MYCXXFLAGS=/TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
-MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO /OUT:$(PROG).exe $(LDFLAGS)
+MYCXXFLAGS = /TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
+MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
 
 all: release test
 release:
-	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 debug:
-	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(MYLDFLAGS)
+	$(CXX) *.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 clean:
 	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
 test:
-	$(PROG) 500
+	$(PROG)
diff --git a/examples/test_all/fibonacci/vc7.1/fibonacci.vcproj b/examples/test_all/fibonacci/vc7.1/fibonacci.vcproj
index 40403b2..fee6503 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -32,7 +32,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				GenerateDebugInformation="TRUE"
 				SubSystem="1"
 				TargetMachine="1"
@@ -42,7 +42,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb_debug.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
@@ -68,7 +68,7 @@
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc7.1\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc7.1\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -90,7 +90,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc7.1\bin\tbb.dll" "$(OutDir)""/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
 			<Tool
diff --git a/examples/test_all/fibonacci/vc8/fibonacci.vcproj b/examples/test_all/fibonacci/vc8/fibonacci.vcproj
index d5903ca..1c2b173 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="1"
@@ -93,7 +93,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -122,7 +122,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -141,7 +141,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -171,7 +171,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -198,7 +198,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -217,7 +217,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -248,7 +248,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -276,7 +276,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -294,7 +294,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc8\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc8\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -325,7 +325,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc8\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/test_all/fibonacci/vc9/fibonacci.suo b/examples/test_all/fibonacci/vc9/fibonacci.suo
index 63c8d84..c80da6b 100644
Binary files a/examples/test_all/fibonacci/vc9/fibonacci.suo and b/examples/test_all/fibonacci/vc9/fibonacci.suo differ
diff --git a/examples/test_all/fibonacci/vc9/fibonacci.vcproj b/examples/test_all/fibonacci/vc9/fibonacci.vcproj
index 550b665..0a50e9a 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="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -63,7 +63,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				RandomizedBaseAddress="1"
@@ -92,7 +92,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -119,7 +119,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -137,7 +137,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\ia32\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -167,7 +167,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -196,7 +196,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;TBB_DO_ASSERT"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
@@ -215,7 +215,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				TargetMachine="17"
@@ -245,7 +245,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb_debug.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb_debug.dll" "$(OutDir)""
 			/>
 		</Configuration>
 		<Configuration
@@ -273,7 +273,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="$(TBB20_INSTALL_DIR)\include"
+				AdditionalIncludeDirectories="$(TBB21_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -291,7 +291,7 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB20_INSTALL_DIR)\em64t\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB21_INSTALL_DIR)\em64t\vc9\lib"
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
@@ -322,7 +322,7 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying tbb.dll"
-				CommandLine="copy "$(TBB20_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
+				CommandLine="copy "$(TBB21_INSTALL_DIR)\em64t\vc9\bin\tbb.dll" "$(OutDir)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/examples/test_all/fibonacci/xcode/fibonacci.xcodeproj/project.pbxproj b/examples/test_all/fibonacci/xcode/fibonacci.xcodeproj/project.pbxproj
index 4652bc2..daabb37 100644
--- a/examples/test_all/fibonacci/xcode/fibonacci.xcodeproj/project.pbxproj
+++ b/examples/test_all/fibonacci/xcode/fibonacci.xcodeproj/project.pbxproj
@@ -163,7 +163,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -179,7 +179,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -228,7 +228,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -249,7 +249,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = i386;
-				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_MODEL_TUNING = "";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
diff --git a/include/tbb/_tbb_windef.h b/include/tbb/_tbb_windef.h
index de949f6..bb02f3c 100644
--- a/include/tbb/_tbb_windef.h
+++ b/include/tbb/_tbb_windef.h
@@ -30,12 +30,21 @@
 #error Do not #include this file directly.  Use "#include tbb/tbb_stddef.h" instead.
 #endif /* __TBB_tbb_windef_H */
 
-#if !defined(_MT) || !defined(_DLL)
-#    error The library requires dynamic linkage with multithreaded MSVC runtime. \
-           Choose proper project settings or use /MD[d] compiler switch.
+// Check that the target Windows version has all API calls requried for TBB.
+// Do not increase the version in condition beyond 0x0500 without prior discussion!
+#if defined(_WIN32_WINNT) && _WIN32_WINNT<0x0400
+#error TBB is unable to run on old Windows versions; _WIN32_WINNT must be 0x0400 or greater.
 #endif
 
-// Workaround for problem in which MVSC headers fail to define namespace std::.
+#if !defined(_MT)
+#error TBB requires linkage with multithreaded C/C++ runtime library. \
+       Choose multithreaded DLL runtime in project settings, or use /MD[d] compiler switch.
+#elif !defined(_DLL)
+#pragma message("Warning: Using TBB together with static C/C++ runtime library is not recommended. " \
+                "Consider switching your project to multithreaded DLL runtime used by TBB.")
+#endif
+
+// Workaround for the problem with MVSC headers failing to define namespace std
 namespace std {
   using ::size_t; using ::ptrdiff_t;
 }
@@ -59,3 +68,17 @@ namespace std {
 #        define TBB_DO_ASSERT 1
 #    endif
 #endif 
+
+#if __TBB_BUILD && !defined(__TBB_NO_IMPLICIT_LINKAGE)
+#define __TBB_NO_IMPLICIT_LINKAGE 1
+#endif
+
+#if _MSC_VER
+    #if !__TBB_NO_IMPLICIT_LINKAGE
+        #ifdef _DEBUG
+            #pragma comment(lib, "tbb_debug.lib")
+        #else
+            #pragma comment(lib, "tbb.lib")
+        #endif
+    #endif
+#endif
diff --git a/include/tbb/aligned_space.h b/include/tbb/aligned_space.h
index 4421c33..2f9d80d 100644
--- a/include/tbb/aligned_space.h
+++ b/include/tbb/aligned_space.h
@@ -30,6 +30,7 @@
 #define __TBB_aligned_space_H
 
 #include "tbb_stddef.h"
+#include "tbb_machine.h"
 
 namespace tbb {
 
@@ -39,17 +40,7 @@ namespace tbb {
 template<typename T,size_t N>
 class aligned_space {
 private:
-    union element_type {
-        size_t s;
-        long z;
-#if  _MSC_VER
-        __int64 l;
-#else
-        long long l;
-#endif /*  _MSC_VER */
-        long double x;
-        double y;
-    };
+    typedef __TBB_TypeWithAlignmentAtLeastAsStrict(T) element_type;
     element_type array[(sizeof(T)*N+sizeof(element_type)-1)/sizeof(element_type)];
 public:
     //! Pointer to beginning of array
diff --git a/include/tbb/atomic.h b/include/tbb/atomic.h
index e5b17da..351cfce 100644
--- a/include/tbb/atomic.h
+++ b/include/tbb/atomic.h
@@ -40,6 +40,12 @@
 
 #include "tbb_machine.h"
 
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (push)
+    #pragma warning (disable: 4244 4267)
+#endif /* _MSC_VER && _Wp64 */
+
 namespace tbb {
 
 //! Specifies memory fencing.
@@ -66,10 +72,10 @@ struct atomic_word {             // Primary template
 
 template<typename I>            // Primary template
 struct atomic_base {
-    volatile I my_value;
+    I my_value;
 };
 
-#if __GNUC__ 
+#if __GNUC__ || __SUNPRO_CC
 #define __TBB_DECL_ATOMIC_FIELD(t,f,a) t f  __attribute__ ((aligned(a)));
 #elif defined(__INTEL_COMPILER)||_MSC_VER >= 1300
 #define __TBB_DECL_ATOMIC_FIELD(t,f,a) __declspec(align(a)) t f;
@@ -102,12 +108,12 @@ struct atomic_word<4> {          // Specialization
 
 template<>
 struct atomic_base<uint64_t> {   // Specialization
-    __TBB_DECL_ATOMIC_FIELD(volatile uint64_t,my_value,8)
+    __TBB_DECL_ATOMIC_FIELD(uint64_t,my_value,8)
 };
 
 template<>
 struct atomic_base<int64_t> {    // Specialization
-    __TBB_DECL_ATOMIC_FIELD(volatile int64_t,my_value,8)
+    __TBB_DECL_ATOMIC_FIELD(int64_t,my_value,8)
 };
 
 #define __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(S,M)                         \
@@ -216,7 +222,7 @@ public:
         return compare_and_swap<__TBB_full_fence>(value,comparand);
     }
 
-    operator value_type() const volatile {
+    operator value_type() const volatile {                // volatile qualifier here for backwards compatibility 
         return __TBB_load_with_acquire( this->my_value );
     }
 
@@ -258,7 +264,8 @@ public:
     }
 };
 
-#if WORDSIZE == 4
+#if __TBB_WORDSIZE == 4
+// Plaforms with 32-bit hardware require special effort for 64-bit loads and stores.
 #if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400
 
 template<>
@@ -284,7 +291,7 @@ inline atomic_impl<unsigned __TBB_LONG_LONG,unsigned __TBB_LONG_LONG,1>::value_t
 }
 
 #endif /* defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */
-#endif
+#endif /* __TBB_WORDSIZE==4 */
 
 } /* Internal */
 //! @endcond
@@ -299,6 +306,7 @@ struct atomic {
 #define __TBB_DECL_ATOMIC(T) \
     template<> struct atomic<T>: internal::atomic_impl<T,T,1> {  \
         T operator=( T rhs ) {return store_with_release(rhs);}  \
+        atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;}  \
     };
 
 #if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400
@@ -326,6 +334,7 @@ template<typename T> struct atomic<T*>: internal::atomic_impl<T*,ptrdiff_t,sizeo
         // "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;}
     T* operator->() const {
         return (*this);
     }
@@ -334,7 +343,7 @@ template<typename T> struct atomic<T*>: internal::atomic_impl<T*,ptrdiff_t,sizeo
 template<>
 struct atomic<void*> {
 private:
-    void* volatile my_value;
+    void* my_value;
 
 public:
     typedef void* value_type;
@@ -358,15 +367,65 @@ public:
     }
 
     operator value_type() const {
-        return __TBB_load_with_acquire(this->my_value);
+        return __TBB_load_with_acquire(my_value);
     }
 
     value_type operator=( value_type rhs ) {
-        __TBB_store_with_release(this->my_value,rhs);
+        __TBB_store_with_release(my_value,rhs);
         return 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;
+    }
 };
 
 } // namespace tbb
 
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (pop)
+#endif /* _MSC_VER && _Wp64 */
+
 #endif /* __TBB_atomic_H */
diff --git a/include/tbb/blocked_range.h b/include/tbb/blocked_range.h
index 025c3fd..6094ef0 100644
--- a/include/tbb/blocked_range.h
+++ b/include/tbb/blocked_range.h
@@ -33,6 +33,15 @@
 
 namespace tbb {
 
+/** \page range_req Requirements on range concept
+    Class \c R implementing the concept of range must define:
+    - \code R::R( const R& ); \endcode               Copy constructor
+    - \code R::~R(); \endcode                        Destructor
+    - \code bool R::is_divisible() const; \endcode   True if range can be partitioned into two subranges
+    - \code bool R::empty() const; \endcode          True if range is empty
+    - \code R::R( R& r, split ); \endcode            Split range \c r into two subranges.
+**/
+
 //! A range over which to iterate.
 /** @ingroup algorithms */
 template<typename Value>
@@ -44,7 +53,7 @@ public:
     typedef Value const_iterator;
 
     //! Type for size of a range
-    typedef size_t size_type;
+    typedef std::size_t size_type;
 
     //! Construct range with default-constructed values for begin and end.
     /** Requires that Value have a default constructor. */
diff --git a/include/tbb/concurrent_hash_map.h b/include/tbb/concurrent_hash_map.h
index bed15c8..d4ca9b5 100644
--- a/include/tbb/concurrent_hash_map.h
+++ b/include/tbb/concurrent_hash_map.h
@@ -29,29 +29,56 @@
 #ifndef __TBB_concurrent_hash_map_H
 #define __TBB_concurrent_hash_map_H
 
+#include <stdexcept>
+#include <iterator>
+#include <utility>      // Need std::pair from here
 #include "tbb_stddef.h"
 #include "cache_aligned_allocator.h"
+#include "tbb_allocator.h"
 #include "spin_rw_mutex.h"
 #include "atomic.h"
-#include <iterator>
-#include <utility>      // Need std::pair from here
+#include "aligned_space.h"
+#if TBB_PERFORMANCE_WARNINGS
+#include <typeinfo>
+#endif
 
 namespace tbb {
 
+template<typename Key, typename T, typename HashCompare, typename A = tbb_allocator<std::pair<Key, T> > >
+class concurrent_hash_map;
+
 //! @cond INTERNAL
 namespace internal {
-    template<typename Value, typename Iterator>
+    //! 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;
+
+        //! Type of a hash code.
+        typedef size_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);
+    };
+
+    template<typename Iterator>
     class hash_map_range;
 
     struct hash_map_segment_base {
         //! Mutex that protects this segment
-        spin_rw_mutex my_mutex;
+        hash_map_base::segment_mutex_t my_mutex;
 
-        // Number of buckets
+        // Number of nodes
         atomic<size_t> my_logical_size;
 
         // Size of chains
-        /** Always zero or a a power of two */
+        /** Always zero or a power of two */
         size_t my_physical_size;
 
         //! True if my_logical_size>=my_physical_size.
@@ -63,18 +90,23 @@ namespace internal {
     /** Value is either the T or const T type of the container.
         @ingroup containers */ 
     template<typename Container, typename Value>
-    class hash_map_iterator {
-        typedef typename Container::bucket bucket;
+    class hash_map_iterator
+#if defined(_WIN64) && defined(_MSC_VER) 
+        // Ensure that Microsoft's internal template function _Val_type works correctly.
+        : public std::iterator<std::forward_iterator_tag,Value>
+#endif /* defined(_WIN64) && defined(_MSC_VER) */
+    {
+        typedef typename Container::node node;
         typedef typename Container::chain chain;
 
         //! concurrent_hash_map over which we are iterating.
         Container* my_table;
 
-        //! Pointer to bucket that has current item
-        bucket* my_bucket;
+        //! Pointer to node that has current item
+        node* my_node;
 
         //! Index into hash table's array for current item
-        size_t my_array_index;  
+        size_t my_array_index;
 
         //! Index of segment that has array for current item
         size_t my_segment_index;
@@ -91,15 +123,15 @@ namespace internal {
         template<typename C, typename U>
         friend class internal::hash_map_iterator;
 
-        template<typename V, typename I>
+        template<typename I>
         friend class internal::hash_map_range;
 
-        void advance_to_next_bucket() {
+        void advance_to_next_node() {
             size_t i = my_array_index+1;
             do {
                 while( i<my_table->my_segment[my_segment_index].my_physical_size ) {
-                    my_bucket = my_table->my_segment[my_segment_index].my_array[i].bucket_list;
-                    if( my_bucket ) goto done;
+                    my_node = my_table->my_segment[my_segment_index].my_array[i].node_list;
+                    if( my_node ) goto done;
                     ++i;
                 }
                 i = 0;
@@ -107,19 +139,25 @@ namespace internal {
         done:
             my_array_index = i;
         }
+#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)
+        template<typename Key, typename T, typename HashCompare, typename A>
+        friend class tbb::concurrent_hash_map;
+#else
+    public: // workaround
+#endif
+        hash_map_iterator( const Container& table, size_t segment_index, size_t array_index=0, node* b=NULL );
     public:
         //! Construct undefined iterator
         hash_map_iterator() {}
-        hash_map_iterator( const Container& table, size_t segment_index, size_t array_index=0 );
-        hash_map_iterator( const hash_map_iterator<Container,const Value>& other ) :
+        hash_map_iterator( const hash_map_iterator<Container,typename Container::value_type>& other ) :
             my_table(other.my_table),
-            my_bucket(other.my_bucket),
+            my_node(other.my_node),
             my_array_index(other.my_array_index),
             my_segment_index(other.my_segment_index)
         {}
         Value& operator*() const {
-            __TBB_ASSERT( my_bucket, "iterator uninitialized or at end of container?" );
-            return my_bucket->item;
+            __TBB_ASSERT( my_node, "iterator uninitialized or at end of container?" );
+            return my_node->item;
         }
         Value* operator->() const {return &operator*();}
         hash_map_iterator& operator++();
@@ -137,44 +175,47 @@ namespace internal {
         typedef Value value_type;
         typedef Value* pointer;
         typedef Value& reference;
+        typedef const Value& const_reference;
         typedef std::forward_iterator_tag iterator_category;
     };
 
     template<typename Container, typename Value>
-    hash_map_iterator<Container,Value>::hash_map_iterator( const Container& table, size_t segment_index, size_t array_index ) : 
+    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_bucket(NULL),
+        my_node(b),
         my_array_index(array_index),
         my_segment_index(segment_index)
     {
         if( segment_index<my_table->n_segment ) {
-            chain* first_chain = my_table->my_segment[segment_index].my_array;
-            my_bucket = first_chain ? first_chain[my_array_index].bucket_list : NULL;
-            if( !my_bucket ) advance_to_next_bucket();
+            if( !my_node ) {
+                chain* first_chain = my_table->my_segment[segment_index].my_array;
+                if( first_chain ) my_node = first_chain[my_array_index].node_list;
+            }
+            if( !my_node ) advance_to_next_node();
         }
     }
 
     template<typename Container, typename Value>
     hash_map_iterator<Container,Value>& hash_map_iterator<Container,Value>::operator++() {
-        my_bucket=my_bucket->next;
-        if( !my_bucket ) advance_to_next_bucket();
+        my_node=my_node->next;
+        if( !my_node ) advance_to_next_node();
         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_bucket==j.my_bucket;
+        return i.my_node==j.my_node;
     }
 
     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_bucket!=j.my_bucket;
+        return i.my_node!=j.my_node;
     }
 
     //! Range class used with concurrent_hash_map
     /** @ingroup containers */ 
-    template<typename Value, typename Iterator>
-    class hash_map_range{
+    template<typename Iterator>
+    class hash_map_range {
     private:
         Iterator my_begin;
         Iterator my_end;
@@ -182,12 +223,15 @@ namespace internal {
         size_t my_grainsize;
         //! Set my_midpoint to point approximately half way between my_begin and my_end.
         void set_midpoint() const;
+        template<typename U> friend class hash_map_range;
     public:
-        typedef Value value_type;
-        typedef Value& reference;
-        typedef const Value& const_reference;
+        //! Type for size of a range
+        typedef std::size_t size_type;
+        typedef typename Iterator::value_type value_type;
+        typedef typename Iterator::reference reference;
+        typedef typename Iterator::const_reference const_reference;
+        typedef typename Iterator::difference_type difference_type;
         typedef Iterator iterator;
-        typedef ptrdiff_t difference_type;
 
         //! True if range is empty.
         bool empty() const {return my_begin==my_end;}
@@ -205,7 +249,16 @@ namespace internal {
             set_midpoint();
             r.set_midpoint();
         }
-        hash_map_range( const Iterator& begin_, const Iterator& end_, size_t grainsize ) : 
+        //! type conversion
+        template<typename U>
+        hash_map_range( hash_map_range<U>& r) : 
+            my_begin(r.my_begin),
+            my_end(r.my_end),
+            my_midpoint(r.my_midpoint),
+            my_grainsize(r.my_grainsize)
+        {}
+        //! 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) 
@@ -215,16 +268,18 @@ namespace internal {
         }
         const Iterator& begin() const {return my_begin;}
         const Iterator& end() const {return my_end;}
+        //! The grain size for this range.
+        size_type grainsize() const {return my_grainsize;}
     };
 
-    template<typename Value, typename Iterator>
-    void hash_map_range<Value,Iterator>::set_midpoint() const {
+    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>0) ) {
             // Split by groups of segments
             my_midpoint = Iterator(*my_begin.my_table,(my_end.my_segment_index+my_begin.my_segment_index)/2u);
         } else {
-            // Split by groups of buckets
+            // Split by groups of nodes
             size_t m = my_end.my_array_index-my_begin.my_array_index;
             if( m>my_grainsize ) {
                 my_midpoint = Iterator(*my_begin.my_table,my_begin.my_segment_index,m/2u);
@@ -237,12 +292,47 @@ namespace internal {
 } // namespace internal
 //! @endcond
 
-//! Unorderd map from Key to T.
-/** @ingroup containers */
-template<typename Key, typename T, typename HashCompare>
-class concurrent_hash_map {
+//! Unordered map from Key to T.
+/** concurrent_hash_map is associative container with concurrent access.
+
+ at par Compatibility
+    The class meets all Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1).
+
+ at par Exception Safety
+    - Hash function is not permitted to throw an exception. User-defined types Key and T are forbidden from throwing an exception in destructors.
+    - 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.0
+    - Fixed exception-safety
+    - Added template argument for allocator
+    - Added allocator argument in constructors
+    - Added constructor from a range of iterators
+    - Added several new overloaded insert() methods
+    - Added get_allocator()
+    - Added swap()
+    - Added count()
+    - Added overloaded erase(accessor &) and erase(const_accessor&)
+    - Added equal_range() [const]
+    - Added [const_]pointer, [const_]reference, and allocator_type types
+    - Added global functions: operator==(), operator!=(), and swap() 
+
+    @ingroup containers */
+template<typename Key, typename T, typename HashCompare, typename A>
+class concurrent_hash_map : protected internal::hash_map_base {
+    template<typename Container, typename Value>
+    friend class internal::hash_map_iterator;
+
+    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;
@@ -250,141 +340,15 @@ public:
     typedef std::pair<const Key,T> value_type;
     typedef size_t size_type;
     typedef ptrdiff_t difference_type;
-
-private:
-    template<typename Container, typename Value>
-    friend class internal::hash_map_iterator;
-
-    template<typename V, typename I>
-    friend class internal::hash_map_range;
-
-    typedef spin_rw_mutex bucket_mutex_t;
-    typedef spin_rw_mutex chain_mutex_t;
-    typedef spin_rw_mutex segment_mutex_t;
-
-    //! Type of a hash code.
-    typedef size_t hashcode_t;
-
-    struct bucket;
-    friend struct bucket;
-
-    //! Basic unit of storage used in chain.
-    struct bucket {
-        //! Next bucket in chain
-        bucket* next;
-        bucket_mutex_t mutex;
-        value_type item;
-        bucket( const Key& key ) : item(key,T()) {}
-        bucket( const Key& key, const T& t ) : item(key,t) {}
-    };
-
-    struct chain;
-    friend struct chain;
-
-    //! A linked-list of buckets.
-    /** Should be zero-initialized before use. */
-    struct chain {
-        void push_front( bucket& b ) {
-            b.next = bucket_list;
-            bucket_list = &b;
-        }
-        chain_mutex_t mutex;
-        bucket* bucket_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-intialized before use. */
-    struct segment: internal::hash_map_segment_base {
-#if TBB_DO_ASSERT
-        ~segment() {
-            __TBB_ASSERT( !my_array, "should have been cleared earlier" );
-        }
-#endif /* TBB_DO_ASSERT */
-
-        // Pointer to array of chains
-        chain* my_array;
-
-        // 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 );
-            memset( array, 0, n*sizeof(chain) );
-            my_array = array;
-            my_physical_size = n;
-        }
-    };
-
-    segment& get_segment( hashcode_t hashcode ) {
-        return my_segment[hashcode&n_segment-1];
-    }
-        
-    HashCompare my_hash_compare;
-
-    //! Log2 of n_segment
-    /** Placed after my_hash_compare for sake of efficient packing. */
-    unsigned char n_segment_bits;
-
-    //! Number of segments 
-    size_t n_segment;
-
-    segment* my_segment;
-
-    bucket* search_list( const Key& key, chain& c ) {
-        bucket* b = c.bucket_list;
-        while( b&& !my_hash_compare.equal(key,b->item.first) )
-            b=b->next;
-        return b;
-    }
-
-    bucket* remove_from_list( const Key& key, chain& c ) {
-        bucket** p = &c.bucket_list;
-        bucket* b=*p;
-        while( b && !my_hash_compare.equal(key,b->item.first ) ) {
-            p = &b->next;
-            b= *p;
-        }
-        if( b )
-            *p = b->next;
-        return b;
-    }
-
-    //! Grow segment for which caller has acquired a write lock.
-    void grow_segment( segment_mutex_t::scoped_lock& segment_lock, segment& s );
-
-    enum operation {
-        op_insert,
-        op_find,
-        op_remove
-    };
-
-    //! Does heavy lifting for "find" and "insert".
-    bool lookup( const_accessor* result, const Key& key, bool write, operation op );
-
-    //! Perform initialization on behalf of a constructor
-    void initialize() {
-        n_segment_bits = 6; 
-        n_segment = size_t(1)<<n_segment_bits; 
-        my_segment = cache_aligned_allocator<segment>().allocate(n_segment);
-        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 );
-public:
-    friend class const_accessor;
+    typedef value_type *pointer;
+    typedef const value_type *const_pointer;
+    typedef value_type &reference;
+    typedef const value_type &const_reference;
+    typedef internal::hash_map_iterator<concurrent_hash_map,value_type> iterator;
+    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;
 
     //! Combines data access, locking, and garbage collection.
     class const_accessor {
@@ -397,38 +361,39 @@ public:
         typedef const std::pair<const Key,T> value_type;
 
         //! True if result is empty.
-        bool empty() const {return !my_bucket;}
+        bool empty() const {return !my_node;}
 
         //! Set to null
         void release() {
-            if( my_bucket ) {
+            if( my_node ) {
                 my_lock.release();
-                my_bucket = NULL;
-            }   
+                my_node = NULL;
+            }
         }
 
         //! Return reference to associated value in hash table.
-        const value_type& operator*() const {
-            __TBB_ASSERT( my_bucket, "attempt to deference empty result" );
-            return my_bucket->item;
+        const_reference operator*() const {
+            __TBB_ASSERT( my_node, "attempt to dereference empty accessor" );
+            return my_node->item;
         }
 
         //! Return pointer to associated value in hash table.
-        const value_type* operator->() const {
+        const_pointer operator->() const {
             return &operator*();
         }
 
         //! Create empty result
-        const_accessor() : my_bucket(NULL) {}
+        const_accessor() : my_node(NULL) {}
 
         //! Destroy result after releasing the underlying reference.
         ~const_accessor() {
-            my_bucket = NULL; // my_lock.release() is called in scoped_lock destructor
+            my_node = NULL; // my_lock.release() is called in scoped_lock destructor
         }
     private:
-        bucket* my_bucket;
-        bucket_mutex_t::scoped_lock my_lock;
-    };   
+        node* my_node;
+        node_mutex_t::scoped_lock my_lock;
+        hashcode_t my_hash;
+    };
 
     //! Allows write access to elements and combines data access, locking, and garbage collection.
     class accessor: public const_accessor {
@@ -437,26 +402,42 @@ public:
         typedef std::pair<const Key,T> value_type;
 
         //! Return reference to associated value in hash table.
-        value_type& operator*() const {
-            __TBB_ASSERT( this->my_bucket, "attempt to deference empty result" );
-            return this->my_bucket->item;
+        reference operator*() const {
+            __TBB_ASSERT( this->my_node, "attempt to dereference empty accessor" );
+            return this->my_node->item;
         }
 
         //! Return pointer to associated value in hash table.
-        value_type* operator->() const {
+        pointer operator->() const {
             return &operator*();
         }       
     };
 
     //! Construct empty table.
-    concurrent_hash_map();
+    concurrent_hash_map(const allocator_type &a = allocator_type())
+        : my_allocator(a)
+
+    {
+        initialize();
+    }
 
     //! Copy constructor
-    concurrent_hash_map( const concurrent_hash_map& table ) {
+    concurrent_hash_map( const concurrent_hash_map& table, const allocator_type &a = allocator_type())
+        : my_allocator(a)
+    {
         initialize();
         internal_copy(table);
     }
 
+    //! Construction with copying iteration range and given allocator instance
+    template<typename I>
+    concurrent_hash_map(I first, I last, const allocator_type &a = allocator_type())
+        : my_allocator(a)
+    {
+        initialize();
+        internal_copy(first, last);
+    }
+
     //! Assignment
     concurrent_hash_map& operator=( const concurrent_hash_map& table ) {
         if( this!=&table ) {
@@ -466,6 +447,7 @@ public:
         return *this;
     }
 
+
     //! Clear table
     void clear();
 
@@ -473,242 +455,527 @@ public:
     ~concurrent_hash_map();
 
     //------------------------------------------------------------------------
+    // Parallel algorithm support
+    //------------------------------------------------------------------------
+    range_type range( size_type grainsize=1 ) {
+        return range_type( begin(), end(), grainsize );
+    }
+    const_range_type range( size_type grainsize=1 ) const {
+        return const_range_type( begin(), end(), 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);}
+    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;
+
+    //! True if size()==0.
+    bool empty() const;
+
+    //! Upper bound on size.
+    size_type max_size() const {return (~size_type(0))/sizeof(node);}
+
+    //! return allocator object
+    allocator_type get_allocator() const { return this->my_allocator; }
+
+    //! swap two instances
+    void swap(concurrent_hash_map &table);
+
+    //------------------------------------------------------------------------
     // concurrent map operations
     //------------------------------------------------------------------------
 
+    //! 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 );
+    }
+
     //! 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(&result,key,/*write=*/false,op_find);
-    }   
+        return const_cast<concurrent_hash_map*>(this)->lookup</*insert*/false>(&result, key, /*write=*/false, NULL );
+    }
 
     //! 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(&result,key,/*write=*/true,op_find);
+        return lookup</*insert*/false>(&result, key, /*write=*/true, NULL );
     }
         
     //! 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(&result,key,/*write=*/false,op_insert);
+        return lookup</*insert*/true>(&result, key, /*write=*/false, NULL );
     }
 
     //! 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(&result,key,/*write=*/true,op_insert);
+        return lookup</*insert*/true>(&result, key, /*write=*/true, NULL );
+    }
+
+    //! 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 );
+    }
+
+    //! 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 );
+    }
+
+    //! 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 );
+    }
+
+    //! Insert range [first, last)
+    template<typename I>
+    void insert(I first, I last) {
+        for(; first != last; ++first)
+            insert( *first );
     }
 
     //! Erase item.
-    /** Return true if item was erased. */
-    bool erase( const Key& key ) {
-        return lookup(NULL,key,/*write=*/true,op_remove);
+    /** Return true if item was erased by particularly this call. */
+    bool erase( const Key& key );
+
+    //! Erase item by const_accessor.
+    /** Return true if item was erased by particularly this call. */
+    bool erase( const_accessor& item_accessor ) {
+        return exclude( item_accessor, /*readonly=*/ true );
     }
 
-    //------------------------------------------------------------------------
-    // Parallel algorithm support
-    //------------------------------------------------------------------------
-    typedef internal::hash_map_iterator<concurrent_hash_map,value_type> iterator;
-    typedef internal::hash_map_iterator<concurrent_hash_map,const value_type> const_iterator;
+    //! Erase item by accessor.
+    /** Return true if item was erased by particularly this call. */
+    bool erase( accessor& item_accessor ) {
+        return exclude( item_accessor, /*readonly=*/ false );
+    }
 
-    typedef internal::hash_map_range<value_type,iterator> range_type;
-    typedef internal::hash_map_range<const value_type,const_iterator> const_range_type;
+private:
+    //! Basic unit of storage used in chain.
+    struct node {
+        //! 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); }
+    };
 
-    range_type range( size_type grainsize=1 ) {
-        return range_type( begin(), end(), grainsize );
+    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_DO_ASSERT
+        ~segment() {
+            __TBB_ASSERT( !my_array, "should have been cleared earlier" );
+        }
+#endif /* TBB_DO_ASSERT */
+
+        // Pointer to array of chains
+        chain* my_array;
+
+        // 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);
+            memset( array, 0, n*sizeof(chain) );
+            my_array = array;
+        }
+    };
+
+    segment& get_segment( hashcode_t hashcode ) {
+        return my_segment[hashcode&(n_segment-1)];
     }
 
-    const_range_type range( size_type grainsize=1 ) const {
-        return const_range_type( begin(), end(), grainsize );
+    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);
     }
 
-    //------------------------------------------------------------------------
-    // STL support
-    //------------------------------------------------------------------------
-    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);}
-    
-    //! 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;
+    void delete_node(node* b) {
+        my_allocator.destroy(b);
+        my_allocator.deallocate(b, 1);
+    }
 
-    //! True if size()==0.
-    bool empty() const;
+    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;
 
-    //! Upper bound on size.
-    size_type max_size() const {return (~size_type(0))/sizeof(bucket);}
+    //! 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);
+        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 concurrent_hash_map<Key,T,HashCompare>::size_type concurrent_hash_map<Key,T,HashCompare>::size() const {
+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>
-bool concurrent_hash_map<Key,T,HashCompare>::empty() const {
+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;
 }
 
-template<typename Key, typename T, typename HashCompare>
-bool concurrent_hash_map<Key,T,HashCompare>::lookup( const_accessor* result, const Key& key, bool write, operation op ) {
-    if( result && result->my_bucket )
+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->my_node -- checked in release() */ )
         result->release();
-    hashcode_t h = my_hash_compare.hash( key );
-    bucket* b = NULL;
-    bucket* b_temp = NULL;
-    bool return_value = false;  
-    {
-        segment& s = get_segment(h);
+    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
 #if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT
-        bool grow = op==op_insert && s.internal_grow_predicate();
+    const bool grow = op_insert && s.internal_grow_predicate();
 #else
-        bool grow = op==op_insert && s.my_logical_size >= s.my_physical_size;
+    const 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_DO_THREADING_TOOLS||TBB_DO_ASSERT */
-        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!=op_insert, NULL ); 
-                goto done;
-            }
-            __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 );
-            b = search_list(key,c);
-            if( b ) {
-                if( op==op_find )
-                    return_value = true;
-                else if( op==op_remove ) {
-                    return_value = true;
-                    chain_lock.upgrade_to_writer();
-                    bucket_mutex_t::scoped_lock item_lock( b->mutex, true );
-                    b_temp = remove_from_list(key,c);
-                    --s.my_logical_size;
-                    goto delete_temp;
-                } 
-            } else {
-                if( op==op_insert ) {
-                    // Search failed
-                    b_temp = new bucket(key);
-
-                    if( !chain_lock.upgrade_to_writer() ) {
-                        // Rerun search_list, in case another thread inserted the item during the upgrade.
-                        b = search_list(key,c);
-                    }
-                    if( !b ) {
-                        return_value = true;
-                        b = b_temp;
-                        b_temp = NULL;
-                        c.push_front( *b );
-                        ++s.my_logical_size;
-                    }
+    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;
                 }
             }
-            if( b ) {
-                result->my_lock.acquire(b->mutex,write);
-                result->my_bucket = b;
+            ++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 );
+        }
+    } 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;
+    result->my_hash = h;
+    return return_value;
+}
+
+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 )
+        return std::make_pair(end, end);
+    iterator lower(*this, segment_index, chain_index, b), 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;
+    {
+        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;
     }
-delete_temp:   
-    if( b_temp ) {
-        {
-            // Get write lock after slicing from list, to ensure no one else
-            // is currently using *b
-            bucket_mutex_t::scoped_lock item_lock( b_temp->mutex, /*write=*/true );
+    {
+        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;
+    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 )
+            p = &(*p)->next;
+        if( !*p ) { // someone else was the first
+            item_accessor.my_lock.release();
+            return false;
         }
-        delete b_temp;
+        __TBB_ASSERT( *p == b, NULL );
+        *p = b->next;
+        --s.my_logical_size;
     }
-done:
-    return return_value;        
+    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
+    return true;
+}
+
+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);
 }
 
-template<typename Key, typename T, typename HashCompare>
-void concurrent_hash_map<Key,T,HashCompare>::clear() {
+template<typename Key, typename T, typename HashCompare, typename A>
+void concurrent_hash_map<Key,T,HashCompare,A>::clear() {
+#if TBB_PERFORMANCE_WARNINGS
+    size_t total_physical_size = 0, min_physical_size = size_t(-1L), max_physical_size = 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 ) {
-            size_t n = s.my_physical_size;
             s.my_array = NULL;
             s.my_physical_size = 0;
             s.my_logical_size = 0;
             for( size_t j=0; j<n; ++j ) {
-                while( bucket* b = array[j].bucket_list ) {
-                    array[j].bucket_list = b->next;
-                    delete b;
+                while( node* b = array[j].node_list ) {
+                    array[j].node_list = b->next;
+                    delete_node(b);
                 }
             }
             cache_aligned_allocator<chain>().deallocate( array, n );
         }
+#if TBB_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( !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;
+        internal::runtime_warning(
+            "Performance is not optimal because the hash function produces bad randomness in lower bits in %s",
+            typeid(*this).name() );
+#endif
     }
 }
 
-template<typename Key, typename T, typename HashCompare>
-void concurrent_hash_map<Key,T,HashCompare>::grow_segment( segment_mutex_t::scoped_lock& segment_lock, segment& s ) {
+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( bucket* b = old_array[k].bucket_list ) {
-                old_array[k].bucket_list = b->next;
+            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);
-            }   
+            }
         cache_aligned_allocator<chain>().deallocate( old_array, old_size );
     }
     segment_lock.downgrade_to_reader();
 }
 
-template<typename Key, typename T, typename HashCompare>
-void concurrent_hash_map<Key,T,HashCompare>::internal_copy( const concurrent_hash_map<Key,T,HashCompare>& source ) {
-    __TBB_ASSERT( n_segment==source.n_segment, NULL );
+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.my_logical_size = s.my_logical_size;
             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( bucket* b = s_array[k].bucket_list; b; b=b->next ) {
-                    hashcode_t h = my_hash_compare.hash( b->item.first );
-                    __TBB_ASSERT( &get_segment(h)==&d, "hash function changed?" );
-                    bucket* b_new = new bucket(b->item.first,b->item.second);
-                    d.get_chain(h,n_segment_bits).push_front(*b_new);
+                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
                 }
         }
     }
 }
 
-template<typename Key, typename T, typename HashCompare>
-concurrent_hash_map<Key,T,HashCompare>::concurrent_hash_map() {
-    initialize();
+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 );
 }
 
-template<typename Key, typename T, typename HashCompare>
-concurrent_hash_map<Key,T,HashCompare>::~concurrent_hash_map() {
-    clear();
-    cache_aligned_allocator<segment>().deallocate( my_segment, n_segment );
+template<typename Key, typename T, typename HashCompare, typename A1, typename A2>
+inline bool operator==(const concurrent_hash_map<Key, T, HashCompare, A1> &a, const concurrent_hash_map<Key, T, HashCompare, A2> &b) {
+    if(a.size() != b.size()) return false;
+    typename concurrent_hash_map<Key, T, HashCompare, A1>::const_iterator i(a.begin()), i_end(a.end());
+    typename concurrent_hash_map<Key, T, HashCompare, A2>::const_iterator j, j_end(b.end());
+    for(; i != i_end; ++i) {
+        j = b.equal_range(i->first).first;
+        if( j == j_end || !(i->second == j->second) ) return false;
+    }
+    return true;
 }
 
+template<typename Key, typename T, typename HashCompare, typename A1, typename A2>
+inline bool operator!=(const concurrent_hash_map<Key, T, HashCompare, A1> &a, const concurrent_hash_map<Key, T, HashCompare, A2> &b)
+{    return !(a == b); }
+
+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 ); }
+
 } // namespace tbb
 
 #endif /* __TBB_concurrent_hash_map_H */
diff --git a/include/tbb/concurrent_queue.h b/include/tbb/concurrent_queue.h
index bf85916..7427e44 100644
--- a/include/tbb/concurrent_queue.h
+++ b/include/tbb/concurrent_queue.h
@@ -30,31 +30,35 @@
 #define __TBB_concurrent_queue_H
 
 #include "tbb_stddef.h"
+#include "cache_aligned_allocator.h"
+#include "tbb_allocator.h"
 #include <new>
 
 namespace tbb {
 
-template<typename T> class concurrent_queue;
+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;
+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: no_copy {
+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;
+    friend class concurrent_queue_iterator_base_v3;
 protected:
     //! Prefix on a page
     struct page {
@@ -70,12 +74,13 @@ protected:
 
     //! 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:
-    concurrent_queue_base( size_t item_size );
-    virtual ~concurrent_queue_base();
+    concurrent_queue_base_v3( size_t item_size );
+    virtual ~concurrent_queue_base_v3();
 
     //! Enqueue item at tail of queue
     void internal_push( const void* src );
@@ -93,12 +98,27 @@ protected:
     //! Get size of queue
     ptrdiff_t internal_size() const;
 
+    //! set the queue capacity
     void 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
+    void internal_finish_clear() ;
+
+    //! throw an exception
+    void internal_throw_exception() const;
 };
 
+typedef concurrent_queue_base_v3 concurrent_queue_base ;
+
 //! Type-independent portion of concurrent_queue_iterator.
 /** @ingroup containers */
-class concurrent_queue_iterator_base {
+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;
@@ -113,40 +133,42 @@ protected:
     mutable void* my_item;
 
     //! Default constructor
-    concurrent_queue_iterator_base() : my_rep(NULL), my_item(NULL) {}
+    concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
 
     //! Copy constructor
-    concurrent_queue_iterator_base( const concurrent_queue_iterator_base& i ) : my_rep(NULL), my_item(NULL) {
+    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( const concurrent_queue_base& queue );
+    concurrent_queue_iterator_base_v3( const concurrent_queue_base& queue );
 
     //! Assignment
-    void assign( const concurrent_queue_iterator_base& i );
+    void assign( const concurrent_queue_iterator_base_v3& i );
 
     //! Advance iterator one step towards tail of queue.
     void advance();
 
     //! Destructor
-    ~concurrent_queue_iterator_base();
+    ~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 {
+class concurrent_queue_iterator: public concurrent_queue_iterator_base_v3 {
 #if !defined(_MSC_VER) || defined(__INTEL_COMPILER)
-    template<typename T>
+    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(queue)
+        concurrent_queue_iterator_base_v3(queue)
     {
     }
 public:
@@ -155,7 +177,7 @@ public:
     /** 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(other)
+        concurrent_queue_iterator_base_v3(other)
     {}
 
     //! Iterator assignment
@@ -185,6 +207,7 @@ public:
     }
 }; // 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;
@@ -196,16 +219,21 @@ bool operator!=( const concurrent_queue_iterator<C,T>& i, const concurrent_queue
 }
 
 } // namespace internal;
+
 //! @endcond
 
 //! A high-performance thread-safe queue.
 /** Multiple threads may each push and pop concurrently.
     Assignment and copy construction are not allowed.
     @ingroup containers */
-template<typename T>
-class concurrent_queue: public internal::concurrent_queue_base {
+template<typename T, class A>
+class concurrent_queue: public internal::concurrent_queue_base_v3 {
     template<typename Container, typename Value> friend class internal::concurrent_queue_iterator;
 
+    //! allocator type
+    typedef typename A::template rebind<char>::other page_allocator_type;
+    page_allocator_type my_allocator;
+
     //! Class used to ensure exception-safety of method "pop" 
     class destroyer {
         T& my_value;
@@ -229,10 +257,25 @@ class concurrent_queue: public internal::concurrent_queue_base {
         *static_cast<T*>(dst) = from;
     }
 
+    /*overide*/ virtual page *allocate_page() {
+        size_t n = sizeof(page) + items_per_page*item_size;
+        page *p = reinterpret_cast<page*>(my_allocator.allocate( n ));
+        if( !p ) internal_throw_exception(); 
+        return p;
+    }
+    
+    /*override*/ virtual void deallocate_page( page *p ) {
+        size_t n = sizeof(page) + items_per_page*item_size;
+        my_allocator.deallocate( reinterpret_cast<char*>(p), n );
+    }
+
 public:
     //! Element type in the queue.
     typedef T value_type;
 
+    //! Allocator type
+    typedef A allocator_type;
+
     //! Reference type
     typedef T& reference;
 
@@ -248,8 +291,9 @@ public:
     typedef std::ptrdiff_t difference_type;
 
     //! Construct empty queue
-    concurrent_queue() : 
-        concurrent_queue_base( sizeof(T) )
+    concurrent_queue(const allocator_type  &a = allocator_type()) : 
+        concurrent_queue_base_v3( sizeof(T) )
+            , my_allocator( a )
     {
     }
 
@@ -302,6 +346,12 @@ public:
         internal_set_capacity( capacity, sizeof(T) );
     }
 
+    //! return allocator object
+    allocator_type get_allocator() const { return this->my_allocator; }
+
+    //! clear the queue and release all resources (i.e., pages)
+    void clear() ;
+
     typedef internal::concurrent_queue_iterator<concurrent_queue,T> iterator;
     typedef internal::concurrent_queue_iterator<concurrent_queue,const T> const_iterator;
 
@@ -315,12 +365,18 @@ public:
     
 }; 
 
-template<typename T>
-concurrent_queue<T>::~concurrent_queue() {
+template<typename T, class A>
+concurrent_queue<T,A>::~concurrent_queue() {
+    clear();
+}
+
+template<typename T, class A>
+void concurrent_queue<T,A>::clear() {
     while( !empty() ) {
         T value;
-        internal_pop(&value);
+        internal_pop_if_present(&value);
     }
+    internal_finish_clear();
 }
 
 } // namespace tbb
diff --git a/include/tbb/concurrent_vector.h b/include/tbb/concurrent_vector.h
index f108e1a..9d67d1e 100644
--- a/include/tbb/concurrent_vector.h
+++ b/include/tbb/concurrent_vector.h
@@ -30,102 +30,144 @@
 #define __TBB_concurrent_vector_H
 
 #include "tbb_stddef.h"
+#include <algorithm>
 #include <iterator>
+#include <memory>
+#include <limits>
 #include <new>
+#include <cstring>
 #include "atomic.h"
 #include "cache_aligned_allocator.h"
 #include "blocked_range.h"
 
 #include "tbb_machine.h"
 
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (push)
+    #pragma warning (disable: 4267)
+#endif /* _MSC_VER && _Wp64 */
+
 namespace tbb {
 
-template<typename T>
+template<typename T, class A = cache_aligned_allocator<T> >
 class concurrent_vector;
 
+//! Bad allocation marker
+#define __TBB_BAD_ALLOC reinterpret_cast<void*>(63)
+
 //! @cond INTERNAL
 namespace internal {
 
     //! Base class of concurrent vector implementation.
     /** @ingroup containers */
-    class concurrent_vector_base {
+    class concurrent_vector_base_v3 {
     protected:
-        typedef unsigned long segment_index_t;
-
-        //! Log2 of "min_segment_size".  
-        static const int lg_min_segment_size = 4;
-
-        //! Minimum size (in physical items) of a segment.
-        static const int min_segment_size = segment_index_t(1)<<lg_min_segment_size;
-      
-        static segment_index_t segment_index_of( size_t index ) { 
-            uintptr i = index|1<<(lg_min_segment_size-1);
-            uintptr j = __TBB_Log2(i); 
-            return segment_index_t(j-(lg_min_segment_size-1)); 
-        }
-
-        static segment_index_t segment_base( segment_index_t k ) { 
-            return min_segment_size>>1<<k & -min_segment_size;
-        }
-
-        static segment_index_t segment_size( segment_index_t k ) {
-            segment_index_t result = k==0 ? min_segment_size : min_segment_size/2<<k;
-            __TBB_ASSERT( result==segment_base(k+1)-segment_base(k), NULL );
-            return result;
-        }
 
+        // Basic types declarations
+        typedef size_t segment_index_t;
         typedef size_t size_type;
 
-        void internal_reserve( size_type n, size_type element_size, size_type max_size );
-
-        size_type internal_capacity() const;
-
-        //! Requested size of vector
-        atomic<size_type> my_early_size;
+        // Using enumerations due to Mac linking problems of static const variables
+        enum {
+            // Size constants
+            default_initial_segments = 1, // 2 initial items
+            //! Number of slots for segment's pointers inside the class
+            pointers_per_short_table = 3, // to fit into 8 words of entire structure
+            pointers_per_long_table = sizeof(segment_index_t) * 8 // one segment per bit
+        };
 
-        /** Can be zero-initialized. */
+        // Segment pointer. Can be zero-initialized
         struct segment_t {
-            /** Declared volatile because in weak memory model, must have ld.acq/st.rel  */
-            void* volatile array;
+            void* array;
 #if TBB_DO_ASSERT
             ~segment_t() {
-                __TBB_ASSERT( !array, "should have been set to NULL by clear" );
+                __TBB_ASSERT( array <= __TBB_BAD_ALLOC, "should have been freed by clear" );
             }
 #endif /* TBB_DO_ASSERT */
         };
  
+        // Data fields
+
+        //! allocator function pointer
+        void* (*vector_allocator_ptr)(concurrent_vector_base_v3 &, size_t);
+
+        //! count of segments in the first block
+        atomic<size_type> my_first_block;
+
+        //! Requested size of vector
+        atomic<size_type> my_early_size;
+
+        //! Pointer to the segments table
         atomic<segment_t*> my_segment;
 
-        segment_t my_storage[2];
+        //! embedded storage of segment pointers
+        segment_t my_storage[pointers_per_short_table];
 
-        concurrent_vector_base() {
+        // Methods
+
+        concurrent_vector_base_v3() {
             my_early_size = 0;
-            my_storage[0].array = NULL;
-            my_storage[1].array = NULL;
+            my_first_block = 0; // here is not default_initial_segments
+            for( segment_index_t i = 0; i < pointers_per_short_table; i++)
+                my_storage[i].array = NULL;
             my_segment = my_storage;
         }
+        ~concurrent_vector_base_v3();
 
-        //! An operation on an n-lement array starting at begin.
+        static segment_index_t segment_index_of( size_type index ) {
+            return segment_index_t( __TBB_Log2( index|1 ) );
+        }
+
+        static segment_index_t segment_base( segment_index_t k ) {
+            return (segment_index_t(1)<<k & ~segment_index_t(1));
+        }
+
+        static inline segment_index_t segment_base_index_of( segment_index_t &index ) {
+            segment_index_t k = segment_index_of( index );
+            index -= segment_base(k);
+            return k;
+        }
+
+        static size_type segment_size( segment_index_t k ) {
+            return segment_index_t(1)<<k; // fake value for k==0
+        }
+
+        //! An operation on an n-element array starting at begin.
         typedef void(*internal_array_op1)(void* begin, size_type n );
 
         //! An operation on n-element destination array and n-element source array.
         typedef void(*internal_array_op2)(void* dst, const void* src, size_type n );
 
-        void internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op1 init );
-        void internal_grow( size_type start, size_type finish, size_type element_size, internal_array_op1 init );
-        size_type internal_grow_by( size_type delta, size_type element_size, internal_array_op1 init );
-        void* internal_push_back( size_type element_size, size_type& index ); 
-        void internal_clear( internal_array_op1 destroy, bool reclaim_storage );
-        void internal_copy( const concurrent_vector_base& src, size_type element_size, internal_array_op2 copy );
-        void internal_assign( const concurrent_vector_base& src, size_type element_size, 
+        //! Internal structure for compact()
+        struct internal_segments_table {
+            segment_index_t first_block;
+            void* table[pointers_per_long_table];
+        };
+
+        void internal_reserve( size_type n, size_type element_size, size_type max_size );
+        size_type internal_capacity() const;
+        void 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 internal_grow_by( size_type delta, size_type element_size, internal_array_op2 init, const void *src );
+        void* internal_push_back( size_type element_size, size_type& index );
+        segment_index_t internal_clear( internal_array_op1 destroy );
+        void* internal_compact( size_type element_size, void *table, internal_array_op1 destroy, internal_array_op2 copy );
+        void internal_copy( const concurrent_vector_base_v3& src, size_type element_size, internal_array_op2 copy );
+        void internal_assign( const concurrent_vector_base_v3& src, size_type element_size,
                               internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy );
+        void internal_throw_exception(size_type) const;
+        void internal_swap(concurrent_vector_base_v3& v);
+
 private:
-        //! Private functionality that does not cross DLL boundary.
+        //! Private functionality
         class helper;
-
         friend class helper;
     };
+    
+    typedef concurrent_vector_base_v3 concurrent_vector_base;
 
+    //TODO[?]: deal with _Range_checked_iterator_tag of MSVC
     //! Meets requirements of a forward iterator for STL and a Value for a blocked_range.*/
     /** Value is either the T or const T type of the container.
         @ingroup containers */
@@ -145,7 +187,10 @@ private:
         //! Caches my_vector->internal_subscript(my_index)
         /** NULL if cached value is not available */
         mutable Value* my_item;
-    
+
+        template<typename C, typename T>
+        friend vector_iterator<C,T> operator+( ptrdiff_t offset, const vector_iterator<C,T>& v );
+
         template<typename C, typename T, typename U>
         friend bool operator==( const vector_iterator<C,T>& i, const vector_iterator<C,U>& j );
 
@@ -159,7 +204,7 @@ private:
         friend class internal::vector_iterator;
 
 #if !defined(_MSC_VER) || defined(__INTEL_COMPILER)
-        template<typename T>
+        template<typename T, class A>
         friend class tbb::concurrent_vector;
 #else
 public: // workaround for MSVC
@@ -184,9 +229,6 @@ public: // workaround for MSVC
         vector_iterator operator+( ptrdiff_t offset ) const {
             return vector_iterator( *my_vector, my_index+offset );
         }
-        friend vector_iterator operator+( ptrdiff_t offset, const vector_iterator& v ) {
-            return vector_iterator( *v.my_vector, v.my_index+offset );
-        }
         vector_iterator operator+=( ptrdiff_t offset ) {
             my_index+=offset;
             my_item = NULL;
@@ -217,10 +259,9 @@ public: // workaround for MSVC
         vector_iterator& operator++() {
             size_t k = ++my_index;
             if( my_item ) {
-                // Following test uses 2's-complement wizardry and fact that
-                // min_segment_size is a power of 2.
-                if( (k& k-concurrent_vector<Container>::min_segment_size)==0 ) {
-                    // k is a power of two that is at least k-min_segment_size  
+                // Following test uses 2's-complement wizardry
+                if( (k& (k-2))==0 ) {
+                    // k is a power of two that is at least k-2
                     my_item= NULL;
                 } else {
                     ++my_item;
@@ -234,10 +275,9 @@ public: // workaround for MSVC
             __TBB_ASSERT( my_index>0, "operator--() applied to iterator already at beginning of concurrent_vector" ); 
             size_t k = my_index--;
             if( my_item ) {
-                // Following test uses 2's-complement wizardry and fact that
-                // min_segment_size is a power of 2.
-                if( (k& k-concurrent_vector<Container>::min_segment_size)==0 ) {
-                    // k is a power of two that is at least k-min_segment_size  
+                // Following test uses 2's-complement wizardry
+                if( (k& (k-2))==0 ) {
+                    // k is a power of two that is at least k-2  
                     my_item= NULL;
                 } else {
                     --my_item;
@@ -269,6 +309,11 @@ public: // workaround for MSVC
         typedef std::random_access_iterator_tag iterator_category;
     };
 
+    template<typename Container, typename T>
+    vector_iterator<Container,T> operator+( ptrdiff_t offset, const vector_iterator<Container,T>& v ) {
+        return vector_iterator<Container,T>( *v.my_vector, v.my_index+offset );
+    }
+
     template<typename Container, typename T, typename U>
     bool operator==( const vector_iterator<Container,T>& i, const vector_iterator<Container,U>& j ) {
         return i.my_index==j.my_index;
@@ -304,15 +349,78 @@ public: // workaround for MSVC
         return ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index);
     }
 
+    template<typename T, class A>
+    class allocator_base {
+    public:
+        typedef typename A::template
+            rebind<T>::other allocator_type;
+        allocator_type my_allocator;
+
+        allocator_base(const allocator_type &a = allocator_type() ) : my_allocator(a) {}
+    };
+
 } // namespace internal
 //! @endcond
 
-//! Concurrent vector
-/** @ingroup containers */
-template<typename T>
-class concurrent_vector: private internal::concurrent_vector_base {
-public:
-    using internal::concurrent_vector_base::size_type;
+//! Concurrent vector container
+/** concurrent_vector is a container having the following main properties:
+    - It provides random indexed access to its elements. The index of the first element is 0.
+    - It ensures safe concurrent growing its size (different threads can safely append new elements).
+    - Adding new elements does not invalidate existing iterators and does not change indices of existing items.
+
+ at par Compatibility
+    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.
+
+ at par Exception Safety
+    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:
+    - Throwing an exception is forbidden for destructor of T.
+    - Default constructor of T must not throw an exception OR its non-virtual destructor must safely work when its object memory is zero-initialized.
+    .
+    Otherwise, the program's behavior is undefined.
+ at par
+    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:
+    - There are no guaranties that all items were initialized by a constructor. The rest of items is zero-filled, including item where exception happens.
+    - An invalid vector instance cannot be repaired; it is unable to grow anymore.
+    - Size and capacity reported by the vector are incorrect, and calculated as if the failed operation were successful.
+    - Attempt to access not allocated elements using operator[] or iterators results in access violation or segmentation fault exception, and in case of using at() method a C++ exception is thrown.
+    .
+    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.
+
+ at par Fragmentation
+    Unlike an STL vector, a concurrent_vector 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 optimized by method compact() that
+    merges several smaller arrays into one solid.
+
+ at par Changes since TBB 2.0
+    - Implemented exception-safety guaranties
+    - Added template argument for allocator
+    - Added allocator argument in constructors
+    - Faster index calculation
+    - First growth call specifies a number of segments to be merged in the first allocation.
+    - Fixed memory blow up for swarm of vector's instances of small size
+    - Added grow_by(size_type n, const_reference t) growth using copying constructor to init new items. 
+    - Added STL-like constructors.
+    - Added operators ==, < and derivatives
+    - Added at() method, approved for using after an exception was thrown inside the vector
+    - Added get_allocator() method.
+    - Added assign() methods
+    - Added compact() method to defragment first segments
+    - Added swap() method
+    - range() defaults on grainsize = 1 supporting auto grainsize algorithms. 
+    - clear() behavior changed to freeing segments memory 
+
+    @ingroup containers */
+template<typename T, class A>
+class concurrent_vector: protected internal::allocator_base<T, A>,
+                         private internal::concurrent_vector_base_v3 {
 private:
     template<typename I>
     class generic_range_type: public blocked_range<I> {
@@ -322,31 +430,117 @@ private:
         typedef const T& const_reference;
         typedef I iterator;
         typedef ptrdiff_t difference_type;
-        generic_range_type( I begin_, I end_, size_t grainsize ) : blocked_range<I>(begin_,end_,grainsize) {} 
+        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()) {}
     };
 
     template<typename C, typename U>
     friend class internal::vector_iterator;
 public:
+    //------------------------------------------------------------------------
+    // STL compatible types
+    //------------------------------------------------------------------------
+    typedef internal::concurrent_vector_base_v3::size_type size_type;
+    typedef typename internal::allocator_base<T, A>::allocator_type allocator_type;
+
+    typedef T value_type;
+    typedef ptrdiff_t difference_type;
     typedef T& reference;
     typedef const T& const_reference;
+    typedef T *pointer;
+    typedef const T *const_pointer;
+
+    typedef internal::vector_iterator<concurrent_vector,T> iterator;
+    typedef internal::vector_iterator<concurrent_vector,const T> const_iterator;
+
+#if !defined(_MSC_VER) || _CPPLIB_VER>=300 
+    // Assume ISO standard definition of std::reverse_iterator
+    typedef std::reverse_iterator<iterator> reverse_iterator;
+    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#else
+    // Use non-standard std::reverse_iterator
+    typedef std::reverse_iterator<iterator,T,T&,T*> reverse_iterator;
+    typedef std::reverse_iterator<const_iterator,T,const T&,const T*> const_reverse_iterator;
+#endif /* defined(_MSC_VER) && (_MSC_VER<1300) */
+
+    //------------------------------------------------------------------------
+    // Parallel algorithm support
+    //------------------------------------------------------------------------
+    typedef generic_range_type<iterator> range_type;
+    typedef generic_range_type<const_iterator> const_range_type;
+
+    //------------------------------------------------------------------------
+    // STL compatible constructors & destructors
+    //------------------------------------------------------------------------
 
     //! Construct empty vector.
-    concurrent_vector() {}
+    explicit concurrent_vector(const allocator_type &a = allocator_type())
+        : internal::allocator_base<T, A>(a)
+    {
+        vector_allocator_ptr = &internal_allocator;
+    }
+
+    //! Copying constructor
+    concurrent_vector( const concurrent_vector& vector, const allocator_type& a = allocator_type() )
+        : internal::allocator_base<T, A>(a)
+    {
+        vector_allocator_ptr = &internal_allocator;
+        internal_copy(vector, sizeof(T), &copy_array);
+    }
+
+    //! Copying constructor for vector with different allocator type
+    template<class M>
+    concurrent_vector( const concurrent_vector<T, M>& vector, const allocator_type& a = allocator_type() )
+        : internal::allocator_base<T, A>(a)
+    {
+        vector_allocator_ptr = &internal_allocator;
+        internal_copy(vector.internal_vector_base(), sizeof(T), &copy_array);
+    }
+
+    //! Construction with initial size specified by argument n
+    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);
+    }
+
+    //! Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance
+    concurrent_vector(size_type n, const_reference t, const allocator_type& a = allocator_type())
+        : internal::allocator_base<T, A>(a)
+    {
+        vector_allocator_ptr = &internal_allocator;
+        internal_assign( n, t );
+    }
 
-    //! Copy a vector.
-    concurrent_vector( const concurrent_vector& vector ) {internal_copy(vector,sizeof(T),&copy_array);}
+    //! Construction with copying iteration range and given allocator instance
+    template<class I>
+    concurrent_vector(I first, I last, const allocator_type &a = allocator_type())
+        : 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) );
+    }
 
-    //! Assignment 
+    //! Assignment
     concurrent_vector& operator=( const concurrent_vector& vector ) {
-        if( this!=&vector )
-            internal_assign(vector,sizeof(T),&destroy_array,&assign_array,&copy_array);
+        if( this != &vector )
+            concurrent_vector_base_v3::internal_assign(vector, sizeof(T), &destroy_array, &assign_array, &copy_array);
         return *this;
     }
 
-    //! Clear and destroy vector.
-    ~concurrent_vector() {internal_clear(&destroy_array,/*reclaim_storage=*/true);}
+    //! Assignment for vector with different allocator type
+    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(),
+                sizeof(T), &destroy_array, &assign_array, &copy_array);
+        return *this;
+    }
 
     //------------------------------------------------------------------------
     // Concurrent operations
@@ -354,19 +548,26 @@ public:
     //! Grow by "delta" elements.
     /** Returns old size. */
     size_type grow_by( size_type delta ) {
-        return delta ? internal_grow_by( delta, sizeof(T), &initialize_array ) : my_early_size;
+        return delta ? internal_grow_by( delta, sizeof(T), &initialize_array, NULL ) : my_early_size;
+    }
+
+    //! Grow by "delta" elements using copying constuctor.
+    /** 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;
     }
 
     //! Grow array until it has at least n elements.
     void grow_to_at_least( size_type n ) {
         if( my_early_size<n )
-            internal_grow_to_at_least( n, sizeof(T), &initialize_array );
+            internal_grow_to_at_least( n, sizeof(T), &initialize_array, NULL );
     };
 
     //! Push item 
     size_type push_back( const_reference item ) {
         size_type k;
-        new( internal_push_back(sizeof(T),k) ) T(item);
+        internal_loop_guide loop(1, internal_push_back(sizeof(T),k));
+        loop.init(&item);
         return k;
     }
 
@@ -382,33 +583,25 @@ public:
         return internal_subscript(index);
     }
 
-    //------------------------------------------------------------------------
-    // Parallel algorithm support
-    //------------------------------------------------------------------------
-    typedef internal::vector_iterator<concurrent_vector,T> iterator;
-    typedef internal::vector_iterator<concurrent_vector,const T> const_iterator;
-
-#if !defined(_MSC_VER) || _CPPLIB_VER>=300 
-    // Assume ISO standard definition of std::reverse_iterator
-    typedef std::reverse_iterator<iterator> reverse_iterator;
-    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-#else
-    // Use non-standard std::reverse_iterator
-    typedef std::reverse_iterator<iterator,T,T&,T*> reverse_iterator;
-    typedef std::reverse_iterator<const_iterator,T,const T&,const T*> const_reverse_iterator;
-#endif /* defined(_MSC_VER) && (_MSC_VER<1300) */
+    //! Get reference to element at given index.
+    reference at( size_type index ) {
+        return internal_subscript_with_exceptions(index);
+    }
 
-    typedef generic_range_type<iterator> range_type;
-    typedef generic_range_type<const_iterator> const_range_type;
+    //! Get const reference to element at given index.
+    const_reference at( size_type index ) const {
+        return internal_subscript_with_exceptions(index);
+    }
 
-    range_type range( size_t grainsize = 1 ) {
+    //! Get range for iterating with parallel algorithms
+    range_type range( size_t grainsize = 1) {
         return range_type( begin(), end(), grainsize );
     }
 
+    //! Get const range for iterating with parallel algorithms
     const_range_type range( size_t grainsize = 1 ) const {
         return const_range_type( begin(), end(), grainsize );
     }
-
     //------------------------------------------------------------------------
     // Capacity
     //------------------------------------------------------------------------
@@ -429,35 +622,125 @@ public:
             internal_reserve(n, sizeof(T), max_size());
     }
 
+    //! Optimize memory usage and fragmentation. Returns true if optimization occurred.
+    void compact();
+
     //! Upper bound on argument to reserve.
-    size_type max_size() const {return (~size_t(0))/sizeof(T);}
+    size_type max_size() const {return (~size_type(0))/sizeof(T);}
 
     //------------------------------------------------------------------------
     // STL support
     //------------------------------------------------------------------------
 
-    typedef T value_type;
-    typedef ptrdiff_t difference_type;
-
+    //! start iterator
     iterator begin() {return iterator(*this,0);}
+    //! end iterator
     iterator end() {return iterator(*this,size());}
+    //! start const iterator
     const_iterator begin() const {return const_iterator(*this,0);}
+    //! end const iterator
     const_iterator end() const {return const_iterator(*this,size());}
-
+    //! reverse start iterator
     reverse_iterator rbegin() {return reverse_iterator(end());}
+    //! reverse end iterator
     reverse_iterator rend() {return reverse_iterator(begin());}
+    //! reverse start const iterator
     const_reverse_iterator rbegin() const {return const_reverse_iterator(end());}
+    //! reverse end const iterator
     const_reverse_iterator rend() const {return const_reverse_iterator(begin());}
+    //! the first item
+    reference front() {
+        __TBB_ASSERT( size()>0, NULL);
+        return static_cast<T*>(my_segment[0].array)[0];
+    }
+    //! the first item const
+    const_reference front() const {
+        __TBB_ASSERT( size()>0, NULL);
+        return static_cast<const T*>(my_segment[0].array)[0];
+    }
+    //! the last item
+    reference back() {
+        __TBB_ASSERT( size()>0, NULL);
+        return internal_subscript( my_early_size-1 );
+    }
+    //! the last item const
+    const_reference back() const {
+        __TBB_ASSERT( size()>0, NULL);
+        return internal_subscript( my_early_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 ); }
+
+    //! 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) );
+    }
+
+    //! swap two instances
+    void swap(concurrent_vector &vector) {
+        if( this != &vector ) {
+            concurrent_vector_base_v3::internal_swap(static_cast<concurrent_vector_base_v3&>(vector));
+            std::swap(this->my_allocator, vector.my_allocator);
+        }
+    }
 
-    //! Not thread safe
-    /** Does not change capacity. */
-    void clear() {internal_clear(&destroy_array,/*reclaim_storage=*/false);}       
+    //! Clear container. Not thread safe
+    void clear() {
+        segment_t *table = my_segment;
+        internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+        my_first_block = 0; // here is not default_initial_segments
+    }
+
+    //! Clear and destroy vector.
+    ~concurrent_vector() {
+        clear();
+        // base class destructor call should be then
+    }
+
+    const internal::concurrent_vector_base_v3 &internal_vector_base() const { return *this; }
 private:
+    //! Allocate k items
+    static void *internal_allocator(internal::concurrent_vector_base_v3 &vb, size_t k) {
+        return static_cast<concurrent_vector<T, A>&>(vb).my_allocator.allocate(k);
+    }
+    //! Free k segments from table
+    void internal_free_segments(void *table[], segment_index_t k, segment_index_t first_block);
+
     //! Get reference to element at given index.
     T& internal_subscript( size_type index ) const;
 
+    //! Get reference to element at given index with errors checks
+    T& internal_subscript_with_exceptions( size_type index ) const;
+
+    //! assign n items by copying t
+    void internal_assign(size_type n, const_reference t);
+
+    //! 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));
+    }
+    //! inline proxy assign by iterators
+    template<class I>
+    void internal_assign(I first, I last, is_integer_tag<false> *) {
+        internal_assign_iterators(first, last);
+    }
+    //! assign by iterators
+    template<class I>
+    void internal_assign_iterators(I first, I last);
+
+    //! Construct n instances of T, starting at "begin".
+    static void initialize_array( void* begin, const void*, size_type n );
+
     //! Construct n instances of T, starting at "begin".
-    static void initialize_array( void* begin, size_type n );
+    static void initialize_array_by( void* begin, const void* src, size_type n );
 
     //! Construct n instances of T, starting at "begin".
     static void copy_array( void* dst, const void* src, size_type n );
@@ -467,46 +750,168 @@ private:
 
     //! Destroy n instances of T, starting at "begin".
     static void destroy_array( void* begin, size_type n );
+
+    //! Exception-aware helper class for filling a segment by exception-danger operators of user class
+    class internal_loop_guide {
+    public:
+        const pointer array;
+        const size_type n;
+        size_type i;
+        internal_loop_guide(size_type ntrials, void *ptr)
+            : array(static_cast<pointer>(ptr)), n(ntrials), i(0) {}
+        void init() {   for(; i < n; ++i) new( &array[i] ) T(); }
+        void init(const void *src) { for(; i < n; ++i) new( &array[i] ) T(*static_cast<const T*>(src)); }
+        void copy(const void *src) { for(; i < n; ++i) new( &array[i] ) T(static_cast<const T*>(src)[i]); }
+        void assign(const void *src) { for(; i < n; ++i) array[i] = static_cast<const T*>(src)[i]; }
+        template<class I> void iterate(I &src) { for(; i < n; ++i, ++src) new( &array[i] ) T( *src ); }
+        ~internal_loop_guide() {
+            if(i < n) // if exception raised, do zerroing on the rest of items
+                std::memset(array+i, 0, (n-i)*sizeof(value_type));
+        }
+    };
 };
 
-template<typename T>
-T& concurrent_vector<T>::internal_subscript( size_type index ) const {
+template<typename T, class A>
+void concurrent_vector<T, A>::compact() {
+    internal_segments_table old;
+    try {
+        if( internal_compact( sizeof(T), &old, &destroy_array, &copy_array ) )
+            internal_free_segments( old.table, pointers_per_long_table, old.first_block ); // free joined and unnecessary segments
+    } catch(...) {
+        if( old.first_block ) // free segment allocated for compacting. Only for support of exceptions in ctor of user T[ype]
+            internal_free_segments( old.table, 1, old.first_block );
+        throw;
+    }
+}
+
+template<typename T, class A>
+void concurrent_vector<T, A>::internal_free_segments(void *table[], segment_index_t k, segment_index_t first_block) {
+    // Free the arrays
+    while( k > first_block ) {
+        --k;
+        T* array = static_cast<T*>(table[k]);
+        table[k] = NULL;
+        if( array > __TBB_BAD_ALLOC ) // check for correct segment pointer
+            this->my_allocator.deallocate( array, segment_size(k) );
+    }
+    T* array = static_cast<T*>(table[0]);
+    if( array > __TBB_BAD_ALLOC ) {
+        __TBB_ASSERT( first_block > 0, NULL );
+        while(k > 0) table[--k] = NULL;
+        this->my_allocator.deallocate( array, segment_size(first_block) );
+    }
+}
+
+template<typename T, class A>
+T& concurrent_vector<T, A>::internal_subscript( size_type index ) const {
     __TBB_ASSERT( index<size(), "index out of bounds" );
-    segment_index_t k = segment_index_of( index );
-    size_type j = index-segment_base(k);
+    size_type j = index;
+    segment_index_t k = segment_base_index_of( j );
+    // no need in __TBB_load_with_acquire since thread works in own space or gets 
     return static_cast<T*>(my_segment[k].array)[j];
 }
 
-template<typename T>
-void concurrent_vector<T>::initialize_array( void* begin, size_type n ) {
-    T* array = static_cast<T*>(begin);
-    for( size_type j=0; j<n; ++j )
-        new( &array[j] ) T();
+template<typename T, class A>
+T& concurrent_vector<T, A>::internal_subscript_with_exceptions( size_type index ) const {
+    if( index >= 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
+    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)
+{
+    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_by(static_cast<T*>(my_segment[0].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) {
+    size_type n = std::distance(first, last);
+    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 );
+    internal_loop_guide loop(n, my_segment[0].array); loop.iterate(first);
+}
+
+template<typename T, class A>
+void concurrent_vector<T, A>::initialize_array( void* begin, const void *, size_type n ) {
+    internal_loop_guide loop(n, begin); loop.init();
 }
 
-template<typename T>
-void concurrent_vector<T>::copy_array( void* dst, const void* src, size_type n ) {
-    T* d = static_cast<T*>(dst);
-    const T* s = static_cast<const T*>(src);
-    for( size_type j=0; j<n; ++j )
-        new( &d[j] ) T(s[j]);
+template<typename T, class A>
+void concurrent_vector<T, A>::initialize_array_by( void* begin, const void *src, size_type n ) {
+    internal_loop_guide loop(n, begin); loop.init(src);
 }
 
-template<typename T>
-void concurrent_vector<T>::assign_array( void* dst, const void* src, size_type n ) {
-    T* d = static_cast<T*>(dst);
-    const T* s = static_cast<const T*>(src);
-    for( size_type j=0; j<n; ++j )
-        d[j] = s[j];
+template<typename T, class A>
+void concurrent_vector<T, A>::copy_array( void* dst, const void* src, size_type n ) {
+    internal_loop_guide loop(n, dst); loop.copy(src);
 }
 
-template<typename T>
-void concurrent_vector<T>::destroy_array( void* begin, size_type n ) {
+template<typename T, class A>
+void concurrent_vector<T, A>::assign_array( void* dst, const void* src, size_type n ) {
+    internal_loop_guide loop(n, dst); loop.assign(src);
+}
+
+template<typename T, class A>
+void concurrent_vector<T, A>::destroy_array( void* begin, size_type n ) {
     T* array = static_cast<T*>(begin);
     for( size_type j=n; j>0; --j )
-        array[j-1].~T();
+        array[j-1].~T(); // destructors are supposed to not throw any exceptions
+}
+
+// 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());
+    typename concurrent_vector<T, A2>::const_iterator j(b.begin());
+    for(; i != a.end(); ++i, ++j)
+        if( !(*i == *j) ) return false;
+    return true;
 }
 
+template<typename T, class A1, class A2>
+inline bool operator!=(const concurrent_vector<T, A1> &a, const concurrent_vector<T, A2> &b)
+{    return !(a == b); }
+
+template<typename T, class A1, class A2>
+inline bool operator<(const concurrent_vector<T, A1> &a, const concurrent_vector<T, A2> &b)
+{    return (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())); }
+
+template<typename T, class A1, class A2>
+inline bool operator>(const concurrent_vector<T, A1> &a, const concurrent_vector<T, A2> &b)
+{    return b < a; }
+
+template<typename T, class A1, class A2>
+inline bool operator<=(const concurrent_vector<T, A1> &a, const concurrent_vector<T, A2> &b)
+{    return !(b < a); }
+
+template<typename T, class A1, class A2>
+inline bool operator>=(const concurrent_vector<T, A1> &a, const concurrent_vector<T, A2> &b)
+{    return !(a < b); }
+
+template<typename T, class A>
+inline void swap(concurrent_vector<T, A> &a, concurrent_vector<T, A> &b)
+{    a.swap( b ); }
+
 } // namespace tbb
 
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (pop)
+#endif /* _MSC_VER && _Wp64 */
+
 #endif /* __TBB_concurrent_vector_H */
diff --git a/src/tbb/concurrent_hash_map.cpp b/include/tbb/machine/ibm_aix51.h
similarity index 65%
copy from src/tbb/concurrent_hash_map.cpp
copy to include/tbb/machine/ibm_aix51.h
index 3de140f..8df0e9a 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/include/tbb/machine/ibm_aix51.h
@@ -26,20 +26,27 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#ifndef __TBB_machine_H
+#error Do not include this file directly; include tbb_machine.h instead
+#endif
 
-namespace tbb {
+#define __TBB_WORDSIZE 8
+#define __TBB_BIG_ENDIAN 1
 
-namespace internal {
+#include <stdint.h>
+#include <unistd.h>
+#include <sched.h>
 
-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;
-}
+extern "C" {
 
-} // namespace internal
+int32_t __TBB_machine_cas_32 (volatile void* ptr, int32_t value, int32_t comparand);
+int64_t __TBB_machine_cas_64 (volatile void* ptr, int64_t value, int64_t comparand);
+#define __TBB_fence_for_acquire() __TBB_machine_flush ()
+#define __TBB_fence_for_release() __TBB_machine_flush ()
 
-} // namespace tbb
+}
 
+#define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cas_32(P,V,C)
+#define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cas_64(P,V,C)
+#define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cas_64(P,V,C)
+#define __TBB_Yield() sched_yield()
diff --git a/include/tbb/machine/linux_em64t.h b/include/tbb/machine/linux_em64t.h
index 9e2d9c7..1a76cc6 100644
--- a/include/tbb/machine/linux_em64t.h
+++ b/include/tbb/machine/linux_em64t.h
@@ -35,23 +35,8 @@
 #define __TBB_WORDSIZE 8
 #define __TBB_BIG_ENDIAN 0
 
-//! Load with acquire semantics, both for hardware and compiler.
-template<typename T>
-inline T __TBB_load_with_acquire_via_explicit_fence(const volatile T& location) {
-    T tmp = location;
-    __asm__ __volatile__("": : :"memory");
-    return tmp;
-}
-
-//! Store with release semantics, both for hardware and compiler.
-template<typename T, typename V>
-inline void __TBB_store_with_release_via_explicit_fence(volatile T& location, V value) {
-    __asm__ __volatile__("": : :"memory");
-    location = value;
-}
-
-#define __TBB_load_with_acquire __TBB_load_with_acquire_via_explicit_fence
-#define __TBB_store_with_release __TBB_store_with_release_via_explicit_fence
+#define __TBB_fence_for_acquire() __asm__ __volatile__("": : :"memory")
+#define __TBB_fence_for_release() __asm__ __volatile__("": : :"memory")
 
 #define __MACHINE_DECL_ATOMICS(S,T,X) \
 static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand )         \
@@ -100,6 +85,10 @@ static inline void __TBB_machine_or( volatile void *ptr, uint64_t addend ) {
     __asm__ __volatile__("lock\norq %1,%0" : "=m"(*(uint64_t *)ptr) : "r"(addend) : "memory");
 }
 
+static inline void __TBB_machine_and( volatile void *ptr, uint64_t addend ) {
+    __asm__ __volatile__("lock\nandq %1,%0" : "=m"(*(uint64_t *)ptr) : "r"(addend) : "memory");
+}
+
 static inline void __TBB_machine_pause( int32_t delay ) {
     for (int32_t i = 0; i < delay; i++) {
        __asm__ __volatile__("pause;");
@@ -131,6 +120,7 @@ static inline void __TBB_machine_pause( int32_t delay ) {
 #define __TBB_Load8(P)    (*P)
 
 #define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V)
+#define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V)
 
 // Definition of other functions
 #define __TBB_Pause(V) __TBB_machine_pause(V)
diff --git a/include/tbb/machine/linux_ia32.h b/include/tbb/machine/linux_ia32.h
index 61d7c68..77e8f9c 100644
--- a/include/tbb/machine/linux_ia32.h
+++ b/include/tbb/machine/linux_ia32.h
@@ -74,9 +74,12 @@ __MACHINE_DECL_ATOMICS(4,int32_t,"l")
 
 static int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t comparand )
 {
-    const int32_t comparand_lo = (int32_t)comparand;
-    const int32_t comparand_hi = *(int32_t*)((intptr_t)&comparand+sizeof(int32_t));
     int64_t result;
+    union {
+      int64_t comparand_local;
+      int32_t comparand_parts[2];
+    };
+    comparand_local = comparand;
     // EBX register saved for compliancy with position-independent code (PIC) rules on IA32
     __asm__ __volatile__ (
              "pushl %%ebx\n\t"
@@ -86,8 +89,8 @@ static int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t
              "popl  %%ebx"
                     : "=A"(result), "=m"(*(int64_t *)ptr)
                     : "S"(ptr),
-                      "a"(comparand_lo),
-                      "d"(comparand_hi),
+                      "a"(comparand_parts[0]),
+                      "d"(comparand_parts[1]),
                       "c"(&value)
                     : "memory", "esp");
     return result;
@@ -103,6 +106,10 @@ static inline void __TBB_machine_or( volatile void *ptr, uint32_t addend ) {
     __asm__ __volatile__("lock\norl %1,%0" : "=m"(*(uint32_t *)ptr) : "r"(addend) : "memory");
 }
 
+static inline void __TBB_machine_and( volatile void *ptr, uint32_t addend ) {
+    __asm__ __volatile__("lock\nandl %1,%0" : "=m"(*(uint32_t *)ptr) : "r"(addend) : "memory");
+}
+
 static inline void __TBB_machine_pause( int32_t delay ) {
     for (int32_t i = 0; i < delay; i++) {
        __asm__ __volatile__("pause;");
@@ -112,16 +119,32 @@ static inline void __TBB_machine_pause( int32_t delay ) {
 
 static inline int64_t __TBB_machine_load8 (const volatile void *ptr) {
     int64_t result;
-    __asm__ __volatile__ ( "fildq %1\n\t"
-                           "fistpq %0" :  "=m"(result) : "m"(*(uint64_t *)ptr), "m"(result) : "memory" );
+    if( ((uint32_t)ptr&7u)==0 ) {
+        // Aligned load
+        __asm__ __volatile__ ( "fildq %1\n\t"
+                               "fistpq %0" :  "=m"(result) : "m"(*(uint64_t *)ptr), "m"(result) : "memory" );
+    } else {
+        // Unaligned load
+        result = __TBB_machine_cmpswp8((void*)ptr,0,0);
+    }
     return result;
 }
 
-static inline void __TBB_machine_store8 (volatile void *ptr, int64_t value) {
-    __asm__ __volatile__ ( "fildq %1\n\t"
-                           "fistpq (%2)" :  "=m"(*(int64_t *)ptr) : "m"(value), "r"(ptr) : "memory" );
+//! Handles misaligned 8-byte store
+/** Defined in tbb_misc.cpp */
+extern "C" void __TBB_machine_store8_slow( volatile void *ptr, int64_t value );
+
+static inline void __TBB_machine_store8(volatile void *ptr, int64_t value) {
+    if( ((uint32_t)ptr&7u)==0 ) {
+        // Aligned store
+        __asm__ __volatile__ ( "fildq %1\n\t"
+                               "fistpq (%2)" :  "=m"(*(int64_t *)ptr) : "m"(value), "r"(ptr) : "memory" );
+    } else {
+        // Unaligned store
+        __TBB_machine_store8_slow(ptr,value);
+    }
 }
-
+ 
 template <typename T, size_t S>
 struct __TBB_machine_load_store {
     static inline T load_with_acquire(const volatile T& location) {
@@ -169,22 +192,23 @@ inline void __TBB_machine_store_with_release(volatile T &location, V value) {
 #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_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)
-#define __TBB_FetchAndAddW(P,V)  __TBB_machine_fetchadd4(P,V)
+#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)
-#define __TBB_FetchAndStoreW(P,V)  __TBB_machine_fetchstore4(P,V)
+#define __TBB_FetchAndStoreW(P,V) __TBB_machine_fetchstore4(P,V)
 
 #define __TBB_Store8(P,V) __TBB_machine_store8(P,V)
 #define __TBB_Load8(P)    __TBB_machine_load8(P)
 
 #define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V)
+#define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V)
 
 
 // Those we chose not to implement (they will be implemented generically using CMPSWP8)
@@ -193,7 +217,7 @@ inline void __TBB_machine_store_with_release(volatile T &location, V value) {
 
 // Definition of other functions
 #define __TBB_Pause(V) __TBB_machine_pause(V)
-#define __TBB_Log2(V)    __TBB_machine_lg(V)
+#define __TBB_Log2(V)  __TBB_machine_lg(V)
 
 // Special atomic functions
 #define __TBB_FetchAndAddWrelease(P,V) __TBB_FetchAndAddW(P,V)
diff --git a/include/tbb/machine/linux_itanium.h b/include/tbb/machine/linux_itanium.h
index 6757921..a004b68 100644
--- a/include/tbb/machine/linux_itanium.h
+++ b/include/tbb/machine/linux_itanium.h
@@ -136,24 +136,11 @@ extern "C" {
 #define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAdd8release(P,-1)
 
 #ifndef __INTEL_COMPILER
-template<typename T, typename V>
-inline void __TBB_store_with_release_via_explicit_fence(volatile T& location, V value) {
-    __asm__ __volatile__("": : :"memory");
-    location = value;
-}
-
-//! Load with acquire semantics, both for hardware and compiler.
-/** Even though GCC imbues volatile loads with acquire semantics, 
-    it sometimes hoists loads over the acquire fence.  We use
-    an explicit memory fence to prevent such incorrect hoisting. */
-template<typename T>
-inline T __TBB_load_with_acquire_via_explicit_fence(const volatile T& location) {
-    T tmp = location;
-    __asm__ __volatile__("": : :"memory");
-    return tmp;
-}
-#define __TBB_load_with_acquire(L)    __TBB_load_with_acquire_via_explicit_fence(L)
-#define __TBB_store_with_release(L,V) __TBB_store_with_release_via_explicit_fence(L,V)
+/* 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
 
 // Special atomic functions
diff --git a/include/tbb/machine/mac_ppc.h b/include/tbb/machine/mac_ppc.h
index e6150cc..3f0c0c2 100644
--- a/include/tbb/machine/mac_ppc.h
+++ b/include/tbb/machine/mac_ppc.h
@@ -42,57 +42,43 @@ inline int32_t __TBB_machine_cmpswp4 (volatile void *ptr, int32_t value, int32_t
 {
     int32_t result;
 
-    __asm__ __volatile__("0: lwarx %0,0,%1\n\t" /* load w/ reservation */
-                         "cmpw %0,%3\n\t"       /* compare against comparand */
+    __asm__ __volatile__("sync\n"
+                         "0: lwarx %0,0,%1\n\t"  /* load w/ reservation */
+                         "cmpw %0,%3\n\t"        /* compare against comparand */
                          "bne- 1f\n\t"           /* exit if not same */
                          "stwcx. %2,0,%1\n\t"    /* store new_value */
                          "bne- 0b\n"             /* retry if reservation lost */
-                         "1:"                   /* the exit */
+                         "1: sync"               /* the exit */
                           : "=&r"(result)
                           : "r"(ptr), "r"(value), "r"(comparand)
                           : "cr0");
     return result;
 }
 
-#if defined(powerpc64) || defined(__powerpc64__) || defined(__ppc64__)
-
 inline int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t comparand )
 {
     int64_t result;
-    __asm__ __volatile__("0: ldarx %0,0,%1\n\t" /* load w/ reservation */
-                         "cmpd %0,%3\n\t"       /* compare against comparand */
+    __asm__ __volatile__("sync\n"
+                         "0: ldarx %0,0,%1\n\t"  /* load w/ reservation */
+                         "cmpd %0,%3\n\t"        /* compare against comparand */
                          "bne- 1f\n\t"           /* exit if not same */
                          "stdcx. %2,0,%1\n\t"    /* store new_value */
                          "bne- 0b\n"             /* retry if reservation lost */
-                         "1:"                   /* the exit */
+                         "1: sync"               /* the exit */
                           : "=&b"(result)
                           : "r"(ptr), "r"(value), "r"(comparand)
                           : "cr0");
     return result;
 }
 
+#if defined(powerpc64) || defined(__powerpc64__) || defined(__ppc64__)
+#define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp8(P,V,C)
 #else
-#error This configuratioin is not supported yet
-
-inline int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t comparand )
-{
-    int64_t result;
-    __asm__ __volatile__("0: ldarx %0,0,%1\n\t" /* load w/ reservation */
-                         "cmpd %0,%3\n\t"       /* compare against comparand */
-                         "bne- 1f\n\t"           /* exit if not same */
-                         "stdcx. %2,0,%1\n\t"    /* store new_value */
-                         "bne- 0b\n"             /* retry if reservation lost */
-                         "1:"                   /* the exit */
-                          : "=&b"(result)
-                          : "r"(ptr), "r"(value), "r"(comparand)
-                          : "cr0");
-    return result;
-}
-
+#define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp4(P,V,C)
 #endif
 
 #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_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")
diff --git a/include/tbb/machine/windows_em64t.h b/include/tbb/machine/windows_em64t.h
index 1a903e2..bc39d14 100644
--- a/include/tbb/machine/windows_em64t.h
+++ b/include/tbb/machine/windows_em64t.h
@@ -33,10 +33,13 @@
 #include <windows.h>
 
 #if defined(__INTEL_COMPILER)
-#define _ReadWriteBarrier() __asm { __asm nop }
+#define __TBB_fence_for_acquire() __asm { __asm nop }
+#define __TBB_fence_for_release() __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()
 #endif
 
 #define __TBB_WORDSIZE 8
@@ -54,22 +57,6 @@ extern "C" {
     void __TBB_machine_pause (__int32 delay );
 }
 
-template <typename T>
-static inline T __TBB_machine_load_with_acquire(const volatile T& location) {
-    T to_return = location;
-    _ReadWriteBarrier();
-    return to_return;
-}
-
-template <typename T, typename V>
-static inline void __TBB_machine_store_with_release(volatile T &location, V value) {
-    _ReadWriteBarrier();
-    location = value;
-}
-
-#define __TBB_load_with_acquire(L) __TBB_machine_load_with_acquire((L))
-#define __TBB_store_with_release(L,V) __TBB_machine_store_with_release((L),(V))
-
 
 #if !__INTEL_COMPILER
 extern "C" unsigned char _BitScanReverse64( unsigned long* i, unsigned __int64 w );
@@ -95,6 +82,10 @@ inline void __TBB_machine_OR( volatile void *operand, uintptr_t addend ) {
     InterlockedOr64((LONGLONG *)operand, addend); 
 }
 
+inline void __TBB_machine_AND( volatile void *operand, uintptr_t addend ) {
+    InterlockedAnd64((LONGLONG *)operand, addend); 
+}
+
 #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) InterlockedCompareExchange( (LONG *) P , V , C ) 
@@ -117,11 +108,8 @@ inline void __TBB_machine_OR( volatile void *operand, uintptr_t addend ) {
 #undef __TBB_Store8
 #undef __TBB_Load8
 
-#if __INTEL_COMPILER<1010
 #define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V)
-#else
-// icl 10.1 incorrectly compiles InterlockedOr64, so use default definition of __TBB_AtomicOR instead.
-#endif
+#define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V)
 
 // Definition of other functions
 #if !defined(_WIN32_WINNT)
diff --git a/include/tbb/machine/windows_ia32.h b/include/tbb/machine/windows_ia32.h
index 5fdae3d..65e4095 100644
--- a/include/tbb/machine/windows_ia32.h
+++ b/include/tbb/machine/windows_ia32.h
@@ -32,16 +32,25 @@
 
 #include <windows.h>
 
-#if !defined(__INTEL_COMPILER)
-#if _MSC_VER >= 1300
+#if defined(__INTEL_COMPILER)
+#define __TBB_fence_for_acquire() __asm { __asm nop }
+#define __TBB_fence_for_release() __asm { __asm nop }
+#elif _MSC_VER >= 1300
 extern "C" void _ReadWriteBarrier();
 #pragma intrinsic(_ReadWriteBarrier)
-#endif
+#define __TBB_fence_for_acquire() _ReadWriteBarrier()
+#define __TBB_fence_for_release() _ReadWriteBarrier()
 #endif
 
 #define __TBB_WORDSIZE 4
 #define __TBB_BIG_ENDIAN 0
 
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (push)
+    #pragma warning (disable: 4244 4267)
+#endif /* _MSC_VER && _Wp64 */
+
 extern "C" {
     __int64 __TBB_machine_cmpswp8 (volatile void *ptr, __int64 value, __int64 comparand );
     __int64 __TBB_machine_fetchadd8 (volatile void *ptr, __int64 addend );
@@ -54,20 +63,18 @@ extern "C" {
 template <typename T, size_t S>
 struct __TBB_machine_load_store {
     static inline T load_with_acquire(const volatile T& location) {
-#if !defined(__INTEL_COMPILER) && _MSC_VER >= 1300
         T to_return = location;
-        _ReadWriteBarrier();
+#ifdef __TBB_fence_for_acquire 
+        __TBB_fence_for_acquire();
+#endif /* __TBB_fence_for_acquire */
         return to_return;
-#else
-        return location;
-#endif
     }
 
-    static inline void store_with_release(T &location, T value) {
-#if !defined(__INTEL_COMPILER) && _MSC_VER >= 1300
-        _ReadWriteBarrier();
-#endif
-        const_cast<T volatile&>(location) = value;
+    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 */
+        location = value;
     }
 };
 
@@ -78,7 +85,7 @@ struct __TBB_machine_load_store<T,8> {
     }
 
     static inline void store_with_release(T &location, T value) {
-        __TBB_machine_store8((volatile void *)&location,(int64_t)value);
+        __TBB_machine_store8((volatile void *)&location,(__int64)value);
     }
 };
 
@@ -163,6 +170,15 @@ static inline void __TBB_machine_OR( volatile void *operand, unsigned __int32 ad
    }
 }
 
+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 
     {
@@ -197,6 +213,7 @@ static inline void __TBB_machine_pause (__int32 delay ) {
 #define __TBB_Store8(P,V) __TBB_machine_store8(P,V)
 #define __TBB_Load8(P) __TBB_machine_load8(P)
 #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)
@@ -222,3 +239,7 @@ static inline void __TBB_x86_cpuid( __int32 buffer[4], __int32 mode ) {
     }
 }
 
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (pop)
+#endif /* _MSC_VER && _Wp64 */
diff --git a/include/tbb/machine/windows_ia32_inline.h b/include/tbb/machine/windows_ia32_inline.h
index 9c25f81..861358e 100644
--- a/include/tbb/machine/windows_ia32_inline.h
+++ b/include/tbb/machine/windows_ia32_inline.h
@@ -119,6 +119,15 @@ static inline void __TBB_machine_OR( volatile void *operand, unsigned __int32 ad
    }
 }
 
+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 
     {
@@ -154,6 +163,7 @@ static inline void __TBB_machine_pause (__int32 delay ) {
 #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)
diff --git a/include/tbb/mutex.h b/include/tbb/mutex.h
index ec0d8f0..dee5f58 100644
--- a/include/tbb/mutex.h
+++ b/include/tbb/mutex.h
@@ -35,9 +35,6 @@
 // The following Windows API function is declared explicitly;
 // otherwise any user would have to specify /D_WIN32_WINNT=0x0400
 extern "C" BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION );
-#elif _WIN32_WINNT<0x0400
-// If earlier WINNT target is explicitly specified, no try_acquire is possible
-#define __TBB_mutex_NO_TRY_ACQUIRE
 #endif
 
 #else /* if not _WIN32||_WIN64 */
@@ -123,7 +120,6 @@ public:
 #endif /* TBB_DO_ASSERT */
         }
 
-#ifndef __TBB_mutex_NO_TRY_ACQUIRE
         //! Try acquire lock on given mutex.
         bool try_acquire( mutex& mutex ) {
 #if TBB_DO_ASSERT
@@ -140,7 +136,6 @@ public:
             return result;
 #endif /* TBB_DO_ASSERT */
         }
-#endif /* __TBB_mutex_NO_TRY_ACQUIRE */
 
         //! Release lock
         void release() {
@@ -170,12 +165,18 @@ public:
         void internal_release();
     };
 
+    // Mutex traits
+    static const bool is_rw_mutex = false;
+    static const bool is_recursive_mutex = false;
+    static const bool is_fair_mutex = false;
+
 private:
 #if _WIN32||_WIN64
     CRITICAL_SECTION impl;    
     enum state_t {
         INITIALIZED=0x1234,
-        DESTROYED=0x789A
+        DESTROYED=0x789A,
+        HELD=0x56CD
     } state;
 #else
     pthread_mutex_t impl;
diff --git a/include/tbb/parallel_do.h b/include/tbb/parallel_do.h
new file mode 100644
index 0000000..1613ca8
--- /dev/null
+++ b/include/tbb/parallel_do.h
@@ -0,0 +1,450 @@
+/*
+    Copyright 2005-2008 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_do_H
+#define __TBB_parallel_do_H
+
+#include "task.h"
+#include "aligned_space.h"
+#include <iterator>
+
+namespace tbb {
+
+//! @cond INTERNAL
+namespace internal {
+    template<typename Body, typename Item> class parallel_do_feeder_impl;
+    template<typename Body> class do_group_task;
+
+    //! Strips its template type argument from 'cv' and '&' qualifiers
+    template<typename T>
+    struct strip { typedef T type; };
+    template<typename T>
+    struct strip<T&> { typedef T type; };
+    template<typename T>
+    struct strip<const T&> { typedef T type; };
+    template<typename T>
+    struct strip<volatile T&> { typedef T type; };
+    template<typename T>
+    struct strip<const volatile T&> { typedef T type; };
+    // Most of the compilers remove cv-qualifiers from non-reference function argument types. 
+    // But unfortunately there are those that don't.
+    template<typename T>
+    struct strip<const T> { typedef T type; };
+    template<typename T>
+    struct strip<volatile T> { typedef T type; };
+    template<typename T>
+    struct strip<const volatile T> { typedef T type; };
+} // namespace internal
+//! @endcond
+
+//! Class the user supplied algorithm body uses to add new tasks
+/** \param Item Work item type **/
+template<typename Item>
+class parallel_do_feeder: internal::no_copy
+{
+    parallel_do_feeder() {}
+    virtual ~parallel_do_feeder () {}
+    virtual void internal_add( const Item& item ) = 0;
+    template<typename Body_, typename Item_> friend class internal::parallel_do_feeder_impl;
+public:
+    //! Add a work item to a running parallel_do.
+    void add( const Item& item ) {internal_add(item);}
+};
+
+//! @cond INTERNAL
+namespace internal {
+    //! For internal use only.
+    /** Selects one of the two possible forms of function call member operator.
+        @ingroup algorithms **/
+    template<class Body, typename Item>
+    class parallel_do_operator_selector
+    {
+        typedef parallel_do_feeder<Item> Feeder;
+        template<typename A1, typename A2, typename CvItem >
+        static void internal_call( const Body& obj, A1& arg1, A2&, void (Body::*)(CvItem) const ) {
+            obj(arg1);
+        }
+        template<typename A1, typename A2, typename CvItem >
+        static void internal_call( const Body& obj, A1& arg1, A2& arg2, void (Body::*)(CvItem, parallel_do_feeder<Item>&) const ) {
+            obj(arg1, arg2);
+        }
+
+    public:
+        template<typename A1, typename A2 >
+        static void call( const Body& obj, A1& arg1, A2& arg2 )
+        {
+            internal_call( obj, arg1, arg2, &Body::operator() );
+        }
+    };
+
+    //! For internal use only.
+    /** Executes one iteration of a do.
+        @ingroup algorithms */
+    template<typename Body, typename Item>
+    class do_iteration_task: public task
+    {
+        typedef parallel_do_feeder_impl<Body, Item> feeder_type;
+
+        Item my_value;
+        feeder_type& my_feeder;
+
+        do_iteration_task( const Item& value, feeder_type& feeder ) : 
+            my_value(value), my_feeder(feeder)
+        {}
+
+        /*override*/ 
+        task* execute()
+        {
+            parallel_do_operator_selector<Body, Item>::call(*my_feeder.my_body, my_value, my_feeder);
+            return NULL;
+        }
+
+        template<typename Body_, typename Item_> friend class parallel_do_feeder_impl;
+    }; // class do_iteration_task
+
+    template<typename Iterator, typename Body, typename Item>
+    class do_iteration_task_iter: public task
+    {
+        typedef parallel_do_feeder_impl<Body, Item> feeder_type;
+
+        Iterator my_iter;
+        feeder_type& my_feeder;
+
+        do_iteration_task_iter( const Iterator& iter, feeder_type& feeder ) : 
+            my_iter(iter), my_feeder(feeder)
+        {}
+
+        /*override*/ 
+        task* execute()
+        {
+            parallel_do_operator_selector<Body, Item>::call(*my_feeder.my_body, *my_iter, my_feeder);
+            return NULL;
+        }
+
+        template<typename Iterator_, typename Body_, typename Item_> friend class do_group_task_forward;    
+        template<typename Body_, typename Item_> friend class do_group_task_input;    
+        template<typename Iterator_, typename Body_, typename Item_> friend class do_task_iter;    
+    }; // class do_iteration_task_iter
+
+    //! For internal use only.
+    /** Implements new task adding procedure.
+        @ingroup algorithms **/
+    template<class Body, typename Item>
+    class parallel_do_feeder_impl : public parallel_do_feeder<Item>
+    {
+        /*override*/ 
+        void internal_add( const Item& item )
+        {
+            typedef do_iteration_task<Body, Item> iteration_type;
+
+            iteration_type& t = *new (task::self().allocate_additional_child_of(*my_barrier)) iteration_type(item, *this);
+
+            t.spawn( t );
+        }
+    public:
+        const Body* my_body;
+        empty_task* my_barrier;
+    }; // class parallel_do_feeder_impl
+
+
+    //! For internal use only
+    /** Unpacks a block of iterations.
+        @ingroup algorithms */
+    
+    template<typename Iterator, typename Body, typename Item>
+    class do_group_task_forward: public task
+    {
+        static const size_t max_arg_size = 4;         
+
+        typedef parallel_do_feeder_impl<Body, Item> feeder_type;
+
+        feeder_type& my_feeder;
+        Iterator my_first;
+        size_t my_size;
+        
+        do_group_task_forward( Iterator first, size_t size, feeder_type& feeder ) 
+            : my_feeder(feeder), my_first(first), my_size(size)
+        {}
+
+        /*override*/ task* execute()
+        {
+            typedef do_iteration_task_iter<Iterator, Body, Item> iteration_type;
+            __TBB_ASSERT( my_size>0, NULL );
+            task_list list;
+            task* t; 
+            size_t k=0; 
+            for(;;) {
+                t = new( allocate_child() ) iteration_type( my_first, my_feeder );
+                ++my_first;
+                if( ++k==my_size ) break;
+                list.push_back(*t);
+            }
+            set_ref_count(int(k+1));
+            spawn(list);
+            spawn_and_wait_for_all(*t);
+            return NULL;
+        }
+
+        template<typename Iterator_, typename Body_, typename _Item> friend class do_task_iter;
+    }; // class do_group_task_forward
+
+    template<typename Body, typename Item>
+    class do_group_task_input: public task
+    {
+        static const size_t max_arg_size = 4;         
+        
+        typedef parallel_do_feeder_impl<Body, Item> feeder_type;
+
+        feeder_type& my_feeder;
+        size_t my_size;
+        aligned_space<Item, max_arg_size> my_arg;
+
+        do_group_task_input( feeder_type& feeder ) 
+            : my_feeder(feeder), my_size(0)
+        {}
+
+        /*override*/ task* execute()
+        {
+            typedef do_iteration_task_iter<Item*, Body, Item> iteration_type;
+            __TBB_ASSERT( my_size>0, NULL );
+            task_list list;
+            task* t; 
+            size_t k=0; 
+            for(;;) {
+                t = new( allocate_child() ) iteration_type( my_arg.begin() + k, my_feeder );
+                if( ++k==my_size ) break;
+                list.push_back(*t);
+            }
+            set_ref_count(int(k+1));
+            spawn(list);
+            spawn_and_wait_for_all(*t);
+            return NULL;
+        }
+
+        ~do_group_task_input(){
+            for( size_t k=0; k<my_size; ++k)
+                (my_arg.begin() + k)->~Item();
+        }
+
+        template<typename Iterator_, typename Body_, typename Item_> friend class do_task_iter;
+    }; // class do_group_task_input
+    
+    //! For internal use only.
+    /** Gets block of iterations and packages them into a do_group_task.
+        @ingroup algorithms */
+    template<typename Iterator, typename Body, typename Item>
+    class do_task_iter: public task
+    {
+        //typedef typename std::iterator_traits<Iterator>::value_type Item;
+        typedef parallel_do_feeder_impl<Body, Item> feeder_type;
+
+    public:
+        do_task_iter( Iterator first, Iterator last , feeder_type& feeder ) : 
+            my_first(first), my_last(last), my_feeder(feeder)
+        {}
+    
+    private:
+        Iterator my_first;
+        Iterator my_last;
+        feeder_type& my_feeder;
+
+        /* Do not merge run(xxx) and run_xxx() methods. They are separated in order
+            to make sure that compilers will eliminate unused argument of type xxx
+            (that is will not put it on stack). The sole purpose of this argument 
+            is overload resolution.
+            
+            An alternative could be using template functions, but explicit specialization 
+            of member function templates is not supported for non specialized class 
+            templates. Besides template functions would always fall back to the least 
+            efficient variant (the one for input iterators) in case of iterators having 
+            custom tags derived from basic ones. */
+        /*override*/ task* execute()
+        {
+            typedef typename std::iterator_traits<Iterator>::iterator_category iterator_tag;
+            return run( (iterator_tag*)NULL );
+        }
+
+        /** This is the most restricted variant that operates on input iterators or
+            iterators with unknown tags (tags not derived from the standard ones). **/
+        inline task* run( void* ) { return run_for_input_iterator(); }
+        
+        task* run_for_input_iterator() {
+            typedef do_group_task_input<Body, Item> block_type;
+
+            block_type& t = *new( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(my_feeder);
+            size_t k=0; 
+            while( !(my_first == my_last) ) {
+                new (t.my_arg.begin() + k) Item(*my_first);
+                ++my_first;
+                if( ++k==block_type::max_arg_size ) {
+                    if ( !(my_first == my_last) )
+                        recycle_to_reexecute();
+                    break;
+                }
+            }
+            if( k==0 ) {
+                destroy(t);
+                return NULL;
+            } else {
+                t.my_size = k;
+                return &t;
+            }
+        }
+
+        inline task* run( std::forward_iterator_tag* ) { return run_for_forward_iterator(); }
+
+        task* run_for_forward_iterator() {
+            typedef do_group_task_forward<Iterator, Body, Item> block_type;
+
+            Iterator first = my_first;
+            size_t k=0; 
+            while( !(my_first==my_last) ) {
+                ++my_first;
+                if( ++k==block_type::max_arg_size ) {
+                    if ( !(my_first==my_last) )
+                        recycle_to_reexecute();
+                    break;
+                }
+            }
+            return k==0 ? NULL : new( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(first, k, my_feeder);
+        }
+        
+        inline task* run( std::random_access_iterator_tag* ) { return run_for_random_access_iterator(); }
+
+        task* run_for_random_access_iterator() {
+            typedef do_group_task_forward<Iterator, Body, Item> block_type;
+            typedef do_iteration_task_iter<Iterator, Body, Item> iteration_type;
+            
+            size_t k = static_cast<size_t>(my_last-my_first); 
+            if( k > block_type::max_arg_size ) {
+                Iterator middle = my_first + k/2;
+
+                empty_task& c = *new( allocate_continuation() ) empty_task;
+                do_task_iter& b = *new( c.allocate_child() ) do_task_iter(middle, my_last, my_feeder);
+                recycle_as_child_of(c);
+
+                my_last = middle;
+                c.set_ref_count(2);
+                c.spawn(b);
+                return this;
+            }else if( k != 0 ) {
+                task_list list;
+                task* t; 
+                size_t k1=0; 
+                for(;;) {
+                    t = new( allocate_child() ) iteration_type(my_first, my_feeder);
+                    ++my_first;
+                    if( ++k1==k ) break;
+                    list.push_back(*t);
+                }
+                set_ref_count(int(k+1));
+                spawn(list);
+                spawn_and_wait_for_all(*t);
+            }
+            return NULL;
+        }
+    }; // class do_task_iter
+
+    //! For internal use only.
+    /** Implements parallel iteration over a range.
+        @ingroup algorithms */
+    template<typename Iterator, typename Body, typename Item> 
+    void run_parallel_do( Iterator first, Iterator last, const Body& body )
+    {
+        typedef do_task_iter<Iterator, Body, Item> root_iteration_task;
+        parallel_do_feeder_impl<Body, Item> feeder;
+        feeder.my_body = &body;
+        feeder.my_barrier = new( task::allocate_root() ) empty_task();
+        __TBB_ASSERT(feeder.my_barrier, "root task allocation failed");
+
+        root_iteration_task &t = *new( feeder.my_barrier->allocate_child() ) root_iteration_task(first, last, feeder);
+
+        feeder.my_barrier->set_ref_count(2);
+        feeder.my_barrier->spawn_and_wait_for_all(t);
+
+        feeder.my_barrier->destroy(*feeder.my_barrier);
+    }
+
+    //! For internal use only.
+    /** Detects types of Body's operator function arguments.
+        @ingroup algorithms **/
+    template<typename Iterator, typename Body, typename Item> 
+    void select_parallel_do( Iterator first, Iterator last, const Body& body, void (Body::*)(Item) const )
+    {
+        run_parallel_do<Iterator, Body, typename strip<Item>::type>( first, last, body );
+    }
+
+    //! For internal use only.
+    /** Detects types of Body's operator function arguments.
+        @ingroup algorithms **/
+    template<typename Iterator, typename Body, typename Item, typename _Item> 
+    void select_parallel_do( Iterator first, Iterator last, const Body& body, void (Body::*)(Item, parallel_do_feeder<_Item>&) const )
+    {
+        run_parallel_do<Iterator, Body, typename strip<Item>::type>( first, last, body );
+    }
+
+} // namespace internal
+//! @endcond
+
+
+/** \page parallel_do_body_req Requirements on parallel_do body
+    Class \c Body implementing the concept of parallel_do body must define:
+    - \code 
+        B::operator()( 
+                cv_item_type item,
+                parallel_do_feeder<item_type>& feeder
+        ) const
+        
+        OR
+
+        B::operator()( cv_item_type& item ) const
+      \endcode                                                      Process item. 
+                                                                    May be invoked concurrently  for the same \c this but different \c item.
+                                                        
+    - \code item_type( const item_type& ) \endcode 
+                                                                    Copy a work item.
+    - \code ~item_type() \endcode                            Destroy a work item
+**/
+
+/** \name parallel_do
+    See also requirements on \ref parallel_do_body_req "parallel_do Body". **/
+//@{
+//! Parallel iteration over a range, with optional addition of more work.
+/** @ingroup algorithms */
+template<typename Iterator, typename Body> 
+void parallel_do( Iterator first, Iterator last, const Body& body )
+{
+    if ( first == last )
+        return;
+    internal::select_parallel_do( first, last, body, &Body::operator() );
+}
+//@}
+
+} // namespace 
+
+#endif /* __TBB_parallel_do_H */
diff --git a/include/tbb/parallel_for.h b/include/tbb/parallel_for.h
index e8dafd9..991a34f 100644
--- a/include/tbb/parallel_for.h
+++ b/include/tbb/parallel_for.h
@@ -40,78 +40,133 @@ namespace internal {
 
     //! Task type used in parallel_for
     /** @ingroup algorithms */
-    template<typename Range, typename Body, typename Partitioner=simple_partitioner>
+    template<typename Range, typename Body, typename Partitioner>
     class start_for: public task {
         Range my_range;
         const Body my_body;
-        Partitioner my_partitioner;
+        typename Partitioner::partition_type my_partition;
         /*override*/ task* execute();
-    public:
 
-        start_for( const Range& range, const Body& body, const Partitioner &partitioner ) :
+        //! Constructor for root task.
+        start_for( const Range& range, const Body& body, Partitioner& partitioner ) :
             my_range(range),    
             my_body(body),
-            my_partitioner(partitioner)
+            my_partition(partitioner)
+        {
+        }
+        //! Splitting constructor used to generate children.
+        /** this becomes left child.  Newly constructed object is right child. */
+        start_for( start_for& parent, split ) :
+            my_range(parent.my_range,split()),    
+            my_body(parent.my_body),
+            my_partition(parent.my_partition,split())
         {
+            my_partition.set_affinity(*this);
+        }
+        //! Update affinity info, if any.
+        /*override*/ void note_affinity( affinity_id id ) {
+            my_partition.note_affinity( id );
+        }
+    public:
+        static void run(  const Range& range, const Body& body, const Partitioner& partitioner ) {
+            if( !range.empty() ) {
+#if !__TBB_EXCEPTIONS || TBB_JOIN_OUTER_TASK_GROUP
+                start_for& a = *new(task::allocate_root()) start_for(range,body,const_cast<Partitioner&>(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;
+                start_for& a = *new(task::allocate_root(context)) start_for(range,body,const_cast<Partitioner&>(partitioner));
+#endif /* __TBB_EXCEPTIONS && !TBB_JOIN_OUTER_TASK_GROUP */
+                task::spawn_root_and_wait(a);
+            }
+        }
+#if __TBB_EXCEPTIONS
+        static void run(  const Range& range, const Body& body, const Partitioner& partitioner, task_group_context& context ) {
+            if( !range.empty() ) {
+                start_for& a = *new(task::allocate_root(context)) start_for(range,body,const_cast<Partitioner&>(partitioner));
+                task::spawn_root_and_wait(a);
+            }
         }
+#endif /* __TBB_EXCEPTIONS */
     };
 
     template<typename Range, typename Body, typename Partitioner>
     task* start_for<Range,Body,Partitioner>::execute() {
-        if( my_partitioner.should_execute_range(my_range, *this) ) {
+        if( !my_range.is_divisible() || my_partition.should_execute_range(*this) ) {
             my_body( my_range );
-            return NULL;
+            return my_partition.continue_after_execute_range(*this); 
         } else {
-            empty_task& c = *new( allocate_continuation() ) empty_task;
+            empty_task& c = *new( this->allocate_continuation() ) empty_task;
             recycle_as_child_of(c);
             c.set_ref_count(2);
-            start_for& b = *new( c.allocate_child() ) start_for(Range(my_range,split()),my_body,Partitioner(my_partitioner,split()));
-            c.spawn(b);
+            bool delay = my_partition.decide_whether_to_delay();
+            start_for& b = *new( c.allocate_child() ) start_for(*this,split());
+            my_partition.spawn_or_delay(delay,*this,b);
             return this;
         }
     } 
-
 } // namespace internal
 //! @endcond
 
 
-//! Parallel iteration over range.
-/** The body b must allow:                                      \n
-        b(r)                    Apply function to range r.      \n
-    r must define:                                              \n
-        r.is_divisible()        True if range should be divided \n
-        r.empty()               True if range is empty          \n
-        R r2(r,split())         Split range into r2 and r.      \n
-    @ingroup algorithms */ 
+// Requirements on Range concept are documented in blocked_range.h
+
+/** \page parallel_for_body_req Requirements on parallel_for body
+    Class \c Body implementing the concept of parallel_for body must define:
+    - \code Body::Body( const Body& ); \endcode                 Copy constructor
+    - \code Body::~Body(); \endcode                             Destructor
+    - \code void Body::operator()( Range& r ) const; \endcode   Function call operator applying the body to range \c r.
+**/
+
+/** \name parallel_for
+    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.
+/** @ingroup algorithms **/
 template<typename Range, typename Body>
-void parallel_for( const Range& range, const Body& body ) {
-    if( !range.empty() ) {
-        typedef typename internal::start_for<Range,Body> start_type;
-        start_type& a = *new(task::allocate_root()) start_type(range,body,simple_partitioner());
-        task::spawn_root_and_wait(a);
-    }
+void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner=simple_partitioner() ) {
+    internal::start_for<Range,Body,simple_partitioner>::run(range,body,partitioner);
 }
 
-//! Parallel iteration over range using a partitioner.
-/** The body b must allow:                                      \n
-        b(r)                    Apply function to range r.      \n
-    r must define:                                              \n
-        r.is_divisible()        True if range can be divided \n
-        r.empty()               True if range is empty          \n
-        R r2(r,split())         Split range into r2 and r.      \n
-    The partitioner p must define: \n
-        p.should_execute_range(r,t)   True if r should be executed to completion without further splits. \n  
-        P p2(p,split())               Split the partitioner into p2 and p.      \n
-    @ingroup algorithms */
-template<typename Range, typename Body, typename Partitioner>
-void parallel_for( const Range& range, const Body& body, const Partitioner &partitioner ) {
-    if( !range.empty() ) {
-        typedef typename internal::start_for<Range,Body,Partitioner> start_type;
-        start_type& a = *new(task::allocate_root()) start_type(range,body,partitioner);
-        task::spawn_root_and_wait(a);
-    }
+//! Parallel iteration over range with auto_partitioner.
+/** @ingroup algorithms **/
+template<typename Range, typename Body>
+void parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner ) {
+    internal::start_for<Range,Body,auto_partitioner>::run(range,body,partitioner);
+}
+
+//! Parallel iteration over range with affinity_partitioner.
+/** @ingroup algorithms **/
+template<typename Range, typename Body>
+void parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner ) {
+    internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner);
+}
+
+#if __TBB_EXCEPTIONS
+//! Parallel iteration over range with simple partitioner and user-supplied context.
+/** @ingroup algorithms **/
+template<typename Range, typename Body>
+void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner, task_group_context& context ) {
+    internal::start_for<Range,Body,simple_partitioner>::run(range, body, partitioner, context);
+}
+
+//! Parallel iteration over range with auto_partitioner and user-supplied context.
+/** @ingroup algorithms **/
+template<typename Range, typename Body>
+void parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner, task_group_context& context ) {
+    internal::start_for<Range,Body,auto_partitioner>::run(range, body, partitioner, context);
 }
 
+//! Parallel iteration over range with affinity_partitioner and user-supplied context.
+/** @ingroup algorithms **/
+template<typename Range, typename Body>
+void parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner, task_group_context& context ) {
+    internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner, context);
+}
+#endif /* __TBB_EXCEPTIONS */
+//@}
 
 } // namespace tbb
 
diff --git a/include/tbb/parallel_reduce.h b/include/tbb/parallel_reduce.h
index f4e9069..e01fd19 100644
--- a/include/tbb/parallel_reduce.h
+++ b/include/tbb/parallel_reduce.h
@@ -39,22 +39,44 @@ namespace tbb {
 //! @cond INTERNAL
 namespace internal {
 
+    //! ITT instrumented routine that stores src into location pointed to by dst.
+    void itt_store_pointer_with_release_v3( void* dst, void* src );
+
+    //! ITT instrumented routine that loads pointer from location pointed to by src.
+    void* itt_load_pointer_with_acquire_v3( const void* src );
+
+    template<typename T> inline void parallel_reduce_store_body( T*& dst, T* src ) {
+#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT
+        itt_store_pointer_with_release_v3(&dst,src);
+#else
+        __TBB_store_with_release(dst,src);
+#endif /* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */
+    }
+
+    template<typename T> inline T* parallel_reduce_load_body( T*& src ) {
+#if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT
+        return static_cast<T*>(itt_load_pointer_with_acquire_v3(&src));
+#else
+        return __TBB_load_with_acquire(src);
+#endif /* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */
+    }
+
     //! 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;
-        Body* right_zombie;
+        bool has_right_zombie;
         aligned_space<Body,1> zombie_space;
         finish_reduce( Body* body ) : 
             my_body(body),
-            right_zombie(NULL)
+            has_right_zombie(false)
         {
         }
         task* execute() {
-            if( Body* s = right_zombie ) {
+            if( has_right_zombie ) {
                 // Right child was stolen.
-                __TBB_ASSERT( my_body!=s, NULL );
+                Body* s = zombie_space.begin();
                 my_body->join( *s );
                 s->~Body();
             }
@@ -64,90 +86,258 @@ namespace internal {
         friend class start_reduce;
     };
 
-    //! Task type use to split the work of parallel_reduce.
+    //! Task type used to split the work of parallel_reduce.
     /** @ingroup algorithms */
-    template<typename Range, typename Body, typename Partitioner=simple_partitioner>
+    template<typename Range, typename Body, typename Partitioner>
     class start_reduce: public task {
         typedef finish_reduce<Body> finish_type;
         Body* my_body;
         Range my_range;
-        Partitioner my_partitioner;
+        typename Partitioner::partition_type my_partition;
         /*override*/ task* execute();
         template<typename Body_>
         friend class finish_reduce;
-    public:
+    
+        //! Constructor used for root task
         start_reduce( const Range& range, Body* body, const Partitioner &partitioner ) :
             my_body(body),
             my_range(range),
-            my_partitioner(partitioner)
+            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() {
-        Body* body = my_body;
-        if( is_stolen_task() ) {
-            finish_reduce<Body>* p = static_cast<finish_type*>(parent() );
-            body = new( p->zombie_space.begin() ) Body(*body,split());
-            my_body = p->right_zombie = body;
-        }
-        task* next_task = NULL;
-        if ( my_partitioner.should_execute_range(my_range, *this))
+        if( !my_range.is_divisible() || my_partition.should_execute_range(*this) ) {
             (*my_body)( my_range );
-        else {
-            finish_reduce<Body>& c = *new( allocate_continuation()) finish_type(body);
+            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(Range(my_range,split()), body, Partitioner(my_partitioner,split()));
-            c.spawn(b);
-            next_task = this;
+            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;
+
+    //! 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 {
+        //! 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 ) : 
+            my_body(NULL),
+            has_right_zombie(false),
+            my_context(context)
+        {
+        }
+        task* execute() {
+            if( has_right_zombie ) {
+                // Right child was stolen.
+                Body* s = zombie_space.begin();
+                my_body->join( *s );
+                s->~Body();
+            }
+            if( my_context==1 ) 
+                parallel_reduce_store_body( static_cast<finish_reduce_with_affinity*>(parent())->my_body, my_body );
+            return NULL;
+        }       
+        template<typename Range,typename Body_>
+        friend class start_reduce_with_affinity;
+    };
+
+    //! 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;
+        Body* my_body;
+        Range my_range;
+        typename affinity_partitioner::partition_type my_partition;
+        reduction_context my_context;
+        /*override*/ task* execute();
+        template<typename Body_>
+        friend class finish_reduce_with_affinity;
+    
+        //! Constructor used for root task
+        start_reduce_with_affinity( const Range& range, Body* body, affinity_partitioner& partitioner ) :
+            my_body(body),
+            my_range(range),
+            my_partition(partitioner),
+            my_context(0)
+        {
+        }
+        //! 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 ) :
+            my_body(parent.my_body),
+            my_range(parent.my_range,split()),
+            my_partition(parent.my_partition,split()),
+            my_context(2)
+        {
+            my_partition.set_affinity(*this);
+            parent.my_context = 1;
+        }
+        //! Update affinity info, if any
+        /*override*/ void note_affinity( affinity_id id ) {
+            my_partition.note_affinity( id );
+        }
+
+public:
+        static void run( const Range& range, Body& body, affinity_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) );
+#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) );
+#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 ) {
+            if( !range.empty() ) 
+                task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce_with_affinity(range,&body,partitioner) );
+        }
+#endif /* __TBB_EXCEPTIONS */
+    };
+
+    template<typename Range, typename Body>
+    task* start_reduce_with_affinity<Range,Body>::execute() {
+        if( my_context==2 ) {
+            finish_type* p = static_cast<finish_type*>(parent() );
+            if( !parallel_reduce_load_body(p->my_body) ) {
+                my_body = new( p->zombie_space.begin() ) Body(*my_body,split());
+                p->has_right_zombie = true;
+            } 
+        }
+        if( !my_range.is_divisible() || my_partition.should_execute_range(*this) ) {
+            (*my_body)( my_range );
+            if( my_context==1 ) 
+                parallel_reduce_store_body(static_cast<finish_type*>(parent())->my_body, my_body );
+            return my_partition.continue_after_execute_range(*this);
+        } else {
+            finish_type& c = *new( allocate_continuation()) finish_type(my_context);
+            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());
+            my_partition.spawn_or_delay(delay,*this,b);
+            return this;
         }
-        return next_task;
     } 
 } // namespace internal
 //! @endcond
 
+// Requirements on Range concept are documented in blocked_range.h
+
+/** \page parallel_reduce_body_req Requirements on parallel_reduce body
+    Class \c Body implementing the concept of parallel_reduce body must define:
+    - \code Body::Body( Body&, split ); \endcode        Splitting constructor.
+                                                        Must be able to run concurrently with operator() and method \c join
+    - \code Body::~Body(); \endcode                     Destructor
+    - \code void Body::operator()( Range& r ); \endcode Function call operator applying body to range \c r
+                                                        and accumulating the result
+    - \code void Body::join( Body& b ); \endcode        Join results. 
+                                                        The result in \c b should be merged into the result of \c this
+**/
 
-//! Parallel iteration with reduction
-/** 
-  * Type Body must have the following signatures: \n
-  *     operator()( const Range& r ); \n
-  *     Body( Body& b, split );  (be aware that b may have concurrent accesses) \n
-  *     void join( Body& ); \n
-  *     ~Body
-  * @ingroup algorithms
-  */
+/** \name parallel_reduce
+    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 default partitioner if no partitioner is specified.
+/** @ingroup algorithms **/
 template<typename Range, typename Body>
-void parallel_reduce( const Range& range, Body& body ) {
-    if( !range.empty() ) {
-        typedef typename internal::start_reduce<Range,Body> start_type;
-        start_type& a = *new(task::allocate_root()) start_type(range,&body,simple_partitioner());
-        task::spawn_root_and_wait( a );
-    }
+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 );
 }
 
-//! Parallel iteration with reduction using a partitioner.
-/** 
-  * Type Body must have the following signatures: \n
-  *     operator()( const Range& r ); \n
-  *     Body( Body& b, split );  (be aware that b may have concurrent accesses) \n
-  *     void join( Body& ); \n
-  *     ~Body
-  * The partitioner p must define: \n
-  *     p.should_execute_range(r,t)   True if r should be executed to completion without further splits. \n
-  *     P p2(p,split())               Split the partitioner into p2 and p.      \n
-  * @ingroup algorithms
-  */
-template<typename Range, typename Body, typename Partitioner>
-void parallel_reduce( const Range& range, Body& body, const Partitioner &partitioner ) {
-    if( !range.empty() ) {
-        typedef typename internal::start_reduce<Range,Body,Partitioner> start_type;
-        start_type& a = *new(task::allocate_root()) start_type(range,&body,partitioner);
-        task::spawn_root_and_wait( a );
-    }
+//! 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 );
+}
+
+//! Parallel iteration with reduction and auto_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 );
 }
 
+#if __TBB_EXCEPTIONS
+//! Parallel iteration with reduction, simple partitioner and user-supplied context.
+/** @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 );
+}
+
+//! 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 );
+}
+
+//! 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 );
+}
+#endif /* __TBB_EXCEPTIONS */
+//@}
 
 } // namespace tbb
 
diff --git a/include/tbb/parallel_scan.h b/include/tbb/parallel_scan.h
index 9a1ab92..8868c20 100644
--- a/include/tbb/parallel_scan.h
+++ b/include/tbb/parallel_scan.h
@@ -198,24 +198,59 @@ namespace internal {
         bool is_final;
         bool is_right_child;
         Range range;
-        Partitioner partitioner;
+        typename Partitioner::partition_type partition;
         /*override*/ task* execute();
     public:
-        start_scan( 
-            sum_node_type*& return_slot_, const Range& range_, final_sum_type& body_, const Partitioner& partitioner_,
-            final_sum_type**sum_, bool is_final_, sum_node_type* parent_sum_ 
-        ) :
-            body(&body_),
-            sum(sum_),
+        start_scan( sum_node_type*& return_slot_, start_scan& parent, sum_node_type* parent_sum_ ) :
+            body(parent.body),
+            sum(parent.sum),
             return_slot(&return_slot_),
             parent_sum(parent_sum_),
-            is_final(is_final_),
+            is_final(parent.is_final),
+            is_right_child(false),
+            range(parent.range,split()),
+            partition(parent.partition,split())
+        {
+            __TBB_ASSERT( !*return_slot, NULL );
+        }
+
+        start_scan( sum_node_type*& return_slot_, const Range& range_, final_sum_type& body_, const Partitioner& partitioner_) :
+            body(&body_),
+            sum(NULL),
+            return_slot(&return_slot_),
+            parent_sum(NULL),
+            is_final(true),
             is_right_child(false),
             range(range_),
-            partitioner(partitioner_)
+            partition(partitioner_)
         {
             __TBB_ASSERT( !*return_slot, NULL );
         }
+
+        static void run(  const Range& range, Body& body, const Partitioner& partitioner ) {
+            if( !range.empty() ) {
+                typedef internal::start_scan<Range,Body,Partitioner> start_pass1_type;
+                internal::sum_node<Range,Body>* root = NULL;
+                typedef internal::final_sum<Range,Body> final_sum_type;
+                final_sum_type* temp_body = new(task::allocate_root()) final_sum_type( body );
+                start_pass1_type& pass1 = *new(task::allocate_root()) start_pass1_type(
+                    /*return_slot=*/root,
+                    range,
+                    *temp_body,
+                    partitioner );
+                task::spawn_root_and_wait( pass1 );
+                if( root ) {
+                    root->body = temp_body;
+                    root->incoming = NULL;
+                    root->stuff_last = &body;
+                    task::spawn_root_and_wait( *root );
+                } else {
+                    body.assign(temp_body->body);
+                    temp_body->finish_construction( range, NULL );
+                    temp_body->destroy(*temp_body);
+                }
+            }
+        }
     };
 
     template<typename Range, typename Body, typename Partitioner>
@@ -232,7 +267,7 @@ namespace internal {
             is_final = false;
         }
         task* next_task = NULL;
-        if( is_right_child && !treat_as_stolen || partitioner.should_execute_range(range, *this) ) {
+        if( (is_right_child && !treat_as_stolen) || !range.is_divisible() || partition.should_execute_range(*this) ) {
             if( is_final )
                 (body->body)( range, final_scan_tag() );
             else if( sum )
@@ -248,14 +283,7 @@ namespace internal {
                 result = new(task::allocate_root()) sum_node_type(range,/*left_is_final=*/is_final);
             finish_pass1_type& c = *new( allocate_continuation()) finish_pass1_type(*return_slot,sum,*result);
             // Split off right child
-            start_scan& b = *new( c.allocate_child() ) start_scan(
-                /*return_slot=*/result->right,
-                /*range=*/Range(range,split()),
-                /*body=*/ *body,
-                /*partitioner=*/ Partitioner(partitioner,split()),
-                sum,
-                is_final,
-                result);
+            start_scan& b = *new( c.allocate_child() ) start_scan( /*return_slot=*/result->right, *this, result );
             b.is_right_child = true;    
             // Left child is recycling of *this.  Must recycle this before spawning b, 
             // otherwise b might complete and decrement c.ref_count() to zero, which
@@ -275,64 +303,40 @@ namespace internal {
 } // namespace internal
 //! @endcond
 
-//! Parallel prefix
-/**
-  * Type Body must have the following signatures: \n
-  *     void operator( const Range& r, pre_scan_tag ); \n
-  *     void operator( const Range& r, final_scan_tag ); \n
-  *     Body( const Body& b, split );  (be aware that b may have concurrent accesses) \n
-  *     void reverse_join( const Body& ); \n
-  *     void assign( const Body& ); \n
-  *     ~Body \n
-  * The partitioner p must define: \n
-  *     p.should_execute_range(r,t)   True if r should be executed to completion without further splits. \n
-  *     P p2(p,split())               Split the partitioner into p2 and p.      \n
-  * @ingroup algorithms
-  */
-template<typename Range, typename Body, typename Partitioner>
-void parallel_scan( const Range& range, Body& body, const Partitioner& partitioner ) {
-    if( !range.empty() ) {
-        typedef internal::start_scan<Range,Body,Partitioner> start_pass1_type;
-        internal::sum_node<Range,Body>* root = NULL;
-        typedef internal::final_sum<Range,Body> final_sum_type;
-        final_sum_type* temp_body = new(task::allocate_root()) final_sum_type( body );
-        start_pass1_type& pass1 = *new(task::allocate_root()) start_pass1_type(
-            /*return_slot=*/root,
-            range,
-            *temp_body,
-            partitioner,
-            /*sum=*/NULL,
-            /*is_final=*/true,
-            /*parent_sum=*/NULL);
-        task::spawn_root_and_wait( pass1 );
-        if( root ) {
-            root->body = temp_body;
-            root->incoming = NULL;
-            root->stuff_last = &body;
-            task::spawn_root_and_wait( *root );
-        } else {
-            body.assign(temp_body->body);
-            temp_body->finish_construction( range, NULL );
-            temp_body->destroy(*temp_body);
-        }
-    }
+// Requirements on Range concept are documented in blocked_range.h
+
+/** \page parallel_scan_body_req Requirements on parallel_scan body
+    Class \c Body implementing the concept of parallel_reduce body must define:
+    - \code Body::Body( Body&, split ); \endcode    Splitting constructor.
+                                                    Split \c b so that \c this and \c b can accumulate separately
+    - \code Body::~Body(); \endcode                 Destructor
+    - \code void Body::operator()( const Range& r, pre_scan_tag ); \endcode
+                                                    Preprocess iterations for range \c r
+    - \code void Body::operator()( const Range& r, final_scan_tag ); \endcode 
+                                                    Do final processing for iterations of range \c r
+    - \code void Body::reverse_join( Body& a ); \endcode
+                                                    Merge preprocessing state of \c a into \c this, where \c a was 
+                                                    created earlier from \c b by b's splitting constructor
+**/
+
+/** \name parallel_scan
+    See also requirements on \ref range_req "Range" and \ref parallel_scan_body_req "parallel_scan Body". **/
+//@{
+
+//! 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() ) {
+    internal::start_scan<Range,Body,simple_partitioner>::run(range,body,partitioner);
 }
 
-//! Parallel prefix with default partitioner
-/** 
-  * Type Body must have the following signatures: \n
-  *     void operator( const Range& r, pre_scan_tag ); \n
-  *     void operator( const Range& r, final_scan_tag ); \n
-  *     Body( const Body& b, split );  (be aware that b may have concurrent accesses) \n
-  *     void reverse_join( const Body& ); \n
-  *     void assign( const Body& ); \n
-  *     ~Body
-  * @ingroup algorithms
-  */
+//! Parallel prefix with auto_partitioner
+/** @ingroup algorithms **/
 template<typename Range, typename Body>
-inline void parallel_scan( const Range& range, Body& body ) {
-    parallel_scan( range, body, simple_partitioner() );
+void parallel_scan( const Range& range, Body& body, const auto_partitioner& partitioner ) {
+    internal::start_scan<Range,Body,auto_partitioner>::run(range,body,partitioner);
 }
+//@}
 
 } // namespace tbb
 
diff --git a/include/tbb/parallel_sort.h b/include/tbb/parallel_sort.h
index 5b154be..de7b244 100644
--- a/include/tbb/parallel_sort.h
+++ b/include/tbb/parallel_sort.h
@@ -112,11 +112,21 @@ void parallel_quick_sort( RandomAccessIterator begin, RandomAccessIterator end,
 } // namespace internal
 //! @endcond
 
+/** \page parallel_sort_iter_req Requirements on iterators for parallel_sort
+    Requirements on value type \c T of \c RandomAccessIterator for \c parallel_sort:
+    - \code void swap( T& x, T& y ) \endcode        Swaps \c x and \c y
+    - \code bool Compare::operator()( const T& x, const T& y ) \endcode
+                                                    True if x comes before y;
+**/
+
+/** \name parallel_sort
+    See also requirements on \ref parallel_sort_iter_req "iterators for parallel_sort". **/
+//@{
+
 //! Sorts the data in [begin,end) using the given comparator 
-/*! The compare function object is used for all comparisons between elements during sorting.
+/** The compare function object is used for all comparisons between elements during sorting.
     The compare object must define a bool operator() function.
-    @ingroup algorithms
-*/
+    @ingroup algorithms **/
 template<typename RandomAccessIterator, typename Compare>
 void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp) { 
     const int min_parallel_size = 500; 
@@ -129,23 +139,20 @@ void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const
     }
 }
 
-//! Sorts the data in [begin,end) with a default comparator 
-/*! The std::less<RandomAccessIterator> class is used for all comparisons during sorting.
-    @ingroup algorithms
-*/
+//! Sorts the data in [begin,end) with a default comparator \c std::less<RandomAccessIterator>
+/** @ingroup algorithms **/
 template<typename RandomAccessIterator>
 inline void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end ) { 
     parallel_sort( begin, end, std::less< typename std::iterator_traits<RandomAccessIterator>::value_type >() );
 }
 
-//! Sorts the data in [begin,end) with a default comparator 
-/*! The std::less<RandomAccessIterator> class is used for all comparisons during sorting.
-    @ingroup algorithms
-*/
+//! Sorts the data in the range \c [begin,end) with a default comparator \c std::less<T>
+/** @ingroup algorithms **/
 template<typename T>
 inline void parallel_sort( T * begin, T * end ) {
     parallel_sort( begin, end, std::less< T >() );
 }   
+//@}
 
 
 } // namespace tbb
diff --git a/include/tbb/parallel_while.h b/include/tbb/parallel_while.h
index a78a1e5..12aa987 100644
--- a/include/tbb/parallel_while.h
+++ b/include/tbb/parallel_while.h
@@ -157,7 +157,6 @@ public:
     template<typename Stream>
     void run( Stream& stream, const Body& body );
 
-
     //! Add a work item while running.
     /** Should be executed only by body.apply or a thread spawned therefrom. */
     void add( const value_type& item );
@@ -175,7 +174,6 @@ void parallel_while<Body>::run( Stream& stream, const Body& body ) {
     my_body = &body;
     my_barrier = &barrier;
     my_barrier->set_ref_count(2);
-
     while_task<Stream,Body>& w = *new( my_barrier->allocate_child() ) while_task<Stream,Body>( stream, body, barrier );
     my_barrier->spawn_and_wait_for_all(w);
     my_barrier->destroy(*my_barrier);
@@ -183,7 +181,6 @@ void parallel_while<Body>::run( Stream& stream, const Body& body ) {
     my_body = NULL;
 }
 
- 
 template<typename Body>
 void parallel_while<Body>::add( const value_type& item ) {
     __TBB_ASSERT(my_barrier,"attempt to add to parallel_while that is not running");
diff --git a/include/tbb/partitioner.h b/include/tbb/partitioner.h
index 3300580..ebf07e6 100644
--- a/include/tbb/partitioner.h
+++ b/include/tbb/partitioner.h
@@ -32,10 +32,52 @@
 #include "task.h"
 
 namespace tbb {
+class affinity_partitioner;
 
+//! @cond INTERNAL
 namespace internal {
 size_t get_initial_auto_partitioner_divisor();
-}
+
+//! Defines entry points into tbb run-time library;
+/** The entry points are the constructor and destructor. */
+class affinity_partitioner_base_v3: no_copy {
+    friend class tbb::affinity_partitioner;
+    //! Array that remembers affinities of tree positions to affinity_id.
+    /** NULL if my_size==0. */
+    affinity_id* my_array;
+    //! Number of elements in my_array.
+    size_t my_size;
+    //! Zeros the fields.
+    affinity_partitioner_base_v3() : my_array(NULL), my_size(0) {}
+    //! Deallocates my_array.
+    ~affinity_partitioner_base_v3() {resize(0);}
+    //! Resize my_array.
+    /** Retains values if resulting size is the same. */
+    void resize( unsigned factor );
+    friend class affinity_partition_type;
+};
+
+//! Provides default methods for partition objects without affinity.
+class partition_type_base {
+public:
+    void set_affinity( task &t ) {}
+    void note_affinity( task::affinity_id id ) {}
+    task* continue_after_execute_range( task& t ) {return NULL;}
+    bool decide_whether_to_delay() {return false;}
+    void spawn_or_delay( bool, task& a, task& b ) {
+        a.spawn(b);
+    }
+};
+
+class affinity_partition_type;
+
+template<typename Range, typename Body, typename Partitioner> class start_for;
+template<typename Range, typename Body, typename Partitioner> class start_reduce;
+template<typename Range, typename Body> class start_reduce_with_affinity;
+template<typename Range, typename Body, typename Partitioner> class start_scan;
+
+} // namespace internal
+//! @endcond
 
 //! A simple partitioner 
 /** Divides the range until the range is not divisible. 
@@ -43,12 +85,17 @@ size_t get_initial_auto_partitioner_divisor();
 class simple_partitioner {
 public:
     simple_partitioner() {}
-    simple_partitioner(simple_partitioner &partitioner, split) {}
-
-    template <typename Range>
-    inline bool should_execute_range(const Range &r, const task &t) {
-        return !r.is_divisible();
-    }
+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, typename Partitioner> friend class internal::start_scan;
+
+    class partition_type: public internal::partition_type_base {
+    public:
+        bool should_execute_range(const task &t) {return false;}
+        partition_type( const simple_partitioner& sp ) {}
+        partition_type( const partition_type&, split ) {}
+    };
 };
 
 //! An auto partitioner 
@@ -56,25 +103,117 @@ public:
     Chunks are further subdivided into VICTIM_CHUNKS pieces if they are stolen and divisible.
     @ingroup algorithms */
 class auto_partitioner {
-    size_t num_chunks;
+public:
+    auto_partitioner() {}
+
+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, typename Partitioner> friend class internal::start_scan;
+
+    class partition_type: public internal::partition_type_base {
+        size_t num_chunks;
+        static const size_t VICTIM_CHUNKS = 4;
+public:
+        bool should_execute_range(const task &t) {
+            if( num_chunks<VICTIM_CHUNKS && t.is_stolen_task() )
+                num_chunks = VICTIM_CHUNKS;
+            return num_chunks==1;
+        }
+        partition_type( const auto_partitioner& ap ) : num_chunks(internal::get_initial_auto_partitioner_divisor()) {}
+        partition_type( partition_type& pt, split ) {
+            num_chunks = pt.num_chunks /= 2u;
+        }
+    };
+};
+
+//! An affinity partitioner
+class affinity_partitioner: private internal::affinity_partitioner_base_v3 {
+public:
+    affinity_partitioner() {}
+
+private:
+    template<typename Range, typename Body, typename Partitioner> friend class internal::start_for;
+    template<typename Range, typename Body> friend class internal::start_reduce_with_affinity;
+    template<typename Range, typename Body, typename Partitioner> friend class internal::start_scan;
+
+    typedef internal::affinity_partition_type partition_type;
+    friend class internal::affinity_partition_type;
+};
+
+//! @cond INTERNAL
+namespace internal {
+
+class affinity_partition_type: public no_copy {
+    //! Must be power of two
+    static const unsigned factor = 16;
     static const size_t VICTIM_CHUNKS = 4;
 
+    internal::affinity_id* my_array;
+    task_list delay_list;
+    unsigned map_begin, map_end;
+    size_t num_chunks;
 public:
-    auto_partitioner() : num_chunks(internal::get_initial_auto_partitioner_divisor())  {
+    affinity_partition_type( affinity_partitioner& ap ) {
+        __TBB_ASSERT( (factor&(factor-1))==0, "factor must be power of two" ); 
+        ap.resize(factor);
+        my_array = ap.my_array;
+        map_begin = 0;
+        map_end = unsigned(ap.my_size);
+        num_chunks = internal::get_initial_auto_partitioner_divisor();
     }
-
-    auto_partitioner(auto_partitioner &partitioner, split) : num_chunks(partitioner.num_chunks/2) {
-        partitioner.num_chunks /= 2;
+    affinity_partition_type(affinity_partition_type& p, split) : my_array(p.my_array) {
+        __TBB_ASSERT( p.map_end-p.map_begin<factor || (p.map_end-p.map_begin)%factor==0, NULL );
+        num_chunks = p.num_chunks /= 2;
+        unsigned e = p.map_end;
+        unsigned d = (e - p.map_begin)/2;
+        if( d>factor ) 
+            d &= 0u-factor;
+        map_end = e;
+        map_begin = p.map_end = e-d;
     }
 
-    template <typename Range>
-    inline bool should_execute_range(const Range &r, const task &t) {
-        if (t.is_stolen_task() && num_chunks < VICTIM_CHUNKS)
+    bool should_execute_range(const task &t) {
+        if( num_chunks < VICTIM_CHUNKS && t.is_stolen_task() )
             num_chunks = VICTIM_CHUNKS;
-        return !r.is_divisible() || num_chunks == 1;
+        return num_chunks == 1;
+    }
+
+    void set_affinity( task &t ) {
+        if( map_begin<map_end )
+            t.set_affinity( my_array[map_begin] );
+    }
+    void note_affinity( task::affinity_id id ) {
+        if( map_begin<map_end ) 
+            my_array[map_begin] = id;
+    }
+    task* continue_after_execute_range( task& t ) {
+        task* first = NULL;
+        if( !delay_list.empty() ) {
+            first = &delay_list.pop_front();
+            while( !delay_list.empty() ) {
+                t.spawn(*first);
+                first = &delay_list.pop_front();
+            }
+        }
+        return first;
+    }
+    bool decide_whether_to_delay() {
+        // The possible underflow caused by "-1u" is deliberate
+        return (map_begin&(factor-1))==0 && map_end-map_begin-1u<factor;
+    }
+    void spawn_or_delay( bool delay, task& a, task& b ) {
+        if( delay )  
+            delay_list.push_back(b);
+        else 
+            a.spawn(b);
     }
 };
 
-}
+} // namespace internal
+//! @endcond
+
+
+} // namespace tbb
 
-#endif
+#endif /* __TBB_partitioner_H */
diff --git a/include/tbb/pipeline.h b/include/tbb/pipeline.h
index 41f5f74..95b164f 100644
--- a/include/tbb/pipeline.h
+++ b/include/tbb/pipeline.h
@@ -40,6 +40,13 @@ class filter;
 
 //! @cond INTERNAL
 namespace internal {
+const unsigned char IS_SERIAL = 0x1;
+const unsigned char SERIAL_MODE_MASK = 0x1; // the lowest bit 0 is for parallel vs. serial 
+
+// The argument for PIPELINE_VERSION should be an integer between 2 and 9
+#define __TBB_PIPELINE_VERSION(x) (unsigned char)(x-2)<<1
+const unsigned char VERSION_MASK = 0x7<<1; // bits 1-3 are for version
+const unsigned char CURRENT_VERSION = __TBB_PIPELINE_VERSION(3);
 
 typedef unsigned long Token;
 typedef long tokendiff_t;
@@ -56,14 +63,34 @@ private:
     //! Value used to mark "not in pipeline"
     static filter* not_in_pipeline() {return reinterpret_cast<filter*>(internal::intptr(-1));}
 protected:
+    //! For pipeline version 2 and earlier 0 is parallel and 1 is serial mode
+    enum mode {
+        parallel = internal::CURRENT_VERSION,
+        serial = internal::CURRENT_VERSION | internal::IS_SERIAL
+    };
+
     filter( bool is_serial_ ) : 
         next_filter_in_pipeline(not_in_pipeline()),
         input_buffer(NULL),
-        my_is_serial(is_serial_)
+        my_filter_mode(static_cast<unsigned char>(is_serial_ ? serial : parallel)),
+        prev_filter_in_pipeline(not_in_pipeline()),
+        my_pipeline(NULL)
+    {}
+    
+    filter( mode filter_mode ) :
+        next_filter_in_pipeline(not_in_pipeline()),
+        input_buffer(NULL),
+        my_filter_mode(static_cast<unsigned char>(filter_mode)),
+        prev_filter_in_pipeline(not_in_pipeline()),
+        my_pipeline(NULL)
     {}
+
+
 public:
     //! True if filter must receive stream in order.
-    bool is_serial() const {return my_is_serial;}
+    bool is_serial() const {
+        return (my_filter_mode & internal::SERIAL_MODE_MASK) == internal::IS_SERIAL;
+    }  
 
     //! Operate on an item from the input stream, and return item for output stream.
     /** Returns NULL if filter is a sink. */
@@ -84,7 +111,13 @@ private:
     friend class pipeline;
 
     //! Internal storage for is_serial()
-    bool my_is_serial;
+    const unsigned char my_filter_mode;
+
+    //! Pointer to previous filter in the pipeline.
+    filter* prev_filter_in_pipeline;
+
+    //! Pointer to the pipeline
+    pipeline* my_pipeline;
 };
 
 //! A processing pipeling that applies filters to items.
@@ -98,7 +131,7 @@ public:
     virtual ~pipeline();
 
     //! Add filter to end of pipeline.
-    void add_filter( filter& filter );
+    void add_filter( filter& filter_ );
 
     //! Run the pipeline to completion.
     void run( size_t max_number_of_live_tokens );
@@ -108,12 +141,13 @@ public:
 
 private:
     friend class internal::stage_task;
+    friend class filter;
 
     //! Pointer to first filter in the pipeline.
     filter* filter_list;
 
     //! Pointer to location where address of next filter to be added should be stored.
-    filter** filter_end;
+    filter* filter_end;
 
     //! task who's reference count is used to determine when all stages are done.
     empty_task* end_counter;
@@ -127,6 +161,9 @@ private:
     //! False until fetch_input returns NULL.
     bool end_of_input;
 
+    //! Remove filter from pipeline.
+    void remove_filter( filter& filter_ );
+
     //! Not used, but retained to satisfy old export files.
     void inject_token( task& self );
 };
diff --git a/include/tbb/queuing_mutex.h b/include/tbb/queuing_mutex.h
index 5c2b736..d55706e 100644
--- a/include/tbb/queuing_mutex.h
+++ b/include/tbb/queuing_mutex.h
@@ -94,6 +94,11 @@ public:
         internal::uintptr going;
     };
 
+    // Mutex traits
+    static const bool is_rw_mutex = false;
+    static const bool is_recursive_mutex = false;
+    static const bool is_fair_mutex = true;
+
     friend class scoped_lock;
 private:
     //! The last competitor requesting the lock
diff --git a/include/tbb/queuing_rw_mutex.h b/include/tbb/queuing_rw_mutex.h
index 0b56a7b..0d568d2 100644
--- a/include/tbb/queuing_rw_mutex.h
+++ b/include/tbb/queuing_rw_mutex.h
@@ -153,6 +153,11 @@ public:
         void unblock_or_wait_on_internal_lock( uintptr_t );
     };
 
+    // Mutex traits
+    static const bool is_rw_mutex = true;
+    static const bool is_recursive_mutex = false;
+    static const bool is_fair_mutex = true;
+
 private:
     //! The last competitor requesting the lock
     atomic<scoped_lock*> q_tail;
diff --git a/include/tbb/mutex.h b/include/tbb/recursive_mutex.h
similarity index 72%
copy from include/tbb/mutex.h
copy to include/tbb/recursive_mutex.h
index ec0d8f0..d2be281 100644
--- a/include/tbb/mutex.h
+++ b/include/tbb/recursive_mutex.h
@@ -26,54 +26,61 @@
     the GNU General Public License.
 */
 
-#ifndef __TBB_mutex_H
-#define __TBB_mutex_H
+#ifndef __TBB_recursive_mutex_H
+#define __TBB_recursive_mutex_H
 
 #if _WIN32||_WIN64
+
 #include <windows.h>
 #if !defined(_WIN32_WINNT)
 // The following Windows API function is declared explicitly;
 // otherwise any user would have to specify /D_WIN32_WINNT=0x0400
 extern "C" BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION );
-#elif _WIN32_WINNT<0x0400
-// If earlier WINNT target is explicitly specified, no try_acquire is possible
-#define __TBB_mutex_NO_TRY_ACQUIRE
 #endif
 
 #else /* if not _WIN32||_WIN64 */
+
 #include <pthread.h>
 namespace tbb { namespace internal {
 // Use this internal TBB function to throw an exception
-extern void handle_perror( int error_code, const char* what );
+  extern void handle_perror( int error_code, const char* what );
 } } //namespaces
+
 #endif /* _WIN32||_WIN64 */
 
 #include <stdio.h>
 #include "tbb_stddef.h"
 
 namespace tbb {
-
-//! Wrapper around the platform's native reader-writer lock.
-/** For testing purposes only.
+//! Mutex that allows recursive mutex acquisition.
+/** Mutex that allows recursive mutex acquisition.
     @ingroup synchronization */
-class mutex {
+class recursive_mutex {
 public:
-    //! Construct unacquired mutex.
-    mutex() {
+    //! Construct unacquired recursive_mutex.
+    recursive_mutex() {
 #if TBB_DO_ASSERT
-    internal_construct();
+        internal_construct();
 #else
   #if _WIN32||_WIN64
         InitializeCriticalSection(&impl);
   #else
-        int error_code = pthread_mutex_init(&impl,NULL);
+        pthread_mutexattr_t mtx_attr;
+        int error_code = pthread_mutexattr_init( &mtx_attr );
         if( error_code )
-            tbb::internal::handle_perror(error_code,"mutex: pthread_mutex_init failed");
+            tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutexattr_init failed");
+
+        pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE );
+        error_code = pthread_mutex_init( &impl, &mtx_attr );
+        if( error_code )
+            tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutex_init failed");
+
+        pthread_mutexattr_destroy( &mtx_attr );
   #endif /* _WIN32||_WIN64*/
 #endif /* TBB_DO_ASSERT */
     };
 
-    ~mutex() {
+    ~recursive_mutex() {
 #if TBB_DO_ASSERT
         internal_destroy();
 #else
@@ -94,12 +101,12 @@ public:
         It also nicely provides the "node" for queuing locks. */
     class scoped_lock : private internal::no_copy {
     public:
-        //! Construct lock that has not acquired a mutex. 
+        //! Construct lock that has not acquired a recursive_mutex. 
         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( mutex& mutex ) {
+        scoped_lock( recursive_mutex& mutex ) {
             acquire( mutex );
         }
 
@@ -110,24 +117,23 @@ public:
         }
 
         //! Acquire lock on given mutex.
-        void acquire( mutex& mutex ) {
+        void acquire( recursive_mutex& mutex ) {
 #if TBB_DO_ASSERT
-            internal_acquire(mutex);
+            internal_acquire( mutex );
 #else
             my_mutex = &mutex;
   #if _WIN32||_WIN64
             EnterCriticalSection(&mutex.impl);
   #else
-            pthread_mutex_lock(&mutex.impl);
+            pthread_mutex_lock( &mutex.impl );
   #endif /* _WIN32||_WIN64 */
 #endif /* TBB_DO_ASSERT */
         }
 
-#ifndef __TBB_mutex_NO_TRY_ACQUIRE
-        //! Try acquire lock on given mutex.
-        bool try_acquire( mutex& mutex ) {
+        //! Try acquire lock on given recursive_mutex.
+        bool try_acquire( recursive_mutex& mutex ) {
 #if TBB_DO_ASSERT
-            return internal_try_acquire (mutex);
+            return internal_try_acquire( mutex );
 #else
             bool result;
   #if _WIN32||_WIN64
@@ -137,10 +143,10 @@ public:
   #endif /* _WIN32||_WIN64 */
             if( result )
                 my_mutex = &mutex;
+
             return result;
 #endif /* TBB_DO_ASSERT */
         }
-#endif /* __TBB_mutex_NO_TRY_ACQUIRE */
 
         //! Release lock
         void release() {
@@ -157,25 +163,30 @@ public:
         }
 
     private:
-        //! The pointer to the current mutex to work
-        mutex* my_mutex;
+        //! The pointer to the current recursive_mutex to work
+        recursive_mutex* my_mutex;
 
         //! All checks from acquire using mutex.state were moved here
-        void internal_acquire( mutex& m );
+        void internal_acquire( recursive_mutex& m );
 
         //! All checks from try_acquire using mutex.state were moved here
-        bool internal_try_acquire( mutex& m );
+        bool internal_try_acquire( recursive_mutex& m );
 
         //! All checks from release using mutex.state were moved here
         void internal_release();
     };
 
+    // Mutex traits
+    static const bool is_rw_mutex = false;
+    static const bool is_recursive_mutex = true;
+    static const bool is_fair_mutex = false;
+
 private:
 #if _WIN32||_WIN64
-    CRITICAL_SECTION impl;    
+    CRITICAL_SECTION impl;
     enum state_t {
         INITIALIZED=0x1234,
-        DESTROYED=0x789A
+        DESTROYED=0x789A,
     } state;
 #else
     pthread_mutex_t impl;
@@ -190,4 +201,4 @@ private:
 
 } // namespace tbb 
 
-#endif /* __TBB_mutex_H */
+#endif /* __TBB_recursive_mutex_H */
diff --git a/include/tbb/scalable_allocator.h b/include/tbb/scalable_allocator.h
index 47e72a1..bac9f7e 100644
--- a/include/tbb/scalable_allocator.h
+++ b/include/tbb/scalable_allocator.h
@@ -79,15 +79,6 @@ public:
         typedef scalable_allocator<U> other;
     };
 
-#if _WIN64
-    //! Non-ISO method required by Microsoft's STL containers
-    /** Microsoft's container classes coming with Platform SDK
-        seem to require that allocators supply this method. */
-    void* _Charalloc( size_type size ) {
-        return scalable_malloc( size );
-    }
-#endif /* _WIN64 */
-
     scalable_allocator() throw() {}
     scalable_allocator( const scalable_allocator& ) throw() {}
     template<typename U> scalable_allocator(const scalable_allocator<U>&) throw() {}
@@ -135,6 +126,20 @@ inline bool operator!=( const scalable_allocator<T>&, const scalable_allocator<U
 
 } // namespace tbb
 
+#if _MSC_VER
+    #if __TBB_BUILD && !defined(__TBBMALLOC_NO_IMPLICIT_LINKAGE)
+        #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
+    #endif
+
+    #if !__TBBMALLOC_NO_IMPLICIT_LINKAGE
+        #ifdef _DEBUG
+            #pragma comment(lib, "tbbmalloc_debug.lib")
+        #else
+            #pragma comment(lib, "tbbmalloc.lib")
+        #endif
+    #endif
+#endif
+
 #endif /* __cplusplus */
 
 #endif /* __TBB_scalable_allocator_H */
diff --git a/include/tbb/spin_mutex.h b/include/tbb/spin_mutex.h
index 00e540f..b24ed94 100644
--- a/include/tbb/spin_mutex.h
+++ b/include/tbb/spin_mutex.h
@@ -43,7 +43,7 @@ namespace tbb {
     @ingroup synchronization */
 class spin_mutex {
     //! 0 if lock is released, 1 if lock is acquired.
-    volatile unsigned char flag;
+    unsigned char flag;
 
 public:
     //! Construct unacquired lock.
@@ -112,7 +112,7 @@ public:
 #if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT
             internal_release();
 #else
-            my_mutex->flag = static_cast<unsigned char>(my_unlock_value);
+            __TBB_store_with_release(my_mutex->flag, static_cast<unsigned char>(my_unlock_value));
             my_mutex = NULL;
 #endif /* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */
         }
@@ -123,12 +123,17 @@ public:
 #if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT
                 internal_release();
 #else
-                my_mutex->flag = static_cast<unsigned char>(my_unlock_value);
+                __TBB_store_with_release(my_mutex->flag, static_cast<unsigned char>(my_unlock_value));
 #endif /* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */
             }
         }
     };
 
+    // Mutex traits
+    static const bool is_rw_mutex = false;
+    static const bool is_recursive_mutex = false;
+    static const bool is_fair_mutex = false;
+
     friend class scoped_lock;
 };
 
diff --git a/include/tbb/spin_rw_mutex.h b/include/tbb/spin_rw_mutex.h
index 173d61a..92a9bc1 100644
--- a/include/tbb/spin_rw_mutex.h
+++ b/include/tbb/spin_rw_mutex.h
@@ -30,51 +30,52 @@
 #define __TBB_spin_rw_mutex_H
 
 #include "tbb_stddef.h"
+#include "tbb_machine.h"
 
 namespace tbb {
 
+class spin_rw_mutex_v3;
+typedef spin_rw_mutex_v3 spin_rw_mutex;
+
 //! Fast, unfair, spinning reader-writer lock with backoff and writer-preference
 /** @ingroup synchronization */
-class spin_rw_mutex {
+class spin_rw_mutex_v3 {
     //! @cond INTERNAL
 
-    //! Present so that 1.0 headers work with 1.1 dynamic library.
-    static void internal_itt_releasing(spin_rw_mutex *);
-
     //! Internal acquire write lock.
-    static bool internal_acquire_writer(spin_rw_mutex *);
+    bool internal_acquire_writer();
 
     //! Out of line code for releasing a write lock.  
     /** This code is has debug checking and instrumentation for Intel(R) Thread Checker and Intel(R) Thread Profiler. */
-    static void internal_release_writer(spin_rw_mutex *);
+    void internal_release_writer();
 
     //! Internal acquire read lock.
-    static void internal_acquire_reader(spin_rw_mutex *);
+    void internal_acquire_reader();
 
     //! Internal upgrade reader to become a writer.
-    static bool internal_upgrade(spin_rw_mutex *);
+    bool internal_upgrade();
 
     //! Out of line code for downgrading a writer to a reader.   
     /** This code is has debug checking and instrumentation for Intel(R) Thread Checker and Intel(R) Thread Profiler. */
-    static void internal_downgrade(spin_rw_mutex *);
+    void internal_downgrade();
 
     //! Internal release read lock.
-    static void internal_release_reader(spin_rw_mutex *);
+    void internal_release_reader();
 
     //! Internal try_acquire write lock.
-    static bool internal_try_acquire_writer(spin_rw_mutex *);
+    bool internal_try_acquire_writer();
 
     //! Internal try_acquire read lock.
-    static bool internal_try_acquire_reader(spin_rw_mutex *);
+    bool internal_try_acquire_reader();
 
     //! @endcond
 public:
     //! Construct unacquired mutex.
-    spin_rw_mutex() : state(0) {}
+    spin_rw_mutex_v3() : state(0) {}
 
 #if TBB_DO_ASSERT
     //! Destructor asserts if the mutex is acquired, i.e. state is zero.
-    ~spin_rw_mutex() {
+    ~spin_rw_mutex_v3() {
         __TBB_ASSERT( !state, "destruction of an acquired mutex");
     };
 #endif /* TBB_DO_ASSERT */
@@ -104,8 +105,8 @@ public:
             __TBB_ASSERT( !mutex, "holding mutex already" );
             is_writer = write; 
             mutex = &m;
-            if( write ) internal_acquire_writer(mutex);
-            else        internal_acquire_reader(mutex);
+            if( write ) mutex->internal_acquire_writer();
+            else        mutex->internal_acquire_reader();
         }
 
         //! Upgrade reader to become a writer.
@@ -114,7 +115,7 @@ public:
             __TBB_ASSERT( mutex, "lock is not acquired" );
             __TBB_ASSERT( !is_writer, "not a reader" );
             is_writer = true; 
-            return internal_upgrade(mutex);
+            return mutex->internal_upgrade();
         }
 
         //! Release lock.
@@ -122,26 +123,24 @@ public:
             __TBB_ASSERT( mutex, "lock is not acquired" );
             spin_rw_mutex *m = mutex; 
             mutex = NULL;
-            if( is_writer ) {
 #if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT
-                internal_release_writer(m);
+            if( is_writer ) m->internal_release_writer();
+            else            m->internal_release_reader();
 #else
-                m->state = 0; 
+            if( is_writer ) __TBB_AtomicAND( &m->state, READERS ); 
+            else            __TBB_FetchAndAddWrelease( &m->state, -(intptr_t)ONE_READER);
 #endif /* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */
-            } else {
-                internal_release_reader(m);
-            }
-        };
+        }
 
         //! Downgrade writer to become a reader.
         bool downgrade_to_reader() {
 #if TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT
             __TBB_ASSERT( mutex, "lock is not acquired" );
             __TBB_ASSERT( is_writer, "not a writer" );
-            internal_downgrade(mutex);
+            mutex->internal_downgrade();
 #else
-            mutex->state = 4; // Bit 2 - reader, 00..00100
-#endif
+	     __TBB_FetchAndAddW( &mutex->state, ((intptr_t)ONE_READER-WRITER));
+#endif /* TBB_DO_THREADING_TOOLS||TBB_DO_ASSERT */
             is_writer = false;
 
             return true;
@@ -152,9 +151,10 @@ public:
             __TBB_ASSERT( !mutex, "holding mutex already" );
             bool result;
             is_writer = write; 
-            result = write? internal_try_acquire_writer(&m)
-                          : internal_try_acquire_reader(&m);
-            if( result ) mutex = &m;
+            result = write? m.internal_try_acquire_writer()
+                          : m.internal_try_acquire_reader();
+            if( result ) 
+                mutex = &m;
             return result;
         }
 
@@ -162,22 +162,28 @@ public:
         //! The pointer to the current mutex that is held, or NULL if no mutex is held.
         spin_rw_mutex* mutex;
 
-        //! True if holding a writer lock, false if holding a reader lock.
+        //! If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock.
         /** Not defined if not holding a lock. */
         bool is_writer;
     };
 
+    // Mutex traits
+    static const bool is_rw_mutex = true;
+    static const bool is_recursive_mutex = false;
+    static const bool is_fair_mutex = false;
+
 private:
-    typedef internal::uintptr state_t;
+    typedef intptr_t state_t;
     static const state_t WRITER = 1;
     static const state_t WRITER_PENDING = 2;
     static const state_t READERS = ~(WRITER | WRITER_PENDING);
     static const state_t ONE_READER = 4;
     static const state_t BUSY = WRITER | READERS;
+    //! State of lock
     /** Bit 0 = writer is holding lock
         Bit 1 = request by a writer to acquire lock (hint to readers to wait)
         Bit 2..N = number of readers holding lock */
-    volatile state_t state;
+    state_t state;
 };
 
 } // namespace ThreadingBuildingBlocks
diff --git a/include/tbb/task.h b/include/tbb/task.h
index e2826b3..881c484 100644
--- a/include/tbb/task.h
+++ b/include/tbb/task.h
@@ -31,10 +31,18 @@
 
 #include "tbb_stddef.h"
 
+#if __TBB_EXCEPTIONS
+#include "tbb/cache_aligned_allocator.h"
+#endif /* __TBB_EXCEPTIONS */
+
 namespace tbb {
 
 class task;
 class task_list;
+#if __TBB_EXCEPTIONS
+class task_group_context;
+class tbb_exception;
+#endif /* __TBB_EXCEPTIONS */
 
 //! @cond INTERNAL
 namespace internal {
@@ -55,8 +63,28 @@ namespace internal {
         virtual ~scheduler() = 0;
     };
 
+    //! A reference count
+    /** Should always be non-negative.  A signed type is used so that underflow can be detected. */
     typedef intptr reference_count;
 
+    //! An id as used for specifying affinity.
+    typedef unsigned short affinity_id;
+
+#if __TBB_EXCEPTIONS
+    struct context_list_node_t {
+        context_list_node_t *my_prev,
+                            *my_next;
+    };
+
+    class allocate_root_with_context_proxy {
+        task_group_context& my_context;
+    public:
+        allocate_root_with_context_proxy ( task_group_context& ctx ) : my_context(ctx) {}
+        task& allocate( size_t size ) const;
+        void free( task& ) const;
+    };
+#endif /* __TBB_EXCEPTIONS */
+
     class allocate_root_proxy {
     public:
         static task& allocate( size_t size );
@@ -84,10 +112,11 @@ namespace internal {
         void free( task& ) const;
     };
 
-
     //! Memory prefix to a task object.
     /** This class is internal to the library.
         Do not reference it directly, except within the library itself.
+        Fields are ordered in way that preserves backwards compatibility and yields 
+        good packing on typical 32-bit and 64-bit platforms.
         @ingroup task_scheduling */
     class task_prefix {
     private:
@@ -99,6 +128,14 @@ namespace internal {
         friend class internal::allocate_continuation_proxy;
         friend class internal::allocate_additional_child_of_proxy;
 
+#if __TBB_EXCEPTIONS
+        //! Shared context that is used to communicate asynchronous state changes
+        /** Currently it is used to broadcast cancellation requests generated both 
+            by users and as the result of unhandled exceptions in the task::execute()
+            methods. */
+        task_group_context  *context;
+#endif /* __TBB_EXCEPTIONS */
+        
         //! The scheduler that allocated the task, or NULL if task is big.
         /** Small tasks are pooled by the scheduler that allocated the task.
             If a scheduler needs to free a small task allocated by another scheduler,
@@ -127,26 +164,19 @@ namespace internal {
         int depth;
 
         //! A task::state_type, stored as a byte for compactness.
+        /** This state is exposed to users via method task::state(). */
         unsigned char state;
 
-        //! If non-zero, this task is a "big" task.
-        unsigned char is_big;
+        //! Miscellaneous state that is not directly visible to users, stored as a byte for compactness.
+        /** 0x0 -> version 1.0 task
+            0x1 -> version 3.0 task
+            0x2 -> task_proxy
+            0x40 -> task has live ref_count */
+        unsigned char extra_state;
 
-#if TBB_DO_ASSERT
-        //! Used for internal debugging.
-        /** Zero if production version of library is linked. */
-        unsigned char debug_state;
-#else
-        //! Reserved for internal use
-        unsigned char reserved0;
-#endif /* TBB_DO_ASSERT */
-
-        //! Reserved for future use
-        unsigned char reserved1;
+        affinity_id affinity;
 
         //! "next" field for list of task
-        /** Assembly coded routine Gettask presumes this field is the last field
-            in the prefix. */
         tbb::task* next;
 
         //! task corresponding to this task_prefix.
@@ -156,6 +186,147 @@ namespace internal {
 } // namespace internal
 //! @endcond
 
+#if __TBB_EXCEPTIONS
+
+
+//! Used to form groups of tasks 
+/** @ingroup task_scheduling 
+    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). 
+
+    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 task::allocate_root()
+    method. See task_group_context::task_group_context for more details.
+    
+    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. **/
+class task_group_context : internal::no_copy
+{
+public:
+    enum kind_type {
+        isolated,
+        bound
+    };
+
+private:
+    union {
+        //! Flavor of this context: bound or isolated.
+        kind_type my_kind;
+        uintptr_t _my_kind_aligner;
+    };
+
+    //! Pointer to the context of the parent cancellation group. NULL for isolated contexts.
+    task_group_context *my_parent;
+
+    //! Used to form the thread specific list of contexts without additional memory allocation.
+    /** A context is included into the list of the current thread when its binding to 
+        its parent happens. Any context can be present in the list of one thread only. **/
+    internal::context_list_node_t my_node;
+
+    //! Leading padding protecting accesses to frequently used members from false sharing.
+    /** 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)];
+    
+    //! 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;
+
+    //! Pointer to the exception being propagated across this task group.
+    tbb_exception *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 
+        benefit by getting us rid of using thread local storage. We do not care 
+        about extra memory it takes since this data structure is excessively padded anyway. **/
+    void *my_owner;
+
+    //! Trailing padding protecting accesses to frequently used members from false sharing
+    /** \sa _leading_padding **/
+    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) 
+        method. Cancellation requests passed to the parent context are propagated
+        to all the contexts bound to it.
+
+        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.
+        
+        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 )
+        : my_kind(relation_with_parent)
+        , my_version(0)
+    {
+        init();
+    }
+
+    ~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.
+        
+        IMPORTANT: It is assumed that this method is not used concurrently!
+
+        The method does not change the context's parent if it is set. **/ 
+    void reset ();
+
+    //! Initiates cancellation of all tasks in this cancellation group and its subordinate groups.
+    /** \return false if cancellation has already been requested, true otherwise. 
+
+        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. **/
+    bool cancel_group_execution ();
+
+    //! Returns true if the context received cancellation request.
+    bool is_group_execution_cancelled () const;
+
+protected:
+    //! Out-of-line part of the constructor. 
+    /** Separated to facilitate future support for backward binary compatibility. **/
+    void init ();
+
+private:
+    friend class task;
+    friend class internal::allocate_root_with_context_proxy;
+
+    static const kind_type binding_required = bound;
+    static const kind_type binding_completed = kind_type(bound+1);
+
+    //! Checks if any of the ancestors has a cancellation request outstanding, 
+    //! and propagates it back to descendants.
+    void propagate_cancellation_from_ancestors ();
+}; // class task_group_context
+
+#endif /* __TBB_EXCEPTIONS */
 
 //! Base class for user-defined tasks.
 /** @ingroup task_scheduling */
@@ -165,13 +336,13 @@ class task: internal::no_copy {
 
 protected:
     //! Default constructor.
-    task() {}
+    task() {prefix().extra_state=1;}
 
 public:
     //! Destructor.
     virtual ~task() {}
 
-    //! Should be overriden by derived classes.
+    //! Should be overridden by derived classes.
     virtual task* execute() = 0;
 
     //! Enumeration of task states that the scheduler considers.
@@ -199,6 +370,13 @@ public:
         return internal::allocate_root_proxy();
     }
 
+#if __TBB_EXCEPTIONS
+    //! Returns proxy for overloaded new that allocates a root task associated with user supplied context.
+    static internal::allocate_root_with_context_proxy allocate_root( task_group_context& ctx ) {
+        return internal::allocate_root_with_context_proxy(ctx);
+    }
+#endif /* __TBB_EXCEPTIONS */
+
     //! Returns proxy for overloaded new that allocates a continuation task of *this.
     /** The continuation's parent becomes the parent of *this. */
     internal::allocate_continuation_proxy& allocate_continuation() {
@@ -229,8 +407,12 @@ public:
     //------------------------------------------------------------------------
 
     //! Change this to be a continuation of its former self.
-    /** Not recommended to use due to possibility to cause a crash in some scenario.
-        Can be deprecated later */
+    /** The caller must guarantee that the task's refcount does not become zero until
+        after the method execute() returns.  Typically, this is done by having
+        method execute() return a pointer to a child of the task.  If the guarantee
+        cannot be made, use method recycle_as_safe_continuation instead. 
+       
+        Because of the hazard, this method may be deprecated in the future. */
     void recycle_as_continuation() {
         __TBB_ASSERT( prefix().state==executing, "execute not running?" );
         prefix().state = allocated;
@@ -254,6 +436,9 @@ public:
         p.state = allocated;
         p.parent = &new_parent;
         p.depth = new_parent.prefix().depth+1;
+#if __TBB_EXCEPTIONS
+        p.context = new_parent.prefix().context;
+#endif /* __TBB_EXCEPTIONS */
     }
 
     //! Schedule this for reexecution after current execute() returns.
@@ -344,7 +529,7 @@ public:
         prefix().owner->wait_for_all( *this, NULL );
     }
 
-    //! The task() current being run by this thread.
+    //! The task() currently being run by this thread.
     static task& self();
 
     //! task on whose behalf this task is working, or NULL if this is a root.
@@ -357,7 +542,6 @@ public:
         return p.owner!=q.owner;
     }
 
-
     //------------------------------------------------------------------------
     // Debugging
     //------------------------------------------------------------------------
@@ -377,19 +561,53 @@ public:
     //! True if this task is owned by the calling thread; false otherwise.
     bool is_owned_by_current_thread() const;
 
+    //------------------------------------------------------------------------
+    // Affinity
+    //------------------------------------------------------------------------
+ 
+    //! An id as used for specifying affinity.
+    /** Guaranteed to be integral type.  Value of 0 means no affinity. */
+    typedef internal::affinity_id affinity_id;
+
+    //! Set affinity for this task.
+    void set_affinity( affinity_id id ) {prefix().affinity = id;}
+
+    //! Current affinity of this task
+    affinity_id affinity() const {return prefix().affinity;}
+
+    //! Invoked by scheduler to notify task that it ran on unexpected thread.
+    /** Invoked before method execute() runs, if task is stolen, or task has 
+        affinity but will be executed on another thread. 
+
+        The default action does nothing. */
+    virtual void note_affinity( affinity_id id );
+
+#if __TBB_EXCEPTIONS
+    //! Initiates cancellation of all tasks in this cancellation group and its subordinate groups.
+    /** \return false if cancellation has already been requested, true otherwise. **/
+    bool cancel_group_execution () { return prefix().context->cancel_group_execution(); }
+
+    //! Returns true if the context received cancellation request.
+    bool is_cancelled () const { return prefix().context->is_group_execution_cancelled(); }
+#endif /* __TBB_EXCEPTIONS */
+
 private:
     friend class task_list;
     friend class internal::scheduler;
     friend class internal::allocate_root_proxy;
+#if __TBB_EXCEPTIONS
+    friend class internal::allocate_root_with_context_proxy;
+#endif /* __TBB_EXCEPTIONS */
     friend class internal::allocate_continuation_proxy;
     friend class internal::allocate_child_proxy;
     friend class internal::allocate_additional_child_of_proxy;
 
     //! Get reference to corresponding task_prefix.
-    internal::task_prefix& prefix() const {
+    /** Version tag prevents loader on Linux from using the wrong symbol in debug builds. **/
+    internal::task_prefix& prefix( internal::version_tag* = NULL ) const {
         return reinterpret_cast<internal::task_prefix*>(const_cast<task*>(this))[-1];
     }
-};
+}; // class task
 
 //! task that does nothing.  Useful for synchronization.
 /** @ingroup task_scheduling */
@@ -432,6 +650,7 @@ public:
         if( !first ) next_ptr = &first;
         return *result;
     }
+
     //! Clear the list
     void clear() {
         first=NULL;
@@ -465,6 +684,16 @@ inline void operator delete( void* task, const tbb::internal::allocate_root_prox
     p.free( *static_cast<tbb::task*>(task) );
 }
 
+#if __TBB_EXCEPTIONS
+inline void *operator new( size_t bytes, const tbb::internal::allocate_root_with_context_proxy& p ) {
+    return &p.allocate(bytes);
+}
+
+inline void operator delete( void* task, const tbb::internal::allocate_root_with_context_proxy& p ) {
+    p.free( *static_cast<tbb::task*>(task) );
+}
+#endif /* __TBB_EXCEPTIONS */
+
 inline void *operator new( size_t bytes, const tbb::internal::allocate_continuation_proxy& p ) {
     return &p.allocate(bytes);
 }
diff --git a/include/tbb/task_scheduler_init.h b/include/tbb/task_scheduler_init.h
index 6fb86d4..9957dc7 100644
--- a/include/tbb/task_scheduler_init.h
+++ b/include/tbb/task_scheduler_init.h
@@ -33,6 +33,8 @@
 
 namespace tbb {
 
+typedef std::size_t stack_size_type;
+
 //! @cond INTERNAL
 namespace internal {
     //! Internal to library. Should not be used by clients.
@@ -49,6 +51,7 @@ class task_scheduler_init: internal::no_copy {
     /** NULL if not currently initialized. */
     internal::scheduler* my_scheduler;
 public:
+    
     //! Typedef for number of threads that is automatic.
     static const int automatic = -1;
 
@@ -56,10 +59,9 @@ public:
     static const int deferred = -2;
 
     //! Ensure that scheduler exists for this thread
-    /** 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 
+    /** 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.
 
         The number_of_threads is ignored if any other task_scheduler_inits 
@@ -67,12 +69,16 @@ public:
         Doing so does no harm because the underlying scheduler is reference counted. */
     void initialize( int number_of_threads=automatic );
 
+    //! The overloaded method with stack size parameter
+    /** Overloading is necessary to preserve ABI compatibility */
+    void initialize( int number_of_threads, stack_size_type thread_stack_size );
+
     //! Inverse of method initialize.
     void terminate();
 
     //! Shorthand for default constructor followed by call to intialize(number_of_threads).
-    task_scheduler_init( int number_of_threads=automatic ) : my_scheduler(NULL)  {
-        initialize( number_of_threads );
+    task_scheduler_init( int number_of_threads=automatic, stack_size_type thread_stack_size=0 ) : my_scheduler(NULL)  {
+        initialize( number_of_threads, thread_stack_size );
     }
   
     //! Destroy scheduler for this thread if thread has no other live task_scheduler_inits.
@@ -81,6 +87,15 @@ public:
             terminate();
         internal::poison_pointer( my_scheduler );
     }
+    //! Returns the number of threads tbb scheduler would create if initialized by default.
+    /** Result returned by this method does not depend on whether the scheduler 
+        has already been initialized.
+        
+        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. */
+    static int default_num_threads ();
 };
 
 } // namespace tbb
diff --git a/src/tbb/concurrent_hash_map.cpp b/include/tbb/task_scheduler_observer.h
similarity index 56%
copy from src/tbb/concurrent_hash_map.cpp
copy to include/tbb/task_scheduler_observer.h
index 3de140f..3e30e6b 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/include/tbb/task_scheduler_observer.h
@@ -26,20 +26,49 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#ifndef __TBB_task_scheduler_observer_H
+#define __TBB_task_scheduler_observer_H
+
+#include "atomic.h"
+
+#if __TBB_SCHEDULER_OBSERVER
 
 namespace tbb {
 
 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;
-}
+class observer_proxy;
+
+class task_scheduler_observer_v3 {
+    friend class observer_proxy;
+    observer_proxy* my_proxy;
+    atomic<intptr> my_busy_count;
+public:
+    //! Enable or disable observation
+    void observe( bool state=true );
+
+    //! True if observation is enables; false otherwise.
+    bool is_observing() const {return my_proxy!=NULL;}
+
+    //! Construct observer with observation disabled.
+    task_scheduler_observer_v3() : my_proxy(NULL) {my_busy_count=0;}
+
+    //! Called by thread before first steal since observation became enabled
+    virtual void on_scheduler_entry( bool is_worker ) {} 
+
+    //! Called by thread when it no longer takes part in task stealing.
+    virtual void on_scheduler_exit( bool is_worker ) {}
+
+    //! Destructor
+    virtual ~task_scheduler_observer_v3() {observe(false);}
+};
 
 } // namespace internal
 
+typedef internal::task_scheduler_observer_v3 task_scheduler_observer;
+
 } // namespace tbb
 
+#endif /* __TBB_SCHEDULER_OBSERVER */
+
+#endif /* __TBB_task_scheduler_observer_H */
diff --git a/include/tbb/scalable_allocator.h b/include/tbb/tbb_allocator.h
similarity index 50%
copy from include/tbb/scalable_allocator.h
copy to include/tbb/tbb_allocator.h
index 47e72a1..b819a3f 100644
--- a/include/tbb/scalable_allocator.h
+++ b/include/tbb/tbb_allocator.h
@@ -26,47 +26,38 @@
     the GNU General Public License.
 */
 
-#ifndef __TBB_scalable_allocator_H
-#define __TBB_scalable_allocator_H
+#ifndef __TBB_tbb_allocator_H
+#define __TBB_tbb_allocator_H
 
-#include <stddef.h> // Need ptrdiff_t and size_t from here.
+#include <new>
+#include "tbb_stddef.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-//! The "malloc" analogue to allocate block of memory of size bytes.
-/** @ingroup memory_allocation */
-void * scalable_malloc (size_t size);
-
-//! The "free" analogue to discard a previously allocated piece of memory
-/** @ingroup memory_allocation */
-void   scalable_free (void* ptr);
-
-//! The "realloc" analogue complementing scalable_malloc
-/** @ingroup memory_allocation */
-void * scalable_realloc (void* ptr, size_t size);
+namespace tbb {
 
-//! The "calloc" analogue complementing scalable_malloc
-/** @ingroup memory_allocation */
-void * scalable_calloc (size_t nobj, size_t size);
+//! @cond INTERNAL
+namespace internal {
 
-#ifdef __cplusplus
-} // extern "C"
-#endif /* __cplusplus */
+    //! Deallocates memory using FreeHandler
+    /** The function uses scalable_free if scalable allocator is available and free if not*/
+    void deallocate_via_handler_v3( void *p );
 
-#ifdef __cplusplus
+    //! Allocates memory using MallocHandler
+    /** The function uses scalable_malloc if scalable allocator is available and malloc if not*/
+    void* allocate_via_handler_v3( size_t n );
 
-#include <new>      // To use new with the placement argument
-
-namespace tbb {
+    //! Returns true if standard malloc/free are used to work with memory.
+    bool is_malloc_used_v3();
+}
+//! @endcond
 
 //! 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
+/** 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.
     @ingroup memory_allocation */
 template<typename T>
-class scalable_allocator {
+class tbb_allocator {
 public:
     typedef T* pointer;
     typedef const T* const_pointer;
@@ -75,66 +66,79 @@ public:
     typedef T value_type;
     typedef size_t size_type;
     typedef ptrdiff_t difference_type;
-    template<class U> struct rebind {
-        typedef scalable_allocator<U> other;
+    template<typename U> struct rebind {
+        typedef tbb_allocator<U> other;
+    };
+
+    //! Specifies current allocator
+    enum malloc_type {
+        scalable, 
+        standard
     };
 
 #if _WIN64
-    //! Non-ISO method required by Microsoft's STL containers
-    /** Microsoft's container classes coming with Platform SDK
-        seem to require that allocators supply this method. */
-    void* _Charalloc( size_type size ) {
-        return scalable_malloc( size );
+    //! Non-ISO method required by Microsoft's STL containers 
+    /** Some versions of Microsoft's container classes seem to require that 
+        allocators supply this method. */
+    char* _Charalloc( size_type size ) {        
+        return (char*)(internal::allocate_via_handler_v3( size * sizeof(T)));
     }
 #endif /* _WIN64 */
 
-    scalable_allocator() throw() {}
-    scalable_allocator( const scalable_allocator& ) throw() {}
-    template<typename U> scalable_allocator(const scalable_allocator<U>&) throw() {}
+    tbb_allocator() throw() {}
+    tbb_allocator( const tbb_allocator& ) throw() {}
+    template<typename U> tbb_allocator(const tbb_allocator<U>&) throw() {}
 
     pointer address(reference x) const {return &x;}
     const_pointer address(const_reference x) const {return &x;}
-
+    
     //! Allocate space for n objects, starting on a cache/sector line.
-    pointer allocate( size_type n, const void* /*hint*/ =0 ) {
-        return static_cast<pointer>( scalable_malloc( n * sizeof(value_type) ) );
+    pointer allocate( size_type n, const void* /*hint*/ = 0) {
+        return pointer(internal::allocate_via_handler_v3( n * sizeof(T) ));
     }
 
     //! Free block of memory that starts on a cache line
     void deallocate( pointer p, size_type ) {
-        scalable_free( p );
+        internal::deallocate_via_handler_v3(p);        
     }
 
     //! Largest value for which method allocate might succeed.
     size_type max_size() const throw() {
-        size_type absolutemax = static_cast<size_type>(-1) / sizeof (T);
-        return (absolutemax > 0 ? absolutemax : 1);
+        size_type max = static_cast<size_type>(-1) / sizeof (T);
+        return (max > 0 ? max : 1);
+    }
+    
+    //! Copy-construct value at location pointed to by p.
+    void construct( pointer p, const T& value ) {new(static_cast<void*>(p)) T(value);}
+
+    //! Destroy value at location pointed to by p.
+    void destroy( pointer p ) {p->~T();}
+
+    //! Returns current allocator
+    static malloc_type allocator_type() {
+        return internal::is_malloc_used_v3() ? standard : scalable;
     }
-    void construct( pointer p, const T& val ) { new(static_cast<void*>(p)) T(val); }
-    void destroy( pointer p ) {(static_cast<T*>(p))->~T();}
 };
 
 //! Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
 /** @ingroup memory_allocation */
-template<>
-class scalable_allocator<void> {
+template<> 
+class tbb_allocator<void> {
 public:
     typedef void* pointer;
     typedef const void* const_pointer;
     typedef void value_type;
-    template<class U> struct rebind {
-        typedef scalable_allocator<U> other;
+    template<typename U> struct rebind {
+        typedef tbb_allocator<U> other;
     };
 };
 
 template<typename T, typename U>
-inline bool operator==( const scalable_allocator<T>&, const scalable_allocator<U>& ) {return true;}
+inline bool operator==( const tbb_allocator<T>&, const tbb_allocator<U>& ) {return true;}
 
 template<typename T, typename U>
-inline bool operator!=( const scalable_allocator<T>&, const scalable_allocator<U>& ) {return false;}
-
-} // namespace tbb
+inline bool operator!=( const tbb_allocator<T>&, const tbb_allocator<U>& ) {return false;}
 
-#endif /* __cplusplus */
+} // namespace ThreadBuildingBlocks 
 
-#endif /* __TBB_scalable_allocator_H */
+#endif /* __TBB_tbb_allocator_H */
diff --git a/include/tbb/tbb_exception.h b/include/tbb/tbb_exception.h
new file mode 100644
index 0000000..48358f0
--- /dev/null
+++ b/include/tbb/tbb_exception.h
@@ -0,0 +1,242 @@
+/*
+    Copyright 2005-2008 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_exception_H
+#define __TBB_exception_H
+
+#include "tbb_stddef.h"
+#include <stdexcept>
+
+namespace tbb {
+
+//! Exception for concurrent containers
+class bad_last_alloc : public std::bad_alloc {
+public:
+    virtual const char* what() const throw() { return "bad allocation in previous or concurrent attempt"; }
+    virtual ~bad_last_alloc() throw() {}
+};
+
+} // namespace tbb
+
+#if __TBB_EXCEPTIONS
+#include "tbb/tbb_allocator.h"
+#include <exception>
+#include <typeinfo>
+#include <new>
+
+namespace tbb {
+
+//! Interface to be implemented by all exceptions TBB recognizes and propagates across the threads.
+/** If an unhandled exception of the type derived from tbb::tbb_exception 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 task_group_context with the guilty algorithm/task (the one
+    that threw the exception first).
+    
+    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. 
+
+    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;" operator. 
+    
+    TBB provides two implementations of this interface: tbb::captured_exception and 
+    template class tbb::movable_exception. See their declarations for more info. **/
+class tbb_exception : public std::exception {
+public:
+    //! Creates and returns pointer to the deep copy of this exception object. 
+    /** Move semantics is allowed. **/
+    virtual tbb_exception* move () throw() = 0;
+    
+    //! Destroys objects created by the move() method.
+    /** Frees memory and calls destructor for this exception object. 
+        Can and must be used only on objects created by the move method. **/
+    virtual void destroy () throw() = 0;
+
+    //! Throws this exception object.
+    /** 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. **/
+    virtual void throw_self () = 0;
+
+    //! Returns RTTI name of the originally intercepted exception
+    virtual const char* name() const throw() = 0;
+
+    //! Returns the result of originally intercepted exception's what() method.
+    virtual const char* what() const throw() = 0;
+};
+
+//! This class is used by TBB to propagate information about unhandled exceptions into the root thread.
+/** 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.
+    \sa tbb::tbb_exception **/
+class captured_exception : public tbb_exception
+{
+public:
+    captured_exception ( const captured_exception& src )
+        : my_dynamic(false)
+    {
+        set(src.my_exception_name, src.my_exception_info);
+    }
+
+    captured_exception ( const char* name, const char* info )
+        : my_dynamic(false)
+    {
+        set(name, info);
+    }
+
+    ~captured_exception () throw() {
+        clear();
+    }
+
+    captured_exception& operator= ( const captured_exception& src ) {
+        if ( this != &src ) {
+            clear();
+            set(src.my_exception_name, src.my_exception_info);
+        }
+        return *this;
+    }
+
+    /*override*/ 
+    captured_exception* move () throw();
+
+    /*override*/ 
+    void destroy () throw();
+
+    /*override*/ 
+    void throw_self () { throw *this; }
+
+    /*override*/ 
+    const char* name() const throw();
+
+    /*override*/ 
+    const char* what() const throw();
+
+private:
+    //! Used only by method clone().  
+    captured_exception() {}
+
+    //! Functionally equivalent to {captured_exception e(name,info); return c.clone();}
+    static captured_exception* allocate ( const char* name, const char* info );
+
+    void set ( const char* name, const char* info ) throw();
+    void clear () throw();
+
+    bool my_dynamic;
+    const char* my_exception_name;
+    const char* my_exception_info;
+};
+
+//! Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread
+/** 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 (). 
+    \sa tbb::tbb_exception **/
+template<typename ExceptionData>
+class movable_exception : public tbb_exception
+{
+    typedef movable_exception<ExceptionData> self_type;
+
+public:
+    movable_exception ( const ExceptionData& data ) 
+        : my_exception_data(data)
+        , my_dynamic(false)
+        , my_exception_name(typeid(self_type).name())
+    {}
+
+    movable_exception ( const movable_exception& src ) throw () 
+        : my_exception_data(src.my_exception_data)
+        , my_dynamic(false)
+        , my_exception_name(src.my_exception_name)
+    {}
+
+    ~movable_exception () throw() {}
+
+    const movable_exception& operator= ( const movable_exception& src ) {
+        if ( this != &src ) {
+            my_exception_data = src.my_exception_data;
+            my_exception_name = src.my_exception_name;
+        }
+        return *this;
+    }
+
+    ExceptionData& data () throw() { return my_exception_data; }
+
+    const ExceptionData& data () const throw() { return my_exception_data; }
+
+    /*override*/ const char* name () const throw() { return my_exception_name; }
+
+    /*override*/ const char* what () const throw() { return "tbb::movable_exception"; }
+
+    /*override*/ 
+    movable_exception* move () throw() {
+        void* e = internal::allocate_via_handler_v3(sizeof(movable_exception));
+        if ( e ) {
+            new (e) movable_exception(*this);
+            ((movable_exception*)e)->my_dynamic = true;
+        }
+        return (movable_exception*)e;
+    }
+    /*override*/ 
+    void destroy () throw() {
+        __TBB_ASSERT ( my_dynamic, "Method destroy can be called only on dynamically allocated movable_exceptions" );
+        if ( my_dynamic ) {
+            this->~movable_exception();
+            internal::deallocate_via_handler_v3(this);
+        }
+    }
+    /*override*/ 
+    void throw_self () {
+        throw *this;
+    }
+
+protected:
+    //! User data
+    ExceptionData  my_exception_data;
+
+private:
+    //! Flag specifying whether this object has been dynamically allocated (by the move method)
+    bool my_dynamic;
+
+    //! RTTI name of this class
+    /** We rely on the fact that RTTI names are static string constants. **/
+    const char* my_exception_name;
+};
+
+} // namespace tbb
+
+#endif /* __TBB_EXCEPTIONS */
+
+#endif /* __TBB_exception_H */
diff --git a/include/tbb/tbb_machine.h b/include/tbb/tbb_machine.h
index d034842..e6456a4 100644
--- a/include/tbb/tbb_machine.h
+++ b/include/tbb/tbb_machine.h
@@ -29,26 +29,14 @@
 #ifndef __TBB_machine_H
 #define __TBB_machine_H
 
-#if _WIN32||_WIN64
-// define the parts of stdint.h that are needed 
-typedef __int8 int8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef __int64 int64_t;
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-#else
-#include <stdint.h>
-#endif
-
-#include <cstdio>
-#include <assert.h>
 #include "tbb/tbb_stddef.h"
 
 #if _WIN32||_WIN64
 
+#ifdef _MANAGED
+#pragma managed(push, off)
+#endif
+
 #if defined(_M_IX86)
 #include "tbb/machine/windows_ia32.h"
 #elif defined(_M_AMD64) 
@@ -57,7 +45,11 @@ typedef unsigned __int64 uint64_t;
 #error Unsupported platform
 #endif
 
-#elif __linux__
+#ifdef _MANAGED
+#pragma managed(pop)
+#endif
+
+#elif __linux__ || __FreeBSD__
 
 #if __i386__
 #include "tbb/machine/linux_ia32.h"
@@ -77,28 +69,45 @@ typedef unsigned __int64 uint64_t;
 #include "tbb/machine/mac_ppc.h"
 #endif
 
+#elif _AIX
+
+#include "tbb/machine/ibm_aix51.h"
+
+#elif __sun || __SUNPRO_CC
+
+#define __asm__ asm 
+#define __volatile__ volatile
+#if __i386  || __i386__
+#include "tbb/machine/linux_ia32.h"
+#elif __x86_64__
+#include "tbb/machine/linux_em64t.h"
 #endif
 
-#if !defined(__TBB_CompareAndSwap4) || !defined(__TBB_CompareAndSwap8) || !defined(__TBB_Yield)
-#error Minimal requirements for tbb_machine.h not satisfied 
 #endif
 
-#if defined(TBB_DO_ASSERT)
-#define WORDSIZE __TBB_WORDSIZE
+#if !defined(__TBB_CompareAndSwap4) || !defined(__TBB_CompareAndSwap8) || !defined(__TBB_Yield)
+#error Minimal requirements for tbb_machine.h not satisfied 
 #endif
 
 #ifndef __TBB_load_with_acquire
-    //! This definition works for compilers that insert acquire fences for volatile loads, and load T atomically.
+    //! Load with acquire semantics; i.e., no following memory operation can move above the load.
     template<typename T>
-    inline T __TBB_load_with_acquire(T const volatile& location) {
-        return location;
+    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 */
+        return temp;
     }
 #endif
 
 #ifndef __TBB_store_with_release
-    //! This definition works only for compilers that insert release fences for volatile stores, and store T atomically.
+    //! 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 const& value) {
+    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 */
         location = value; 
     }
 #endif
@@ -143,9 +152,7 @@ public:
             count*=2;
             return true;
         } else {
-            __TBB_Pause(8);
-            count+=8;
-            return (count<64);
+            return false;
         }
     }
 
@@ -156,31 +163,26 @@ public:
 
 template<size_t S, typename T>
 inline intptr_t __TBB_MaskedCompareAndSwap (volatile int32_t *ptr, T value, T comparand ) {
-    volatile T *base = (T *)( (uintptr_t)(__TBB_load_with_acquire(ptr)) & ~(uintptr_t)(0x3) );
+    T *base = (T *)( (uintptr_t)(ptr) & ~(uintptr_t)(0x3) );
 #if __TBB_BIG_ENDIAN
-    uint8_t bitoffset = ( (4-S) - ( (uint8_t *)ptr - (uint8_t *)base) ) * 8;
+    const uint8_t bitoffset = ( (4-S) - ( (uint8_t *)ptr - (uint8_t *)base) ) * 8;
 #else
-    uint8_t bitoffset = ( (uint8_t *)ptr - (uint8_t *)base ) * 8;
-#endif
-    uint32_t mask = ( (1<<(S*8) ) - 1)<<bitoffset;
-    uint32_t tmp, result = *(uint32_t *)base;
-    if ( (T)( (result & mask) >> bitoffset) == (uint32_t)comparand ) {
-      tmp = result;
-      uint32_t new_value = ( result & ~mask ) | ( value << bitoffset );
-      result = __TBB_CompareAndSwap4( base, new_value, tmp );
-      if ( result != tmp && ( (T)( (result & mask) >> bitoffset) == comparand ) ) {
-        AtomicBackoff b;
-        do {
-          b.pause();
-          tmp = result;
-          uint32_t new_value = ( result & ~mask ) | ( value << bitoffset );
-          result = __TBB_CompareAndSwap4( base, new_value, tmp );
-        } while ( result != tmp && ( (T)( (result & mask) >> bitoffset) == comparand ) );
-      }
+    const uint8_t bitoffset = ( (uint8_t *)ptr - (uint8_t *)base ) * 8;
+#endif
+    const uint32_t mask = ( (1<<(S*8) ) - 1)<<bitoffset;
+    AtomicBackoff b;
+    uint32_t result;
+    for(;;) {
+        result = *(volatile uint32_t *)base;
+        uint32_t old_value = ( result & ~mask ) | ( comparand << bitoffset );
+        uint32_t new_value = ( result & ~mask ) | ( value << bitoffset );
+        // __TBB_CompareAndSwap4 presumed to have full fence. 
+        uint32_t tmp = __TBB_CompareAndSwap4( base, new_value, old_value );
+        if( tmp==old_value || ((tmp^old_value)&mask)!=0 ) 
+            break;
+        b.pause();
     }
-    intptr_t to_return;
-    __TBB_store_with_release(to_return, (T)( (result & mask) >> bitoffset));
-    return to_return;
+    return (T)((result & mask) >> bitoffset);
 }
 
 template<size_t S, typename T>
@@ -218,42 +220,81 @@ 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) {
-    T result = __TBB_load_with_acquire(*reinterpret_cast<volatile T *>(ptr));
-    T tmp = result;
-    result = __TBB_CompareAndSwapGeneric<S,T> ( ptr, result+addend, result );
-    if (tmp != result) {
-        AtomicBackoff b;
-        do {
-            b.pause();
-            tmp = result;
-            result = __TBB_CompareAndSwapGeneric<S,T> ( ptr, result+addend, result );
-         } while ( tmp != result);
+    AtomicBackoff b;
+    T result;
+    for(;;) {
+        result = *reinterpret_cast<volatile T *>(ptr);
+        // __TBB_CompareAndSwapGeneric presumed to have full fence. 
+        if( __TBB_CompareAndSwapGeneric<S,T> ( ptr, result+addend, result )==result ) 
+            break;
+        b.pause();
     }
-    intptr_t to_return; 
-    __TBB_store_with_release(to_return, result);
-    return to_return; 
+    return result;
 }
 
 template<size_t S, typename T>
 inline T __TBB_FetchAndStoreGeneric (volatile void *ptr, T value) {
-    T result; 
-    T tmp = __TBB_load_with_acquire(*reinterpret_cast<volatile T *>(ptr));
-    result = __TBB_CompareAndSwapGeneric<S,T> ( ptr, value, tmp );
-    if ( tmp != result ) {
-        AtomicBackoff b;
-        do {
-            b.pause();
-            tmp = result;
-            result = __TBB_CompareAndSwapGeneric<S,T> ( ptr, value, tmp );
-        } while ( tmp != result );
+    AtomicBackoff b;
+    T result;
+    for(;;) {
+        result = *reinterpret_cast<volatile T *>(ptr);
+        // __TBB_CompareAndSwapGeneric presumed to have full fence.
+        if( __TBB_CompareAndSwapGeneric<S,T> ( ptr, value, result )==result ) 
+            break;
+        b.pause();
     }
-    intptr_t to_return; 
-    __TBB_store_with_release(to_return, result);
-    return to_return; 
+    return result;
 }
 
-}
-}
+// Macro __TBB_TypeWithAlignmentAtLeastAsStrict(T) should be a type with alignment at least as 
+// strict as type T.  Type type should have a trivial default constructor and destructor, so that
+// arrays of that type can be declared without initializers.  
+// It is correct (but perhaps a waste of space) if __TBB_TypeWithAlignmentAtLeastAsStrict(T) expands
+// to a type bigger than T.
+// The default definition here works on machines where integers are naturally aligned and the
+// strictest alignment is 16.
+#ifndef __TBB_TypeWithAlignmentAtLeastAsStrict
+
+#if __GNUC__ || __SUNPRO_CC
+struct __TBB_machine_type_with_strictest_alignment {
+    int member[4];
+} __attribute__((aligned(16)));
+#elif _MSC_VER
+__declspec(align(16)) struct __TBB_machine_type_with_strictest_alignment {
+    int member[4];
+};
+#else
+#error Must define __TBB_TypeWithAlignmentAtLeastAsStrict(T) or __TBB_machine_type_with_strictest_alignment
+#endif
+
+template<size_t N> struct type_with_alignment {__TBB_machine_type_with_strictest_alignment member;};
+template<> struct type_with_alignment<1> { char member; };
+template<> struct type_with_alignment<2> { uint16_t member; };
+template<> struct type_with_alignment<4> { uint32_t member; };
+template<> struct type_with_alignment<8> { uint64_t member; };
+
+#if _MSC_VER||defined(__GNUC__)&&__GNUC__==3 && __GNUC_MINOR__<=2  
+//! 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). */
+template<size_t Size, typename T> 
+struct work_around_alignment_bug {
+#if _MSC_VER
+    static const size_t alignment = __alignof(T);
+#else
+    static const size_t alignment = __alignof__(T);
+#endif
+};
+#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<tbb::internal::work_around_alignment_bug<sizeof(T),T>::alignment>
+#elif __GNUC__ || __SUNPRO_CC
+#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<__alignof__(T)>
+#else
+#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) __TBB_machine_type_with_strictest_alignment
+#endif
+#endif  /* ____TBB_TypeWithAlignmentAtLeastAsStrict */
+
+} // namespace internal
+} // namespace tbb
 
 #ifndef __TBB_CompareAndSwap1
 #define __TBB_CompareAndSwap1 tbb::internal::__TBB_CompareAndSwapGeneric<1,uint8_t>
@@ -444,20 +485,16 @@ inline T __TBB_FetchAndStoreGeneric (volatile void *ptr, T value) {
 #define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,(-1))
 #endif
 
+#if __TBB_WORDSIZE==4
+// 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) {
-    int64_t result = *(int64_t *)ptr;
-    int64_t tmp;
-    tmp = result; 
-    result = __TBB_CompareAndSwap8(ptr,value,result);
-    if ( tmp != result ) {
-      tbb::internal::AtomicBackoff b;
-      do {
+    tbb::internal::AtomicBackoff b;
+    for(;;) {
+        int64_t result = *(int64_t *)ptr;
+        if( __TBB_CompareAndSwap8(ptr,value,result)==result ) break;
         b.pause();
-        tmp = result; 
-        result = __TBB_CompareAndSwap8(ptr,value,result);
-      } while ( tmp != result );
-   }
+    }
 }
 #endif
 
@@ -468,6 +505,7 @@ inline int64_t __TBB_Load8 (const volatile void *ptr) {
     return result;
 }
 #endif
+#endif /* __TBB_WORDSIZE==4 */
 
 #ifndef __TBB_Log2
 inline intptr_t __TBB_Log2( uintptr_t x ) {
@@ -479,23 +517,36 @@ inline intptr_t __TBB_Log2( uintptr_t x ) {
 
 #ifndef __TBB_AtomicOR
 inline void __TBB_AtomicOR( volatile void *operand, uintptr_t addend ) {
-       uintptr_t result, tmp;
-       do {
-          tmp = *(uintptr_t *)operand;
-          result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp);
-       } while (result != tmp);
+    tbb::internal::AtomicBackoff b;
+    for(;;) {
+        uintptr_t tmp = *(volatile uintptr_t *)operand;
+        uintptr_t result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp);
+        if( result==tmp ) break;
+        b.pause();
+    }
+}
+#endif
+
+#ifndef __TBB_AtomicAND
+inline void __TBB_AtomicAND( volatile void *operand, uintptr_t addend ) {
+    tbb::internal::AtomicBackoff b;
+    for(;;) {
+        uintptr_t tmp = *(volatile uintptr_t *)operand;
+        uintptr_t result = __TBB_CompareAndSwapW(operand, tmp&addend, tmp);
+        if( result==tmp ) break;
+        b.pause();
     }
+}
 #endif
 
 #ifndef __TBB_TryLockByte
-inline bool __TBB_TryLockByte( volatile unsigned char &flag ) {
-  volatile void *f = &flag;
-  return ( __TBB_CompareAndSwap1(f,1,0) == 0);
+inline bool __TBB_TryLockByte( unsigned char &flag ) {
+    return __TBB_CompareAndSwap1(&flag,1,0)==0;
 }
 #endif
 
 #ifndef __TBB_LockByte
-inline uintptr_t __TBB_LockByte( volatile unsigned char& flag ) {
+inline uintptr_t __TBB_LockByte( unsigned char& flag ) {
     if ( !__TBB_TryLockByte(flag) ) {
         tbb::internal::AtomicBackoff b;
         do {
@@ -506,5 +557,4 @@ inline uintptr_t __TBB_LockByte( volatile unsigned char& flag ) {
 }
 #endif
 
-#endif
-
+#endif /* __TBB_machine_H */
diff --git a/include/tbb/tbb_stddef.h b/include/tbb/tbb_stddef.h
index c3a94af..6ff8e59 100644
--- a/include/tbb/tbb_stddef.h
+++ b/include/tbb/tbb_stddef.h
@@ -29,6 +29,24 @@
 #ifndef __TBB_tbb_stddef_H
 #define __TBB_tbb_stddef_H
 
+// Marketing-driven product version
+#define TBB_VERSION_MAJOR 2
+#define TBB_VERSION_MINOR 1
+
+// Engineering-focused interface version
+#define TBB_INTERFACE_VERSION 3011
+#define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000
+
+// The oldest major interface version still supported
+// To be used in SONAME, manifests, etc.
+#define TBB_COMPATIBLE_INTERFACE_VERSION 2
+
+#define __TBB_STRING_AUX(x) #x
+#define __TBB_STRING(x) __TBB_STRING_AUX(x)
+
+// We do not need defines below for resource processing on windows
+#if !defined RC_INVOKED
+
 // Define groups for Doxygen documentation
 /**
  * @defgroup algorithms         Algorithms
@@ -44,12 +62,43 @@
  * \mainpage Main Page
  *
  * Click the tabs above for information about the
- * <a href="./annotated.html">Classes</a> in the library or the
- * <a href="./modules.html">Modules</a> to which they belong.  The
- * <a href="./files.html">Files</a> tab shows which files contain the library
- * components.
+ * - <a href="./modules.html">Modules</a> (groups of functionality) implemented by the library 
+ * - <a href="./annotated.html">Classes</a> provided by the library
+ * - <a href="./files.html">Files</a> constituting the library.
+ * .
+ * Please note that significant part of TBB functionality is implemented in the form of
+ * template functions, descriptions of which are not accessible on the <a href="./annotated.html">Classes</a>
+ * tab. Use <a href="./modules.html">Modules</a> or <a href="./namespacemembers.html">Namespace/Namespace Members</a>
+ * tabs to find them.
+ *
+ * Additional pieces of information can be found here
+ * - \subpage concepts
+ * .
  */
 
+/** \page concepts TBB concepts
+    
+    A concept is a set of requirements to a type, which are necessary and sufficient
+    for the type to model a particular behavior or a set of behaviors. Some concepts 
+    are specific to a particular algorithm (e.g. algorithm body), while other ones 
+    are common to several algorithms (e.g. range concept). 
+
+    All TBB algorithms make use of different classes implementing various concepts.
+    Implementation classes are supplied by the user as type arguments of template 
+    parameters and/or as objects passed as function call arguments. The library 
+    provides predefined  implementations of some concepts (e.g. several kinds of 
+    \ref range_req "ranges"), while other ones must always be implemented by the user. 
+    
+    TBB defines a set of minimal requirements each concept must conform to. Here is 
+    the list of different concepts hyperlinked to the corresponding requirements specifications:
+    - \subpage range_req
+    - \subpage parallel_do_body_req
+    - \subpage parallel_for_body_req
+    - \subpage parallel_reduce_body_req
+    - \subpage parallel_scan_body_req
+    - \subpage parallel_sort_iter_req
+**/
+
 // Define preprocessor symbols used to determine architecture
 #if _WIN32||_WIN64
 #   if defined(_M_AMD64)
@@ -67,14 +116,32 @@
 #       define __TBB_x86_64 1
 #   elif __ia64__
 #       define __TBB_ipf 1
-#   elif __i386__
+#   elif __i386__||__i386  // __i386 is for Sun OS
 #       define __TBB_x86_32 1
 #   else
 #       define __TBB_generic_arch 1
 #   endif
 #endif
 
-#include <cstddef>              /* Need size_t and ptrdiff_t from here. */
+#if _WIN32||_WIN64
+// define the parts of stdint.h that are needed, but put them inside tbb::internal 
+namespace tbb {
+namespace internal {
+    typedef __int8 int8_t;
+    typedef __int16 int16_t;
+    typedef __int32 int32_t;
+    typedef __int64 int64_t;
+    typedef unsigned __int8 uint8_t;
+    typedef unsigned __int16 uint16_t;
+    typedef unsigned __int32 uint32_t;
+    typedef unsigned __int64 uint64_t;
+} // namespace internal
+} // namespace tbb
+#else
+#include <stdint.h>
+#endif
+
+#include <cstddef>      /* Need size_t and ptrdiff_t (the latter on Windows only) from here. */
 
 #if _WIN32||_WIN64
 #define __TBB_tbb_windef_H
@@ -119,7 +186,7 @@ namespace tbb {
 //! The namespace tbb contains all components of the library.
 namespace tbb {
 
-//! Dummy type that distinguishs splitting constructor from copy constructor.
+//! Dummy type that distinguishes splitting constructor from copy constructor.
 /**
  * See description of parallel_for and parallel_reduce for example usages.
  * @ingroup algorithms
@@ -133,6 +200,8 @@ class split {
  */
 namespace internal {
 
+using std::size_t;
+
 //! An unsigned integral type big enough to hold a pointer.
 /** There's no guarantee by the C++ standard that a size_t is really big enough,
     but it happens to be for all platforms of interest. */
@@ -141,12 +210,15 @@ typedef size_t uintptr;
 //! A signed integral type big enough to hold a pointer.
 /** There's no guarantee by the C++ standard that a ptrdiff_t is really big enough,
     but it happens to be for all platforms of interest. */
-typedef ptrdiff_t intptr;
+typedef std::ptrdiff_t intptr;
+
+//! Report a runtime warning.
+void runtime_warning( const char* format, ... );
 
 #if TBB_DO_ASSERT
 //! Set p to invalid pointer value.
 template<typename T>
-inline void poison_pointer( T* volatile & p ) {
+inline void poison_pointer( T* & p ) {
     p = reinterpret_cast<T*>(-1);
 }
 #else
@@ -166,9 +238,32 @@ public:
     no_copy() {}
 };
 
+// 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 
+    symbol in debug builds (when inline functions are compiled as out-of-line). **/
+struct version_tag_v3 {};
+
+typedef version_tag_v3 version_tag;
+
 } // internal
 //! @endcond
 
 } // 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_PERFORMANCE_WARNINGS
+#define TBB_PERFORMANCE_WARNINGS TBB_DO_ASSERT
+#endif /* TBB_PERFORMANCE_WARNINGS */
+
+#endif /* RC_INVOKED */
 #endif /* __TBB_tbb_stddef_H */
diff --git a/include/tbb/tbb_thread.h b/include/tbb/tbb_thread.h
new file mode 100644
index 0000000..8587f2b
--- /dev/null
+++ b/include/tbb/tbb_thread.h
@@ -0,0 +1,285 @@
+/*
+    Copyright 2005-2008 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_thread_H
+#define __TBB_tbb_thread_H
+
+#if _WIN32||_WIN64
+#include <windows.h>
+#define __TBB_NATIVE_THREAD_ROUTINE unsigned WINAPI
+#define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) unsigned (WINAPI* r)( void* )
+#else
+#define __TBB_NATIVE_THREAD_ROUTINE void*
+#define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) void* (*r)( void* )
+#include <pthread.h>
+#endif // _WIN32||_WIN64
+
+#include <iosfwd>
+#include <exception>             // Need std::terminate from here.
+#include "tbb_stddef.h"
+#include "tick_count.h"
+
+namespace tbb {
+
+//! @cond INTERNAL
+namespace internal {
+    
+    class tbb_thread_v3;
+
+} // namespace internal
+
+void swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ); 
+
+namespace internal {
+
+    //! Allocate a closure
+    void* allocate_closure_v3( size_t size );
+    //! Free a closure allocated by allocate_closure_v3
+    void free_closure_v3( void* );
+   
+    struct thread_closure_base {
+        void* operator new( size_t size ) {return allocate_closure_v3(size);}
+        void operator delete( void* ptr ) {free_closure_v3(ptr);}
+    };
+
+    template<class F> struct thread_closure_0: thread_closure_base {
+        F function;
+
+        static __TBB_NATIVE_THREAD_ROUTINE start_routine( void* c ) {
+            thread_closure_0 *self = static_cast<thread_closure_0*>(c);
+            try {
+                self->function();
+            } catch ( ... ) {
+                std::terminate();
+            }
+            delete self;
+            return 0;
+        }
+        thread_closure_0( const F& f ) : function(f) {}
+    };
+    //! Structure used to pass user function with 1 argument to thread.  
+    template<class F, class X> struct thread_closure_1: thread_closure_base {
+        F function;
+        X arg1;
+        //! Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll
+        static __TBB_NATIVE_THREAD_ROUTINE start_routine( void* c ) {
+            thread_closure_1 *self = static_cast<thread_closure_1*>(c);
+            try {
+                self->function(self->arg1);
+            } catch ( ... ) {
+                std::terminate();
+            }
+            delete self;
+            return 0;
+        }
+        thread_closure_1( const F& f, const X& x ) : function(f), arg1(x) {}
+    };
+    template<class F, class X, class Y> struct thread_closure_2: thread_closure_base {
+        F function;
+        X arg1;
+        Y arg2;
+        //! Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll
+        static __TBB_NATIVE_THREAD_ROUTINE start_routine( void* c ) {
+            thread_closure_2 *self = static_cast<thread_closure_2*>(c);
+            try {
+                self->function(self->arg1, self->arg2);
+            } catch ( ... ) {
+                std::terminate();
+            }
+            delete self;
+            return 0;
+        }
+        thread_closure_2( const F& f, const X& x, const Y& y ) : function(f), arg1(x), arg2(y) {}
+    };
+
+    //! Versioned thread class.
+    class tbb_thread_v3 {
+        tbb_thread_v3& operator=(const tbb_thread_v3&); // Deny access
+        tbb_thread_v3(const tbb_thread_v3&); // = delete;   // Deny access
+    public:
+#if _WIN32||_WIN64
+        typedef HANDLE native_handle_type; 
+#else
+        typedef pthread_t native_handle_type; 
+#endif // _WIN32||_WIN64
+
+        class id;
+        //! Constructs a thread object that does not represent a thread of execution. 
+        tbb_thread_v3() : my_handle(0)
+#if _WIN32||_WIN64
+            , my_thread_id(0)
+#endif // _WIN32||_WIN64
+        {}
+        
+        //! Constructs an object and executes f() in a new thread
+        template <class F> explicit tbb_thread_v3(F f) {
+            typedef internal::thread_closure_0<F> closure_type;
+            internal_start(closure_type::start_routine, new closure_type(f));
+        }
+        //! Constructs an object and executes f(x) in a new thread
+        template <class F, class X> tbb_thread_v3(F f, X x) {
+            typedef internal::thread_closure_1<F,X> closure_type;
+            internal_start(closure_type::start_routine, new closure_type(f,x));
+        }
+        //! Constructs an object and executes f(x,y) in a new thread
+        template <class F, class X, class Y> tbb_thread_v3(F f, X x, Y y) {
+            typedef internal::thread_closure_2<F,X,Y> closure_type;
+            internal_start(closure_type::start_routine, new closure_type(f,x,y));
+        }
+
+        bool joinable() const {return my_handle!=0; }
+        //! The completion of the thread represented by *this happens before join() returns.
+        void join();
+        //! When detach() returns, *this no longer represents the possibly continuing thread of execution.
+        void detach();
+        ~tbb_thread_v3() {if( joinable() ) detach();}
+        inline id get_id() const;
+        native_handle_type native_handle() { return my_handle; }
+    
+        //! The number of hardware thread contexts.
+        static unsigned hardware_concurrency();
+    private:
+        native_handle_type my_handle; 
+#if _WIN32||_WIN64
+        DWORD my_thread_id;
+#endif // _WIN32||_WIN64
+
+        /** Runs start_routine(closure) on another thread and sets my_handle to the handle of the created thread. */
+        void internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), 
+                             void* closure );
+        friend void move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 );
+        friend void tbb::swap( tbb_thread_v3& t1, tbb_thread_v3& t2 ); 
+    };
+        
+    class tbb_thread_v3::id { 
+#if _WIN32||_WIN64
+        DWORD my_id;
+        id( DWORD my_id ) : my_id(my_id) {}
+#else
+        pthread_t my_id;
+        id( pthread_t my_id ) : my_id(my_id) {}
+#endif // _WIN32||_WIN64
+        friend class tbb_thread_v3;
+    public:
+        id() : my_id(0) {}
+
+        friend bool operator==( tbb_thread_v3::id x, tbb_thread_v3::id y );
+        friend bool operator!=( tbb_thread_v3::id x, tbb_thread_v3::id y );
+        friend bool operator<( tbb_thread_v3::id x, tbb_thread_v3::id y );
+        friend bool operator<=( tbb_thread_v3::id x, tbb_thread_v3::id y );
+        friend bool operator>( tbb_thread_v3::id x, tbb_thread_v3::id y );
+        friend bool operator>=( tbb_thread_v3::id x, tbb_thread_v3::id y );
+        
+        template<class charT, class traits>
+        friend std::basic_ostream<charT, traits>&
+        operator<< (std::basic_ostream<charT, traits> &out, 
+                    tbb_thread_v3::id id)
+        {
+            out << id.my_id;
+            return out;
+        }
+        friend tbb_thread_v3::id thread_get_id_v3();
+    }; // tbb_thread_v3::id
+
+    tbb_thread_v3::id tbb_thread_v3::get_id() const {
+#if _WIN32||_WIN64
+        return id(my_thread_id);
+#else
+        return id(my_handle);
+#endif // _WIN32||_WIN64
+    }
+    void move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 );
+    tbb_thread_v3::id thread_get_id_v3();
+    void thread_yield_v3();
+    void thread_sleep_v3(const tick_count::interval_t &i);
+
+    inline bool operator==(tbb_thread_v3::id x, tbb_thread_v3::id y)
+    {
+        return x.my_id == y.my_id;
+    }
+    inline bool operator!=(tbb_thread_v3::id x, tbb_thread_v3::id y)
+    {
+        return x.my_id != y.my_id;
+    }
+    inline bool operator<(tbb_thread_v3::id x, tbb_thread_v3::id y)
+    {
+        return x.my_id < y.my_id;
+    }
+    inline bool operator<=(tbb_thread_v3::id x, tbb_thread_v3::id y)
+    {
+        return x.my_id <= y.my_id;
+    }
+    inline bool operator>(tbb_thread_v3::id x, tbb_thread_v3::id y)
+    {
+        return x.my_id > y.my_id;
+    }
+    inline bool operator>=(tbb_thread_v3::id x, tbb_thread_v3::id y)
+    {
+        return x.my_id >= y.my_id;
+    }
+
+} // namespace internal;
+
+//! Users reference thread class by name tbb_thread
+typedef internal::tbb_thread_v3 tbb_thread;
+
+using internal::operator==;
+using internal::operator!=;
+using internal::operator<;
+using internal::operator>;
+using internal::operator<=;
+using internal::operator>=;
+
+inline void move( tbb_thread& t1, tbb_thread& t2 ) {
+    internal::move_v3(t1, t2);
+}
+
+inline void swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ) {
+    tbb::tbb_thread::native_handle_type h = t1.my_handle;
+    t1.my_handle = t2.my_handle;
+    t2.my_handle = h;
+#if _WIN32||_WIN64
+    DWORD i = t1.my_thread_id;
+    t1.my_thread_id = t2.my_thread_id;
+    t2.my_thread_id = i;
+#endif /* _WIN32||_WIN64 */
+}
+
+namespace this_tbb_thread {
+    inline tbb_thread::id get_id() { return internal::thread_get_id_v3(); }
+    //! Offers the operating system the opportunity to schedule another thread.
+    inline void yield() { internal::thread_yield_v3(); }
+    //! The current thread blocks at least until the time specified.
+    inline void sleep(const tick_count::interval_t &i) { 
+        internal::thread_sleep_v3(i);  
+    }
+}  // namespace this_tbb_thread
+
+} // namespace tbb
+
+#endif /* __TBB_tbb_thread_H */
diff --git a/include/tbb/tick_count.h b/include/tbb/tick_count.h
index 2a91e84..18c0a6b 100644
--- a/include/tbb/tick_count.h
+++ b/include/tbb/tick_count.h
@@ -54,6 +54,9 @@ public:
         //! Construct a time interval representing zero time duration
         interval_t() : value(0) {};
 
+        //! Construct a time interval representing sec seconds time  duration
+        explicit interval_t( double sec );
+
         //! Return the length of a time interval in seconds
         double seconds() const;
 
@@ -79,6 +82,9 @@ public:
         interval_t& operator-=( const interval_t& i ) {value -= i.value; return *this;}
     };
     
+    //! Construct an absolute timestamp initialized to zero.
+    tick_count() : my_count(0) {};
+
     //! Return current time.
     static tick_count now();
     
@@ -115,6 +121,19 @@ inline tick_count tick_count::now() {
     return result;
 }
 
+inline tick_count::interval_t::interval_t( double sec )
+{
+#if _WIN32||_WIN64
+    LARGE_INTEGER qpfreq;
+    QueryPerformanceFrequency(&qpfreq);
+    value = static_cast<long long>(sec*qpfreq.QuadPart);
+#elif __linux__
+    value = static_cast<long long>(sec*1E9);
+#else /* generic Unix */
+    value = static_cast<long long>(sec*1E6);
+#endif /* (choice of OS) */
+}
+
 inline tick_count::interval_t operator-( const tick_count& t1, const tick_count& t0 ) {
     return tick_count::interval_t( t1.my_count-t0.my_count );
 }
diff --git a/index.html b/index.html
index e3aefdf..c6a5165 100644
--- a/index.html
+++ b/index.html
@@ -16,6 +16,8 @@ To port TBB to a new platform, operating system or architecture, see the <A HREF
 
 <H2>Directories</H2>
 <DL>
+<DT><A HREF="doc/index.html">doc</A>
+<DD>Documentation for the library.
 <DT><A HREF="include/index.html">include</A>
 <DD>Include files required for compiling code that uses the library.
 <DT><A HREF="examples/index.html">examples</A>
@@ -24,6 +26,8 @@ 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>
+<DD>Platform-specific binary files for the library.
 </DL>
 
 <HR>
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..0ac9d96
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,156 @@
+# Copyright 2005-2008 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?=..
+examples_root:=$(tbb_root)/examples
+include $(tbb_root)/build/common.inc
+.PHONY: all tbb tbbmalloc test debug examples clean info
+
+all: release debug examples
+
+tbb: tbb_release tbb_debug
+
+tbbmalloc: tbbmalloc_release tbbmalloc_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
+	@echo done
+
+release: tbb_release tbbmalloc_release
+release: $(call cross_cfg,tbbmalloc_test_release) $(call cross_cfg,test_release)
+
+debug: tbb_debug tbbmalloc_debug
+debug: $(call cross_cfg,tbbmalloc_test_debug) $(call cross_cfg, test_debug)
+
+examples: tbb tbbmalloc examples_debug clean_examples examples_release
+
+clean: clean_release clean_debug clean_examples
+	@echo clean done
+
+.PHONY: full
+full:
+	$(MAKE) -s -i -r --no-print-directory -f Makefile tbb_root=. clean all
+ifeq ($(tbb_os),windows)
+	$(MAKE) -s -i -r --no-print-directory -f Makefile tbb_root=. compiler=icl clean all native_examples
+else
+	$(MAKE) -s -i -r --no-print-directory -f Makefile tbb_root=. compiler=icc clean all native_examples
+endif
+ifeq ($(arch),em64t)
+	$(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
+
+native_examples: tbb tbbmalloc
+	$(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. compiler=$(native_compiler) tbb_build_prefix=$(tbb_build_prefix) debug test
+	$(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. compiler=$(native_compiler) tbb_build_prefix=$(tbb_build_prefix) clean release test
+
+../examples/% examples/%::
+	$(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. $(subst examples/,,$(subst ../,,$@))
+
+debug_%:: cfg?=debug
+test_% stress_% time_%:: cfg?=release
+debug_% test_% stress_% time_%::
+	$(MAKE) -C "$(work_dir)_$(cfg)"  -r -f $(tbb_root)/build/Makefile.test cfg=$(cfg) tbb_root=$(tbb_root) $@
+
+clean_%::
+ifeq ($(cfg),)
+	@$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root) $@
+	@$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root) $@
+else
+	@$(MAKE) -C "$(work_dir)_$(cfg)"  -r -f $(tbb_root)/build/Makefile.test cfg=$(cfg) tbb_root=$(tbb_root) $@
+endif
+
+.PHONY: tbb_release tbb_debug test_release test_debug
+
+# do not delete double-space after -C option
+tbb_release: mkdir_release
+	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbb cfg=release tbb_root=$(tbb_root)
+
+tbb_debug: mkdir_debug
+	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbb cfg=debug tbb_root=$(tbb_root)
+
+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) 
+
+test_debug: $(call cross_cfg,mkdir_debug) $(call cross_cfg,tbb_debug) test_debug_no_depends
+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)
+
+.PHONY: tbbmalloc_release tbbmalloc_debug tbbmalloc_test_release tbbmalloc_test_debug
+
+tbbmalloc_release: mkdir_release
+	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc tbb_root=$(tbb_root)
+
+tbbmalloc_debug: mkdir_debug
+	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc 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)
+
+tbbmalloc_test_debug: $(call cross_cfg,mkdir_debug) $(call cross_cfg,tbbmalloc_debug) tbbmalloc_test_debug_no_depends
+tbbmalloc_test_debug_no_depends:
+	-$(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test tbb_root=$(tbb_root)
+
+.PHONY: examples_release examples_debug
+
+examples_release: tbb_release tbbmalloc_release
+	$(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. release test
+
+examples_debug: tbb_debug tbbmalloc_debug
+	$(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. debug test
+
+.PHONY: clean_release clean_debug clean_examples
+
+clean_release:
+	$(shell $(RM) $(work_dir)_release$(SLASH)*.* >$(NUL) 2>$(NUL))
+	$(shell $(RD) $(work_dir)_release >$(NUL) 2>$(NUL))
+
+clean_debug:
+	$(shell $(RM) $(work_dir)_debug$(SLASH)*.* >$(NUL) 2>$(NUL))
+	$(shell $(RD) $(work_dir)_debug >$(NUL) 2>$(NUL))
+
+clean_examples:
+	$(shell $(MAKE) -s -i -r -C $(examples_root) -f Makefile tbb_root=.. clean >$(NUL) 2>$(NUL))
+
+.PHONY: mkdir_release mkdir_debug
+
+mkdir_release:
+	$(shell $(MD) "$(work_dir)_release" >$(NUL) 2>$(NUL))
+	$(if $(subst undefined,,$(origin_build_dir)),,cd "$(work_dir)_release" && $(MAKE_TBBVARS) $(tbb_build_prefix)_release)
+
+mkdir_debug:
+	$(shell $(MD) "$(work_dir)_debug" >$(NUL) 2>$(NUL))
+	$(if $(subst undefined,,$(origin_build_dir)),,cd "$(work_dir)_debug" && $(MAKE_TBBVARS) $(tbb_build_prefix)_debug)
+
+info:
+	@echo OS: $(tbb_os)
+	@echo arch=$(arch)
+	@echo compiler=$(compiler)
+	@echo runtime=$(runtime)
+	@echo tbb_build_prefix=$(tbb_build_prefix)
diff --git a/src/old/concurrent_queue_v2.cpp b/src/old/concurrent_queue_v2.cpp
new file mode 100644
index 0000000..776547b
--- /dev/null
+++ b/src/old/concurrent_queue_v2.cpp
@@ -0,0 +1,383 @@
+/*
+    Copyright 2005-2008 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 "concurrent_queue_v2.h"
+#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>
+
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (disable: 4267)
+#endif /* _MSC_VER && _Wp64 */
+
+#define RECORD_EVENTS 0
+
+using namespace std;
+
+namespace tbb {
+
+namespace internal {
+
+class concurrent_queue_rep;
+
+//! A queue using simple locking.
+/** For efficient, this class has no constructor.  
+    The caller is expected to zero-initialize it. */
+struct micro_queue {
+    typedef concurrent_queue_base::page page;
+    typedef size_t ticket;
+
+    atomic<page*> head_page;
+    atomic<ticket> head_counter;
+
+    atomic<page*> tail_page;
+    atomic<ticket> tail_counter;
+
+    spin_mutex page_mutex;
+    
+    class push_finalizer {
+        ticket my_ticket;
+        micro_queue& my_queue;
+    public:
+        push_finalizer( micro_queue& queue, ticket k ) :
+            my_ticket(k), my_queue(queue)
+        {}
+        ~push_finalizer() {
+            my_queue.tail_counter = my_ticket;
+        }
+    };
+
+    void push( const void* item, ticket k, concurrent_queue_base& base );
+
+    class pop_finalizer {
+        ticket my_ticket;
+        micro_queue& my_queue;
+        page* my_page; 
+    public:
+        pop_finalizer( micro_queue& queue, ticket k, page* p ) :
+            my_ticket(k), my_queue(queue), my_page(p)
+        {}
+        ~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 ) 
+                operator delete(p);
+        }
+    };
+
+    bool pop( void* dst, ticket k, concurrent_queue_base& base );
+};
+
+//! Internal representation of a ConcurrentQueue.
+/** For efficient, this class has no constructor.  
+    The caller is expected to zero-initialize it. */
+class concurrent_queue_rep {
+public:
+    typedef size_t ticket;
+
+private:
+    friend struct micro_queue;
+
+    //! Approximately n_queue/golden ratio
+    static const size_t phi = 3;
+
+public:
+    //! Must be power of 2
+    static const size_t n_queue = 8; 
+
+    //! Map ticket to an array index
+    static size_t index( ticket k ) {
+        return k*phi%n_queue;
+    }
+
+    atomic<ticket> head_counter;
+    char pad1[NFS_MaxLineSize-sizeof(size_t)];
+
+    atomic<ticket> tail_counter;
+    char pad2[NFS_MaxLineSize-sizeof(ticket)];
+    micro_queue array[n_queue];    
+
+    micro_queue& choose( ticket k ) {
+        // The formula here approximates LRU in a cache-oblivious way.
+        return array[index(k)];
+    }
+
+    //! Value for effective_capacity that denotes unbounded queue.
+    static const ptrdiff_t infinite_capacity = ptrdiff_t(~size_t(0)/2);
+};
+
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+#pragma warning( push )
+// unary minus operator applied to unsigned type, result still unsigned
+#pragma warning( disable: 4146 )
+#endif /* _MSC_VER && !defined(__INTEL_COMPILER) */
+
+//------------------------------------------------------------------------
+// micro_queue
+//------------------------------------------------------------------------
+void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base ) {
+    k &= -concurrent_queue_rep::n_queue;
+    page* p = NULL;
+    size_t index = (k/concurrent_queue_rep::n_queue & base.items_per_page-1);
+    if( !index ) {
+        size_t n = sizeof(page) + base.items_per_page*base.item_size;
+        p = static_cast<page*>(operator new( n ));
+        p->mask = 0;
+        p->next = NULL;
+    }
+    {
+        push_finalizer finalizer( *this, k+concurrent_queue_rep::n_queue ); 
+        SpinwaitUntilEq( tail_counter, k );
+        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;
+        }
+        base.copy_item( *p, index, item );
+        // If no exception was thrown, mark item as present.
+        p->mask |= uintptr(1)<<index;
+    } 
+}
+
+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 );
+    page& p = *head_page;
+    __TBB_ASSERT( &p, NULL );
+    size_t index = (k/concurrent_queue_rep::n_queue & base.items_per_page-1);
+    bool success = false; 
+    {
+        pop_finalizer finalizer( *this, k+concurrent_queue_rep::n_queue, index==base.items_per_page-1 ? &p : NULL ); 
+        if( p.mask & uintptr(1)<<index ) {
+            success = true;
+            base.assign_and_destroy_item( dst, p, index );
+        }
+    }
+    return success;
+}
+
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+#pragma warning( pop )
+#endif /* _MSC_VER && !defined(__INTEL_COMPILER) */
+
+//------------------------------------------------------------------------
+// concurrent_queue_base
+//------------------------------------------------------------------------
+concurrent_queue_base::concurrent_queue_base( size_t item_size ) {
+    items_per_page = item_size<=8 ? 32 :
+                     item_size<=16 ? 16 : 
+                     item_size<=32 ? 8 :
+                     item_size<=64 ? 4 :
+                     item_size<=128 ? 2 :
+                     1;
+    my_capacity = size_t(-1)/(item_size>1 ? item_size : 2); 
+    my_rep = cache_aligned_allocator<concurrent_queue_rep>().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));
+    this->item_size = item_size;
+}
+
+concurrent_queue_base::~concurrent_queue_base() {
+    size_t nq = my_rep->n_queue;
+    for( size_t i=0; i<nq; i++ ) {
+        page* tp = my_rep->array[i].tail_page;
+        __TBB_ASSERT( my_rep->array[i].head_page==tp, "at most one page should remain" );
+        if( tp!=NULL )
+            delete tp;
+    }
+    cache_aligned_allocator<concurrent_queue_rep>().deallocate(my_rep,1);
+}
+
+void concurrent_queue_base::internal_push( const void* src ) {
+    concurrent_queue_rep& r = *my_rep;
+    concurrent_queue_rep::ticket k  = r.tail_counter++;
+    ptrdiff_t e = my_capacity;
+    if( e<concurrent_queue_rep::infinite_capacity ) {
+        ExponentialBackoff backoff;
+        for(;;) {
+            if( (ptrdiff_t)(k-r.head_counter)<e ) break;
+            backoff.pause();
+            e = const_cast<volatile ptrdiff_t&>(my_capacity);
+        }
+    } 
+    r.choose(k).push(src,k,*this);
+}
+
+void concurrent_queue_base::internal_pop( void* dst ) {
+    concurrent_queue_rep& r = *my_rep;
+    concurrent_queue_rep::ticket k;
+    do {
+        k = r.head_counter++;
+    } while( !r.choose(k).pop(dst,k,*this) );
+}
+
+bool concurrent_queue_base::internal_pop_if_present( void* dst ) {
+    concurrent_queue_rep& r = *my_rep;
+    concurrent_queue_rep::ticket k;
+    do {
+        ExponentialBackoff backoff;
+        for(;;) {
+            k = r.head_counter;
+            if( r.tail_counter<=k ) {
+                // Queue is empty 
+                return false;
+            }
+            // Queue had item with ticket k when we looked.  Attempt to get that item.
+            if( r.head_counter.compare_and_swap(k+1,k)==k ) {
+                break;
+            }
+            // Another thread snatched the item, so pause and retry.
+            backoff.pause();
+        }
+    } while( !r.choose(k).pop(dst,k,*this) );
+    return true;
+}
+
+bool concurrent_queue_base::internal_push_if_not_full( const void* src ) {
+    concurrent_queue_rep& r = *my_rep;
+    ExponentialBackoff backoff;
+    concurrent_queue_rep::ticket k;
+    for(;;) {
+        k = r.tail_counter;
+        if( (ptrdiff_t)(k-r.head_counter)>=my_capacity ) {
+            // Queue is full
+            return false;
+        }
+        // Queue had empty slot with ticket k when we looked.  Attempt to claim that slot.
+        if( r.tail_counter.compare_and_swap(k+1,k)==k ) 
+            break;
+        // Another thread claimed the slot, so pause and retry.
+        backoff.pause();
+    }
+    r.choose(k).push(src,k,*this);
+    return true;
+}
+
+ptrdiff_t concurrent_queue_base::internal_size() const {
+    __TBB_ASSERT( sizeof(ptrdiff_t)<=sizeof(size_t), NULL );
+    return ptrdiff_t(my_rep->tail_counter-my_rep->head_counter);
+}
+
+void concurrent_queue_base::internal_set_capacity( ptrdiff_t capacity, size_t /*item_size*/ ) {
+    my_capacity = capacity<0 ? concurrent_queue_rep::infinite_capacity : capacity;
+}
+
+//------------------------------------------------------------------------
+// concurrent_queue_iterator_rep
+//------------------------------------------------------------------------
+class  concurrent_queue_iterator_rep {
+public:
+    typedef concurrent_queue_rep::ticket ticket;
+    ticket head_counter;   
+    const concurrent_queue_base& my_queue;
+    concurrent_queue_base::page* array[concurrent_queue_rep::n_queue];
+    concurrent_queue_iterator_rep( const concurrent_queue_base& queue ) : 
+        head_counter(queue.my_rep->head_counter),
+        my_queue(queue)
+    {
+        const concurrent_queue_rep& rep = *queue.my_rep;
+        for( size_t k=0; k<concurrent_queue_rep::n_queue; ++k )
+            array[k] = rep.array[k].head_page;
+    }
+    //! Get pointer to kth element
+    void* choose( size_t k ) {
+        if( k==my_queue.my_rep->tail_counter )
+            return NULL;
+        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;
+            return static_cast<unsigned char*>(static_cast<void*>(p+1)) + my_queue.item_size*i;
+        }
+    }
+};
+
+//------------------------------------------------------------------------
+// concurrent_queue_iterator_base
+//------------------------------------------------------------------------
+concurrent_queue_iterator_base::concurrent_queue_iterator_base( const concurrent_queue_base& queue ) {
+    my_rep = new concurrent_queue_iterator_rep(queue);
+    my_item = my_rep->choose(my_rep->head_counter);
+}
+
+void concurrent_queue_iterator_base::assign( const concurrent_queue_iterator_base& other ) {
+    if( my_rep!=other.my_rep ) {
+        if( my_rep ) {
+            delete my_rep;
+            my_rep = NULL;
+        }
+        if( other.my_rep ) {
+            my_rep = new concurrent_queue_iterator_rep( *other.my_rep );
+        }
+    }
+    my_item = other.my_item;
+}
+
+void concurrent_queue_iterator_base::advance() {
+    __TBB_ASSERT( my_item, "attempt to increment iterator past end of queue" );  
+    size_t k = my_rep->head_counter;
+    const concurrent_queue_base& queue = my_rep->my_queue;
+    __TBB_ASSERT( my_item==my_rep->choose(k), NULL );
+    size_t i = k/concurrent_queue_rep::n_queue & queue.items_per_page-1;
+    if( i==queue.items_per_page-1 ) {
+        concurrent_queue_base::page*& root = my_rep->array[concurrent_queue_rep::index(k)];
+        root = root->next;
+    }
+    my_rep->head_counter = k+1;
+    my_item = my_rep->choose(k+1);
+}
+
+concurrent_queue_iterator_base::~concurrent_queue_iterator_base() {
+    delete my_rep;
+    my_rep = NULL;
+}
+
+} // namespace internal
+
+} // namespace tbb
diff --git a/include/tbb/concurrent_queue.h b/src/old/concurrent_queue_v2.h
similarity index 99%
copy from include/tbb/concurrent_queue.h
copy to src/old/concurrent_queue_v2.h
index bf85916..7f49fb4 100644
--- a/include/tbb/concurrent_queue.h
+++ b/src/old/concurrent_queue_v2.h
@@ -29,7 +29,7 @@
 #ifndef __TBB_concurrent_queue_H
 #define __TBB_concurrent_queue_H
 
-#include "tbb_stddef.h"
+#include "tbb/tbb_stddef.h"
 #include <new>
 
 namespace tbb {
diff --git a/src/tbb/concurrent_vector.cpp b/src/old/concurrent_vector_v2.cpp
similarity index 96%
copy from src/tbb/concurrent_vector.cpp
copy to src/old/concurrent_vector_v2.cpp
index 1892508..12b7a60 100644
--- a/src/tbb/concurrent_vector.cpp
+++ b/src/old/concurrent_vector_v2.cpp
@@ -26,14 +26,19 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_vector.h"
-#include "tbb_misc.h"
+#include "concurrent_vector_v2.h"
+#include "../tbb/tbb_misc.h"
 #include <stdexcept>
-#include "itt_notify.h"
+#include "../tbb/itt_notify.h"
 #include "tbb/task.h"
 #include <cstring>
 
 
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (disable: 4267)
+#endif /* _MSC_VER && _Wp64 */
+
 namespace tbb {
 
 namespace internal {
@@ -74,7 +79,7 @@ public:
 void concurrent_vector_base::helper::extend_segment( concurrent_vector_base& v ) {
     const size_t pointers_per_long_segment = sizeof(void*)==4 ? 32 : 64;
     segment_t* s = (segment_t*)NFS_Allocate( pointers_per_long_segment, sizeof(segment_t), NULL );
-    memset( s, 0, pointers_per_long_segment*sizeof(segment_t) );
+    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;
diff --git a/include/tbb/concurrent_vector.h b/src/old/concurrent_vector_v2.h
similarity index 99%
copy from include/tbb/concurrent_vector.h
copy to src/old/concurrent_vector_v2.h
index f108e1a..c54393b 100644
--- a/include/tbb/concurrent_vector.h
+++ b/src/old/concurrent_vector_v2.h
@@ -29,14 +29,14 @@
 #ifndef __TBB_concurrent_vector_H
 #define __TBB_concurrent_vector_H
 
-#include "tbb_stddef.h"
+#include "tbb/tbb_stddef.h"
 #include <iterator>
 #include <new>
-#include "atomic.h"
-#include "cache_aligned_allocator.h"
-#include "blocked_range.h"
+#include "tbb/atomic.h"
+#include "tbb/cache_aligned_allocator.h"
+#include "tbb/blocked_range.h"
 
-#include "tbb_machine.h"
+#include "tbb/tbb_machine.h"
 
 namespace tbb {
 
diff --git a/src/tbb/spin_rw_mutex.cpp b/src/old/spin_rw_mutex_v2.cpp
similarity index 98%
copy from src/tbb/spin_rw_mutex.cpp
copy to src/old/spin_rw_mutex_v2.cpp
index ca818ab..5046c7a 100644
--- a/src/tbb/spin_rw_mutex.cpp
+++ b/src/old/spin_rw_mutex_v2.cpp
@@ -26,10 +26,10 @@
     the GNU General Public License.
 */
 
-#include "tbb/spin_rw_mutex.h"
+#include "spin_rw_mutex_v2.h"
 #include "tbb/tbb_machine.h"
-#include "tbb_misc.h"
-#include "itt_notify.h"
+#include "../tbb/tbb_misc.h"
+#include "../tbb/itt_notify.h"
 
 namespace tbb {
 
diff --git a/include/tbb/spin_rw_mutex.h b/src/old/spin_rw_mutex_v2.h
similarity index 99%
copy from include/tbb/spin_rw_mutex.h
copy to src/old/spin_rw_mutex_v2.h
index 173d61a..46f11ae 100644
--- a/include/tbb/spin_rw_mutex.h
+++ b/src/old/spin_rw_mutex_v2.h
@@ -29,7 +29,7 @@
 #ifndef __TBB_spin_rw_mutex_H
 #define __TBB_spin_rw_mutex_H
 
-#include "tbb_stddef.h"
+#include "tbb/tbb_stddef.h"
 
 namespace tbb {
 
diff --git a/src/test/test_concurrent_queue.cpp b/src/old/test_concurrent_queue_v2.cpp
similarity index 99%
copy from src/test/test_concurrent_queue.cpp
copy to src/old/test_concurrent_queue_v2.cpp
index 1b48e92..2aaaadc 100644
--- a/src/test/test_concurrent_queue.cpp
+++ b/src/old/test_concurrent_queue_v2.cpp
@@ -30,7 +30,9 @@
 #include "tbb/atomic.h"
 #include "tbb/tick_count.h"
 #include "tbb/blocked_range.h"
-#include "harness.h"
+
+#include "../test/harness_assert.h"
+#include "../test/harness.h"
 
 static tbb::atomic<long> FooConstructed;
 static tbb::atomic<long> FooDestroyed;
diff --git a/src/test/test_concurrent_vector.cpp b/src/old/test_concurrent_vector_v2.cpp
similarity index 93%
copy from src/test/test_concurrent_vector.cpp
copy to src/old/test_concurrent_vector_v2.cpp
index 6947610..7bc02c3 100644
--- a/src/test/test_concurrent_vector.cpp
+++ b/src/old/test_concurrent_vector_v2.cpp
@@ -26,10 +26,10 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_vector.h"
+#include "concurrent_vector_v2.h"
 #include <cstdio>
 #include <cstdlib>
-#include "harness_assert.h"
+#include "../test/harness_assert.h"
 
 tbb::atomic<long> FooCount;
 
@@ -92,7 +92,7 @@ static void CheckVector( const tbb::concurrent_vector<Foo>& cv, size_t expected_
     ASSERT( cv.empty()==(expected_size==0), NULL );
     for( int j=0; j<int(expected_size); ++j ) {
         if( cv[j].bar()!=~j )
-            printf("ERROR on line %d for old_size=%ld expected_size=%ld j=%d\n",__LINE__,long(old_size),long(expected_size),j);
+            std::printf("ERROR on line %d for old_size=%ld expected_size=%ld j=%d\n",__LINE__,long(old_size),long(expected_size),j);
     }
 }
 
@@ -112,7 +112,7 @@ void TestResizeAndCopy() {
             for( int j=0; j<new_size; ++j ) {
                 int expected = j<old_size ? j*j : Foo::initial_value_of_bar;
                 if( v[j].bar()!=expected ) 
-                    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);
+                    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);
             }
             ASSERT( v.size()==size_t(new_size), NULL );
             for( int j=0; j<new_size; ++j ) {
@@ -158,7 +158,7 @@ struct AssignElement {
     void operator()( const tbb::concurrent_vector<int>::range_type& range ) const {
         for( iterator i=range.begin(); i!=range.end(); ++i ) {
             if( *i!=0 )
-                printf("ERROR for v[%ld]\n", long(i-base));
+                std::printf("ERROR for v[%ld]\n", long(i-base));
             *i = int(i-base);
         }
     }
@@ -171,14 +171,14 @@ struct CheckElement {
     void operator()( const tbb::concurrent_vector<int>::const_range_type& range ) const {
         for( iterator i=range.begin(); i!=range.end(); ++i )
             if( *i != int(i-base) )
-                printf("ERROR for v[%ld]\n", long(i-base));
+                std::printf("ERROR for v[%ld]\n", long(i-base));
     }
     CheckElement( iterator base_ ) : base(base_) {}
 };
 
 #include "tbb/tick_count.h"
 #include "tbb/parallel_for.h"
-#include "harness.h"
+#include "../test/harness.h"
 
 void TestParallelFor( int nthread ) {
     typedef tbb::concurrent_vector<int> vector_t;
@@ -186,18 +186,18 @@ void TestParallelFor( int nthread ) {
     v.grow_to_at_least(N);  
     tbb::tick_count t0 = tbb::tick_count::now();
     if( Verbose )
-        printf("Calling parallel_for.h with %ld threads\n",long(nthread));
+        std::printf("Calling parallel_for.h with %ld threads\n",long(nthread));
     tbb::parallel_for( v.range(10000), AssignElement(v.begin()) );
     tbb::tick_count t1 = tbb::tick_count::now();
     const vector_t& u = v;      
     tbb::parallel_for( u.range(10000), CheckElement(u.begin()) );
     tbb::tick_count t2 = tbb::tick_count::now();
     if( Verbose )
-        printf("Time for parallel_for.h: assign time = %8.5f, check time = %8.5f\n",
+        std::printf("Time for parallel_for.h: assign time = %8.5f, check time = %8.5f\n",
                (t1-t0).seconds(),(t2-t1).seconds());
     for( long i=0; size_t(i)<v.size(); ++i )
         if( v[i]!=i )
-            printf("ERROR for v[%ld]\n", i);
+            std::printf("ERROR for v[%ld]\n", i);
 }
 
 template<typename Iterator1, typename Iterator2>
@@ -227,11 +227,11 @@ template<typename Vector, typename Iterator>
 void CheckConstIterator( const Vector& u, int i, const Iterator& cp ) {
     typename Vector::const_reference pref = *cp;
     if( pref.bar()!=i )
-        printf("ERROR for u[%ld] using const_iterator\n", long(i));
+        std::printf("ERROR for u[%ld] using const_iterator\n", long(i));
     typename Vector::difference_type delta = cp-u.begin();
     ASSERT( delta==i, NULL );
     if( u[i].bar()!=i )
-        printf("ERROR for u[%ld] using subscripting\n", long(i));
+        std::printf("ERROR for u[%ld] using subscripting\n", long(i));
     ASSERT( u.begin()[i].bar()==i, NULL );
 }
 
@@ -268,7 +268,7 @@ void TestSequentialFor() {
     ASSERT( !p->is_const(), NULL );
     for( int i=0; size_t(i)<v.size(); ++i, ++p ) {
         if( (*p).state!=Foo::DefaultInitialized )
-            printf("ERROR for v[%ld]\n", long(i));
+            std::printf("ERROR for v[%ld]\n", long(i));
         typename V::reference pref = *p;
         pref.bar() = i;
         typename V::difference_type delta = p-v.begin();
@@ -287,7 +287,7 @@ void TestSequentialFor() {
     }
     tbb::tick_count t2 = tbb::tick_count::now();
     if( Verbose )
-        printf("Time for serial for:  assign time = %8.5f, check time = %8.5f\n",
+        std::printf("Time for serial for:  assign time = %8.5f, check time = %8.5f\n",
                (t1-t0).seconds(),(t2-t1).seconds());
 
     // Now go backwards
@@ -434,7 +434,7 @@ void TestConcurrentGrowBy( int nthread ) {
     }
     delete[] found;
     if( nthread>1 && inversions<m/10 )
-        printf("WARNING: not much concurrency in TestConcurrentGrowBy\n");
+        std::printf("WARNING: not much concurrency in TestConcurrentGrowBy\n");
 }
 
 //! Test the assignment operator
@@ -511,14 +511,14 @@ static void TestFindPrimes() {
     double t128 = TimeFindPrimes(128);
 
     if( Verbose ) 
-        printf("TestFindPrimes: t2==%g t128=%g\n", t2, t128 );
+        std::printf("TestFindPrimes: t2==%g t128=%g\n", t2, t128 );
 
     // We allow the 128-thread run a little extra time to allow for thread overhead.
     // Theoretically, following test will fail on machine with >128 processors.
     // But that situation is not going to come up in the near future,
     // and the generalization to fix the issue is not worth the trouble.
     if( t128>1.10*t2 ) {
-        printf("Warning: grow_by is pathetically slow: t2==%g t128=%g\n", t2, t128);
+        std::printf("Warning: grow_by is pathetically slow: t2==%g t128=%g\n", t2, t128);
     } 
 }
 
@@ -548,7 +548,7 @@ int main( int argc, char* argv[] ) {
     MinThread = 1;
     ParseCommandLine( argc, argv );
     if( MinThread<1 ) {
-        printf("ERROR: MinThread=%d, but must be at least 1\n",MinThread);
+        std::printf("ERROR: MinThread=%d, but must be at least 1\n",MinThread);
     }
 
     TestIteratorTraits<tbb::concurrent_vector<Foo>::iterator,Foo>();
@@ -565,6 +565,6 @@ int main( int argc, char* argv[] ) {
     }
     TestFindPrimes();
     TestSort();
-    printf("done\n");
+    std::printf("done\n");
     return 0;
 }
diff --git a/src/test/test_mutex.cpp b/src/old/test_mutex_v2.cpp
similarity index 90%
copy from src/test/test_mutex.cpp
copy to src/old/test_mutex_v2.cpp
index fb9e611..16c6881 100644
--- a/src/test/test_mutex.cpp
+++ b/src/old/test_mutex_v2.cpp
@@ -35,22 +35,14 @@
 //
 // Compile with _OPENMP and -openmp
 //------------------------------------------------------------------------
-#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/parallel_for.h"
+#include "tbb/atomic.h"
 #include "tbb/blocked_range.h"
+#include "tbb/parallel_for.h"
 #include "tbb/tick_count.h"
-#include "tbb/atomic.h"
-#include "harness.h"
+#include "../test/harness.h"
+#include "spin_rw_mutex_v2.h"
 #include <cstdlib>
 #include <cstdio>
-#if _OPENMP
-#include "test/OpenMP_Mutex.h"
-#endif /* _OPENMP */
-
 
 #if __linux__
 #define STD std
@@ -265,25 +257,9 @@ int main( int argc, char * argv[] ) {
 	    printf( "testing with %d workers\n", static_cast<int>(p) );
 	// Run each test 3 times.
 	for( int i=0; i<3; ++i ) {
-	    Test<tbb::spin_mutex>( "Spin Mutex" );
-#if _OPENMP
-	    Test<OpenMP_Mutex>( "OpenMP_Mutex" );
-#endif /* _OPENMP */
-	    Test<tbb::queuing_mutex>( "Queuing Mutex" );
-	    Test<tbb::mutex>( "Wrapper Mutex" );
-	    Test<tbb::queuing_rw_mutex>( "Queuing RW Mutex" );
 	    Test<tbb::spin_rw_mutex>( "Spin RW Mutex" );
             
-            TestTryAcquire_OneThread<tbb::spin_mutex>("Spin Mutex");
-            TestTryAcquire_OneThread<tbb::queuing_mutex>("Queuing Mutex");
-#if USE_PTHREAD
-            // under ifdef because on Windows tbb::mutex is reenterable and the test will fail
-            TestTryAcquire_OneThread<tbb::mutex>("Wrapper Mutex");
-#endif /* USE_PTHREAD */
             TestTryAcquire_OneThread<tbb::spin_rw_mutex>("Spin RW Mutex"); // only tests try_acquire for writers
-            TestTryAcquire_OneThread<tbb::queuing_rw_mutex>("Queuing RW Mutex"); // only tests try_acquire for writers
-
-	    TestReaderWriterLock<tbb::queuing_rw_mutex>( "Queuing RW Mutex" );
 	    TestReaderWriterLock<tbb::spin_rw_mutex>( "Spin RW Mutex" );
 	if( Verbose )
 	    printf( "calling destructor for task_scheduler_init\n" );
diff --git a/include/tbb/aligned_space.h b/src/perf/harness_barrier.h
similarity index 52%
copy from include/tbb/aligned_space.h
copy to src/perf/harness_barrier.h
index 4421c33..d1422fd 100644
--- a/include/tbb/aligned_space.h
+++ b/src/perf/harness_barrier.h
@@ -26,39 +26,43 @@
     the GNU General Public License.
 */
 
-#ifndef __TBB_aligned_space_H
-#define __TBB_aligned_space_H
+#include "tbb/atomic.h"
+#include "../tbb/tbb_misc.h"
 
-#include "tbb_stddef.h"
+#ifndef harness_barrier_H
+#define harness_barrier_H
 
-namespace tbb {
+class spin_barrier
+{
+    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 */
 
-//! Block of space aligned sufficiently to construct an array T with N elements.
-/** The elements are not constructed or destroyed by this class.
-    @ingroup memory_allocation */
-template<typename T,size_t N>
-class aligned_space {
-private:
-    union element_type {
-        size_t s;
-        long z;
-#if  _MSC_VER
-        __int64 l;
-#else
-        long long l;
-#endif /*  _MSC_VER */
-        long double x;
-        double y;
-    };
-    element_type array[(sizeof(T)*N+sizeof(element_type)-1)/sizeof(element_type)];
 public:
-    //! Pointer to beginning of array
-    T* begin() {return reinterpret_cast<T*>(this);}
+    spin_barrier( unsigned nthreads ) { initialize(nthreads); };
 
-    //! Pointer to one past last element in array.
-    T* end() {return begin()+N;}
-};
+    void initialize( unsigned nthreads ) {
+        numThreads = nthreads;
+        numThreadsFinished = 0;
+        epoch = 0;
+    };
 
-} // namespace tbb 
+    bool wait()
+    { // 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::SpinwaitWhileEq(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 */
+        numThreadsFinished = 0;
+        epoch = myEpoch+1; /* wakes up threads waiting to exit this epoch */
+        return true;
+    };
+};
 
-#endif /* __TBB_aligned_space_H */
+#endif //harness_barrier_H
diff --git a/src/perf/perf_util.h b/src/perf/perf_util.h
new file mode 100644
index 0000000..269cf2a
--- /dev/null
+++ b/src/perf/perf_util.h
@@ -0,0 +1,291 @@
+/*
+    Copyright 2005-2008 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/task_scheduler_init.h"
+#include "tbb/tick_count.h"
+#include <cmath>
+#include <cstdlib>
+#include <cerrno>
+#include <cfloat>
+#include <vector>
+#include <algorithm>
+
+#include "../src/test/harness.h"
+
+#if  __linux__ || __APPLE__ || __FreeBSD__
+    #include <sys/resource.h>
+#endif /* __APPLE__ */
+
+// The code, performance of which is to be measured, is surrounded by the StartSimpleTiming
+// and StopSimpleTiming macros. It is called "target code" or "code of interest" hereafter.
+//
+// The target code is executed inside the nested loop. Nesting is necessary to allow
+// measurements on arrays that fit cache of a particular level, while making the load
+// big enough to eliminate the influence of random deviations.
+//
+// Macro StartSimpleTiming defines reduction variable "util::anchor", which may be modified (usually 
+// by adding to) by the target code. This can be necessary to prevent optimizing compilers 
+// from throwing out the code of interest. Besides, if the target code is complex enough, 
+// make sure that all its branches contribute (directly or indirectly) to the value 
+// being added to the "util::anchor" variable.
+//
+// To factor out overhead introduced by the measurement infra code it is recommended to make 
+// a calibration run with target code replaced by a no-op (but still modifying "sum"), and
+// store the resulting time in the "util::base" variable.
+//
+// A generally good approach is to make the target code use elements of a preliminary 
+// initialized array. Then for calibration run you just need to add vector elements 
+// to the "sum" variable. To get rid of memory access delays make the array small 
+// enough to fit L2 or L1 cache (play with StartSimpleTiming arguments if necessary).
+//
+// Macro CalibrateSimpleTiming performs default calibration using "util::anchor += i;" operation.
+//
+// Macro ANCHOR_TYPE defines the type of the reduction variable. If it was not 
+// defined  before including this header, it is defined as size_t. Depending on 
+// the target code modern super scalar architectures may blend reduction operation
+// and instructions of interest differently for different target alternatives. So
+// you may play with the type to minimize out-of-order and parallel execution impact
+// on the calibration time veracity. You may even end up with different reduction 
+// variable types (and different calibration times) for different measurements.
+
+
+namespace util {
+
+typedef std::vector<double>    durations_t;
+
+    void trace_histogram ( const durations_t& t, char* histogramFileName )
+    {
+        FILE* f = histogramFileName ? fopen(histogramFileName, "wt") : stdout;
+        size_t  n = t.size();
+        const size_t num_buckets = 100;
+        double  min_val = *std::min_element(t.begin(), t.end()),
+                max_val = *std::max_element(t.begin(), t.end()),
+                bucket_size = (max_val - min_val) / num_buckets;
+        std::vector<size_t> hist(num_buckets + 1, 0);
+        for ( size_t i = 0; i < n; ++i )
+            ++hist[size_t((t[i]-min_val)/bucket_size)];
+        fprintf (f, "Histogram: nvals = %u, min = %g, max = %g, nbuckets = %u\n", (unsigned)n, min_val, max_val, (unsigned)num_buckets);
+        double bucket = min_val;
+        for ( size_t i = 0; i <= num_buckets; ++i, bucket+=bucket_size )
+            fprintf (f, "%12g\t%u\n", bucket, (unsigned)hist[i]);
+        fclose(f);
+    }
+
+    double average ( const durations_t& d, double& variation_percent, double& std_dev_percent )
+    {
+        durations_t t = d;
+        if ( t.size() > 5 ) {
+            t.erase(std::min_element(t.begin(), t.end()));
+            t.erase(std::max_element(t.begin(), t.end()));
+        }
+        size_t  n = t.size();
+        double  sum = 0,
+                min_val = *std::min_element(t.begin(), t.end()),
+                max_val = *std::max_element(t.begin(), t.end());
+        for ( size_t i = 0; i < n; ++i )
+            sum += t[i];
+        double  avg = sum / n,
+                std_dev = 0;
+        for ( size_t i = 0; i < n; ++i ) {
+            double    dev = fabs(t[i] - avg);
+            std_dev += dev * dev;
+        }
+        std_dev = sqrt(std_dev / n);
+        std_dev_percent = std_dev / avg * 100;
+        variation_percent = 100 * (max_val - min_val) / avg;
+        return avg;
+    }
+
+    static int num_threads;
+
+    static double   base = 0,
+                    base_dev = 0,
+                    base_dev_percent = 0;
+
+    static char *empty_fmt = "";
+    static int rate_field_len = 11;
+
+#if !defined(ANCHOR_TYPE)
+    #define ANCHOR_TYPE size_t
+#endif
+
+    static ANCHOR_TYPE anchor = 0;
+    
+    static double sequential_time = 0;
+
+
+#define StartSimpleTiming(nOuter, nInner) {             \
+    tbb::tick_count t1, t0 = tbb::tick_count::now();    \
+    for ( size_t j = 0; l < nOuter; ++l ) {             \
+        for ( size_t i = 0; i < nInner; ++i ) {
+
+#define StopSimpleTiming(res)                   \
+        }                                       \
+        util::anchor += (ANCHOR_TYPE)l;         \
+    }                                           \
+    t1 = tbb::tick_count::now();                \
+    printf (util::empty_fmt, util::anchor);     \
+    res = (t1-t0).seconds() - util::base;       \
+}
+
+#define CalibrateSimpleTiming(T, nOuter, nInner)    \
+    StartSimpleTiming(nOuter, nInner);              \
+        util::anchor += (ANCHOR_TYPE)i;             \
+    StopSimpleTiming(util::base);
+
+
+#define StartTimingImpl(nRuns, nOuter, nInner)      \
+    tbb::tick_count t1, t0;                         \
+    for ( size_t k = 0; k < nRuns; ++k )  {         \
+        t0 = tbb::tick_count::now();                \
+        for ( size_t l = 0; l < nOuter; ++l ) {     \
+            for ( size_t i = 0; i < nInner; ++i ) {
+
+#define StartTiming(nRuns, nOuter, nInner) {        \
+    util::durations_t  t_(nRuns);                   \
+    StartTimingImpl(nRuns, nOuter, nInner)
+
+#define StartTimingEx(vDurations, nRuns, nOuter, nInner) {  \
+    util::durations_t  &t_ = vDurations;                    \
+    vDurations.resize(nRuns);                               \
+    StartTimingImpl(nRuns, nOuter, nInner)
+
+#define StopTiming(Avg, StdDev, StdDevPercent)      \
+            }                                       \
+            util::anchor += (ANCHOR_TYPE)l;         \
+        }                                           \
+        t1 = tbb::tick_count::now();                \
+        t_[k] = (t1 - t0).seconds()/nrep;           \
+    }                                               \
+    printf (util::empty_fmt, util::anchor);         \
+    Avg = util::average(t_, StdDev, StdDevPercent); \
+}
+
+#define CalibrateTiming(nRuns, nOuter, nInner)      \
+    StartTiming(nRuns, nOuter, nInner);             \
+        util::anchor += (ANCHOR_TYPE)i;             \
+    StopTiming(util::base, util::base_dev, util::base_dev_percent);
+
+} // namespace util
+
+
+#ifndef NRUNS
+    #define NRUNS               7
+#endif
+
+#ifndef ONE_TEST_DURATION
+    #define ONE_TEST_DURATION   0.01
+#endif
+
+#define no_histogram  ((char*)-1)
+
+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) {
+        CalibrateTiming(NRUNS, 1, nrep);
+        StartTiming(NRUNS, 1, nrep);
+        pfn();
+        StopTiming(time, variation, deviation);
+        time -= util::base;
+        if ( time > 1e-6 )
+            break;
+        nrep *= 2;
+    }
+    nrep *= (size_t)ceil(ONE_TEST_DURATION/time);
+    CalibrateTiming(NRUNS, 1, nrep);    // sets util::base
+    util::durations_t  t;
+    StartTimingEx(t, NRUNS, 1, nrep);
+        pfn();
+    StopTiming(time, variation, deviation);
+    if ( histogramFileName != (char*)-1 )
+        util::trace_histogram(t, histogramFileName);
+    double clean_time = time - util::base;
+    if ( title ) {
+        // Deviation (in percent) is calulated for the Gross time
+        printf ("\n%-34s %.2e  %5.1f      ", title, clean_time, deviation);
+        if ( util::sequential_time != 0  )
+            //printf ("% .2e  ", clean_time - util::sequential_time);
+            printf ("% 10.1f      ", 100*(clean_time - util::sequential_time)/util::sequential_time);
+        else
+            printf ("%*s ", util::rate_field_len, "");
+        printf ("%-9u %1.6f    |", (unsigned)nrep, time * nrep);
+    }
+    return clean_time;
+}
+
+
+/// Runs the test function, does statistical processing, and, if title is nonzero, prints results.
+/** If histogramFileName is a string, the histogram of individual runs is generated and stored
+    in a file with the given name. If it is NULL then the histogram is printed on the console.
+    By default no histogram is generated. 
+    The histogram format is: "rate bucket start" "number of tests in this bucket". **/
+inline 
+void RunTest ( const char* title_fmt, size_t workload_param, void (*pfn_test)(), char* histogramFileName = no_histogram ) {
+    char title[1024];
+    sprintf(title, title_fmt, (long)workload_param);
+    RunTestImpl(title, pfn_test, histogramFileName);
+}
+
+inline 
+void CalcSequentialTime ( void (*pfn)() ) {
+    util::sequential_time = RunTestImpl(NULL, pfn) / util::num_threads;
+}
+
+inline 
+void ResetSequentialTime () {
+    util::sequential_time = 0;
+}
+
+
+inline void PrintTitle() {
+    //printf ("%-32s %-*s Std Dev,%%  %-*s  Repeats   Gross time  Infra time  | NRUNS = %u", 
+    //        "Test name", util::rate_field_len, "Rate", util::rate_field_len, "Overhead", NRUNS);
+    printf ("%-34s %-*s Std Dev,%%  Par.overhead,%%  Repeats   Gross time  | Nruns %u, Nthreads %d", 
+            "Test name", util::rate_field_len, "Rate", NRUNS, util::num_threads);
+}
+
+void Test();
+
+inline
+int test_main( int argc, char* argv[] ) {
+    ParseCommandLine( argc, argv );
+    ASSERT (MinThread>=2, "Minimal number of threads must be 2 or more");
+    char buf[128];
+    util::rate_field_len = 2 + sprintf(buf, "%.1e", 1.1);
+    for ( int i = MinThread; i <= MaxThread; ++i ) {
+        tbb::task_scheduler_init init (i);
+        util::num_threads = i;
+        PrintTitle();
+        Test();
+        printf("\n");
+    }
+    printf("done\n");
+    return 0;
+}
diff --git a/src/perf/statistics.cpp b/src/perf/statistics.cpp
new file mode 100644
index 0000000..94bcea3
--- /dev/null
+++ b/src/perf/statistics.cpp
@@ -0,0 +1,411 @@
+/*
+    Copyright 2005-2008 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 "statistics.h"
+#include "statistics_xml.h"
+
+#define COUNT_PARAMETERS 3
+
+#ifdef _WIN32
+#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); 
+}
+
+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); 
+}
+
+
+StatisticsCollector::TestCase StatisticsCollector::SetTestCase(const char *name, const char *mode, int threads)
+{
+    string KeyName(name);
+    switch (SortMode)
+    {
+	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->Results.reserve(RoundTitles.size());
+        Statistics[KeyName] = CurrentKey;
+    }
+    return TestCase(CurrentKey);
+}
+
+StatisticsCollector::~StatisticsCollector()
+{
+    for(Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+        delete i->second;
+}
+
+void StatisticsCollector::ReserveRounds(size_t index)
+{
+    size_t i = RoundTitles.size();
+    if (i > index) return;
+    char buf[16];
+    RoundTitles.resize(index+1);
+    for(; i <= index; i++) {
+        snprintf( buf, 15, "%u", unsigned(i+1) );
+        RoundTitles[i] = buf;
+    }
+    for(Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) {
+        if(!i->second) printf("!!!'%s' = NULL\n", i->first.c_str());
+        else i->second->Results.reserve(index+1);
+    }
+}
+
+void StatisticsCollector::AddRoundResult(const TestCase &key, value_t v)
+{
+    ReserveRounds(key.access->Results.size());
+    key.access->Results.push_back(v);
+}
+
+void StatisticsCollector::SetRoundTitle(size_t index, const char *fmt, ...)
+{
+    vargf2buff(buff, 128, fmt);
+    ReserveRounds(index);
+    RoundTitles[index] = buff;
+}
+
+void StatisticsCollector::AddStatisticValue(const TestCase &key, const char *type, const char *fmt, ...)
+{
+    vargf2buff(buff, 128, fmt);
+    AnalysisTitles.insert(type);
+    key.access->Analysis[type] = buff;
+}
+
+void StatisticsCollector::AddStatisticValue(const char *type, const char *fmt, ...)
+{
+    vargf2buff(buff, 128, fmt);
+    AnalysisTitles.insert(type);
+    CurrentKey->Analysis[type] = buff;
+}
+
+void StatisticsCollector::SetStatisticFormula(const char *name, const char *formula)
+{
+    Formulas[name] = formula;
+}
+
+void StatisticsCollector::SetTitle(const char *fmt, ...)
+{
+    vargf2buff(buff, 256, fmt);
+    Title = buff;
+}
+
+string ExcelFormula(const string &fmt, size_t place, size_t rounds, bool is_horizontal)
+{
+    char buff[16];
+    if(is_horizontal)
+        snprintf(buff, 15, "RC[%u]:RC[%u]", unsigned(place), unsigned(place+rounds-1));
+    else
+        snprintf(buff, 15, "R[%u]C:R[%u]C", unsigned(place+1), unsigned(place+rounds));
+    string result(fmt); size_t pos = 0;
+    while ( (pos = result.find("ROUNDS", pos, 6)) != string::npos )
+        result.replace(pos, 6, buff);
+    return result;
+}
+
+void StatisticsCollector::Print(int dataOutput)
+{
+	FILE *OutputFile;
+	if (dataOutput & StatisticsCollector::Stdout)
+	{
+        printf("\n-=# %s #=-\n", Title.c_str());
+        if(SortMode == ByThreads)
+            printf("    Name    |  #  | Mode ");
+        else
+            printf("    Name    | Mode |  #  ");
+        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++)
+		{
+            if(SortMode == ByThreads)
+			    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;
+            AnalysisTitles_t::iterator t = AnalysisTitles.begin();
+			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, "");
+                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());
+            //-----------------------
+			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);
+            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>",
+                    i->second->Name.c_str(), i->second->Threads, i->second->Mode.c_str());
+				//statistics
+                AnalysisTitles_t::iterator t = AnalysisTitles.begin();
+				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
+                Results_t &r = i->second->Results;
+				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, "<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';"
+                                "v.style.visibility='hidden';\">Flip[V]</a></td>\n"
+                                "<td>%s</td><td>%s</td><td colspan=%u>%s</td>", 
+                DateBuff, TimerBuff, unsigned(max(Statistics.size()-2,size_t(1))), Title.c_str());
+
+            fprintf(OutputFile, "</tr>\n<tr bgcolor=#CCFFCC><td bgcolor=#CCFFFF>Name</td>");
+            for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+                fprintf(OutputFile, "<td>%s</td>", i->second->Name.c_str());
+            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>");
+            for (Statistics_t::iterator m = Statistics.begin(); m != Statistics.end(); m++)
+                fprintf(OutputFile, "<td>%s</td>", m->second->Mode.c_str());
+
+            for (AnalysisTitles_t::iterator t = AnalysisTitles.begin(); t != AnalysisTitles.end(); t++)
+            {
+                fprintf(OutputFile, "</tr>\n<tr bgcolor=#FFFF99><td bgcolor=#CCFFFF>%s</td>", t->c_str()+1);
+                for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+                    fprintf(OutputFile, "<td>%s</td>", i->second->Analysis.count(*t)?i->second->Analysis[*t].c_str():" ");
+            }
+
+            for (size_t r = 0; r < RoundTitles.size(); r++)
+            {
+                fprintf(OutputFile, "</tr>\n<tr><td bgcolor=#CCFFFF>%s</td>", RoundTitles[r].c_str());
+                for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+                {
+                    Results_t &result = i->second->Results;
+                    fprintf(OutputFile, "<td>");
+                    if(result.size() > r)
+                        fprintf(OutputFile, ResultsFmt, result[r]);
+                    fprintf(OutputFile, "</td>");
+                }
+            }
+            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];
+#if _WIN32 || _WIN64
+			strcpy(UserName,getenv("USERNAME"));
+#else
+			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);
+            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
+                AnalysisTitles_t::iterator at = AnalysisTitles.begin();
+				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]);
+				}
+                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, 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, XMLERow);
+			//-----------------
+            for (AnalysisTitles_t::iterator t = AnalysisTitles.begin(); t != AnalysisTitles.end(); t++)
+			{
+				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);
+			}
+            //-------------------------------------
+            for (Formulas_t::iterator t = Formulas.begin(); t != Formulas.end(); t++)
+            {
+                fprintf(OutputFile, XMLBRow);
+                fprintf(OutputFile, XMLAnalysisTitle, t->first.c_str()+1);
+                size_t place = 0;
+                for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++)
+                    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++)
+                    if(i->second->Results.size() > 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);
+		}
+	}
+}
diff --git a/src/perf/statistics.h b/src/perf/statistics.h
new file mode 100644
index 0000000..545186c
--- /dev/null
+++ b/src/perf/statistics.h
@@ -0,0 +1,188 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+// Internal Intel tool
+
+#ifndef __STATISTICS_H__
+#define __STATISTICS_H__
+
+#define _CRT_SECURE_NO_DEPRECATE 1
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <vector>
+#include <map>
+#include <set>
+#include <string>
+#include <time.h>
+
+using namespace std;
+typedef double value_t;
+
+/*
+   Statistical collector class.
+  
+   Resulting table output:
+        +---------------------------------------------------------------------------+
+        | [Date] <Title>...                                                         |
+        +----------+----v----+--v---+----------------+------------+-..-+------------+
+        | TestName | Threads | Mode | Rounds results | Stat_type1 | .. | Stat_typeN |
+        +----------+---------+------+-+-+-+-..-+-+-+-+------------+-..-+------------+
+        |          |         |      | | | | .. | | | |            |    |            |
+        ..        ...       ...     ..................            ......           ..
+        |          |         |      | | | | .. | | | |            |    |            |
+        +----------+---------+------+-+-+-+-..-+-+-+-+------------+-..-+------------+
+
+   Iterating table output:
+        +---------------------------------------------------------------------------+
+        | [Date] <TestName>, Threads: <N>, Mode: <M>; for <Title>...                |
+        +----------+----v----+--v---+----------------+------------+-..-+------------+
+        
+*/
+
+class StatisticsCollector
+{
+public:
+    typedef map<string, string> Analysis_t;
+    typedef vector<value_t> Results_t;
+
+protected:
+    StatisticsCollector(const StatisticsCollector &);
+
+    struct StatisticResults
+    {
+        string              Name;
+        string              Mode;
+        int                 Threads;
+        Results_t           Results;
+        Analysis_t          Analysis;
+    };
+
+    // internal members
+	//bool OpenFile;
+    StatisticResults *CurrentKey;
+    string Title;
+    const char /**Name,*/ *ResultsFmt;
+	string Name;
+    //! Data
+    typedef map<string, StatisticResults*> Statistics_t;
+    Statistics_t Statistics;
+    typedef vector<string> RoundTitles_t;
+    RoundTitles_t RoundTitles;
+    //TODO: merge those into one structure
+    typedef map<string, string> Formulas_t;
+    Formulas_t   Formulas;
+    typedef set<string> AnalysisTitles_t;
+    AnalysisTitles_t AnalysisTitles;
+
+public:
+    struct TestCase {
+        StatisticResults *access;
+        TestCase() : access(0) {}
+        TestCase(StatisticResults *link) : access(link) {}
+        const char *getName() const { return access->Name.c_str(); }
+        const char *getMode() const { return access->Mode.c_str(); }
+        int getThreads()       const { return access->Threads; }
+        const Results_t &getResults() const { return access->Results; }
+        const Analysis_t &getAnalysis() const { return access->Analysis; }
+    };
+
+    enum Sorting {
+        ByThreads, ByAlg
+    };
+
+    //! Data and output types
+    enum DataOutput {
+        // Verbosity level enumeration
+        Statistic = 1,     //< Analytical data - computed after all iterations and rounds passed
+        Result    = 2,     //< Testing data    - collected after all iterations passed
+        Iteration = 3,     //< Verbose data    - collected at each iteration (for each size - in case of containers)
+        // ExtraVerbose is not applicabe yet :) be happy, but flexibility is always welcome
+
+        // Next constants are bit-fields
+        Stdout   = 1<<8,    //< Output to the console
+        TextFile = 1<<9,    //< Output to plain text file "name.txt" (delimiter is TAB by default)
+        ExcelXML = 1<<10,   //< Output to Excel-readable XML-file "name.xml"
+        HTMLFile = 1<<11    //< Output to HTML file "name.html"
+    };
+
+    //! Constructor. Specify tests set name which used as name of output files
+    StatisticsCollector(const char *name, Sorting mode = ByThreads, const char *fmt = "%g")
+        :  CurrentKey(NULL), ResultsFmt(fmt), Name(name), SortMode(mode) {}
+
+    ~StatisticsCollector();
+
+    //! Set tests set title, supporting printf-like arguments
+    void SetTitle(const char *fmt, ...);
+
+    //! Specify next test key
+    TestCase SetTestCase(const char *name, const char *mode, int threads);
+    //! Specify next test key
+    void SetTestCase(const TestCase &t) { SetTestCase(t.getName(), t.getMode(), t.getThreads()); }
+    //! Reserve specified number of rounds. Use for effeciency. Used mostly internally
+    void ReserveRounds(size_t index);
+    //! Add result of the measure
+    void AddRoundResult(const TestCase &, value_t v);
+    //! Add result of the current measure
+    void AddRoundResult(value_t v) { if(CurrentKey) AddRoundResult(TestCase(CurrentKey), v); }
+    //! Add title of round
+    void SetRoundTitle(size_t index, const char *fmt, ...);
+    //! Add numbered title of round
+    void SetRoundTitle(size_t index, int num) { SetRoundTitle(index, "%d", num); }
+    //! Get number of rounds
+    size_t GetRoundsCount() const { return RoundTitles.size(); }
+    // Set statistic value for the test
+    void AddStatisticValue(const TestCase &, const char *type, const char *fmt, ...);
+    // Set statistic value for the current test
+    void AddStatisticValue(const char *type, const char *fmt, ...);
+    //! Add Excel-processing formulas. @arg formula can contain more than one instances of
+    //! ROUNDS template which transforms into the range of cells with result values
+    //TODO://! #1 .. #n templates represent data cells from the first to the last
+    //TODO: merge with Analisis
+    void SetStatisticFormula(const char *name, const char *formula);
+
+    //! Data output
+    void Print(int dataOutput);
+
+private:
+    Sorting SortMode;
+};
+
+//! using: Func(const char *fmt, ...) { vargf2buff(buff, 128, fmt);...
+#define vargf2buff(name, size, fmt) char name[size]; memset(name, 0, size); va_list args; va_start(args, fmt); vsnprintf( name, size-1, fmt, args)
+
+inline std::string Format(const char *fmt, ...) {
+    vargf2buff(buf, 1024, fmt); // from statistics.h
+    return std::string(buf);
+}
+
+#ifdef STATISTICS_INLINE
+#include "statistics.cpp"
+#endif
+#endif //__STATISTICS_H__
diff --git a/src/perf/statistics_xml.h b/src/perf/statistics_xml.h
new file mode 100644
index 0000000..da83848
--- /dev/null
+++ b/src/perf/statistics_xml.h
@@ -0,0 +1,208 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+const char XMLBRow[]=
+"   <Row>\n";
+
+const char XMLERow[]=
+"   </Row>\n";
+
+const char XMLHead[]=
+"<?xml version=\"1.0\"?>\n"
+"<?mso-application progid=\"Excel.Sheet\"?>\n\
+<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n\
+ xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n\
+ xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n\
+ xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n\
+ xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n\
+ <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n\
+  <Author>%s</Author>\n\
+  <Created>%s</Created>\n\
+  <Company>Intel Corporation</Company>\n\
+ </DocumentProperties>\n\
+ <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n\
+  <RefModeR1C1/>\n\
+ </ExcelWorkbook>\n";
+ 
+ const char XMLStyles[]=
+ " <Styles>\n\
+  <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n\
+   <Alignment ss:Vertical=\"Bottom\" ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\
+  </Style>\n\
+  <Style ss:ID=\"s26\">\n\
+   <Alignment ss:Vertical=\"Top\"  ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\
+   <Borders>\n\
+    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+   </Borders>\n\
+   <Interior ss:Color=\"#FFFF99\" ss:Pattern=\"Solid\"/>\n\
+  </Style>\n\
+  <Style ss:ID=\"s25\">\n\
+   <Alignment ss:Vertical=\"Top\"  ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\
+   <Borders>\n\
+    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+   </Borders>\n\
+   <Interior ss:Color=\"#CCFFFF\" ss:Pattern=\"Solid\"/>\n\
+  </Style>\n\
+  <Style ss:ID=\"s24\">\n\
+   <Alignment ss:Vertical=\"Top\"  ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\
+   <Borders>\n\
+    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+   </Borders>\n\
+   <Interior ss:Color=\"#CCFFCC\" ss:Pattern=\"Solid\"/>\n\
+  </Style>\n\
+  <Style ss:ID=\"s23\">\n\
+   <Alignment ss:Vertical=\"Top\"  ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\
+   <Borders>\n\
+    <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+    <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\
+   </Borders>\n\
+  </Style>\n\
+ </Styles>\n";
+
+const char XMLBeginSheet[]=
+" <Worksheet ss:Name=\"%s\">\n";
+
+const char XMLNames[]=
+"  <Names>\n\
+   <NamedRange ss:Name=\"_FilterDatabase\" ss:RefersTo=\"R%dC%d:R%dC%d\" ss:Hidden=\"1\"/>\n\
+  </Names>\n";
+
+const char XMLBeginTable[]=
+"  <Table ss:ExpandedColumnCount=\"%d\" ss:ExpandedRowCount=\"%d\" x:FullColumns=\"1\"\n\
+   x:FullRows=\"1\">\n";
+   
+const char XMLColumsHorizontalTable[]=
+"   <Column ss:Index=\"1\" ss:Width=\"108.75\"/>\n\
+   <Column ss:Index=\"%d\" ss:Width=\"77.25\" ss:Span=\"%d\"/>\n";
+ 
+const char XMLColumsVerticalTable[]= 
+"   <Column ss:Index=\"1\" ss:Width=\"77.25\" ss:Span=\"%d\"/>\n";
+
+const char XMLNameAndTime[]=
+"    <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n\
+    <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n\
+    <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n";
+
+const char XMLTableParamAndTitle[]=
+"    <Cell><Data ss:Type=\"Number\">%d</Data></Cell>\n\
+    <Cell><Data ss:Type=\"Number\">%d</Data></Cell>\n\
+    <Cell><Data ss:Type=\"Number\">%d</Data></Cell>\n\
+    <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n";
+
+//--------------
+const char XMLCellTopName[]=
+"   <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">Name</Data></Cell>\n";
+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";
+//---------------------
+const char XMLAnalysisTitle[]=
+"   <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">%s</Data></Cell>\n";
+
+const char XMLCellName[]=
+"    <Cell ss:StyleID=\"s24\"><Data ss:Type=\"String\">%s</Data></Cell>\n";
+
+const char XMLCellThread[]=
+"    <Cell ss:StyleID=\"s24\"><Data ss:Type=\"Number\">%d</Data></Cell>\n";
+
+const char XMLCellMode[]=
+"    <Cell ss:StyleID=\"s24\"><Data ss:Type=\"String\">%s</Data></Cell>\n";
+
+const char XMLCellAnalysis[]=
+"    <Cell ss:StyleID=\"s26\"><Data ss:Type=\"String\">%s</Data></Cell>\n";
+
+const char XMLCellFormula[]=
+"    <Cell ss:StyleID=\"s26\" ss:Formula=\"%s\"><Data ss:Type=\"Number\"></Data></Cell>\n";
+
+const char XMLCellData[]=
+"    <Cell ss:StyleID=\"s23\"><Data ss:Type=\"Number\">%g</Data></Cell>\n";
+
+const char XMLMergeRow[]=
+"   <Cell ss:StyleID=\"s23\" ss:MergeAcross=\"%d\" ><Data ss:Type=\"String\"></Data></Cell>\n";
+
+const char XMLCellEmptyWhite[]=
+"    <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n";
+
+const char XMLCellEmptyTitle[]=
+"    <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\"></Data></Cell>\n";
+
+const char XMLEndTable[]=
+"  </Table>\n";
+
+const char XMLAutoFilter[]=
+"  <AutoFilter x:Range=\"R%dC%d:R%dC%d\" xmlns=\"urn:schemas-microsoft-com:office:excel\">\n\
+  </AutoFilter>\n";
+
+const char XMLEndWorkSheet[]=
+ " </Worksheet>\n";
+
+const char XMLWorkSheetProperties[]=
+"  <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n\
+   <Unsynced/>\n\
+   <Selected/>\n\
+   <FreezePanes/>\n\
+   <FrozenNoSplit/>\n\
+   <SplitHorizontal>%d</SplitHorizontal>\n\
+   <TopRowBottomPane>%d</TopRowBottomPane>\n\
+   <SplitVertical>%d</SplitVertical>\n\
+   <LeftColumnRightPane>%d</LeftColumnRightPane>\n\
+   <ActivePane>0</ActivePane>\n\
+   <Panes>\n\
+    <Pane>\n\
+     <Number>3</Number>\n\
+    </Pane>\n\
+    <Pane>\n\
+     <Number>1</Number>\n\
+    </Pane>\n\
+    <Pane>\n\
+     <Number>2</Number>\n\
+    </Pane>\n\
+    <Pane>\n\
+     <Number>0</Number>\n\
+     <ActiveRow>0</ActiveRow>\n\
+     <ActiveCol>6</ActiveCol>\n\
+    </Pane>\n\
+   </Panes>\n\
+   <ProtectObjects>False</ProtectObjects>\n\
+   <ProtectScenarios>False</ProtectScenarios>\n\
+  </WorksheetOptions>\n";
+
+const char XMLEndWorkbook[]=
+ "</Workbook>\n";
diff --git a/src/perf/time_base.cpp b/src/perf/time_base.cpp
new file mode 100644
index 0000000..11ef231
--- /dev/null
+++ b/src/perf/time_base.cpp
@@ -0,0 +1,260 @@
+/*
+    Copyright 2005-2008 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/blocked_range.h"
+#include "tbb/parallel_for.h"
+#include "tbb/parallel_reduce.h"
+
+
+#define NRUNS               10
+#define ONE_TEST_DURATION   0.01
+
+#include "perf_util.h"
+
+
+#define NUM_CHILD_TASKS     128
+#define NUM_ROOT_TASKS      16
+
+#define N               1000000
+#define FINE_GRAIN      50
+#define MED_GRAIN       500
+#define COARSE_GRAIN    10000
+
+
+typedef ANCHOR_TYPE count_type;
+typedef tbb::blocked_range<count_type> range_type;
+
+const count_type NUM_leaf_tasks = NUM_CHILD_TASKS * NUM_ROOT_TASKS;
+
+const count_type N_finest = (count_type)(N/log((double)N)/10);
+const count_type N_fine = N_finest * 10;
+
+
+class static_task_holder {
+public:
+    tbb::task   *my_simple_leaf_task_ptr;
+    
+    static_task_holder ();
+};
+
+static static_task_holder s_tasks;
+
+
+static size_t s_num_iterations = 0;
+
+
+class simple_leaf_task : public tbb::task
+{
+    task* execute () {
+        for ( size_t i=0; i < s_num_iterations; ++i )
+            util::anchor += i;
+            //util::anchor += size_t(log10((double)util::anchor)*10);
+        return NULL;
+    }
+};
+
+class simple_root_task : public tbb::task
+{
+    task* execute () {
+        set_ref_count(NUM_leaf_tasks + 1);
+        for ( size_t i = 0; i < NUM_leaf_tasks; ++i ) {
+            simple_leaf_task &t = *new( allocate_child() ) simple_leaf_task;
+            spawn(t);
+        }
+        return NULL;
+    }
+};
+
+void Work1 () {
+    for ( size_t i=0; i < NUM_leaf_tasks; ++i )
+        s_tasks.my_simple_leaf_task_ptr->execute();
+}
+
+void Test1_1 () {
+    tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
+    r.set_ref_count(NUM_leaf_tasks + 1);
+    for ( size_t i = 0; i < NUM_leaf_tasks; ++i ) {
+        simple_leaf_task &t = *new( r.allocate_child() ) simple_leaf_task;
+        r.spawn(t);
+    }
+    r.wait_for_all();
+    r.destroy(r);
+}
+
+void Test1_2 ()
+{
+    simple_root_task &r = *new( tbb::task::allocate_root() ) simple_root_task;
+    tbb::task::spawn_root_and_wait(r);
+}
+
+
+class children_launcher_task : public tbb::task
+{
+    task* execute () {
+        set_ref_count(NUM_CHILD_TASKS + 1);
+        for ( size_t i = 0; i < NUM_CHILD_TASKS; ++i ) {
+            simple_leaf_task &t = *new( allocate_child() ) simple_leaf_task;
+            spawn(t);
+        }
+        return NULL;
+    }
+};
+
+class root_launcher_task : public tbb::task
+{
+    task* execute () {
+        children_launcher_task &r = *new( allocate_root() ) children_launcher_task;
+        spawn_root_and_wait(r);
+        return NULL;
+    }
+};
+
+class hierarchy_root_task : public tbb::task
+{
+    task* execute () {
+        tbb::task_list  tl;
+        for ( size_t i = 0; i < NUM_ROOT_TASKS; ++i ) {
+            root_launcher_task &r = *new( allocate_root() ) root_launcher_task;
+            tl.push_back(r);
+        }
+        spawn_root_and_wait(tl);
+        return NULL;
+    }
+};
+
+void Test1_3 ()
+{
+    hierarchy_root_task &r = *new( tbb::task::allocate_root() ) hierarchy_root_task;
+    tbb::task::spawn_root_and_wait(r);
+}
+
+
+static size_t   s_range = N,
+                s_grain = 1;
+
+class simple_pfor_body {
+public:
+    void operator()( const range_type& r ) const {
+        count_type end = r.end();
+        for( count_type i = r.begin(); i < end; ++i )
+            util::anchor += i;
+    }
+};
+
+void Work2 () {
+    simple_pfor_body body;
+    range_type range(0, s_range, s_grain);
+    body(range);
+}
+
+void Test2 () {
+    tbb::parallel_for( range_type(0, s_range, s_grain), simple_pfor_body() );
+}
+
+void Test2_0 () {
+    volatile count_type zero = 0;
+    tbb::parallel_for( range_type(0, zero, 1), simple_pfor_body() );
+}
+
+
+class simple_preduce_body {
+public:
+    count_type my_sum;
+    simple_preduce_body () : my_sum(0) {}
+    simple_preduce_body ( simple_preduce_body&, tbb::split ) : my_sum(0) {}
+    void join( simple_preduce_body& rhs ) { my_sum += rhs.my_sum;}
+    void operator()( const range_type& r ) {
+        count_type end = r.end();
+        for( count_type i = r.begin(); i < end; ++i )
+            util::anchor += i;
+        my_sum = util::anchor;
+    }
+};
+
+void Work3 () {
+    simple_preduce_body body;
+    range_type range(0, s_range, s_grain);
+    body(range);
+}
+
+void Test3 () {
+    simple_preduce_body body;
+    tbb::parallel_reduce( range_type(0, s_range, s_grain), body );
+}
+
+void Test3_0 () {
+    volatile count_type zero = 0;
+    simple_preduce_body body;
+    tbb::parallel_reduce( range_type(0, zero, 1), body );
+}
+
+
+static_task_holder::static_task_holder () {
+    static simple_leaf_task s_t1;
+    my_simple_leaf_task_ptr = &s_t1;
+}
+
+void Test () {
+    const size_t num_task_tree_workloads = 4;
+    size_t task_tree_workloads[num_task_tree_workloads] = {0, 50, 500, 10000};
+    for (size_t i = 0; i < num_task_tree_workloads; ++i ) {
+        size_t n = task_tree_workloads[i];
+        s_num_iterations = n;
+        CalcSequentialTime(Work1);
+        RunTest ("Bunch of leaves: %d adds/task", n, Test1_1);
+        RunTest ("Simple task tree: %d adds/task", n, Test1_2);
+        RunTest ("Complex task tree: %d adds/task", n, Test1_3);
+    }
+
+    // Using N_fine constant in the body of this function results in incorrect code
+    // generation by icl 10.1.014
+    const size_t num_alg_workloads = 4;
+    size_t alg_ranges[num_alg_workloads] = {N_fine/10, N_fine, N, N};
+    size_t alg_grains[num_alg_workloads] = {1, FINE_GRAIN, MED_GRAIN, COARSE_GRAIN};
+    
+    //RunTest ("Empty pfor", 0, Test2_0);
+    for (size_t i = 0; i < num_alg_workloads; ++i ) {
+        s_range = alg_ranges[i];
+        s_grain = alg_grains[i];
+        CalcSequentialTime(Work2);
+        RunTest ("pfor: %d adds/body", s_grain, Test2);
+    }
+
+    //RunTest ("Empty preduce", Test3_0);
+    for (size_t i = 0; i < num_alg_workloads; ++i ) {
+        s_range = alg_ranges[i];
+        s_grain = alg_grains[i];
+        CalcSequentialTime(Work3);
+        RunTest ("preduce: %d adds/body", s_grain, Test3);
+    }
+}
+
+int main( int argc, char* argv[] ) {
+    test_main(argc, argv);
+    return 0;
+}
diff --git a/src/perf/time_framework.h b/src/perf/time_framework.h
new file mode 100644
index 0000000..2ef245e
--- /dev/null
+++ b/src/perf/time_framework.h
@@ -0,0 +1,280 @@
+/*
+    Copyright 2005-2008 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 <cstdlib>
+#include <math.h>
+#include <vector>
+#include <string>
+#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"
+#define STATISTICS_INLINE
+#include "statistics.h"
+
+class Timer {
+    tbb::tick_count tick;
+public:
+    Timer() { tick = tbb::tick_count::now(); }
+    double get_time()  { return (tbb::tick_count::now() - tick).seconds(); }
+    double diff_time(const Timer &newer) { return (newer.tick - tick).seconds(); }
+    double mark_time() { tbb::tick_count t1(tbb::tick_count::now()), t2(tick); tick = t1; return (t1 - t2).seconds(); }
+    double mark_time(const Timer &newer) { tbb::tick_count t(tick); tick = newer.tick; return (tick - t).seconds(); }
+};
+
+class TesterBase /*: public tbb::internal::no_copy*/ {
+protected:
+    friend class TestProcessor;
+    friend class TestRunner;
+
+    //! it is barrier for synchronizing between threads
+    spin_barrier *barrier;
+    
+    //! number of tests per this tester
+    const int tests_count;
+    
+    //! number of threads to operate
+    int threads_count;
+
+    //! some value for tester
+    int value;
+    
+public:
+    //! init tester base. @arg ntests is number of embeded tests in this tester.
+    TesterBase(int ntests)
+        : barrier(NULL), tests_count(ntests)
+    {}
+    virtual ~TesterBase() {}
+
+    //! internal function
+    void base_init(int v, int t, spin_barrier &b) {
+        threads_count = t;
+        barrier = &b;
+        value = v;
+        init();
+    }
+
+    //! optionally override to init after value and threads count were set.
+    virtual void init() { }
+
+    //! Override to provide your names
+    virtual std::string get_name(int testn) {
+        return Format("test %d", testn);
+    }
+
+    //! Override to provide main test's entry function returns a value to record
+    virtual value_t test(int testn, int threadn) = 0;
+};
+
+/*****
+a user's tester concept:
+
+class tester: public TesterBase {
+public:
+    //! init tester with known amount of work
+    tester() : TesterBase(<user-specified tests count>) { ... }
+
+    //! run a test with sequental number @arg test_number for @arg thread.
+	/ *override* / value_t test(int test_number, int thread);
+};
+
+******/
+
+template<typename Tester, bool longest_time = false>
+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();
+    }
+};
+
+template<typename Tester, bool longest_time = false>
+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);
+    }
+};
+
+// operate with single tester
+class TestRunner {
+    friend class TestProcessor;
+    friend struct RunArgsBody;
+    TestRunner(const TestRunner &); // don't copy
+
+    const char *tester_name;
+    StatisticsCollector *stat;
+    std::vector<std::vector<StatisticsCollector::TestCase> > keys;
+
+public:
+    TesterBase &tester;
+
+    template<typename Test>
+    TestRunner(const char *name, Test *test)
+        : tester_name(name), tester(*dynamic_cast<TesterBase*>(test))
+    {}
+    
+    ~TestRunner() { delete &tester; }
+
+    void init(int value, int threads, spin_barrier &barrier, StatisticsCollector *s) {
+        tester.base_init(value, threads, barrier);
+        stat = s;
+        keys.resize(tester.tests_count);
+        for(int testn = 0; testn < tester.tests_count; testn++) {
+            keys[testn].resize(threads);
+            std::string test_name(tester.get_name(testn));
+            for(int threadn = 0; threadn < threads; threadn++)
+                keys[testn][threadn] = stat->SetTestCase(tester_name, test_name.c_str(), threadn);
+        }
+    }
+
+    void test(int threadn) {
+        for(int testn = 0; testn < tester.tests_count; testn++) {
+            tester.barrier->wait();
+            value_t result = tester.test(testn, threadn);
+            stat->AddRoundResult(keys[testn][threadn], result);
+        }
+    }
+
+    void post_process(StatisticsCollector &report) {
+        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];
+            for(int threadn = 1; threadn < threads; threadn++) {
+                result += keys[testn][threadn].getResults()[coln]; // for SUM or AVG
+                // can do also: MIN/MAX
+            }
+            result /= threads; // AVG
+            report.SetTestCase(tester_name, tester.get_name(testn).c_str(), threads);
+            report.AddRoundResult(result); // final result
+        }
+    }
+};
+
+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);
+    }
+};
+
+//! Main test processor.
+/** Override or use like this:
+ class MyTestCollection : public TestProcessor {
+    void factory(int value, int threads) {
+        process( value, threads,
+            run("my1", new tester<my1>() ),
+            run("my2", new tester<my2>() ),
+        end );
+        if(value == threads)
+            stat->Print();
+    }
+};
+*/
+
+class TestProcessor {
+    friend class TesterBase;
+
+    // <threads, collector>
+    typedef std::map<int, StatisticsCollector *> statistics_collection;
+    statistics_collection stat_by_threads;
+
+protected:
+    // Members
+    const char *collection_name;
+    // current stat
+    StatisticsCollector *stat;
+    // token
+    size_t end;
+
+    // iterations parameters
+    //int min_value, act_index, max_value;
+    //int min_thread, act_thread, max_thread;
+
+public:
+    StatisticsCollector report;
+
+    // token of tests list
+    template<typename Test>
+    TestRunner *run(const char *name, Test *test) {
+        return new TestRunner(name, test);
+    }
+
+    // iteration processing
+    void process(int 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);
+        }
+        spin_barrier barrier(threads);
+        // init args
+        va_list args; va_start(args, threads);
+        vector<TestRunner*> run_list; run_list.reserve(16);
+        while(true) {
+            TestRunner *item = va_arg(args, TestRunner*);
+            if( !item ) break;
+            item->init(value, threads, barrier, stat);
+            run_list.push_back(item);
+        }
+        va_end(args);
+        const size_t round_number = stat->GetRoundsCount();
+        stat->SetRoundTitle(round_number, value);
+        report.SetRoundTitle(round_number, value);
+        // run them
+        NativeParallelFor(tbb::blocked_range<int>(0, threads, 1), RunArgsBody(run_list));
+        // destroy args
+        for(size_t i = 0; i < run_list.size(); i++) {
+            run_list[i]->post_process(report);
+            delete run_list[i];
+        }
+    }
+
+public:
+    TestProcessor(const char *name)
+        : collection_name(name), stat(NULL), end(0), report(collection_name, StatisticsCollector::ByAlg)
+    { }
+
+    ~TestProcessor() {
+        for(statistics_collection::iterator i = stat_by_threads.begin(); i != stat_by_threads.end(); i++)
+            delete i->second;
+    }
+};
diff --git a/src/perf/time_hash_map.cpp b/src/perf/time_hash_map.cpp
new file mode 100644
index 0000000..ab63e24
--- /dev/null
+++ b/src/perf/time_hash_map.cpp
@@ -0,0 +1,347 @@
+/*
+    Copyright 2005-2008 Intel Corporation.  All Rights Reserved.
+
+    This file is part of Threading Building Blocks.
+
+    Threading Building Blocks is free software; you can redistribute it
+    and/or modify it under the terms of the GNU General Public License
+    version 2 as published by the Free Software Foundation.
+
+    Threading Building Blocks is distributed in the hope that it will be
+    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Threading Building Blocks; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+    As a special exception, you may use this file as part of a free software
+    library without restriction.  Specifically, if other files instantiate
+    templates or use macros or inline functions from this file, or you compile
+    this file and link it with other files to produce an executable, this
+    file does not by itself cause the resulting executable to be covered by
+    the GNU General Public License.  This exception does not however
+    invalidate any other reasons why the executable file might be covered by
+    the GNU General Public License.
+*/
+
+// configuration:
+
+//! enable/disable std::map tests
+#define STDTABLE 1
+
+//! enable/disable old implementation tests (correct include file also)
+#define OLDTABLE 0
+#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"
+
+//////////////////////////////////////////////////////////////////////////////////
+
+#include <cstdlib>
+#include <math.h>
+#include "tbb/tbb_stddef.h"
+#include <vector>
+#include <map>
+// needed by hash_maps
+#include <stdexcept>
+#include <iterator>
+#include <algorithm>                 // std::swap
+#include <utility>      // Need std::pair from here
+#include "tbb/cache_aligned_allocator.h"
+#include "tbb/tbb_allocator.h"
+#include "tbb/spin_rw_mutex.h"
+#include "tbb/aligned_space.h"
+#include "tbb/atomic.h"
+#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; }
+    static long hash( int x ) { return x; }
+    bool equal( int x, int y ) const { return x==y; }
+};
+
+namespace version_current {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+    #include "tbb/concurrent_hash_map.h"
+}
+typedef version_current::tbb::concurrent_hash_map<int,int,IntHashCompare> IntTable;
+
+#if OLDTABLE
+#undef __TBB_concurrent_hash_map_H
+namespace version_base {
+    namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } }
+    #include OLDTABLEHEADER
+}
+typedef version_base::tbb::concurrent_hash_map<int,int,IntHashCompare> OldTable;
+#endif
+
+#if TESTTABLE
+#undef __TBB_concurrent_hash_map_H
+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;
+#define TESTTABLE 1
+#endif
+
+///////////////////////////////////////
+
+static const char *map_testnames[] = {
+    "fill", "work", "clean"
+};
+
+template<typename TableType>
+struct TestTBBMap : TesterBase {
+    typedef typename TableType::accessor accessor;
+    typedef typename TableType::const_accessor const_accessor;
+    TableType Table;
+    int n_items;
+
+    TestTBBMap() : TesterBase(3) {}
+    void init() { n_items = value/threads_count; }
+
+    std::string get_name(int testn) {
+        return std::string(map_testnames[testn]);
+    }
+
+    double test(int test, int t)
+    {
+        switch(test) {
+          case 0: // fill
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                accessor a;
+                Table.insert( a, i );
+                a->second = 0;
+            }
+            break;
+          case 1: // work
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                accessor a;
+                Table.find( a, i );
+                a->second += 1;
+            }
+            break;
+          case 2: // clean
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                Table.erase( i );
+            }
+        }
+        return 0;
+    }
+};
+
+template<typename M>
+struct TestSTLMap : TesterBase {
+    std::map<int, int> Table;
+    M mutex;
+
+    int n_items;
+    TestSTLMap() : TesterBase(3) {}
+    void init() { n_items = value/threads_count; }
+
+    std::string get_name(int testn) {
+        return std::string(map_testnames[testn]);
+    }
+
+    double test(int test, int t)
+    {
+        switch(test) {
+          case 0: // fill
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                typename M::scoped_lock with(mutex);
+                Table[i] = 0;
+            }
+            break;
+          case 1: // work
+            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
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                typename M::scoped_lock with(mutex);
+                Table.erase(i);
+            }
+        }
+        return 0;
+    }
+};
+
+class fake_mutex {
+    int a;
+public:
+    class scoped_lock {
+        fake_mutex *p;
+
+    public:
+        scoped_lock() {}
+        scoped_lock( fake_mutex &m ) { p = &m; }
+        ~scoped_lock() { p->a = 0; }
+        void acquire( fake_mutex &m ) { p = &m; }
+        void release() { }
+    };
+};
+
+class test_hash_map : public TestProcessor {
+public:
+    test_hash_map() : TestProcessor("test_hash_map") {}
+    void factory(int value, int threads) {
+        if(Verbose) printf("Processing with %d threads: %d...\n", threads, value);
+        process( value, threads,
+#if STDTABLE
+            run("std::map ", new NanosecPerValue<TestSTLMap<spin_mutex> >() ),
+#endif
+#if OLDTABLE
+            run("old::hmap", new NanosecPerValue<TestTBBMap<OldTable> >() ),
+#endif
+            run("tbb::hmap", new NanosecPerValue<TestTBBMap<IntTable> >() ),
+#if TESTTABLE
+            run("new::hmap", new NanosecPerValue<TestTBBMap<TestTable> >() ),
+#endif
+        end );
+        //stat->Print(StatisticsCollector::Stdout);
+        if(value >= 2097152) stat->Print(StatisticsCollector::HTMLFile);
+    }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+template<typename TableType>
+struct TestHashMapFind : TesterBase {
+    typedef typename TableType::accessor accessor;
+    typedef typename TableType::const_accessor const_accessor;
+    TableType Table;
+    int n_items;
+
+    std::string get_name(int testn) {
+        return std::string(!testn?"find()":"insert()");
+    }
+
+    TestHashMapFind() : TesterBase(2) {}
+    void init() {
+        n_items = value/threads_count;
+        for(int i = 0; i < value; i++) {
+            accessor a; Table.insert( a, i );
+        }
+    }
+
+    double test(int test, int t)
+    {
+        switch(test) {
+          case 0: // find
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                accessor a;
+                Table.find( a, i );
+                a->second = i;
+            }
+            break;
+          case 1: // insert
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                accessor a;
+                Table.insert( a, i );
+                a->second = -i;
+            }
+            break;
+        }
+        return 0;
+    }
+};
+
+const int test2_size = 65536;
+int Data[test2_size];
+
+template<typename TableType>
+struct TestHashCountStrings : TesterBase {
+    typedef typename TableType::accessor accessor;
+    typedef typename TableType::const_accessor const_accessor;
+    TableType Table;
+    int n_items;
+
+    std::string get_name(int testn) {
+        return !testn?"example":"just find";
+    }
+
+    TestHashCountStrings() : TesterBase(2) {}
+    void init() {
+        n_items = value/threads_count;
+    }
+
+    double test(int testn, int t)
+    {
+        if(!testn) {
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                accessor a; Table.insert( a, Data[i] );
+            }
+        } else { // 
+            for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+                accessor a; Table.find( a, Data[i] );
+            }
+        }
+        return 0;
+    }
+};
+
+class test_hash_map_find : public TestProcessor {
+public:
+    test_hash_map_find() : TestProcessor("test_hash_map_find") {}
+    void factory(int value, int threads) {
+        if(Verbose) printf("Processing with %d threads: %d...\n", threads, value);
+        process( value, threads,
+#if OLDTABLE
+            run("old::hashmap", new NanosecPerValue<TestHashMapFind<OldTable> >() ),
+#endif
+            run("tbb::hashmap", new NanosecPerValue<TestHashMapFind<IntTable> >() ),
+#if OLDTABLE
+            run("old::countstr", new TimeTest<TestHashCountStrings<OldTable> >() ),
+#endif
+            run("tbb::countstr", new TimeTest<TestHashCountStrings<IntTable> >() ),
+#if TESTTABLE
+            run("new::countstr", new TimeTest<TestHashCountStrings<TestTable> >() ),
+#endif
+        end );
+        //stat->Print(StatisticsCollector::HTMLFile);
+    }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+int main(int argc, char* argv[]) {
+    if(argc>1) Verbose = true;
+    //if(argc>2) ExtraVerbose = true;
+    MinThread = 1; MaxThread = 8;
+    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");
+
+    {
+        test_hash_map_find test_find; int o = test2_size;
+        for(int i = 0; i < o; i++)
+            Data[i] = i%60;
+        for( int t=MinThread; t <= MaxThread; t++)
+            test_find.factory(o, t);
+        test_find.report.SetTitle("Nanoseconds per operation of finding operation (Mode) for %d items", o);
+        test_find.report.Print(StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML);
+    }
+    {
+        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 )
+                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)");
+        the_test.report.Print(StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML);
+    }
+    return 0;
+}
+
diff --git a/src/perf/time_unit.cpp b/src/perf/time_unit.cpp
new file mode 100644
index 0000000..269cf2a
--- /dev/null
+++ b/src/perf/time_unit.cpp
@@ -0,0 +1,291 @@
+/*
+    Copyright 2005-2008 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/task_scheduler_init.h"
+#include "tbb/tick_count.h"
+#include <cmath>
+#include <cstdlib>
+#include <cerrno>
+#include <cfloat>
+#include <vector>
+#include <algorithm>
+
+#include "../src/test/harness.h"
+
+#if  __linux__ || __APPLE__ || __FreeBSD__
+    #include <sys/resource.h>
+#endif /* __APPLE__ */
+
+// The code, performance of which is to be measured, is surrounded by the StartSimpleTiming
+// and StopSimpleTiming macros. It is called "target code" or "code of interest" hereafter.
+//
+// The target code is executed inside the nested loop. Nesting is necessary to allow
+// measurements on arrays that fit cache of a particular level, while making the load
+// big enough to eliminate the influence of random deviations.
+//
+// Macro StartSimpleTiming defines reduction variable "util::anchor", which may be modified (usually 
+// by adding to) by the target code. This can be necessary to prevent optimizing compilers 
+// from throwing out the code of interest. Besides, if the target code is complex enough, 
+// make sure that all its branches contribute (directly or indirectly) to the value 
+// being added to the "util::anchor" variable.
+//
+// To factor out overhead introduced by the measurement infra code it is recommended to make 
+// a calibration run with target code replaced by a no-op (but still modifying "sum"), and
+// store the resulting time in the "util::base" variable.
+//
+// A generally good approach is to make the target code use elements of a preliminary 
+// initialized array. Then for calibration run you just need to add vector elements 
+// to the "sum" variable. To get rid of memory access delays make the array small 
+// enough to fit L2 or L1 cache (play with StartSimpleTiming arguments if necessary).
+//
+// Macro CalibrateSimpleTiming performs default calibration using "util::anchor += i;" operation.
+//
+// Macro ANCHOR_TYPE defines the type of the reduction variable. If it was not 
+// defined  before including this header, it is defined as size_t. Depending on 
+// the target code modern super scalar architectures may blend reduction operation
+// and instructions of interest differently for different target alternatives. So
+// you may play with the type to minimize out-of-order and parallel execution impact
+// on the calibration time veracity. You may even end up with different reduction 
+// variable types (and different calibration times) for different measurements.
+
+
+namespace util {
+
+typedef std::vector<double>    durations_t;
+
+    void trace_histogram ( const durations_t& t, char* histogramFileName )
+    {
+        FILE* f = histogramFileName ? fopen(histogramFileName, "wt") : stdout;
+        size_t  n = t.size();
+        const size_t num_buckets = 100;
+        double  min_val = *std::min_element(t.begin(), t.end()),
+                max_val = *std::max_element(t.begin(), t.end()),
+                bucket_size = (max_val - min_val) / num_buckets;
+        std::vector<size_t> hist(num_buckets + 1, 0);
+        for ( size_t i = 0; i < n; ++i )
+            ++hist[size_t((t[i]-min_val)/bucket_size)];
+        fprintf (f, "Histogram: nvals = %u, min = %g, max = %g, nbuckets = %u\n", (unsigned)n, min_val, max_val, (unsigned)num_buckets);
+        double bucket = min_val;
+        for ( size_t i = 0; i <= num_buckets; ++i, bucket+=bucket_size )
+            fprintf (f, "%12g\t%u\n", bucket, (unsigned)hist[i]);
+        fclose(f);
+    }
+
+    double average ( const durations_t& d, double& variation_percent, double& std_dev_percent )
+    {
+        durations_t t = d;
+        if ( t.size() > 5 ) {
+            t.erase(std::min_element(t.begin(), t.end()));
+            t.erase(std::max_element(t.begin(), t.end()));
+        }
+        size_t  n = t.size();
+        double  sum = 0,
+                min_val = *std::min_element(t.begin(), t.end()),
+                max_val = *std::max_element(t.begin(), t.end());
+        for ( size_t i = 0; i < n; ++i )
+            sum += t[i];
+        double  avg = sum / n,
+                std_dev = 0;
+        for ( size_t i = 0; i < n; ++i ) {
+            double    dev = fabs(t[i] - avg);
+            std_dev += dev * dev;
+        }
+        std_dev = sqrt(std_dev / n);
+        std_dev_percent = std_dev / avg * 100;
+        variation_percent = 100 * (max_val - min_val) / avg;
+        return avg;
+    }
+
+    static int num_threads;
+
+    static double   base = 0,
+                    base_dev = 0,
+                    base_dev_percent = 0;
+
+    static char *empty_fmt = "";
+    static int rate_field_len = 11;
+
+#if !defined(ANCHOR_TYPE)
+    #define ANCHOR_TYPE size_t
+#endif
+
+    static ANCHOR_TYPE anchor = 0;
+    
+    static double sequential_time = 0;
+
+
+#define StartSimpleTiming(nOuter, nInner) {             \
+    tbb::tick_count t1, t0 = tbb::tick_count::now();    \
+    for ( size_t j = 0; l < nOuter; ++l ) {             \
+        for ( size_t i = 0; i < nInner; ++i ) {
+
+#define StopSimpleTiming(res)                   \
+        }                                       \
+        util::anchor += (ANCHOR_TYPE)l;         \
+    }                                           \
+    t1 = tbb::tick_count::now();                \
+    printf (util::empty_fmt, util::anchor);     \
+    res = (t1-t0).seconds() - util::base;       \
+}
+
+#define CalibrateSimpleTiming(T, nOuter, nInner)    \
+    StartSimpleTiming(nOuter, nInner);              \
+        util::anchor += (ANCHOR_TYPE)i;             \
+    StopSimpleTiming(util::base);
+
+
+#define StartTimingImpl(nRuns, nOuter, nInner)      \
+    tbb::tick_count t1, t0;                         \
+    for ( size_t k = 0; k < nRuns; ++k )  {         \
+        t0 = tbb::tick_count::now();                \
+        for ( size_t l = 0; l < nOuter; ++l ) {     \
+            for ( size_t i = 0; i < nInner; ++i ) {
+
+#define StartTiming(nRuns, nOuter, nInner) {        \
+    util::durations_t  t_(nRuns);                   \
+    StartTimingImpl(nRuns, nOuter, nInner)
+
+#define StartTimingEx(vDurations, nRuns, nOuter, nInner) {  \
+    util::durations_t  &t_ = vDurations;                    \
+    vDurations.resize(nRuns);                               \
+    StartTimingImpl(nRuns, nOuter, nInner)
+
+#define StopTiming(Avg, StdDev, StdDevPercent)      \
+            }                                       \
+            util::anchor += (ANCHOR_TYPE)l;         \
+        }                                           \
+        t1 = tbb::tick_count::now();                \
+        t_[k] = (t1 - t0).seconds()/nrep;           \
+    }                                               \
+    printf (util::empty_fmt, util::anchor);         \
+    Avg = util::average(t_, StdDev, StdDevPercent); \
+}
+
+#define CalibrateTiming(nRuns, nOuter, nInner)      \
+    StartTiming(nRuns, nOuter, nInner);             \
+        util::anchor += (ANCHOR_TYPE)i;             \
+    StopTiming(util::base, util::base_dev, util::base_dev_percent);
+
+} // namespace util
+
+
+#ifndef NRUNS
+    #define NRUNS               7
+#endif
+
+#ifndef ONE_TEST_DURATION
+    #define ONE_TEST_DURATION   0.01
+#endif
+
+#define no_histogram  ((char*)-1)
+
+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) {
+        CalibrateTiming(NRUNS, 1, nrep);
+        StartTiming(NRUNS, 1, nrep);
+        pfn();
+        StopTiming(time, variation, deviation);
+        time -= util::base;
+        if ( time > 1e-6 )
+            break;
+        nrep *= 2;
+    }
+    nrep *= (size_t)ceil(ONE_TEST_DURATION/time);
+    CalibrateTiming(NRUNS, 1, nrep);    // sets util::base
+    util::durations_t  t;
+    StartTimingEx(t, NRUNS, 1, nrep);
+        pfn();
+    StopTiming(time, variation, deviation);
+    if ( histogramFileName != (char*)-1 )
+        util::trace_histogram(t, histogramFileName);
+    double clean_time = time - util::base;
+    if ( title ) {
+        // Deviation (in percent) is calulated for the Gross time
+        printf ("\n%-34s %.2e  %5.1f      ", title, clean_time, deviation);
+        if ( util::sequential_time != 0  )
+            //printf ("% .2e  ", clean_time - util::sequential_time);
+            printf ("% 10.1f      ", 100*(clean_time - util::sequential_time)/util::sequential_time);
+        else
+            printf ("%*s ", util::rate_field_len, "");
+        printf ("%-9u %1.6f    |", (unsigned)nrep, time * nrep);
+    }
+    return clean_time;
+}
+
+
+/// Runs the test function, does statistical processing, and, if title is nonzero, prints results.
+/** If histogramFileName is a string, the histogram of individual runs is generated and stored
+    in a file with the given name. If it is NULL then the histogram is printed on the console.
+    By default no histogram is generated. 
+    The histogram format is: "rate bucket start" "number of tests in this bucket". **/
+inline 
+void RunTest ( const char* title_fmt, size_t workload_param, void (*pfn_test)(), char* histogramFileName = no_histogram ) {
+    char title[1024];
+    sprintf(title, title_fmt, (long)workload_param);
+    RunTestImpl(title, pfn_test, histogramFileName);
+}
+
+inline 
+void CalcSequentialTime ( void (*pfn)() ) {
+    util::sequential_time = RunTestImpl(NULL, pfn) / util::num_threads;
+}
+
+inline 
+void ResetSequentialTime () {
+    util::sequential_time = 0;
+}
+
+
+inline void PrintTitle() {
+    //printf ("%-32s %-*s Std Dev,%%  %-*s  Repeats   Gross time  Infra time  | NRUNS = %u", 
+    //        "Test name", util::rate_field_len, "Rate", util::rate_field_len, "Overhead", NRUNS);
+    printf ("%-34s %-*s Std Dev,%%  Par.overhead,%%  Repeats   Gross time  | Nruns %u, Nthreads %d", 
+            "Test name", util::rate_field_len, "Rate", NRUNS, util::num_threads);
+}
+
+void Test();
+
+inline
+int test_main( int argc, char* argv[] ) {
+    ParseCommandLine( argc, argv );
+    ASSERT (MinThread>=2, "Minimal number of threads must be 2 or more");
+    char buf[128];
+    util::rate_field_len = 2 + sprintf(buf, "%.1e", 1.1);
+    for ( int i = MinThread; i <= MaxThread; ++i ) {
+        tbb::task_scheduler_init init (i);
+        util::num_threads = i;
+        PrintTitle();
+        Test();
+        printf("\n");
+    }
+    printf("done\n");
+    return 0;
+}
diff --git a/src/perf/time_vector.cpp b/src/perf/time_vector.cpp
new file mode 100644
index 0000000..800d6ff
--- /dev/null
+++ b/src/perf/time_vector.cpp
@@ -0,0 +1,256 @@
+/*
+    Copyright 2005-2008 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_SCALABLEALLOC
+
+#include <cstdlib>
+#include <cmath>
+#include <vector>
+#include <algorithm>
+#include <functional>
+#include <numeric>
+#include "tbb/tbb_stddef.h"
+#include "tbb/spin_mutex.h"
+#ifdef DO_SCALABLEALLOC
+#include "tbb/scalable_allocator.h"
+#endif
+#include "tbb/concurrent_vector.h"
+#include "tbb/tbb_allocator.h"
+#include "tbb/cache_aligned_allocator.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_allocator.h"
+#define STATISTICS_INLINE
+#include "statistics.h"
+
+using namespace tbb;
+bool ExtraVerbose = false;
+
+class Timer {
+    tbb::tick_count tick;
+public:
+    Timer() { tick = tbb::tick_count::now(); }
+    double get_time()  { return (tbb::tick_count::now() - tick).seconds(); }
+    double diff_time(const Timer &newer) { return (newer.tick - tick).seconds(); }
+    double mark_time() { tick_count t1(tbb::tick_count::now()), t2(tick); tick = t1; return (t1 - t2).seconds(); }
+    double mark_time(const Timer &newer) { tick_count t(tick); tick = newer.tick; return (tick - t).seconds(); }
+};
+
+/************************************************************************/
+/* TEST1                                                                */
+/************************************************************************/
+#define mk_vector_test1(v, a) vector_test1<v<Timer, static_counting_allocator<a<Timer> > >, v<double, static_counting_allocator<a<double> > > >
+template<class timers_vector_t, class values_vector_t>
+class vector_test1 {
+    const char *mode;
+    StatisticsCollector &stat;
+    StatisticsCollector::TestCase key[16];
+
+public:
+    vector_test1(const char *m, StatisticsCollector &s)  :  mode(m), stat(s) {}
+
+    vector_test1 &operator()(size_t len) {
+        if(Verbose) printf("test1<%s>(%u): collecting timing statistics\n", mode, unsigned(len));
+        __TBB_ASSERT(sizeof(Timer) == sizeof(double), NULL);
+        static const char *test_names[] = {
+            "b)creation wholly",
+            "a)creation by push",
+            "c)operation time per item",
+            0 };
+        for(int i = 0; test_names[i]; ++i) key[i] = stat.SetTestCase(test_names[i], mode, len);
+
+        Timer timer0; timers_vector_t::allocator_type::init_counters();
+        timers_vector_t tv(len);
+        Timer timer1; values_vector_t::allocator_type::init_counters();
+        values_vector_t dv;
+        for (size_t i = 0; i < len; ++i)
+            dv.push_back( i );
+        Timer timer2;
+        for (size_t i = 0; i < len; ++i)
+        {
+            dv[len-i-1] = timer0.diff_time(tv[i]);
+            tv[i].mark_time();
+        }
+        stat.AddStatisticValue( key[2], "1total, ms", "%.3f", timer2.get_time()*1000.0 );
+        stat.AddStatisticValue( key[1], "1total, ms", "%.3f", timer1.diff_time(timer2)*1000.0 );
+        stat.AddStatisticValue( key[0], "1total, ms", "%.3f", timer0.diff_time(timer1)*1000.0 );
+        //allocator statistics
+        stat.AddStatisticValue( key[0], "2total allocations", "%d", int(timers_vector_t::allocator_type::allocations) );
+        stat.AddStatisticValue( key[1], "2total allocations", "%d", int(values_vector_t::allocator_type::allocations) );
+        stat.AddStatisticValue( key[2], "2total allocations", "%d",  0);
+        stat.AddStatisticValue( key[0], "3total alloc#items", "%d", int(timers_vector_t::allocator_type::items_allocated) );
+        stat.AddStatisticValue( key[1], "3total alloc#items", "%d", int(values_vector_t::allocator_type::items_allocated) );
+        stat.AddStatisticValue( key[2], "3total alloc#items", "%d",  0);
+        //remarks
+        stat.AddStatisticValue( key[0], "9note", "segment creation time, ns:");
+        stat.AddStatisticValue( key[2], "9note", "average op-time per item, ns:");
+        Timer last_timer(timer2); double last_value = 0;
+        for (size_t j = 0, i = 2; i < len; i *= 2, j++) {
+            stat.AddRoundResult( key[0], (dv[len-i-1]-last_value)*1000000.0 );
+            last_value = dv[len-i-1];
+            stat.AddRoundResult( key[2], last_timer.diff_time(tv[i])/double(i)*1000000.0 );
+            last_timer = tv[i];
+            stat.SetRoundTitle(j, i);
+        }
+        tv.clear(); dv.clear();
+        //__TBB_ASSERT(timers_vector_t::allocator_type::items_allocated == timers_vector_t::allocator_type::items_freed, NULL);
+        //__TBB_ASSERT(values_vector_t::allocator_type::items_allocated == values_vector_t::allocator_type::items_freed, NULL);
+    	return *this;
+    }
+};
+
+/************************************************************************/
+/* TEST2                                                                */
+/************************************************************************/
+#define mk_vector_test2(v, a) vector_test2<v<size_t, a<size_t> > >
+template<class vector_t>
+class vector_test2 {
+    const char *mode;
+    static const int ntrial = 10;
+    StatisticsCollector &stat;
+
+public:
+    vector_test2(const char *m, StatisticsCollector &s)  :  mode(m), stat(s) {}
+
+    vector_test2 &operator()(size_t len) {
+        if(Verbose) printf("test2<%s>(%u): performing standard transformation sequence on vector\n", mode, unsigned(len));
+        StatisticsCollector::TestCase init_key = stat.SetTestCase("allocate", mode, len);
+        StatisticsCollector::TestCase fill_key = stat.SetTestCase("fill", mode, len);
+        StatisticsCollector::TestCase proc_key = stat.SetTestCase("process", mode, len);
+        StatisticsCollector::TestCase full_key = stat.SetTestCase("total time", mode, len);
+        for (int i = 0; i < ntrial; i++) {
+            Timer timer0;
+            vector_t v1(len);
+            vector_t v2(len);
+            Timer timer1;
+            std::generate(v1.begin(), v1.end(), values(0));
+            std::generate(v2.begin(), v2.end(), values(size_t(-len)));
+            Timer timer2;
+            std::reverse(v1.rbegin(), v1.rend());
+            std::inner_product(v1.begin(), v1.end(), v2.rbegin(), 1);
+            std::sort(v1.rbegin(), v1.rend());
+            std::sort(v2.rbegin(), v2.rend());
+            std::set_intersection(v1.begin(), v1.end(), v2.rbegin(), v2.rend(), v1.begin());
+            Timer timer3;
+            stat.AddRoundResult( proc_key, timer2.diff_time(timer3)*1000.0 );
+            stat.AddRoundResult( fill_key, timer1.diff_time(timer2)*1000.0 );
+            stat.AddRoundResult( init_key, timer0.diff_time(timer1)*1000.0 );
+            stat.AddRoundResult( full_key, timer0.diff_time(timer3)*1000.0 );
+        }
+        stat.SetStatisticFormula("1Average", "=AVERAGE(ROUNDS)");
+        stat.SetStatisticFormula("2+/-", "=(MAX(ROUNDS)-MIN(ROUNDS))/2");
+        return *this;
+    }
+
+    class values
+    {
+        size_t value;
+    public:
+        values(size_t i) : value(i) {}
+        size_t operator()() {
+            return value++%(1|(value^55));
+        }
+    };
+};
+
+/************************************************************************/
+/* TEST3                                                                */
+/************************************************************************/
+#define mk_vector_test3(v, a) vector_test3<v<char, local_counting_allocator<a<char>, size_t > > >
+template<class vector_t>
+class vector_test3 {
+    const char *mode;
+    StatisticsCollector &stat;
+
+public:
+    vector_test3(const char *m, StatisticsCollector &s)  :  mode(m), stat(s) {}
+
+    vector_test3 &operator()(size_t len) {
+        if(Verbose) printf("test3<%s>(%u): collecting allocator statistics\n", mode, unsigned(len));
+        static const size_t sz = 1024;
+        vector_t V[sz];
+        StatisticsCollector::TestCase vinst_key = stat.SetTestCase("instances number", mode, len);
+        StatisticsCollector::TestCase count_key = stat.SetTestCase("allocations count", mode, len);
+        StatisticsCollector::TestCase items_key = stat.SetTestCase("allocated items", mode, len);
+        //stat.ReserveRounds(sz-1);
+        for (size_t c = 0, i = 0, s = sz/2; s >= 1 && i < sz; s /= 2, c++)
+        {
+            const size_t count = c? 1<<(c-1) : 0;
+            for (size_t e = i+s; i < e; i++) {
+                //if(count >= 16) V[i].reserve(count);
+                for (size_t j = 0; j < count; j++)
+                    V[i].push_back(j);
+            }
+            stat.SetRoundTitle ( c, count );
+            stat.AddRoundResult( vinst_key, s );
+            stat.AddRoundResult( count_key, V[i-1].get_allocator().allocations );
+            stat.AddRoundResult( items_key, V[i-1].get_allocator().items_allocated );
+        }
+        return *this;
+    }
+};
+
+/************************************************************************/
+/* TYPES SET FOR TESTS                                                  */
+/************************************************************************/
+#define types_set(n, title, op) { StatisticsCollector Collector("time_vector"#n); Collector.SetTitle title; \
+    {mk_vector_test##n(tbb::concurrent_vector, tbb::cache_aligned_allocator) ("TBB:NFS", Collector)op;} \
+    {mk_vector_test##n(tbb::concurrent_vector, tbb::tbb_allocator)           ("TBB:TBB", Collector)op;} \
+    {mk_vector_test##n(tbb::concurrent_vector, std::allocator)               ("TBB:STD", Collector)op;} \
+    {mk_vector_test##n(std::vector, tbb::cache_aligned_allocator)            ("STL:NFS", Collector)op;} \
+    {mk_vector_test##n(std::vector, tbb::tbb_allocator)                      ("STL:TBB", Collector)op;} \
+    {mk_vector_test##n(std::vector, std::allocator)                          ("STL:STD", Collector)op;} \
+    Collector.Print(StatisticsCollector::Stdout|StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML); }
+
+
+/************************************************************************/
+/* MAIN DRIVER                                                          */
+/************************************************************************/
+int main(int argc, char* argv[]) {
+	if(argc>1) Verbose = true;
+	if(argc>2) ExtraVerbose = true;
+    MinThread = 0; MaxThread = 500000; // use in another meaning - test#:problem size
+    ParseCommandLine( argc, argv );
+
+    ASSERT(tbb_allocator<int>::allocator_type() == tbb_allocator<int>::scalable, "expecting scalable allocator library to be loaded");
+    
+    if(!MinThread || MinThread == 1)
+        types_set(1, ("Vectors performance test #1 for %d", MaxThread), (MaxThread) )
+    if(!MinThread || MinThread == 2)
+        types_set(2, ("Vectors performance test #2 for %d", MaxThread), (MaxThread) )
+    if(!MinThread || MinThread == 3)
+        types_set(3, ("Vectors performance test #3 for %d", MaxThread), (MaxThread) )
+
+    if(!Verbose) printf("done\n");
+    return 0;
+}
+
diff --git a/src/tbb/Makefile b/src/tbb/Makefile
deleted file mode 100644
index 2e7155e..0000000
--- a/src/tbb/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 2005-2008 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?=../..
-include $(tbb_root)/build/common.inc
-
-all: release debug
-
-release debug: 
-	@-$(MD) "$(work_dir)_$@"
-	$(MAKE) -C "$(work_dir)_$@" -r -f $(tbb_root)/build/Makefile.tbb cfg=$@
-
-clean: clean_release clean_debug
-
-clean_release:
-	@-$(RM) $(work_dir)_release$(SLASH)*.*
-	@-rmdir "$(work_dir)_release"
-
-clean_debug:
-	@-$(RM) $(work_dir)_debug$(SLASH)*.*
-	@-rmdir "$(work_dir)_debug"
-
diff --git a/src/tbb/cache_aligned_allocator.cpp b/src/tbb/cache_aligned_allocator.cpp
index 0e2e881..7844ef1 100644
--- a/src/tbb/cache_aligned_allocator.cpp
+++ b/src/tbb/cache_aligned_allocator.cpp
@@ -27,6 +27,7 @@
 */
 
 #include "tbb/cache_aligned_allocator.h"
+#include "tbb/tbb_allocator.h"
 #include "tbb_misc.h"
 #include <cstdlib>
 
@@ -36,6 +37,22 @@
 #include <dlfcn.h>
 #endif /* _WIN32||_WIN64 */
 
+using namespace std;
+
+#if __TBB_WEAK_SYMBOLS
+
+#pragma weak scalable_malloc
+#pragma weak scalable_free
+
+extern "C" {
+    void* scalable_malloc( size_t );
+    void scalable_free( void* );
+}
+
+#endif /* __TBB_WEAK_SYMBOLS */
+
+#define __TBB_IS_SCALABLE_MALLOC_FIX_READY 0
+
 namespace tbb {
 
 namespace internal {
@@ -54,10 +71,35 @@ static void (*FreeHandler)( void* pointer ) = &DummyFree;
 
 //! Table describing the how to link the handlers.
 static const DynamicLinkDescriptor MallocLinkTable[] = {
-    {"scalable_malloc",ADDRESS_OF_HANDLER(&MallocHandler)},
-    {"scalable_free",ADDRESS_OF_HANDLER(&FreeHandler)}
+    DLD(scalable_malloc, MallocHandler),
+    DLD(scalable_free, FreeHandler),
 };
 
+#if __TBB_IS_SCALABLE_MALLOC_FIX_READY 
+//! Dummy routine used for first indirect call via padded_allocate_handler.
+static void* dummy_padded_allocate( size_t bytes, size_t alignment );
+
+//! Dummy routine used for first indirect call via padded_free_handler.
+static void dummy_padded_free( void * ptr );
+
+// ! Allocates memory using standard malloc. It is used when scalable_allocator is not available
+static void* padded_allocate( size_t bytes, size_t alignment );
+
+// ! Allocates memory using scalable_malloc
+static void* padded_allocate_via_scalable_malloc( size_t bytes, size_t alignment );
+
+// ! Allocates memory using standard free. It is used when scalable_allocator is not available
+static void padded_free( void* p );
+
+//! Handler for padded memory allocation
+static void* (*padded_allocate_handler)( size_t bytes, size_t alignment ) = &dummy_padded_allocate;
+
+//! Handler for padded memory deallocation
+static void (*padded_free_handler)( void* p ) = &dummy_padded_free;
+
+#endif // #if __TBB_IS_SCALABLE_MALLOC_FIX_READY 
+
+
 #if TBB_DO_ASSERT
 #define DEBUG_SUFFIX "_debug"
 #else
@@ -70,6 +112,8 @@ static const DynamicLinkDescriptor MallocLinkTable[] = {
 #elif __APPLE__
 #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".dylib"
 #elif __linux__
+#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX  __TBB_STRING(.so.TBB_COMPATIBLE_INTERFACE_VERSION)
+#elif __FreeBSD__ || __sun
 #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so"
 #else
 #error Unknown OS
@@ -89,6 +133,14 @@ void initialize_cache_aligned_allocator() {
         // which forces them to wait.
         FreeHandler = &free;
         MallocHandler = &malloc;
+#if __TBB_IS_SCALABLE_MALLOC_FIX_READY 
+        padded_allocate_handler = &padded_allocate;
+        padded_free_handler = &padded_free;
+    }else{
+        padded_allocate_handler = &padded_allocate_via_scalable_malloc;
+        __TBB_ASSERT(FreeHandler != &free && FreeHandler != &DummyFree, NULL);
+        padded_free_handler = FreeHandler;
+#endif // __TBB_IS_SCALABLE_MALLOC_FIX_READY 
     }
     PrintExtraVersionInfo( "ALLOCATOR", success?"scalable_malloc":"malloc" );
 }
@@ -110,6 +162,22 @@ static void DummyFree( void * ptr ) {
     (*FreeHandler)( ptr );
 }
 
+#if __TBB_IS_SCALABLE_MALLOC_FIX_READY 
+//! Executed on very first call throught padded_allocate_handler
+static void* dummy_padded_allocate( size_t bytes, size_t alignment ) {
+    DoOneTimeInitializations();
+    __TBB_ASSERT( padded_allocate_handler!=&dummy_padded_allocate, NULL );
+    return (*padded_allocate_handler)(bytes, alignment);
+}
+
+//! Executed on very first call throught padded_free_handler
+static void dummy_padded_free( void * ptr ) {
+    DoOneTimeInitializations();
+    __TBB_ASSERT( padded_free_handler!=&dummy_padded_free, NULL );
+    (*padded_free_handler)( ptr );
+}    
+#endif // __TBB_IS_SCALABLE_MALLOC_FIX_READY 
+
 static size_t NFS_LineSize = 128;
 
 size_t NFS_GetLineSize() {
@@ -126,27 +194,41 @@ const size_t BigSize = 4096;
 #endif /* _MSC_VER && !defined(__INTEL_COMPILER) */
 
 void* NFS_Allocate( size_t n, size_t element_size, void* hint ) {
-    using namespace internal;
     size_t m = NFS_LineSize;
     __TBB_ASSERT( m<=NFS_MaxLineSize, "illegal value for NFS_LineSize" );
     __TBB_ASSERT( (m & m-1)==0, "must be power of two" );
     size_t bytes = n*element_size;
+#if __TBB_IS_SCALABLE_MALLOC_FIX_READY 
+
+    if (bytes<n || bytes+m<bytes) {
+        // Overflow
+        throw bad_alloc();
+    }
+    
+    void* result = (*padded_allocate_handler)( bytes, m );
+#else
     unsigned char* base;
     if( bytes<n || bytes+m<bytes || !(base=(unsigned char*)(bytes>=BigSize?malloc(m+bytes):(*MallocHandler)(m+bytes))) ) {
         // Overflow
-        throw std::bad_alloc();
+        throw bad_alloc();
     }
     // Round up to next line
     unsigned char* result = (unsigned char*)((uintptr)(base+m)&-m);
     // Record where block actually starts.  Use low order bit to record whether we used malloc or MallocHandler.
     ((uintptr*)result)[-1] = uintptr(base)|(bytes>=BigSize);
+#endif // __TBB_IS_SCALABLE_MALLOC_FIX_READY    
+    /** The test may fail with TBB_IS_SCALABLE_MALLOC_FIX_READY = 1 
+        because scalable_malloc returns addresses aligned to 64 when large block is allocated */
+    __TBB_ASSERT( ((size_t)result&(m-1)) == 0, "The address returned isn't aligned to cache line size" );
     return result;
 }
 
 void NFS_Free( void* p ) {
+#if __TBB_IS_SCALABLE_MALLOC_FIX_READY 
+    (*padded_free_handler)( p );
+#else
     if( p ) {
         __TBB_ASSERT( (uintptr)p>=0x4096, "attempt to free block not obtained from cache_aligned_allocator" );
-        using namespace internal;
         // Recover where block actually starts
         unsigned char* base = ((unsigned char**)p)[-1];
         __TBB_ASSERT( (void*)((uintptr)(base+NFS_LineSize)&-NFS_LineSize)==p, "not allocated by NFS_Allocate?" );
@@ -158,8 +240,67 @@ void NFS_Free( void* p ) {
             (*FreeHandler)( base );
         }
     }
+#endif // __TBB_IS_SCALABLE_MALLOC_FIX_READY
 }
 
+#if __TBB_IS_SCALABLE_MALLOC_FIX_READY
+static void* padded_allocate_via_scalable_malloc( size_t bytes, size_t alignment  ) {  
+    unsigned char* base;
+    if( !(base=(unsigned char*)(*MallocHandler)((bytes+alignment)&-alignment))) {
+        throw bad_alloc();
+    }        
+    return base; // scalable_malloc returns aligned pointer
+}
+
+static void* padded_allocate( size_t bytes, size_t alignment ) {    
+    unsigned char* base;
+    if( !(base=(unsigned char*)malloc(alignment+bytes)) ) {        
+        throw bad_alloc();
+    }
+    // Round up to the next line
+    unsigned char* result = (unsigned char*)((uintptr)(base+alignment)&-alignment);
+    // Record where block actually starts.
+    ((uintptr*)result)[-1] = uintptr(base);
+    return result;    
+}
+
+static void padded_free( void* p ) {
+    if( p ) {
+        __TBB_ASSERT( (uintptr)p>=0x4096, "attempt to free block not obtained from cache_aligned_allocator" );
+        // Recover where block actually starts
+        unsigned char* base = ((unsigned char**)p)[-1];
+        __TBB_ASSERT( (void*)((uintptr)(base+NFS_LineSize)&-NFS_LineSize)==p, "not allocated by NFS_Allocate?" );
+        free(base);
+    }
+}
+#endif // #if __TBB_IS_SCALABLE_MALLOC_FIX_READY
+
+void* allocate_via_handler_v3( size_t n ) {    
+    void* result;
+    result = (*MallocHandler) (n);
+    if (!result) {
+        // Overflow
+        throw bad_alloc();
+    }
+    return result;
+}
+
+void deallocate_via_handler_v3( void *p ) {
+    if( p ) {        
+        (*FreeHandler)( p );
+    }
+}
+
+bool is_malloc_used_v3() {
+    if (MallocHandler == &DummyMalloc) {
+        void* void_ptr = (*MallocHandler)(1);
+        (*FreeHandler)(void_ptr);
+    }
+    __TBB_ASSERT( MallocHandler!=&DummyMalloc && FreeHandler!=&DummyFree, NULL );
+    __TBB_ASSERT(MallocHandler==&malloc && FreeHandler==&free ||
+                  MallocHandler!=&malloc && FreeHandler!=&free, NULL );
+    return MallocHandler == &malloc;
+}
 #if _MSC_VER && !defined(__INTEL_COMPILER)
 #pragma warning( pop )
 #endif /* _MSC_VER && !defined(__INTEL_COMPILER) */
diff --git a/src/tbb/concurrent_hash_map.cpp b/src/tbb/concurrent_hash_map.cpp
index 3de140f..528e15a 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/src/tbb/concurrent_hash_map.cpp
@@ -36,7 +36,7 @@ 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;
+    return my_logical_size >= my_physical_size && my_physical_size < internal::hash_map_base::max_physical_size;
 }
 
 } // namespace internal
diff --git a/src/tbb/concurrent_queue.cpp b/src/tbb/concurrent_queue.cpp
index da0116c..fd51ee7 100644
--- a/src/tbb/concurrent_queue.cpp
+++ b/src/tbb/concurrent_queue.cpp
@@ -28,21 +28,34 @@
 
 #include <cstring>
 #include <cstdio>
+
 #include "tbb/tbb_machine.h"
 #include "tbb/cache_aligned_allocator.h"
 #include "tbb/spin_mutex.h"
 #include "tbb/atomic.h"
-#include "tbb_misc.h"
 #include "tbb/concurrent_queue.h"
+#include "tbb/tbb_exception.h"
+#include "tbb_misc.h"
 #include "itt_notify.h"
+#if __SUNPRO_CC
+#include <memory.h>
+#endif
 
+using namespace std;
+
+// enable sleep support
 #define __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE 1
 
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (disable: 4267)
+#endif /* _MSC_VER && _Wp64 */
+
 #define RECORD_EVENTS 0
 
+
 #if __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
-#if !_WIN32&&!_WIN64&&!__TBB_USE_FUTEX
-#define __TBB_USE_PTHREAD_CONDWAIT 1
+#if !_WIN32&&!_WIN64
 #include <pthread.h>
 #endif
 #endif
@@ -53,12 +66,15 @@ namespace internal {
 
 class concurrent_queue_rep;
 
+typedef size_t ticket;
+
 //! A queue using simple locking.
 /** For efficient, this class has no constructor.  
     The caller is expected to zero-initialize it. */
 struct micro_queue {
     typedef concurrent_queue_base::page page;
-    typedef size_t ticket;
+
+    friend class micro_queue_pop_finalizer;
 
     atomic<page*> head_page;
     atomic<ticket> head_counter;
@@ -82,31 +98,34 @@ struct micro_queue {
 
     void push( const void* item, ticket k, concurrent_queue_base& base );
 
-    class pop_finalizer {
-        ticket my_ticket;
-        micro_queue& my_queue;
-        page* my_page; 
-    public:
-        pop_finalizer( micro_queue& queue, ticket k, page* p ) :
-            my_ticket(k), my_queue(queue), my_page(p)
-        {}
-        ~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;
-                }
+    bool pop( void* dst, ticket k, concurrent_queue_base& base );
+};
+
+// we need to yank it out of micro_queue because of concurrent_queue_base::deallocate_page being virtual.
+class micro_queue_pop_finalizer {
+    typedef concurrent_queue_base::page page;
+    ticket my_ticket;
+    micro_queue& my_queue;
+    page* my_page; 
+    concurrent_queue_base &base;
+public:
+    micro_queue_pop_finalizer( micro_queue& queue, concurrent_queue_base& b, ticket k, page* p ) :
+        my_ticket(k), my_queue(queue), my_page(p), base(b)
+    {}
+    ~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 ) 
-                operator delete(p);
         }
-    };
-
-    bool pop( void* dst, ticket k, concurrent_queue_base& base );
+        my_queue.head_counter = my_ticket;
+        if( p )
+           base.deallocate_page( p );
+    }
 };
 
 //! Internal representation of a ConcurrentQueue.
@@ -114,21 +133,15 @@ struct micro_queue {
     The caller is expected to zero-initialize it. */
 class concurrent_queue_rep {
 public:
-    typedef size_t ticket;
-
 #if __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
-
-#if _WIN32||_WIN64
-    typedef HANDLE cq_cond_t;
-#elif __TBB_USE_FUTEX
-    typedef int cq_cond_t;
-#else /* including MacOS */
-    typedef pthread_cond_t  cq_cond_t;
-    typedef pthread_mutex_t cq_mutex_t;
-#endif
-
+# if _WIN32||_WIN64
+    typedef HANDLE waitvar_t;
+    typedef CRITICAL_SECTION mutexvar_t;
+# else 
+    typedef pthread_cond_t  waitvar_t;
+    typedef pthread_mutex_t mutexvar_t;
+# endif
 #endif /* __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
-
 private:
     friend struct micro_queue;
 
@@ -145,51 +158,37 @@ public:
     }
 
 #if __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
-
     atomic<ticket> head_counter;
-#if !__TBB_USE_PTHREAD_CONDWAIT
-    atomic<size_t> n_waiting_consumers;
-    cq_cond_t  var_wait_for_items;
-    char pad1[NFS_MaxLineSize-sizeof(size_t)-sizeof(atomic<size_t>)-sizeof(cq_cond_t)];
-#else /* including MacOS */
-    size_t n_waiting_consumers;
-    cq_cond_t  var_wait_for_items;
-    cq_mutex_t mtx_items_avail;
-    char pad1[NFS_MaxLineSize-sizeof(size_t)-sizeof(atomic<size_t>)-sizeof(cq_cond_t)-sizeof(cq_mutex_t)];
-#endif /* !__TBB_USE_PTHREAD_CONDWAIT */
+    waitvar_t  var_wait_for_items;
+    mutexvar_t mtx_items_avail;
+    uint16_t n_waiting_consumers;
+#if _WIN32||_WIN64
+    uint16_t consumer_wait_generation;
+    uint16_t n_consumers_to_wakeup;
+    char pad1[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))&(NFS_MaxLineSize-1))];
+#else
+    char pad1[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(uint16_t))&(NFS_MaxLineSize-1))];
+#endif
 
     atomic<ticket> tail_counter;
-#if !__TBB_USE_PTHREAD_CONDWAIT
-    atomic<size_t> n_waiting_producers;
-    cq_cond_t  var_wait_for_slots;
-    char pad2[NFS_MaxLineSize-sizeof(size_t)-sizeof(atomic<size_t>)-sizeof(cq_cond_t)];
-#else /* including MacOS */
-    size_t n_waiting_producers;
-    cq_cond_t  var_wait_for_slots;
-    cq_mutex_t mtx_slots_avail;
-    char pad2[NFS_MaxLineSize-sizeof(ticket)-sizeof(atomic<size_t>)-sizeof(cq_cond_t)-sizeof(cq_mutex_t)];
-#endif /* !__TBB_USE_PTHREAD_CONDWAIT */
-
+    waitvar_t  var_wait_for_slots;
+    mutexvar_t mtx_slots_avail;
+    uint16_t n_waiting_producers;
+#if _WIN32||_WIN64
+    uint16_t producer_wait_generation;
+    uint16_t n_producers_to_wakeup;
+    char pad2[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))&(NFS_MaxLineSize-1))];
+#else
+    char pad2[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(uint16_t))&(NFS_MaxLineSize-1))];
+#endif
 #else /* !__TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
-
     atomic<ticket> head_counter;
-    char pad1[NFS_MaxLineSize-sizeof(atomic<ticket>)];
-
+    char pad1[NFS_MaxLineSize-sizeof(atomic<ticket)>];
     atomic<ticket> tail_counter;
     char pad2[NFS_MaxLineSize-sizeof(atomic<ticket>)];
-
 #endif /* __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
-
     micro_queue array[n_queue];    
 
-#if !__TBB_USE_PTHREAD_CONDWAIT
-    ptrdiff_t size_to_use;
-    atomic<size_t> nthreads_in_transition;
-    ptrdiff_t nthreads_to_read_size;
-#define __TBB_INVALID_QSIZE (concurrent_queue_rep::infinite_capacity)
-    static const ptrdiff_t thread_woken = -1;
-#endif /* !__TBB_USE_PTHREAD_CONDWAIT */
-
     micro_queue& choose( ticket k ) {
         // The formula here approximates LRU in a cache-oblivious way.
         return array[index(k)];
@@ -205,22 +204,46 @@ public:
 #pragma warning( disable: 4146 )
 #endif /* _MSC_VER && !defined(__INTEL_COMPILER) */
 
+
+static void* invalid_page;
+
 //------------------------------------------------------------------------
 // micro_queue
 //------------------------------------------------------------------------
 void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base ) {
+    static concurrent_queue_base::page dummy = {static_cast<page*>((void*)1), 0};
     k &= -concurrent_queue_rep::n_queue;
     page* p = NULL;
     size_t index = (k/concurrent_queue_rep::n_queue & base.items_per_page-1);
     if( !index ) {
-        size_t n = sizeof(page) + base.items_per_page*base.item_size;
-        p = static_cast<page*>(operator new( n ));
+        try {
+            p = base.allocate_page();
+        } catch (...) {
+            // 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::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;
+        }
         p->mask = 0;
         p->next = NULL;
     }
     {
         push_finalizer finalizer( *this, k+concurrent_queue_rep::n_queue ); 
-        SpinwaitUntilEq( tail_counter, k );
+        if( tail_counter!=k ) {
+            ExponentialBackoff backoff;
+            do {
+                backoff.pause();
+                // no memory. throws an exception
+                if( tail_counter&0x1 ) throw bad_last_alloc();
+            } while( tail_counter!=k ) ;
+        }
+        
         if( p ) {
             spin_mutex::scoped_lock lock( page_mutex );
             if( page* q = tail_page )
@@ -236,7 +259,7 @@ void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base
         ITT_NOTIFY( sync_releasing, p );
         // If no exception was thrown, mark item as present.
         p->mask |= uintptr(1)<<index;
-    } 
+    }
 }
 
 bool micro_queue::pop( void* dst, ticket k, concurrent_queue_base& base ) {
@@ -248,7 +271,7 @@ bool micro_queue::pop( void* dst, ticket k, concurrent_queue_base& base ) {
     size_t index = (k/concurrent_queue_rep::n_queue & base.items_per_page-1);
     bool success = false; 
     {
-        pop_finalizer finalizer( *this, k+concurrent_queue_rep::n_queue, index==base.items_per_page-1 ? &p : NULL ); 
+        micro_queue_pop_finalizer finalizer( *this, base, k+concurrent_queue_rep::n_queue, index==base.items_per_page-1 ? &p : NULL ); 
         if( p.mask & uintptr(1)<<index ) {
             success = true;
 #if DO_ITT_NOTIFY
@@ -272,7 +295,7 @@ bool micro_queue::pop( void* dst, ticket k, concurrent_queue_base& base ) {
 //------------------------------------------------------------------------
 // concurrent_queue_base
 //------------------------------------------------------------------------
-concurrent_queue_base::concurrent_queue_base( size_t item_size ) {
+concurrent_queue_base_v3::concurrent_queue_base_v3( size_t item_size ) {
     items_per_page = item_size<=8 ? 32 :
                      item_size<=16 ? 16 : 
                      item_size<=32 ? 8 :
@@ -289,19 +312,17 @@ concurrent_queue_base::concurrent_queue_base( size_t item_size ) {
     this->item_size = item_size;
 #if __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
 #if _WIN32||_WIN64
-    my_rep->size_to_use = __TBB_INVALID_QSIZE;
-    my_rep->var_wait_for_items = CreateEvent( NULL, FALSE, FALSE, NULL);
-    my_rep->var_wait_for_slots = CreateEvent( NULL, FALSE, FALSE, NULL);
-#elif __TBB_USE_FUTEX
-    my_rep->size_to_use = __TBB_INVALID_QSIZE;
-    // do nothing extra
-#else /* __TBB_USE_PTHREAD_CONDWAIT; including MacOS */
+    my_rep->var_wait_for_items = CreateEvent( NULL, TRUE/*manual reset*/, FALSE/*not signalled initially*/, NULL);
+    my_rep->var_wait_for_slots = CreateEvent( NULL, TRUE/*manual reset*/, FALSE/*not signalled initially*/, NULL);
+    InitializeCriticalSection( &my_rep->mtx_items_avail );
+    InitializeCriticalSection( &my_rep->mtx_slots_avail );
+#else 
     // initialize pthread_mutex_t, and pthread_cond_t
-
-    // use default mutexes
     pthread_mutexattr_t m_attr;
     pthread_mutexattr_init( &m_attr );
+#ifdef PTHREAD_PRIO_INHERIT 
     pthread_mutexattr_setprotocol( &m_attr, PTHREAD_PRIO_INHERIT );
+#endif
     pthread_mutex_init( &my_rep->mtx_items_avail, &m_attr );
     pthread_mutex_init( &my_rep->mtx_slots_avail, &m_attr );
     pthread_mutexattr_destroy( &m_attr );
@@ -311,25 +332,21 @@ concurrent_queue_base::concurrent_queue_base( size_t item_size ) {
     pthread_cond_init( &my_rep->var_wait_for_items, &c_attr );
     pthread_cond_init( &my_rep->var_wait_for_slots, &c_attr );
     pthread_condattr_destroy( &c_attr );
-
 #endif
 #endif /* __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
 }
 
-concurrent_queue_base::~concurrent_queue_base() {
+concurrent_queue_base_v3::~concurrent_queue_base_v3() {
     size_t nq = my_rep->n_queue;
-    for( size_t i=0; i<nq; i++ ) {
-        page* tp = my_rep->array[i].tail_page;
-        __TBB_ASSERT( my_rep->array[i].head_page==tp, "at most one page should remain" );
-        if( tp!=NULL )
-            delete tp;
-    }
+    for( size_t i=0; i<nq; i++ )
+        __TBB_ASSERT( my_rep->array[i].tail_page==NULL, "pages were not freed properly" );
 #if __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
 # if _WIN32||_WIN64
     CloseHandle( my_rep->var_wait_for_items );
     CloseHandle( my_rep->var_wait_for_slots );
-#endif
-# if __TBB_USE_PTHREAD_CONDWAIT
+    DeleteCriticalSection( &my_rep->mtx_items_avail );
+    DeleteCriticalSection( &my_rep->mtx_slots_avail );
+# else
     pthread_mutex_destroy( &my_rep->mtx_items_avail );
     pthread_mutex_destroy( &my_rep->mtx_slots_avail );
     pthread_cond_destroy( &my_rep->var_wait_for_items );
@@ -339,7 +356,7 @@ concurrent_queue_base::~concurrent_queue_base() {
     cache_aligned_allocator<concurrent_queue_rep>().deallocate(my_rep,1);
 }
 
-void concurrent_queue_base::internal_push( const void* src ) {
+void concurrent_queue_base_v3::internal_push( const void* src ) {
     concurrent_queue_rep& r = *my_rep;
 #if !__TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
     concurrent_queue_rep::ticket k  = r.tail_counter++;
@@ -353,150 +370,83 @@ void concurrent_queue_base::internal_push( const void* src ) {
         }
     } 
     r.choose(k).push(src,k,*this);
-#else /* __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
-
+#elif _WIN32||_WIN64
+    ticket k = r.tail_counter++;
+    ptrdiff_t e = my_capacity;
+    AtomicBackoff backoff;
 #if DO_ITT_NOTIFY
     bool sync_prepare_done = false;
 #endif
 
-# if !__TBB_USE_PTHREAD_CONDWAIT
-    concurrent_queue_rep::ticket k = r.tail_counter;
-    bool in_transition = false;
-    ptrdiff_t e = my_capacity;
-    if( e<concurrent_queue_rep::infinite_capacity ) {
-        AtomicBackoff backoff;
-        for( ;; ) {
-            while( (ptrdiff_t)(k-r.head_counter)>=e ) {
+    while( (ptrdiff_t)(k-r.head_counter)>=e ) {
 #if DO_ITT_NOTIFY
-                if( !sync_prepare_done ) {
-                     ITT_NOTIFY( sync_prepare, &sync_prepare_done );
-                     sync_prepare_done = true;
-                }
-#endif
-                if( !backoff.bounded_pause() ) {
-                    // queue is full.  go to sleep.
-                    r.n_waiting_producers++;
-
-                    // i created the mess. so I am the one who better clean it up.
-                    // and if someone else did not clean it up yet.
-                    if( in_transition ) {
-                        in_transition = false;
-                        __TBB_ASSERT( r.nthreads_in_transition>0, NULL );
-                        --r.nthreads_in_transition; // atomic decrement
-                    }
-                    
-                    if( (ptrdiff_t)(k-r.head_counter)>=e ) {
-#if _WIN32||_WIN64
-                        WaitForSingleObject( r.var_wait_for_slots, INFINITE );
-#elif __TBB_USE_FUTEX
-                        futex_wait( &r.var_wait_for_slots, 0 );
-                        // only one thread will wake up and come here at a time
-#endif
-                        in_transition = true;
-
-                        // raise barrier
-                        backoff.reset();
-                        while ( __TBB_CompareAndSwapW( &r.nthreads_to_read_size, r.thread_woken, 0 )!=0 )
-                            backoff.pause();
-                        
-                        r.nthreads_in_transition++; // atomic increment
-
-                        // lower barrier
-                        r.nthreads_to_read_size = 0;
-                    }
-#if __TBB_USE_FUTEX
-                    r.var_wait_for_slots = 0;
+        if( !sync_prepare_done ) {
+            ITT_NOTIFY( sync_prepare, &sync_prepare_done );
+            sync_prepare_done = true;
+        }
 #endif
-                    --r.n_waiting_producers;
-                    k = r.tail_counter;
-                    backoff.reset();
-                }
-                e = const_cast<volatile ptrdiff_t&>(my_capacity);
-            }
-            // increment the tail counter
-            concurrent_queue_rep::ticket tk = k;
-            k = r.tail_counter.compare_and_swap( tk+1, tk );
-            if( k==tk ) {
-                if( in_transition ) {
-                    in_transition = false;
-                    __TBB_ASSERT( r.nthreads_in_transition>0, NULL );
-                    --r.nthreads_in_transition;
+        if( !backoff.bounded_pause() ) {
+            EnterCriticalSection( &r.mtx_slots_avail );
+            r.n_waiting_producers++;
+            while( (ptrdiff_t)(k-r.head_counter)>=const_cast<volatile ptrdiff_t&>(my_capacity) ) {
+                int my_generation = r.producer_wait_generation;
+                for( ;; ) {
+                    LeaveCriticalSection( &r.mtx_slots_avail );
+                    WaitForSingleObject( r.var_wait_for_slots, INFINITE );
+                    EnterCriticalSection( &r.mtx_slots_avail );
+                    if( r.n_producers_to_wakeup > 0 && r.producer_wait_generation != my_generation )
+                        break;
                 }
-                break;
+                if( --r.n_producers_to_wakeup == 0 )
+                    ResetEvent( r.var_wait_for_slots );
             }
+            LeaveCriticalSection( &r.mtx_slots_avail );
+            break;
         }
-
+        e = const_cast<volatile ptrdiff_t&>(my_capacity);
+    }
 #if DO_ITT_NOTIFY
-        if( sync_prepare_done )
-            ITT_NOTIFY( sync_acquired, &sync_prepare_done );
+    if( sync_prepare_done )
+        ITT_NOTIFY( sync_acquired, &sync_prepare_done );
 #endif
 
-        r.choose( k ).push( src, k, *this );
-
-#if _WIN32||_WIN64
-        if( r.n_waiting_consumers>0 )
-            SetEvent( r.var_wait_for_items );
-        if( r.n_waiting_producers>0 && (ptrdiff_t)(r.tail_counter-r.head_counter)<my_capacity )
-            SetEvent( r.var_wait_for_slots );
-#elif __TBB_USE_FUTEX
-        if( r.n_waiting_consumers>0 && __TBB_CompareAndSwapW( &r.var_wait_for_items,1,0 )==0 )
-            futex_wakeup_one( &r.var_wait_for_items );
-        if( r.n_waiting_producers>0 && (ptrdiff_t)(r.tail_counter-r.head_counter)<my_capacity )
-            if( __TBB_CompareAndSwapW( &r.var_wait_for_slots,1,0 )==0)
-                futex_wakeup_one( &r.var_wait_for_slots );
-#endif
-    } else {
-        // in infinite capacity, no producers would ever sleep.
-        r.choose(k).push(src,k,*this);
+    r.choose( k ).push( src, k, *this );
 
-#if _WIN32||_WIN64
-        if( r.n_waiting_consumers>0 )
+    if( r.n_waiting_consumers>0 ) {
+        EnterCriticalSection( &r.mtx_items_avail );
+        if( r.n_waiting_consumers>0 ) {
+            r.consumer_wait_generation++;
+            r.n_consumers_to_wakeup = r.n_waiting_consumers;
             SetEvent( r.var_wait_for_items );
-#elif __TBB_USE_FUTEX
-        if( r.n_waiting_consumers>0 && __TBB_CompareAndSwapW( &r.var_wait_for_items,1,0 )==0 )
-            futex_wakeup_one( &r.var_wait_for_items );
-#endif
+        }
+        LeaveCriticalSection( &r.mtx_items_avail );
     }
-
-# else /* __TBB_USE_PTHREAD_CONDWAIT */
-
-    concurrent_queue_rep::ticket k = r.tail_counter;
+#else 
+    ticket k = r.tail_counter++;
     ptrdiff_t e = my_capacity;
-    if( e<concurrent_queue_rep::infinite_capacity ) {
-        AtomicBackoff backoff;
-        for( ;; ) {
-            while( (ptrdiff_t)(k-r.head_counter)>=e ) {
+    AtomicBackoff backoff;
 #if DO_ITT_NOTIFY
-                if( !sync_prepare_done ) {
-                    ITT_NOTIFY( sync_prepare, &sync_prepare_done );
-                    sync_prepare_done = true;
-                }
+    bool sync_prepare_done = false;
 #endif
-                if( !backoff.bounded_pause() ) {
-                    // queue is full.  go to sleep.
-
-                    pthread_mutex_lock( &r.mtx_slots_avail );
-
-                    r.n_waiting_producers++;
-
-                    while( (ptrdiff_t)(k-r.head_counter)>=e )
-                        pthread_cond_wait( &r.var_wait_for_slots, &r.mtx_slots_avail );
-
-                    --r.n_waiting_producers;
-
-                    pthread_mutex_unlock( &r.mtx_slots_avail );
-
-                    k = r.tail_counter;
-                    backoff.reset();
-                }
-                e = const_cast<volatile ptrdiff_t&>(my_capacity);
+    while( (ptrdiff_t)(k-r.head_counter)>=e ) {
+#if DO_ITT_NOTIFY
+        if( !sync_prepare_done ) {
+            ITT_NOTIFY( sync_prepare, &sync_prepare_done );
+            sync_prepare_done = true;
+        }
+#endif
+        if( !backoff.bounded_pause() ) {
+            // queue is full.  go to sleep. let them go to sleep in order.
+            pthread_mutex_lock( &r.mtx_slots_avail );
+            r.n_waiting_producers++;
+            while( (ptrdiff_t)(k-r.head_counter)>=const_cast<volatile ptrdiff_t&>(my_capacity) ) {
+                pthread_cond_wait( &r.var_wait_for_slots, &r.mtx_slots_avail );
             }
-            // increment the tail counter
-            concurrent_queue_rep::ticket tk = k;
-            k = r.tail_counter.compare_and_swap( tk+1, tk );
-            if( tk==k )
-                break;
+            --r.n_waiting_producers;
+            pthread_mutex_unlock( &r.mtx_slots_avail );
+            break;
         }
+        e = const_cast<volatile ptrdiff_t&>(my_capacity);
     }
 #if DO_ITT_NOTIFY
     if( sync_prepare_done )
@@ -506,183 +456,114 @@ void concurrent_queue_base::internal_push( const void* src ) {
 
     if( r.n_waiting_consumers>0 ) {
         pthread_mutex_lock( &r.mtx_items_avail );
-        // pthread_cond_signal() wakes up 'at least' one consumer.
+        // pthread_cond_broadcast() wakes up all consumers. 
         if( r.n_waiting_consumers>0 )
-            pthread_cond_signal( &r.var_wait_for_items );
+            pthread_cond_broadcast( &r.var_wait_for_items );
         pthread_mutex_unlock( &r.mtx_items_avail );
     }
-
-# endif /* !__TBB_USE_PTHREAD_CONDWAIT */
-
 #endif /* !__TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
 }
 
-void concurrent_queue_base::internal_pop( void* dst ) {
+void concurrent_queue_base_v3::internal_pop( void* dst ) {
     concurrent_queue_rep& r = *my_rep;
 #if !__TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
     concurrent_queue_rep::ticket k;
     do {
         k = r.head_counter++;
     } while( !r.choose(k).pop(dst,k,*this) );
-#else /* __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
-
+#elif _WIN32||_WIN64
+    ticket k;
+    AtomicBackoff backoff;
 #if DO_ITT_NOTIFY
     bool sync_prepare_done = false;
 #endif
-# if !__TBB_USE_PTHREAD_CONDWAIT
-    concurrent_queue_rep::ticket k;
-    bool in_transition = false;
-    AtomicBackoff backoff;
-
     do {
-        k = r.head_counter;
-        for( ;; ) {
-            while( r.tail_counter<=k ) {
+        k=r.head_counter++;
+        while( r.tail_counter<=k ) {
 #if DO_ITT_NOTIFY
-                if( !sync_prepare_done ) {
-                    ITT_NOTIFY( sync_prepare, dst );
-                    dst = (void*) ((intptr_t)dst | 1);
-                    sync_prepare_done = true;
-                }
+            if( !sync_prepare_done ) {
+                ITT_NOTIFY( sync_prepare, dst );
+                dst = (void*) ((intptr_t)dst | 1);
+                sync_prepare_done = true;
+            }
 #endif
-                // Queue is empty; pause and re-try a few times
-                if( !backoff.bounded_pause() ) {
-                    // it is really empty.. go to sleep
-                    r.n_waiting_consumers++;
-
-                    if( in_transition ) {
-                        in_transition = false;
-                        __TBB_ASSERT( r.nthreads_in_transition>0, NULL );
-                        --r.nthreads_in_transition;
-                    }
-                    
-                    if( r.tail_counter<=k ) {
-#if _WIN32||_WIN64
+            // Queue is empty; pause and re-try a few times
+            if( !backoff.bounded_pause() ) {
+                // it is really empty.. go to sleep
+                EnterCriticalSection( &r.mtx_items_avail );
+                r.n_waiting_consumers++;
+                while( r.tail_counter<=k ) {
+                    int my_generation = r.consumer_wait_generation;
+                    for( ;; ) {
+                        LeaveCriticalSection( &r.mtx_items_avail );
                         WaitForSingleObject( r.var_wait_for_items, INFINITE );
-#elif __TBB_USE_FUTEX
-                        futex_wait( &r.var_wait_for_items, 0 );
-                        r.var_wait_for_items = 0;
-#endif 
-                        in_transition = true;
-
-                        // raise barrier
-                        backoff.reset();
-                        while ( __TBB_CompareAndSwapW( &r.nthreads_to_read_size, r.thread_woken, 0 )!=0 )
-                            backoff.pause();
-                        
-                        ++r.nthreads_in_transition;
-
-                        // lower barrier
-                        r.nthreads_to_read_size = 0;
-
-                        --r.n_waiting_consumers;
-                        backoff.reset();
-                        k = r.head_counter;
-                    } else {
-#if __TBB_USE_FUTEX
-                        r.var_wait_for_items = 0;
-#endif
-                        --r.n_waiting_consumers;
-                        break;
+                        EnterCriticalSection( &r.mtx_items_avail );
+                        if( r.n_consumers_to_wakeup > 0 && r.consumer_wait_generation != my_generation )
+                            break;
                     }
+                    if( --r.n_consumers_to_wakeup == 0 )
+                        ResetEvent( r.var_wait_for_items );
                 }
+                LeaveCriticalSection( &r.mtx_items_avail );
+                backoff.reset();
+                break; // break from inner while
             }
-            // Queue had item with ticket k when we looked.  Attempt to get that item.
-            concurrent_queue_rep::ticket tk=k;
-            k = r.head_counter.compare_and_swap( tk+1, tk );
-            if( k==tk ) {
-                if( in_transition ) {
-                    in_transition = false;
-                    __TBB_ASSERT( r.nthreads_in_transition>0, NULL );
-                    --r.nthreads_in_transition;
-                }
-
-                break; // break from the middle 'for' loop
-            }
-            // Another thread snatched the item, so pause and retry.
-        }
+        } // break to here
     } while( !r.choose(k).pop(dst,k,*this) );
 
-#if _WIN32||_WIN64
-    if( r.n_waiting_consumers>0 && (ptrdiff_t)(r.tail_counter-r.head_counter)>0 )
-        SetEvent( r.var_wait_for_items );
-    if( r.n_waiting_producers>0 )
-        SetEvent( r.var_wait_for_slots );
-#elif __TBB_USE_FUTEX
-    if( r.n_waiting_consumers>0 && (ptrdiff_t)(r.tail_counter-r.head_counter)>0 )
-        if( __TBB_CompareAndSwapW( &r.var_wait_for_items, 1, 0 )==0 )
-            futex_wakeup_one( &r.var_wait_for_items );
     // wake up a producer..
-    if( r.n_waiting_producers>0 && __TBB_CompareAndSwapW( &r.var_wait_for_slots, 1, 0 )==0 )
-        futex_wakeup_one( &r.var_wait_for_slots );
-#endif
-
-# else /* __TBB_USE_PTHREAD_CONDWAIT */
-
-    concurrent_queue_rep::ticket k;
+    if( r.n_waiting_producers>0 ) {
+        EnterCriticalSection( &r.mtx_slots_avail );
+        if( r.n_waiting_producers>0 ) {
+            r.producer_wait_generation++;
+            r.n_producers_to_wakeup = r.n_waiting_producers;
+            SetEvent( r.var_wait_for_slots );
+        }
+        LeaveCriticalSection( &r.mtx_slots_avail );
+    }
+#else 
+    ticket k;
     AtomicBackoff backoff;
-
+#if DO_ITT_NOTIFY
+    bool sync_prepare_done = false;
+#endif
     do {
-        k = r.head_counter;
-        for( ;; ) {
-            while( r.tail_counter<=k ) {
+        k = r.head_counter++;
+        while( r.tail_counter<=k ) {
 #if DO_ITT_NOTIFY
-                if( !sync_prepare_done ) {
-                    ITT_NOTIFY( sync_prepare, dst );
-                    dst = (void*) ((intptr_t)dst | 1);
-                    sync_prepare_done = true;
-                }
+            if( !sync_prepare_done ) {
+                ITT_NOTIFY( sync_prepare, dst );
+                dst = (void*) ((intptr_t)dst | 1);
+                sync_prepare_done = true;
+            }
 #endif
-                // Queue is empty; pause and re-try a few times
-                if( !backoff.bounded_pause() ) {
-                    // it is really empty.. go to sleep
-
-                    pthread_mutex_lock( &r.mtx_items_avail );
-
-                    r.n_waiting_consumers++;
-
-                    if( r.tail_counter<=k ) {
-                        while( r.tail_counter<=k )
-                            pthread_cond_wait( &r.var_wait_for_items, &r.mtx_items_avail );
-
-                        --r.n_waiting_consumers;
-
-                        pthread_mutex_unlock( &r.mtx_items_avail );
-
-                        backoff.reset();
-                        k = r.head_counter;
-                    } else {
-                        --r.n_waiting_consumers;
-
-                        pthread_mutex_unlock( &r.mtx_items_avail );
-                        break;
-                    }
-                }
+            // Queue is empty; pause and re-try a few times
+            if( !backoff.bounded_pause() ) {
+                // it is really empty.. go to sleep
+                pthread_mutex_lock( &r.mtx_items_avail );
+                r.n_waiting_consumers++;
+                while( r.tail_counter<=k )
+                    pthread_cond_wait( &r.var_wait_for_items, &r.mtx_items_avail );
+                --r.n_waiting_consumers;
+                pthread_mutex_unlock( &r.mtx_items_avail );
+                backoff.reset();
+                break;
             }
-            // Queue had item with ticket k when we looked.  Attempt to get that item.
-            concurrent_queue_rep::ticket tk=k;
-            k = r.head_counter.compare_and_swap( tk+1, tk );
-            if( tk==k )
-                break; // break from the middle 'for' loop
-            // Another thread snatched the item, so pause and retry.
         }
     } while( !r.choose(k).pop(dst,k,*this) );
 
     if( r.n_waiting_producers>0 ) {
         pthread_mutex_lock( &r.mtx_slots_avail );
         if( r.n_waiting_producers>0 )
-            pthread_cond_signal( &r.var_wait_for_slots );
+            pthread_cond_broadcast( &r.var_wait_for_slots );
         pthread_mutex_unlock( &r.mtx_slots_avail );
     }
-
-# endif /* !__TBB_USE_PTHREAD_CONDWAIT */
-
 #endif /* !__TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
 }
 
-bool concurrent_queue_base::internal_pop_if_present( void* dst ) {
+bool concurrent_queue_base_v3::internal_pop_if_present( void* dst ) {
     concurrent_queue_rep& r = *my_rep;
-    concurrent_queue_rep::ticket k;
+    ticket k;
     do {
         k = r.head_counter;
         for(;;) {
@@ -691,62 +572,72 @@ bool concurrent_queue_base::internal_pop_if_present( void* dst ) {
                 return false;
             }
             // Queue had item with ticket k when we looked.  Attempt to get that item.
-            concurrent_queue_rep::ticket tk=k;
+            ticket tk=k;
             k = r.head_counter.compare_and_swap( tk+1, tk );
             if( k==tk )
                 break;
-            // Another thread snatched the item, so retry.
+            // Another thread snatched the item, retry.
         }
-    } while( !r.choose(k).pop(dst,k,*this) );
+    } while( !r.choose( k ).pop( dst, k, *this ) );
+
 #if __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
 #if _WIN32||_WIN64
     // wake up a producer..
-    if( r.n_waiting_producers>0 )
-        SetEvent( r.var_wait_for_slots );
-#elif __TBB_USE_FUTEX
-    if( r.n_waiting_producers>0 && __TBB_CompareAndSwapW( &r.var_wait_for_slots, 1, 0 )==0 )
-        futex_wakeup_one( &r.var_wait_for_slots );
+    if( r.n_waiting_producers>0 ) {
+        EnterCriticalSection( &r.mtx_slots_avail );
+        if( r.n_waiting_producers>0 ) {
+            r.producer_wait_generation++;
+            r.n_producers_to_wakeup = r.n_waiting_producers;
+            SetEvent( r.var_wait_for_slots );
+        }
+        LeaveCriticalSection( &r.mtx_slots_avail );
+    }
 #else /* including MacOS */
     if( r.n_waiting_producers>0 ) {
         pthread_mutex_lock( &r.mtx_slots_avail );
         if( r.n_waiting_producers>0 )
-            pthread_cond_signal( &r.var_wait_for_slots );
+            pthread_cond_broadcast( &r.var_wait_for_slots );
         pthread_mutex_unlock( &r.mtx_slots_avail );
     }
 #endif
 #endif /* __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
+
     return true;
 }
 
-bool concurrent_queue_base::internal_push_if_not_full( const void* src ) {
+bool concurrent_queue_base_v3::internal_push_if_not_full( const void* src ) {
     concurrent_queue_rep& r = *my_rep;
-    concurrent_queue_rep::ticket k = r.tail_counter;
+    ticket k = r.tail_counter;
     for(;;) {
         if( (ptrdiff_t)(k-r.head_counter)>=my_capacity ) {
             // Queue is full
             return false;
         }
         // Queue had empty slot with ticket k when we looked.  Attempt to claim that slot.
-        concurrent_queue_rep::ticket tk=k;
+        ticket tk=k;
         k = r.tail_counter.compare_and_swap( tk+1, tk );
-        if( k==tk )
+        if( k==tk ) 
             break;
-        // Another thread claimed the slot, so retry.
+        // Another thread claimed the slot, so retry. 
     }
     r.choose(k).push(src,k,*this);
+
 #if __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
 #if _WIN32||_WIN64
-    // wake up a consumer..
-    if( r.n_waiting_consumers>0 )
-        SetEvent( r.var_wait_for_items );
-#elif __TBB_USE_FUTEX
-    if( r.n_waiting_consumers>0 && __TBB_CompareAndSwapW( &r.var_wait_for_items, 1, 0 )==0 )
-        futex_wakeup_one( &r.var_wait_for_items );
+    if( r.n_waiting_consumers>0 ) {
+        EnterCriticalSection( &r.mtx_items_avail );
+        if( r.n_waiting_consumers>0 ) {
+            r.consumer_wait_generation++;
+            r.n_consumers_to_wakeup = r.n_waiting_consumers;
+            SetEvent( r.var_wait_for_items );
+        }
+        LeaveCriticalSection( &r.mtx_items_avail );
+    }
 #else /* including MacOS */
     if( r.n_waiting_consumers>0 ) {
         pthread_mutex_lock( &r.mtx_items_avail );
         if( r.n_waiting_consumers>0 )
-            pthread_cond_signal( &r.var_wait_for_items );
+            pthread_cond_broadcast( &r.var_wait_for_items );
         pthread_mutex_unlock( &r.mtx_items_avail );
     }
 #endif
@@ -754,63 +645,36 @@ bool concurrent_queue_base::internal_push_if_not_full( const void* src ) {
     return true;
 }
 
-ptrdiff_t concurrent_queue_base::internal_size() const {
+ptrdiff_t concurrent_queue_base_v3::internal_size() const {
     __TBB_ASSERT( sizeof(ptrdiff_t)<=sizeof(size_t), NULL );
-#if __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE
-# if !__TBB_USE_PTHREAD_CONDWAIT
-    concurrent_queue_rep& r = *my_rep;
-    ptrdiff_t sz;
-    {
-        ptrdiff_t n, nn;
-        AtomicBackoff bo;
-    restart_read_size:
-        while( (n=r.nthreads_to_read_size)==r.thread_woken ) // a woken thread is incrementing nthreads_in_transition
-            bo.pause();
-        bo.reset();
-        do {
-            nn = n;
-            n = __TBB_CompareAndSwapW( &r.nthreads_to_read_size, nn+1, nn );
-            if( n==r.thread_woken ) // I lost to a woken thread
-                goto restart_read_size;
-        } while ( n!=nn );
-
-        while( r.nthreads_in_transition>0 ) // wait until already woken threads to finish
-            bo.pause();
-
-        sz = ptrdiff_t((r.tail_counter-r.head_counter)+(r.n_waiting_producers-r.n_waiting_consumers));
-
-        n = r.nthreads_to_read_size;
-        do {
-            nn = n;
-            n = __TBB_CompareAndSwapW( &r.nthreads_to_read_size, nn-1, nn );
-        } while ( n!=nn );
-    }
-    return sz;
-#else /* __TBB_USE_PTHREAD_CONDWAIT */
-    concurrent_queue_rep& r = *my_rep;
-    pthread_mutex_lock( &r.mtx_slots_avail );
-    int nwp = r.n_waiting_producers;
-    pthread_mutex_unlock( &r.mtx_slots_avail );
-    pthread_mutex_lock( &r.mtx_items_avail );
-    int nwc = r.n_waiting_consumers;
-    pthread_mutex_unlock( &r.mtx_items_avail );
-    return ptrdiff_t((r.tail_counter-r.head_counter)+(nwp - nwc));
-#endif /* !__TBB_USE_PTHREAD_CONDWAIT */
-#else /* !__TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE || __TBB_USE_PTHREAD_CONDWAIT */
     return ptrdiff_t(my_rep->tail_counter-my_rep->head_counter);
-#endif /* __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
 }
 
-void concurrent_queue_base::internal_set_capacity( ptrdiff_t capacity, size_t /*item_size*/ ) {
+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;
 }
 
+void concurrent_queue_base_v3::internal_finish_clear() {
+    size_t nq = my_rep->n_queue;
+    for( size_t i=0; i<nq; i++ ) {
+        page* tp = my_rep->array[i].tail_page;
+        __TBB_ASSERT( my_rep->array[i].head_page==tp, "at most one page should remain" );
+        if( tp!=NULL) {
+            if( tp!=invalid_page ) deallocate_page( tp );
+            my_rep->array[i].tail_page = NULL;
+        }
+    }
+}
+
+void concurrent_queue_base_v3::internal_throw_exception() const {
+    throw bad_alloc();
+}
+
 //------------------------------------------------------------------------
 // concurrent_queue_iterator_rep
 //------------------------------------------------------------------------
 class  concurrent_queue_iterator_rep {
 public:
-    typedef concurrent_queue_rep::ticket ticket;
     ticket head_counter;   
     const concurrent_queue_base& my_queue;
     concurrent_queue_base::page* array[concurrent_queue_rep::n_queue];
@@ -838,25 +702,27 @@ public:
 //------------------------------------------------------------------------
 // concurrent_queue_iterator_base
 //------------------------------------------------------------------------
-concurrent_queue_iterator_base::concurrent_queue_iterator_base( const concurrent_queue_base& queue ) {
-    my_rep = new concurrent_queue_iterator_rep(queue);
+concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3( const concurrent_queue_base& queue ) {
+    my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep>().allocate(1);
+    new( my_rep ) concurrent_queue_iterator_rep(queue);
     my_item = my_rep->choose(my_rep->head_counter);
 }
 
-void concurrent_queue_iterator_base::assign( const concurrent_queue_iterator_base& other ) {
+void concurrent_queue_iterator_base_v3::assign( const concurrent_queue_iterator_base& other ) {
     if( my_rep!=other.my_rep ) {
         if( my_rep ) {
-            delete my_rep;
+            cache_aligned_allocator<concurrent_queue_iterator_rep>().deallocate(my_rep, 1);
             my_rep = NULL;
         }
         if( other.my_rep ) {
-            my_rep = new concurrent_queue_iterator_rep( *other.my_rep );
+            my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep>().allocate(1);
+            new( my_rep ) concurrent_queue_iterator_rep( *other.my_rep );
         }
     }
     my_item = other.my_item;
 }
 
-void concurrent_queue_iterator_base::advance() {
+void concurrent_queue_iterator_base_v3::advance() {
     __TBB_ASSERT( my_item, "attempt to increment iterator past end of queue" );  
     size_t k = my_rep->head_counter;
     const concurrent_queue_base& queue = my_rep->my_queue;
@@ -870,8 +736,9 @@ void concurrent_queue_iterator_base::advance() {
     my_item = my_rep->choose(k+1);
 }
 
-concurrent_queue_iterator_base::~concurrent_queue_iterator_base() {
-    delete my_rep;
+concurrent_queue_iterator_base_v3::~concurrent_queue_iterator_base_v3() {
+    //delete my_rep;
+    cache_aligned_allocator<concurrent_queue_iterator_rep>().deallocate(my_rep, 1);
     my_rep = NULL;
 }
 
diff --git a/src/tbb/concurrent_vector.cpp b/src/tbb/concurrent_vector.cpp
index 1892508..372c7dc 100644
--- a/src/tbb/concurrent_vector.cpp
+++ b/src/tbb/concurrent_vector.cpp
@@ -27,235 +27,386 @@
 */
 
 #include "tbb/concurrent_vector.h"
+#include "tbb/tbb_exception.h"
 #include "tbb_misc.h"
-#include <stdexcept>
 #include "itt_notify.h"
 #include "tbb/task.h"
 #include <cstring>
 
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (disable: 4267)
+#endif /* _MSC_VER && _Wp64 */
+
+using namespace std;
 
 namespace tbb {
 
 namespace internal {
+class concurrent_vector_base_v3::helper {
+public:
+    //! memory page size
+    static const size_type page_size = 4096;
 
-void concurrent_vector_base::internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op1 init ) {
-    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 );
-            return;
-        }
-        e = f;
+    inline static bool incompact_predicate(size_type size) { // assert size != 0, see source/test/test_vector_layout.cpp
+        return size < page_size || ((size-1)%page_size < page_size/2 && size < page_size * 128); // for more details
     }
-}
 
-class concurrent_vector_base::helper {
-    static void extend_segment( concurrent_vector_base& v );
-public:
-    static segment_index_t find_segment_end( const concurrent_vector_base& v ) {
-        const size_t pointers_per_long_segment = sizeof(void*)==4 ? 32 : 64;
-        const size_t pointers_per_short_segment = 2;
-        //unsigned u = v.my_segment==v.my_storage ? pointers_per_short_segment : pointers_per_long_segment;
-        segment_index_t u = v.my_segment==(&(v.my_storage[0])) ? pointers_per_short_segment : pointers_per_long_segment;
+    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_index_t k = 0;
-        while( k<u && v.my_segment[k].array )
+        while( k < u && v.my_segment[k].array )
             ++k;
         return k;
     }
-    static void extend_segment_if_necessary( concurrent_vector_base& v, size_t k ) {
-        const size_t pointers_per_short_segment = 2;
-        if( k>=pointers_per_short_segment && v.my_segment==v.my_storage ) {
-            extend_segment(v);
+
+    //! 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*/) {
+        if( !v.my_first_block ) {
+            v.my_first_block.compare_and_swap(k+1, 0); // store number of segments
         }
     }
+
+    inline static void *allocate_segment(concurrent_vector_base_v3 &v, size_type n) {
+        void *ptr = v.vector_allocator_ptr(v, n);
+        if(!ptr) throw bad_alloc(); // check for bad allocation, throw exception
+        return ptr;
+    }
+
+    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?" );
+        size_type m = segment_size(k);
+        if( !k ) {
+            assign_first_segment_if_neccessary(v, default_initial_segments-1, element_size);
+            try {
+                __TBB_store_with_release(v.my_segment[0].array, allocate_segment(v, segment_size(v.my_first_block) ) );
+            } catch(...) { // intercept exception here, assign __TBB_BAD_ALLOC value, re-throw exception
+                __TBB_store_with_release(v.my_segment[0].array, __TBB_BAD_ALLOC); throw;
+            }
+            return 2;
+        }
+        if( !v.my_first_block )
+            internal::SpinwaitWhileEq( v.my_first_block, segment_index_t(0) );
+        if( k < v.my_first_block ) {
+            if( !v.my_segment[0].array )
+                internal::SpinwaitWhileEq( v.my_segment[0].array, (void*)0 );
+            void *array0 = v.my_segment[0].array;
+            if( array0 <= __TBB_BAD_ALLOC ) { // check for __TBB_BAD_ALLOC of initial segment
+                __TBB_store_with_release(v.my_segment[k].array, __TBB_BAD_ALLOC); // and assign __TBB_BAD_ALLOC here
+                throw bad_last_alloc(); // throw custom exception
+            }
+            __TBB_store_with_release(v.my_segment[k].array, static_cast<void*>(
+                static_cast<char*>(array0) + segment_base(k)*element_size ) );
+        } else {
+            try {
+                __TBB_store_with_release(v.my_segment[k].array, allocate_segment(v, m));
+            } catch(...) { // intercept exception here, assign __TBB_BAD_ALLOC value, re-throw exception
+                __TBB_store_with_release(v.my_segment[k].array, __TBB_BAD_ALLOC); throw;
+            }
+        }
+        return m;
+    }
+
+    inline static void extend_table_if_necessary(concurrent_vector_base_v3 &v, size_type k) {
+        if(k >= pointers_per_short_table && v.my_segment == v.my_storage)
+            extend_segment_table(v);
+    }
+
+    static void extend_segment_table(concurrent_vector_base_v3 &v) {
+        segment_t* s = (segment_t*)NFS_Allocate( pointers_per_long_table, sizeof(segment_t), NULL );
+        // if( !s ) throw bad_alloc() -- implemented in NFS_Allocate
+        memset( s, 0, pointers_per_long_table*sizeof(segment_t) );
+        // 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.
+        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);
+
+        for( segment_index_t i = 0; i < pointers_per_short_table; i++)
+            s[i] = v.my_storage[i];
+        if( v.my_segment.compare_and_swap( s, v.my_storage ) != v.my_storage )
+            NFS_Free( s );
+    }
 };
 
-void concurrent_vector_base::helper::extend_segment( concurrent_vector_base& v ) {
-    const size_t pointers_per_long_segment = sizeof(void*)==4 ? 32 : 64;
-    segment_t* s = (segment_t*)NFS_Allocate( pointers_per_long_segment, sizeof(segment_t), NULL );
-    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;
-    while( !v.my_storage[0].array || !v.my_storage[1].array ) {
-        backoff.pause();
+concurrent_vector_base_v3::~concurrent_vector_base_v3() {
+    segment_t* s = my_segment;
+    if( s != my_storage ) {
+        // Clear short segment.
+        for( segment_index_t i = 0; i < pointers_per_short_table; i++)
+            my_storage[i].array = NULL;
+        my_segment = my_storage;
+        NFS_Free( s );
     }
-    s[0] = v.my_storage[0]; 
-    s[1] = v.my_storage[1]; 
-    if( v.my_segment.compare_and_swap( s, v.my_storage )!=v.my_storage ) 
-        NFS_Free(s);
 }
 
-concurrent_vector_base::size_type concurrent_vector_base::internal_capacity() const {
+concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_capacity() const {
     return segment_base( helper::find_segment_end(*this) );
 }
 
-void concurrent_vector_base::internal_reserve( size_type n, size_type element_size, size_type max_size ) {
+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");
+    }
+}
+
+void concurrent_vector_base_v3::internal_reserve( size_type n, size_type element_size, size_type max_size ) {
     if( n>max_size ) {
-        throw std::length_error("argument to ConcurrentVector::reserve exceeds ConcurrentVector::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 ) {
-        helper::extend_segment_if_necessary(*this,k);
-        size_t m = segment_size(k);
-        __TBB_ASSERT( !my_segment[k].array, "concurrent operation during reserve(...)?" );
-        my_segment[k].array = NFS_Allocate( m, element_size, NULL );
+        try {
+            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
+        }
     }
 }
 
-void concurrent_vector_base::internal_copy( const concurrent_vector_base& src, size_type element_size, internal_array_op2 copy ) {
+void concurrent_vector_base_v3::internal_copy( const concurrent_vector_base_v3& src, size_type element_size, internal_array_op2 copy ) {
     size_type n = src.my_early_size;
     my_early_size = n;
     my_segment = my_storage;
     if( n ) {
+        helper::assign_first_segment_if_neccessary(*this, segment_index_of(n), element_size);
         size_type b;
         for( segment_index_t k=0; (b=segment_base(k))<n; ++k ) {
-            helper::extend_segment_if_necessary(*this,k);
-            size_t m = segment_size(k);
-            __TBB_ASSERT( !my_segment[k].array, "concurrent operation during copy construction?" );
-            my_segment[k].array = NFS_Allocate( m, element_size, NULL );
-            if( m>n-b ) m = n-b; 
+            if( (src.my_segment == (segment_t*)src.my_storage && k >= pointers_per_short_table)
+                || src.my_segment[k].array <= __TBB_BAD_ALLOC ) {
+                my_early_size = b; break;
+            }
+            helper::extend_table_if_necessary(*this, k);
+            size_type m = helper::enable_segment(*this, k, element_size);
+            if( m > n-b ) m = n-b; 
             copy( my_segment[k].array, src.my_segment[k].array, m );
         }
     }
 }
 
-void concurrent_vector_base::internal_assign( const concurrent_vector_base& src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy ) {
+void concurrent_vector_base_v3::internal_assign( const concurrent_vector_base_v3& src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy ) {
     size_type n = src.my_early_size;
     while( my_early_size>n ) { 
         segment_index_t k = segment_index_of( my_early_size-1 );
         size_type b=segment_base(k);
         size_type new_end = b>=n ? b : n;
         __TBB_ASSERT( my_early_size>new_end, NULL );
+        if( my_segment[k].array <= __TBB_BAD_ALLOC) // check vector was broken before
+            throw bad_last_alloc(); // throw custom exception
+        // destructors are supposed to not throw any exceptions
         destroy( (char*)my_segment[k].array+element_size*(new_end-b), my_early_size-new_end );
         my_early_size = new_end;
     }
     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);
     size_type b;
     for( segment_index_t k=0; (b=segment_base(k))<n; ++k ) {
-        helper::extend_segment_if_necessary(*this,k);
-        size_t m = segment_size(k);
-        if( !my_segment[k].array )
-            my_segment[k].array = NFS_Allocate( m, element_size, NULL );
-        if( m>n-b ) m = n-b; 
+        helper::extend_table_if_necessary(*this, k);
+        if(!my_segment[k].array)
+            helper::enable_segment(*this, k, element_size);
+        if( (src.my_segment == (segment_t*)src.my_storage && k >= pointers_per_short_table)
+            || src.my_segment[k].array <= __TBB_BAD_ALLOC ) { // if source is damaged
+                my_early_size = b; break;
+        }
+        size_type m = k? segment_size(k) : 2;
+        if( m > n-b ) m = n-b;
         size_type a = 0;
         if( dst_initialized_size>b ) {
             a = dst_initialized_size-b;
             if( a>m ) a = m;
             assign( my_segment[k].array, src.my_segment[k].array, a );
-            m -= a; 
-            a *= element_size; 
+            m -= a;
+            a *= element_size;
         }
-        if( m>0 ) 
+        if( m>0 )
             copy( (char*)my_segment[k].array+a, (char*)src.my_segment[k].array+a, m );
     }
     __TBB_ASSERT( src.my_early_size==n, "detected use of ConcurrentVector::operator= with right side that was concurrently modified" );
 }
 
-void* concurrent_vector_base::internal_push_back( size_type element_size, size_type& index ) {
+void* concurrent_vector_base_v3::internal_push_back( size_type element_size, size_type& index ) {
     __TBB_ASSERT( sizeof(my_early_size)==sizeof(reference_count), NULL );
-    //size_t tmp = __TBB_FetchAndIncrementWacquire(*(tbb::internal::reference_count*)&my_early_size);
-    size_t tmp = __TBB_FetchAndIncrementWacquire((tbb::internal::reference_count*)&my_early_size);
+    size_type tmp = __TBB_FetchAndIncrementWacquire((tbb::internal::reference_count*)&my_early_size);
     index = tmp;
     segment_index_t k_old = segment_index_of( tmp );
     size_type base = segment_base(k_old);
-    helper::extend_segment_if_necessary(*this,k_old);
+    helper::extend_table_if_necessary(*this, k_old);
     segment_t& s = my_segment[k_old];
-    void* array = s.array;
-    if( !array ) {
-        // FIXME - consider factoring this out and share with internal_grow_by
-	if( base==tmp ) {
-	    __TBB_ASSERT( !s.array, NULL );
-            size_t n = segment_size(k_old);
-	    array = NFS_Allocate( n, element_size, NULL );
-	    ITT_NOTIFY( sync_releasing, &s.array );
-	    s.array = array;
-	} else {
-	    ITT_NOTIFY(sync_prepare, &s.array);
-	    internal::SpinwaitWhileEq( s.array, (void*)0 );
-	    ITT_NOTIFY(sync_acquired, &s.array);
-	    array = s.array;
-	}
+    if( !__TBB_load_with_acquire(s.array) ) { // do not check for __TBB_BAD_ALLOC because it's hard to recover after __TBB_BAD_ALLOC correctly
+        if( base==tmp ) {
+            helper::enable_segment(*this, k_old, element_size);
+            ITT_NOTIFY( sync_releasing, &s.array );
+        } else {
+            ITT_NOTIFY(sync_prepare, &s.array);
+            internal::SpinwaitWhileEq( s.array, (void*)0 );
+            ITT_NOTIFY(sync_acquired, &s.array);
+        }
     }
+    if( s.array <= __TBB_BAD_ALLOC ) // check for __TBB_BAD_ALLOC
+        throw bad_last_alloc(); // throw custom exception
     size_type j_begin = tmp-base;
-    return (void*)((char*)array+element_size*j_begin);
+    return (void*)((char*)s.array+element_size*j_begin);
+}
+
+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 ) {
+    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;
+        }
+        e = f;
+    }
 }
 
-concurrent_vector_base::size_type concurrent_vector_base::internal_grow_by( size_type delta, size_type element_size, internal_array_op1 init ) {
+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 ) {
     size_type result = my_early_size.fetch_and_add(delta);
-    internal_grow( result, result+delta, element_size, init );
+    internal_grow( result, result+delta, element_size, init, src );
     return result;
 }
 
-void concurrent_vector_base::internal_grow( const size_type start, size_type finish, size_type element_size, internal_array_op1 init ) {
+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_t tmp = start;
+    size_type tmp = start;
+    helper::assign_first_segment_if_neccessary(*this, segment_index_of(finish), element_size);
     do {
         segment_index_t k_old = segment_index_of( tmp );
         size_type base = segment_base(k_old);
-        size_t n = segment_size(k_old);
-        helper::extend_segment_if_necessary(*this,k_old);
+        helper::extend_table_if_necessary(*this, k_old);
         segment_t& s = my_segment[k_old];
-        void* array = s.array;
-        if( !array ) {
+        if( !__TBB_load_with_acquire(s.array) ) { // do not check for __TBB_BAD_ALLOC because it's hard to recover after __TBB_BAD_ALLOC correctly
             if( base==tmp ) {
-                __TBB_ASSERT( !s.array, NULL );
-                array = NFS_Allocate( n, element_size, NULL );
+                helper::enable_segment(*this, k_old, element_size);
                 ITT_NOTIFY( sync_releasing, &s.array );
-                s.array = array;
             } else {
                 ITT_NOTIFY(sync_prepare, &s.array);
                 internal::SpinwaitWhileEq( s.array, (void*)0 );
                 ITT_NOTIFY(sync_acquired, &s.array);
-                array = s.array;
             }
         }
+        if( s.array <= __TBB_BAD_ALLOC ) // check for __TBB_BAD_ALLOC
+            throw bad_last_alloc(); // throw custom exception
+        size_type n = k_old?segment_size(k_old):2;
         size_type j_begin = tmp-base;
         size_type j_end = n > finish-base ? finish-base : n;
-        (*init)( (void*)((char*)array+element_size*j_begin), j_end-j_begin );
+        init( (void*)((char*)s.array+element_size*j_begin), src, j_end-j_begin );
         tmp = base+j_end;
     } while( tmp<finish );
 }
 
-void concurrent_vector_base::internal_clear( internal_array_op1 destroy, bool reclaim_storage ) {
-    // Set "my_early_size" early, so that subscripting errors can be caught.
-    // FIXME - doing so may be hurting exception saftey
+concurrent_vector_base_v3::segment_index_t concurrent_vector_base_v3::internal_clear( internal_array_op1 destroy ) {
     __TBB_ASSERT( my_segment, NULL );
+    const size_type k_end = helper::find_segment_end(*this);
     size_type finish = my_early_size;
+    // Set "my_early_size" early, so that subscripting errors can be caught.
     my_early_size = 0;
-    while( finish>0 ) {
+    while( finish > 0 ) {
         segment_index_t k_old = segment_index_of(finish-1);
-        segment_t& s = my_segment[k_old];
-        __TBB_ASSERT( s.array, NULL );
         size_type base = segment_base(k_old);
         size_type j_end = finish-base;
-        __TBB_ASSERT( j_end, NULL );
-        (*destroy)( s.array, j_end );
         finish = base;
+        if( k_old <= k_end ) {
+            segment_t& s = my_segment[k_old];
+            __TBB_ASSERT( j_end, NULL );
+            if( s.array > __TBB_BAD_ALLOC)
+                destroy( s.array, j_end ); // destructors are supposed to not throw any exceptions
+        }
     }
+    return k_end;
+}
+
+void *concurrent_vector_base_v3::internal_compact( size_type element_size, void *table, internal_array_op1 destroy, internal_array_op2 copy )
+{
+    const size_type my_size = my_early_size;
+    if( !my_size ) return NULL;
+    const segment_index_t k_end = helper::find_segment_end(*this);
+    const segment_index_t k_stop = segment_index_of(my_size-1) + 1;
+    const segment_index_t first_block = my_first_block; // getting values from atomics
+
+    segment_index_t k = first_block;
+    if(k_stop < first_block)
+        k = k_stop;
+    else
+        while (k < k_stop && helper::incompact_predicate(segment_size( k ) * element_size) ) k++;
+    if(k_stop == k_end && k == first_block)
+        return NULL;
 
-    // Free the arrays
-    if( reclaim_storage ) {
-        size_t k = helper::find_segment_end(*this);
-        while( k>0 ) {
-            --k;
-            segment_t& s = my_segment[k];
-            void* array = s.array;
-            s.array = NULL;
-            NFS_Free( array );
+    segment_t *const segment_table = my_segment;
+    internal_segments_table &old = *static_cast<internal_segments_table*>( table );
+    memset(&old, 0, sizeof(old));
+
+    if ( k != first_block ) // first segment optimization
+    {
+        // exception can occur here
+        void *seg = old.table[0] = helper::allocate_segment( *this, segment_size(k) );
+        old.first_block = k; // fill info for freeing new segment if exception occurs
+        // copy items to the new segment
+        size_type my_segment_size = segment_size( first_block );
+        for (segment_index_t i = 0, j = 0; i < k && j < my_size; j = my_segment_size) {
+            __TBB_ASSERT( segment_table[i].array > __TBB_BAD_ALLOC, NULL);
+            void *s = static_cast<void*>(
+                static_cast<char*>(seg) + segment_base(i)*element_size );
+            if(j + my_segment_size >= my_size) my_segment_size = my_size - j;
+            // exception can occur here
+            copy( s, segment_table[i].array, my_segment_size );
+            my_segment_size = i? segment_size( ++i ) : segment_size( i = first_block );
+        }
+        // commit the changes
+        memcpy(old.table, segment_table, k * sizeof(segment_t));
+        for (segment_index_t i = 0; i < k; i++) {
+            segment_table[i].array = static_cast<void*>(
+                static_cast<char*>(seg) + segment_base(i)*element_size );
+        }
+        old.first_block = first_block; my_first_block = k; // now, first_block != my_first_block
+        // destroy original copies
+        my_segment_size = segment_size( first_block ); // old.first_block actually
+        for (segment_index_t i = 0, j = 0; i < k && j < my_size; j = my_segment_size) {
+            if(j + my_segment_size >= my_size) my_segment_size = my_size - j;
+            // destructors are supposed to not throw any exceptions
+            destroy( old.table[i], my_segment_size );
+            my_segment_size = i? segment_size( ++i ) : segment_size( i = first_block );
         }
-        // Clear short segment.  
-        my_storage[0].array = NULL;
-        my_storage[1].array = NULL;
-        segment_t* s = my_segment;
-        if( s!=my_storage ) {
-            my_segment = my_storage;
-            NFS_Free( s );
-        } 
     }
+    // free unnecessary segments allocated by reserve() call
+    if ( k_stop < k_end ) {
+        memcpy(old.table+k_stop, segment_table+k_stop, (k_end-k_stop) * sizeof(segment_t));
+        memset(segment_table+k_stop, 0, (k_end-k_stop) * sizeof(segment_t));
+    }
+    return table;
 }
 
+void concurrent_vector_base_v3::internal_swap(concurrent_vector_base_v3& v)
+{
+    size_type my_sz = my_early_size, v_sz = v.my_early_size;
+    if(!my_sz && !v_sz) return;
+    size_type tmp = my_first_block; my_first_block = v.my_first_block; v.my_first_block = tmp;
+    bool my_short = (my_segment == my_storage), v_short  = (v.my_segment == v.my_storage);
+    if ( my_short && v_short ) { // swap both tables
+        char tbl[pointers_per_short_table * sizeof(segment_t)];
+        memcpy(tbl, my_storage, pointers_per_short_table * sizeof(segment_t));
+        memcpy(my_storage, v.my_storage, pointers_per_short_table * sizeof(segment_t));
+        memcpy(v.my_storage, tbl, pointers_per_short_table * sizeof(segment_t));
+    }
+    else if ( my_short ) { // my -> v
+        memcpy(v.my_storage, my_storage, pointers_per_short_table * sizeof(segment_t));
+        my_segment = v.my_segment; v.my_segment = v.my_storage;
+    }
+    else if ( v_short ) { // v -> my
+        memcpy(my_storage, v.my_storage, pointers_per_short_table * sizeof(segment_t));
+        v.my_segment = my_segment; my_segment = my_storage;
+    } else {
+        segment_t *ptr = my_segment; my_segment = v.my_segment; v.my_segment = ptr;
+    }
+    my_early_size = v_sz; v.my_early_size = my_sz;
+}
+
+
 } // namespace internal
 
 } // tbb
diff --git a/src/tbb/em64t-tbb-mac-export.txt b/src/tbb/em64t-tbb-mac-export.txt
deleted file mode 100644
index f10c283..0000000
--- a/src/tbb/em64t-tbb-mac-export.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 2005-2008 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.
-
-# cache_aligned_allocator.cpp
-__ZN3tbb8internal12NFS_AllocateEmmPv
-__ZN3tbb8internal15NFS_GetLineSizeEv
-__ZN3tbb8internal8NFS_FreeEPv
-
-# Task.cpp
-__ZN3tbb19task_scheduler_init10initializeEi
-__ZN3tbb19task_scheduler_init9terminateEv
-__ZN3tbb4task22internal_set_ref_countEi
-__ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE
-__ZN3tbb4task4selfEv
-__ZN3tbb4task7destroyERS0_
-__ZNK3tbb4task26is_owned_by_current_threadEv
-__ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE
-__ZN3tbb8internal19allocate_root_proxy8allocateEm
-__ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE
-__ZNK3tbb8internal20allocate_child_proxy8allocateEm
-__ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE
-__ZNK3tbb8internal27allocate_continuation_proxy8allocateEm
-__ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE
-__ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm
-
-# tbb_misc.cpp
-__ZN3tbb17assertion_failureEPKciS1_S1_
-__ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E
-__ZN3tbb8internal36get_initial_auto_partitioner_divisorEv
-__ZN3tbb8internal13handle_perrorEiPKc
-
-# Pipeline.cpp
-__ZTIN3tbb6filterE
-__ZTVN3tbb6filterE
-__ZN3tbb6filterD2Ev
-__ZN3tbb8pipeline10add_filterERNS_6filterE
-__ZN3tbb8pipeline12inject_tokenERNS_4taskE
-__ZN3tbb8pipeline3runEm
-__ZN3tbb8pipeline5clearEv
-__ZN3tbb8pipelineC1Ev
-__ZN3tbb8pipelineD1Ev
-
-# ReaderWriterMutex.cpp
-__ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv
-__ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv
-__ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b
-__ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv
-__ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b
-
-# spin_rw_mutex.cpp
-__ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_
-__ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_
-__ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_
-__ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_
-__ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_
-__ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_
-__ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_
-__ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_
-__ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_
-
-# SpinMutex.cpp
-__ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_
-__ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv
-__ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_
-
-# mutex.cpp
-__ZN3tbb5mutex11scoped_lock16internal_acquireERS0_
-__ZN3tbb5mutex11scoped_lock16internal_releaseEv
-__ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_
-__ZN3tbb5mutex16internal_destroyEv
-__ZN3tbb5mutex18internal_constructEv
-
-# QueuingMutex.cpp
-__ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_
-__ZN3tbb13queuing_mutex11scoped_lock7releaseEv
-__ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_
-
-# concurrent_hash_map
-__ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv
-
-# ConcurrentQueue.cpp
-__ZN3tbb8internal21concurrent_queue_base12internal_popEPv
-__ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv
-__ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm
-__ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv
-__ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv
-__ZN3tbb8internal21concurrent_queue_baseC2Em
-__ZN3tbb8internal21concurrent_queue_baseD2Ev
-__ZTIN3tbb8internal21concurrent_queue_baseE
-__ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_
-__ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv
-__ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE
-__ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev
-__ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv
-
-# ConcurrentVector.cpp
-__ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE
-__ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb
-__ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_
-__ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE
-__ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm
-__ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm
-__ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE
-__ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv
diff --git a/src/tbb/gate.h b/src/tbb/gate.h
index b57ace5..3de446f 100644
--- a/src/tbb/gate.h
+++ b/src/tbb/gate.h
@@ -29,7 +29,6 @@
 #ifndef _TBB_Gate_H
 #define _TBB_Gate_H
 
-#define IMPROVED_GATING 1
 namespace tbb {
 
 namespace internal {
@@ -50,27 +49,22 @@ public:
 /** Use this futex-based implementation where possible, because it is the simplest and usually fastest. */
 class Gate {
 public:
-    typedef intptr state_t;
+    typedef intptr_t state_t;
 
     //! Get current state of gate
     state_t get_state() const {
         return state;
     }
     //! Update state=value if state==comparand (flip==false) or state!=comparand (flip==true)
-    void try_update( intptr value, intptr comparand, bool flip=false ) {
+    void try_update( intptr_t value, intptr_t comparand, bool flip=false ) {
         __TBB_ASSERT( comparand!=0 || value!=0, "either value or comparand must be non-zero" );
-        intptr old = state;
-        if( flip ) {
-            if( old==comparand ) 
-                return;
-            comparand = old;
-        } else {
-            if( old!=comparand )
-                return;
-        }   
-        old = state.compare_and_swap( value, comparand );
-        if( old==comparand && value!=0 )
-            futex_wakeup_all( &state );
+        state_t old_state = state;
+        // First test for condition without using atomic operation
+        if( flip ? old_state!=comparand : old_state==comparand ) {
+            // Now atomically retest condition and set.
+            if( state.compare_and_swap( value, old_state )==old_state && value!=0 )   
+                 futex_wakeup_all( &state );  // Update was successful and new state is not SNAPSHOT_EMPTY
+        }
     }
     //! Wait for state!=0.
     void wait() {
@@ -84,43 +78,31 @@ private:
 #elif USE_WINTHREAD
 
 class Gate {
-#if IMPROVED_GATING
 public:
-    typedef intptr state_t;
+    typedef intptr_t state_t;
 private:
     //! If state==0, then thread executing wait() suspend until state becomes non-zero.
     state_t state;
-#else
-    intptr count;
-#endif /* IMPROVED_GATING */
     CRITICAL_SECTION critical_section;
     HANDLE event;
 public:
     //! Initialize with count=0
     Gate() :   
-#if IMPROVED_GATING
     state(0) 
-#else
-    count(0) 
-#endif /* IMPROVED_GATING */
     {
         event = CreateEvent( NULL, true, false, NULL );
         InitializeCriticalSection( &critical_section );
     }
     ~Gate() {
-#if !IMPROVED_GATING
-        __TBB_ASSERT( count==0, NULL );
-#endif /* !IMPROVED_GATING */
         CloseHandle( event );
         DeleteCriticalSection( &critical_section );
     }
-#if IMPROVED_GATING
     //! Get current state of gate
     state_t get_state() const {
         return state;
     }
     //! Update state=value if state==comparand (flip==false) or state!=comparand (flip==true)
-    void try_update( intptr value, intptr comparand, bool flip=false ) {
+    void try_update( intptr_t value, intptr_t comparand, bool flip=false ) {
         __TBB_ASSERT( comparand!=0 || value!=0, "either value or comparand must be non-zero" );
         EnterCriticalSection( &critical_section );
         state_t old = state;
@@ -139,69 +121,36 @@ public:
             WaitForSingleObject( event, INFINITE );
         }
     }
-#else /* IMPROVED_GATING */
-    //! Increment count
-    void open() {
-        EnterCriticalSection( &critical_section );
-        if( ++count==1 )
-            SetEvent( event );
-        LeaveCriticalSection( &critical_section );
-    }
-    //! Decrement count
-    void close() {
-        EnterCriticalSection( &critical_section );
-        if( --count==0 )
-            ResetEvent( event );
-        LeaveCriticalSection( &critical_section );
-    }
-    //! Wait for count>0.
-    void wait() {
-        if( count==0 )
-            WaitForSingleObject( event, INFINITE );
-    }
-#endif /* IMPROVED_GATING */
 };
 
 #elif USE_PTHREAD
 
 class Gate {
-#if IMPROVED_GATING
 public:
-    typedef intptr state_t;
+    typedef intptr_t state_t;
 private:
     //! If state==0, then thread executing wait() suspend until state becomes non-zero.
     state_t state;
-#else
-    intptr count;
-#endif /* IMPROVED_GATING */
     pthread_mutex_t mutex;
     pthread_cond_t cond;
 public:
     //! Initialize with count=0
     Gate() :   
-#if IMPROVED_GATING
     state(0)
-#else
-    count(0)
-#endif /* IMPROVED_GATING */
     {
         pthread_mutex_init( &mutex, NULL );
         pthread_cond_init( &cond, NULL);
     }
     ~Gate() {
-#if !IMPROVED_GATING
-        __TBB_ASSERT( count==0, NULL );
-#endif /* !IMPROVED_GATING */
         pthread_cond_destroy( &cond );
         pthread_mutex_destroy( &mutex );
     }
-#if IMPROVED_GATING
     //! Get current state of gate
     state_t get_state() const {
         return state;
     }
     //! Update state=value if state==comparand (flip==false) or state!=comparand (flip==true)
-    void try_update( intptr value, intptr comparand, bool flip=false ) {
+    void try_update( intptr_t value, intptr_t comparand, bool flip=false ) {
         __TBB_ASSERT( comparand!=0 || value!=0, "either value or comparand must be non-zero" );
         pthread_mutex_lock( &mutex );
         state_t old = state;
@@ -222,32 +171,6 @@ public:
             pthread_mutex_unlock( &mutex );
         }
     }
-#else /* IMPROVED_GATING */
-    //! Increment count
-    void open() {
-        pthread_mutex_lock( &mutex );
-        if( ++count==1 )
-            pthread_cond_broadcast( &cond );
-        pthread_mutex_unlock( &mutex );
-    }
-    //! Decrement count
-    void close() {
-        pthread_mutex_lock( &mutex );
-        __TBB_ASSERT( count>0, NULL );
-        --count;
-        pthread_mutex_unlock( &mutex );
-    }
-    //! Wait for count>0.
-    void wait() {
-        if( count==0 ) {
-            pthread_mutex_lock( &mutex );
-            while( count==0 ) {
-                pthread_cond_wait( &cond, &mutex );
-            }
-            pthread_mutex_unlock( &mutex );
-        }
-    }
-#endif /* IMPROVED_GATING */
 };
 
 #else
diff --git a/src/tbb/ia32-masm/atomic_support.asm b/src/tbb/ia32-masm/atomic_support.asm
index 5123950..030987b 100644
--- a/src/tbb/ia32-masm/atomic_support.asm
+++ b/src/tbb/ia32-masm/atomic_support.asm
@@ -24,7 +24,6 @@
 ; invalidate any other reasons why the executable file might be covered by
 ; the GNU General Public License.
 
-; DO NOT EDIT - AUTOMATICALLY GENERATED FROM .s FILE
 .686
 .model flat,c
 .code 
@@ -157,19 +156,40 @@ __TBB_machine_cmpswp8:
 	ALIGN 4
 	PUBLIC c __TBB_machine_load8
 __TBB_machine_Load8:
+	; If location is on stack, compiler may have failed to align it correctly, so we do dynamic check.
+	mov ecx,4[esp]
+	test ecx,7
+	jne load_slow
+	; Load within a cache line
 	sub esp,12
-	mov ecx,16[esp]
 	fild qword ptr [ecx]
 	fistp qword ptr [esp]
 	mov eax,[esp]
 	mov edx,4[esp]
 	add esp,12
 	ret
+load_slow:
+	; Load is misaligned. Use cmpxchg8b.
+	push ebx
+	push edi
+	mov edi,ecx
+	xor eax,eax
+	xor ebx,ebx
+	xor ecx,ecx
+	xor edx,edx
+	lock cmpxchg8b qword ptr [edi]
+	pop edi
+	pop ebx
+	ret
+EXTRN __TBB_machine_store8_slow:PROC
 .code 
 	ALIGN 4
 	PUBLIC c __TBB_machine_store8
 __TBB_machine_Store8:
+	; If location is on stack, compiler may have failed to align it correctly, so we do dynamic check.
 	mov ecx,4[esp]
+	test ecx,7
+	jne __TBB_machine_store8_slow ;; tail call to tbb_misc.cpp
 	fild qword ptr 8[esp]
 	fistp qword ptr [ecx]
 	ret
diff --git a/src/tbb/ia32-tbb-mac-export.txt b/src/tbb/ia32-tbb-mac-export.txt
deleted file mode 100644
index 4546228..0000000
--- a/src/tbb/ia32-tbb-mac-export.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 2005-2008 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.
-
-# cache_aligned_allocator.cpp
-__ZN3tbb8internal12NFS_AllocateEmmPv
-__ZN3tbb8internal15NFS_GetLineSizeEv
-__ZN3tbb8internal8NFS_FreeEPv
-
-# Task.cpp
-__ZN3tbb19task_scheduler_init10initializeEi
-__ZN3tbb19task_scheduler_init9terminateEv
-__ZN3tbb4task22internal_set_ref_countEi
-__ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE
-__ZN3tbb4task4selfEv
-__ZN3tbb4task7destroyERS0_
-__ZNK3tbb4task26is_owned_by_current_threadEv
-__ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE
-__ZN3tbb8internal19allocate_root_proxy8allocateEm
-__ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE
-__ZNK3tbb8internal20allocate_child_proxy8allocateEm
-__ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE
-__ZNK3tbb8internal27allocate_continuation_proxy8allocateEm
-__ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE
-__ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm
-
-# tbb_misc.cpp
-__ZN3tbb17assertion_failureEPKciS1_S1_
-__ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E
-__ZN3tbb8internal36get_initial_auto_partitioner_divisorEv
-__ZN3tbb8internal13handle_perrorEiPKc
-
-# Pipeline.cpp
-__ZTIN3tbb6filterE
-__ZTVN3tbb6filterE
-__ZN3tbb6filterD2Ev
-__ZN3tbb8pipeline10add_filterERNS_6filterE
-__ZN3tbb8pipeline12inject_tokenERNS_4taskE
-__ZN3tbb8pipeline3runEm
-__ZN3tbb8pipeline5clearEv
-__ZN3tbb8pipelineC1Ev
-__ZN3tbb8pipelineD1Ev
-
-# ReaderWriterMutex.cpp
-__ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv
-__ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv
-__ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b
-__ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv
-__ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b
-
-# spin_rw_mutex.cpp
-__ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_
-__ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_
-__ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_
-__ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_
-__ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_
-__ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_
-__ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_
-__ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_
-__ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_
-
-# SpinMutex.cpp
-__ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_
-__ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv
-__ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_
-
-# mutex.cpp
-__ZN3tbb5mutex11scoped_lock16internal_acquireERS0_
-__ZN3tbb5mutex11scoped_lock16internal_releaseEv
-__ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_
-__ZN3tbb5mutex16internal_destroyEv
-__ZN3tbb5mutex18internal_constructEv
-
-# QueuingMutex.cpp
-__ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_
-__ZN3tbb13queuing_mutex11scoped_lock7releaseEv
-__ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_
-
-# concurrent_hash_map
-__ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv
-
-# ConcurrentQueue.cpp
-__ZN3tbb8internal21concurrent_queue_base12internal_popEPv
-__ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv
-__ZN3tbb8internal21concurrent_queue_base21internal_set_capacityEim
-__ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv
-__ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv
-__ZN3tbb8internal21concurrent_queue_baseC2Em
-__ZN3tbb8internal21concurrent_queue_baseD2Ev
-__ZTIN3tbb8internal21concurrent_queue_baseE
-__ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_
-__ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv
-__ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE
-__ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev
-__ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv
-
-# ConcurrentVector.cpp
-__ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE
-__ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb
-__ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_
-__ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE
-__ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm
-__ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm
-__ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE
-__ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv
diff --git a/src/tbb/concurrent_hash_map.cpp b/src/tbb/ibm_aix51/atomic_support.c
similarity index 60%
copy from src/tbb/concurrent_hash_map.cpp
copy to src/tbb/ibm_aix51/atomic_support.c
index 3de140f..caa8fb1 100644
--- a/src/tbb/concurrent_hash_map.cpp
+++ b/src/tbb/ibm_aix51/atomic_support.c
@@ -26,20 +26,30 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#include <stdint.h>
+#include <sys/atomic_op.h>
 
-namespace tbb {
+/* This file must be compiled with gcc.  The IBM compiler doesn't seem to
+   support inline assembly statements (October 2007). */
 
-namespace internal {
+#ifdef __GNUC__
 
-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;
+int32_t __TBB_machine_cas_32 (volatile void* ptr, int32_t value, int32_t comparand) { 
+    __asm__ __volatile__ ("sync\n");  /* memory release operation */
+    compare_and_swap ((atomic_p) ptr, &comparand, value);
+    __asm__ __volatile__ ("sync\n");  /* memory acquire operation */
+    return comparand;
 }
 
-} // namespace internal
+int64_t __TBB_machine_cas_64 (volatile void* ptr, int64_t value, int64_t comparand) { 
+    __asm__ __volatile__ ("sync\n");  /* memory release operation */
+    compare_and_swaplp ((atomic_l) ptr, &comparand, value);
+    __asm__ __volatile__ ("sync\n");  /* memory acquire operation */
+    return comparand;
+}
 
-} // namespace tbb
+void __TBB_machine_flush () { 
+    __asm__ __volatile__ ("sync\n");
+}
 
+#endif /* __GNUC__ */
diff --git a/src/tbb/itanium-gas/lock_byte.s b/src/tbb/itanium-gas/lock_byte.s
index d1f726e..582dcca 100644
--- a/src/tbb/itanium-gas/lock_byte.s
+++ b/src/tbb/itanium-gas/lock_byte.s
@@ -51,4 +51,4 @@ __TBB_machine_trylockbyte:
 ;;
 (p6)    mov RETCODE=1
    	br.ret.sptk.many b0	
-	.endp __TBB_TryLockByte#
+	.endp __TBB_machine_trylockbyte#
diff --git a/src/tbb/itanium-tbb.def b/src/tbb/itanium-tbb.def
deleted file mode 100644
index 73d2553..0000000
--- a/src/tbb/itanium-tbb.def
+++ /dev/null
@@ -1,169 +0,0 @@
-; Copyright 2005-2008 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 file is organized with a section for each .cpp file.
-; Each of these sections is in alphabetical order.
-
-EXPORTS
-
-; Assembly-language support that is called directly by clients
-__TBB_CompareAndSwap1acquire
-__TBB_CompareAndSwap1__TBB_full_fence
-__TBB_CompareAndSwap1release
-__TBB_CompareAndSwap2acquire
-__TBB_CompareAndSwap2__TBB_full_fence
-__TBB_CompareAndSwap2release
-__TBB_CompareAndSwap4acquire
-__TBB_CompareAndSwap4__TBB_full_fence
-__TBB_CompareAndSwap4release
-__TBB_CompareAndSwap8acquire
-__TBB_CompareAndSwap8__TBB_full_fence
-__TBB_CompareAndSwap8release
-__TBB_FetchAndAdd1acquire
-__TBB_FetchAndAdd1__TBB_full_fence
-__TBB_FetchAndAdd1release
-__TBB_FetchAndAdd2acquire
-__TBB_FetchAndAdd2__TBB_full_fence
-__TBB_FetchAndAdd2release
-__TBB_FetchAndAdd4acquire
-__TBB_FetchAndAdd4__TBB_full_fence
-__TBB_FetchAndAdd4release
-__TBB_FetchAndAdd8acquire
-__TBB_FetchAndAdd8__TBB_full_fence
-__TBB_FetchAndAdd8release
-__TBB_FetchAndStore1acquire
-__TBB_FetchAndStore1__TBB_full_fence
-__TBB_FetchAndStore1release
-__TBB_FetchAndStore2acquire
-__TBB_FetchAndStore2__TBB_full_fence
-__TBB_FetchAndStore2release
-__TBB_FetchAndStore4acquire
-__TBB_FetchAndStore4__TBB_full_fence
-__TBB_FetchAndStore4release
-__TBB_FetchAndStore8acquire
-__TBB_FetchAndStore8__TBB_full_fence
-__TBB_FetchAndStore8release
-__TBB_LockByte
-__TBB_TryLockByte
-__TBB_Log2
-__TBB_Pause
-;__TBB_TaggedCompareAndSwap
-;__TBB_CheckAcquire
-
-; NFS_Allocator.cpp
-?NFS_Allocate at internal@tbb@@YAPEAX_K0PEAX at Z
-?NFS_GetLineSize at internal@tbb@@YA_KXZ
-?NFS_Free at internal@tbb@@YAXPEAX at Z
-
-; task.cpp
-?allocate at allocate_additional_child_of_proxy@internal at tbb@@QEBAAEAVtask at 3@_K at Z
-?allocate at allocate_child_proxy@internal at tbb@@QEBAAEAVtask at 3@_K at Z
-?allocate at allocate_continuation_proxy@internal at tbb@@QEBAAEAVtask at 3@_K at Z
-?allocate at allocate_root_proxy@internal at tbb@@SAAEAVtask at 3@_K at Z
-?destroy at task@tbb@@QEAAXAEAV12@@Z
-?free at allocate_additional_child_of_proxy@internal at tbb@@QEBAXAEAVtask at 3@@Z
-?free at allocate_child_proxy@internal at tbb@@QEBAXAEAVtask at 3@@Z
-?free at allocate_continuation_proxy@internal at tbb@@QEBAXAEAVtask at 3@@Z
-?free at allocate_root_proxy@internal at tbb@@SAXAEAVtask at 3@@Z
-?initialize at task_scheduler_init@tbb@@QEAAXH at Z
-?internal_set_ref_count at task@tbb@@AEAAXH at Z
-?is_owned_by_current_thread at task@tbb@@QEBA_NXZ
-?self at task@tbb@@SAAEAV12 at XZ
-?spawn_and_wait_for_all at task@tbb@@QEAAXAEAVtask_list at 2@@Z
-?terminate at task_scheduler_init@tbb@@QEAAXXZ
-
-; tbb_misc.cpp
-?assertion_failure at tbb@@YAXPEBDH00 at Z
-
-; pipeline.cpp
-??_7pipeline at tbb@@6B@
-??0pipeline at tbb@@QEAA at XZ
-??1filter at tbb@@UEAA at XZ
-??1pipeline at tbb@@UEAA at XZ
-?add_filter at pipeline@tbb@@QEAAXAEAVfilter at 2@@Z
-?clear at pipeline@tbb@@QEAAXXZ
-?inject_token at pipeline@tbb@@AEAAXAEAVtask at 2@@Z
-?run at pipeline@tbb@@QEAAX_K at Z
-
-; queuing_rw_mutex.cpp
-?acquire at scoped_lock@queuing_rw_mutex at tbb@@QEAAXAEAV23 at _N@Z
-?downgrade_to_reader at scoped_lock@queuing_rw_mutex at tbb@@QEAA_NXZ
-?release at scoped_lock@queuing_rw_mutex at tbb@@QEAAXXZ
-?upgrade_to_writer at scoped_lock@queuing_rw_mutex at tbb@@QEAA_NXZ
-?try_acquire at scoped_lock@queuing_rw_mutex at tbb@@QEAA_NAEAV23 at _N@Z
-
-; spin_rw_mutex.cpp
-?internal_acquire_writer at spin_rw_mutex@tbb@@AEAA_NXZ
-?internal_acquire_reader at spin_rw_mutex@tbb@@AEAAXXZ
-?internal_upgrade at spin_rw_mutex@tbb@@AEAA_NXZ
-?internal_downgrade at spin_rw_mutex@tbb@@AEAAXXZ
-?internal_itt_releasing at spin_rw_mutex@tbb@@AEAAXXZ
-?internal_release_reader at spin_rw_mutex@tbb@@AEAAXXZ
-?internal_release_writer at spin_rw_mutex@tbb@@AEAAXXZ
-?internal_try_acquire_writer at spin_rw_mutex@tbb@@AEAA_NXZ
-?internal_try_acquire_reader at spin_rw_mutex@tbb@@AEAA_NXZ
-
-; spin_mutex.cpp
-?internal_acquire at scoped_lock@spin_mutex at tbb@@AEAAXAEAV23@@Z
-?internal_release at scoped_lock@spin_mutex at tbb@@AEAAXXZ
-?internal_try_acquire at scoped_lock@spin_mutex at tbb@@AEAA_NAEAV23@@Z
-
-; mutex.cpp
-?internal_acquire at scoped_lock@mutex at tbb@@AEAAXAEAV23@@Z
-?internal_release at scoped_lock@mutex at tbb@@AEAAXXZ
-?internal_try_acquire at scoped_lock@mutex at tbb@@AEAA_NAEAV23@@Z
-?internal_construct at mutex@tbb@@AEAAXXZ
-?internal_destroy at mutex@tbb@@AEAAXXZ
-
-; queuing_mutex.cpp
-?acquire at scoped_lock@queuing_mutex at tbb@@QEAAXAEAV23@@Z
-?release at scoped_lock@queuing_mutex at tbb@@QEAAXXZ
-?try_acquire at scoped_lock@queuing_mutex at tbb@@QEAA_NAEAV23@@Z
-
-; ConcurrentQueue.cpp
-??0concurrent_queue_base at internal@tbb@@IEAA at _K@Z
-??0concurrent_queue_iterator_base at internal@tbb@@IEAA at AEBVconcurrent_queue_base@12@@Z
-??1concurrent_queue_base at internal@tbb@@IEAA at XZ
-??1concurrent_queue_iterator_base at internal@tbb@@IEAA at XZ
-?advance at concurrent_queue_iterator_base@internal at tbb@@IEAAXXZ
-?assign at concurrent_queue_iterator_base@internal at tbb@@IEAAXAEBV123@@Z
-?internal_pop at concurrent_queue_base@internal at tbb@@IEAAXPEAX at Z
-?internal_pop_if_present at concurrent_queue_base@internal at tbb@@IEAA_NPEAX at Z
-?internal_push at concurrent_queue_base@internal at tbb@@IEAAXPEBX at Z
-?internal_push_if_not_full at concurrent_queue_base@internal at tbb@@IEAA_NPEBX at Z
-?internal_set_capacity at concurrent_queue_base@internal at tbb@@IEAAX_J_K at Z
-?internal_size at concurrent_queue_base@internal at tbb@@IEBA_JXZ
-
-; ConcurrentVector.cpp
-?internal_assign at concurrent_vector_base@internal at tbb@@IEAAXAEBV123 at _KP6AXPEAX1@ZP6AX2PEBX1 at Z5@Z
-?internal_capacity at concurrent_vector_base@internal at tbb@@IEBA_KXZ
-?internal_clear at concurrent_vector_base@internal at tbb@@IEAAXP6AXPEAX_K at Z_N@Z
-?internal_copy at concurrent_vector_base@internal at tbb@@IEAAXAEBV123 at _KP6AXPEAXPEBX1@Z at Z
-?internal_grow_by at concurrent_vector_base@internal at tbb@@IEAA_K_K0P6AXPEAX0 at Z@Z
-?internal_grow_to_at_least at concurrent_vector_base@internal at tbb@@IEAAX_K0P6AXPEAX0 at Z@Z
-?internal_push_back at concurrent_vector_base@internal at tbb@@IEAAPEAX_KAEA_K at Z
-?internal_reserve at concurrent_vector_base@internal at tbb@@IEAAX_K00 at Z
-
diff --git a/src/tbb/itt_notify.cpp b/src/tbb/itt_notify.cpp
index 5575754..fdbe4a1 100644
--- a/src/tbb/itt_notify.cpp
+++ b/src/tbb/itt_notify.cpp
@@ -26,7 +26,9 @@
     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 <stdlib.h>
@@ -34,36 +36,51 @@
 #include "tbb/tbb_machine.h"
 
 #if _WIN32||_WIN64
-#include <windows.h>
-#else
-#include <dlfcn.h>
-#endif /* _WIN32||_WIN64 */
+    #include <windows.h>
+#else /* !WIN */
+    #include <dlfcn.h>
+#if __TBB_WEAK_SYMBOLS
+    #pragma weak __itt_notify_sync_prepare
+    #pragma weak __itt_notify_sync_acquired
+    #pragma weak __itt_notify_sync_releasing
+    #pragma weak __itt_notify_sync_cancel
+    #pragma weak __itt_thr_name_set
+    extern "C" {
+        void __itt_notify_sync_prepare(void *p);
+        void __itt_notify_sync_cancel(void *p);
+        void __itt_notify_sync_acquired(void *p);
+        void __itt_notify_sync_releasing(void *p);
+        int __itt_thr_name_set (void* p, int len);
+    }
+#endif /* __TBB_WEAK_SYMBOLS */
+#endif /* !WIN */
 
 namespace tbb {
 namespace internal {
 
 #if DO_ITT_NOTIFY
+
 //! Table describing the __itt_notify handlers.
 static const DynamicLinkDescriptor ITT_HandlerTable[] = {
-    {"__itt_notify_sync_prepare",ADDRESS_OF_HANDLER(&ITT_Handler_sync_prepare)},
-    {"__itt_notify_sync_acquired",ADDRESS_OF_HANDLER(&ITT_Handler_sync_acquired)},
-    {"__itt_notify_sync_releasing",ADDRESS_OF_HANDLER(&ITT_Handler_sync_releasing)},
-    {"__itt_notify_sync_cancel",ADDRESS_OF_HANDLER(&ITT_Handler_sync_cancel)},
+    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),
+    DLD( __itt_notify_sync_cancel, ITT_Handler_sync_cancel),
 # if _WIN32||_WIN64
 #  ifdef UNICODE
-    {"__itt_thr_name_setW",ADDRESS_OF_HANDLER(&ITT_Handler_thr_name_set)},
+    DLD( __itt_thr_name_setW, ITT_Handler_thr_name_set),
 #  else
-    {"__itt_thr_name_setA",ADDRESS_OF_HANDLER(&ITT_Handler_thr_name_set)},
-#  endif
+    DLD( __itt_thr_name_setA, ITT_Handler_thr_name_set),
+#  endif /* UNICODE */
 # else
-    {"__itt_thr_name_set",ADDRESS_OF_HANDLER(&ITT_Handler_thr_name_set)},
-# endif
+    DLD( __itt_thr_name_set, ITT_Handler_thr_name_set),
+# endif /* _WIN32 || _WIN64 */
 };
 
 // LIBITTNOTIFY_NAME is the name of the ITT notification library 
 # if _WIN32||_WIN64
 #  define LIBITTNOTIFY_NAME "libittnotify.dll"
-# elif __linux__
+# elif __linux__ || __FreeBSD__ || __sun
 #  define LIBITTNOTIFY_NAME "libittnotify.so"
 # elif __APPLE__
 #  define LIBITTNOTIFY_NAME "libittnotify.dylib"
@@ -135,6 +152,17 @@ int dummy_thr_name_set( const char* str, int number ) {
 
 #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;
+}
+
 } // namespace internal 
 
 } // namespace tbb
diff --git a/src/tbb/lin32-tbb-export.def b/src/tbb/lin32-tbb-export.def
new file mode 100644
index 0000000..a09bfa6
--- /dev/null
+++ b/src/tbb/lin32-tbb-export.def
@@ -0,0 +1,292 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+{
+global:
+
+/* cache_aligned_allocator.cpp */
+_ZN3tbb8internal12NFS_AllocateEjjPv;
+_ZN3tbb8internal15NFS_GetLineSizeEv;
+_ZN3tbb8internal8NFS_FreeEPv;
+_ZN3tbb8internal23allocate_via_handler_v3Ej;
+_ZN3tbb8internal25deallocate_via_handler_v3EPv;
+_ZN3tbb8internal17is_malloc_used_v3Ev;
+
+/* task.cpp v3 */
+_ZN3tbb4task13note_affinityEt;
+_ZN3tbb4task22internal_set_ref_countEi;
+_ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE;
+_ZN3tbb4task4selfEv;
+_ZN3tbb4task7destroyERS0_;
+_ZNK3tbb4task26is_owned_by_current_threadEv;
+_ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE;
+_ZN3tbb8internal19allocate_root_proxy8allocateEj;
+_ZN3tbb8internal28affinity_partitioner_base_v36resizeEj;
+_ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE;
+_ZNK3tbb8internal20allocate_child_proxy8allocateEj;
+_ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE;
+_ZNK3tbb8internal27allocate_continuation_proxy8allocateEj;
+_ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE;
+_ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEj;
+_ZTIN3tbb4taskE;
+_ZTSN3tbb4taskE;
+_ZTVN3tbb4taskE;
+_ZN3tbb19task_scheduler_init19default_num_threadsEv;
+_ZN3tbb19task_scheduler_init10initializeEij;
+_ZN3tbb19task_scheduler_init10initializeEi;
+_ZN3tbb19task_scheduler_init9terminateEv;
+_ZN3tbb8internal26task_scheduler_observer_v37observeEb;
+_ZN3tbb10empty_task7executeEv;
+_ZN3tbb10empty_taskD0Ev;
+_ZN3tbb10empty_taskD1Ev;
+_ZTIN3tbb10empty_taskE;
+_ZTSN3tbb10empty_taskE;
+_ZTVN3tbb10empty_taskE;
+
+/* exception handling support */
+_ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEj;
+_ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE;
+_ZNK3tbb18task_group_context28is_group_execution_cancelledEv;
+_ZN3tbb18task_group_context22cancel_group_executionEv;
+_ZN3tbb18task_group_context5resetEv;
+_ZN3tbb18task_group_context4initEv;
+_ZN3tbb18task_group_contextD1Ev;
+_ZN3tbb18task_group_contextD2Ev;
+_ZNK3tbb18captured_exception4nameEv;
+_ZNK3tbb18captured_exception4whatEv;
+_ZN3tbb18captured_exception10throw_selfEv;
+_ZN3tbb18captured_exception3setEPKcS2_;
+_ZN3tbb18captured_exception4moveEv;
+_ZN3tbb18captured_exception5clearEv;
+_ZN3tbb18captured_exception7destroyEv;
+_ZN3tbb18captured_exception8allocateEPKcS2_;
+_ZN3tbb18captured_exceptionD0Ev;
+_ZN3tbb18captured_exceptionD1Ev;
+_ZTIN3tbb18captured_exceptionE;
+_ZTSN3tbb18captured_exceptionE;
+_ZTVN3tbb18captured_exceptionE;
+_ZN3tbb13tbb_exceptionD2Ev;
+_ZTIN3tbb13tbb_exceptionE;
+_ZTSN3tbb13tbb_exceptionE;
+_ZTVN3tbb13tbb_exceptionE;
+_ZN3tbb14bad_last_allocD0Ev;
+_ZN3tbb14bad_last_allocD1Ev;
+_ZNK3tbb14bad_last_alloc4whatEv;
+_ZTIN3tbb14bad_last_allocE;
+_ZTSN3tbb14bad_last_allocE;
+_ZTVN3tbb14bad_last_allocE;
+
+/* tbb_misc.cpp */
+_ZN3tbb17assertion_failureEPKciS1_S1_;
+_ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E;
+_ZN3tbb8internal36get_initial_auto_partitioner_divisorEv;
+_ZN3tbb8internal13handle_perrorEiPKc;
+_ZN3tbb8internal15runtime_warningEPKcz;
+__TBB_machine_store8_slow;
+
+/* itt_notify.cpp */
+_ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv;
+_ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_;
+
+/* pipeline.cpp */
+_ZTIN3tbb6filterE;
+_ZTSN3tbb6filterE;
+_ZTVN3tbb6filterE;
+_ZN3tbb6filterD2Ev;
+_ZN3tbb8pipeline10add_filterERNS_6filterE;
+_ZN3tbb8pipeline12inject_tokenERNS_4taskE;
+_ZN3tbb8pipeline13remove_filterERNS_6filterE;
+_ZN3tbb8pipeline3runEj;
+_ZN3tbb8pipeline5clearEv;
+_ZTIN3tbb8pipelineE;
+_ZTSN3tbb8pipelineE;
+_ZTVN3tbb8pipelineE;
+_ZN3tbb8pipelineC1Ev;
+_ZN3tbb8pipelineC2Ev;
+_ZN3tbb8pipelineD0Ev;
+_ZN3tbb8pipelineD1Ev;
+_ZN3tbb8pipelineD2Ev;
+
+/* queuing_rw_mutex.cpp */
+_ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv;
+_ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv;
+_ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b;
+_ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv;
+_ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b;
+
+#if !TBB_NO_LEGACY
+/* spin_rw_mutex.cpp v2 */
+_ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_;
+_ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_;
+_ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_;
+_ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_;
+_ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_;
+#endif
+
+/* spin_rw_mutex v3 */
+_ZN3tbb16spin_rw_mutex_v316internal_upgradeEv;
+_ZN3tbb16spin_rw_mutex_v318internal_downgradeEv;
+_ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv;
+_ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv;
+_ZN3tbb16spin_rw_mutex_v323internal_release_readerEv;
+_ZN3tbb16spin_rw_mutex_v323internal_release_writerEv;
+_ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv;
+_ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv;
+
+/* spin_mutex.cpp */
+_ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_;
+_ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv;
+_ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_;
+
+/* mutex.cpp */
+_ZN3tbb5mutex11scoped_lock16internal_acquireERS0_;
+_ZN3tbb5mutex11scoped_lock16internal_releaseEv;
+_ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_;
+_ZN3tbb5mutex16internal_destroyEv;
+_ZN3tbb5mutex18internal_constructEv;
+
+/* recursive_mutex.cpp */
+_ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_;
+_ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv;
+_ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_;
+_ZN3tbb15recursive_mutex16internal_destroyEv;
+_ZN3tbb15recursive_mutex18internal_constructEv;
+
+/* QueuingMutex.cpp */
+_ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_;
+_ZN3tbb13queuing_mutex11scoped_lock7releaseEv;
+_ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_;
+
+/* 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;
+_ZN3tbb8internal21concurrent_queue_base21internal_set_capacityEij;
+_ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv;
+_ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv;
+_ZN3tbb8internal21concurrent_queue_baseC2Ej;
+_ZN3tbb8internal21concurrent_queue_baseD2Ev;
+_ZTIN3tbb8internal21concurrent_queue_baseE;
+_ZTSN3tbb8internal21concurrent_queue_baseE;
+_ZTVN3tbb8internal21concurrent_queue_baseE;
+_ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_;
+_ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv;
+_ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE;
+_ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev;
+_ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv;
+#endif
+
+/* concurrent_queue v3 */
+/* constructors */
+_ZN3tbb8internal24concurrent_queue_base_v3C2Ej;
+_ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E;
+/* destructors */
+_ZN3tbb8internal24concurrent_queue_base_v3D2Ev;
+_ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev;
+/* typeinfo */
+_ZTIN3tbb8internal24concurrent_queue_base_v3E;
+_ZTSN3tbb8internal24concurrent_queue_base_v3E;
+/* vtable */
+_ZTVN3tbb8internal24concurrent_queue_base_v3E;
+/* methods */
+_ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv;
+_ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_;
+_ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv;
+_ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv;
+_ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv;
+_ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv;
+_ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityEij;
+_ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv;
+_ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv;
+_ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv;
+
+#if !TBB_NO_LEGACY
+/* concurrent_vector.cpp v2 */
+_ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_jPFvPvPKvjE;
+_ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvjEb;
+_ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_jPFvPvjEPFvS4_PKvjESA_;
+_ZN3tbb8internal22concurrent_vector_base16internal_grow_byEjjPFvPvjE;
+_ZN3tbb8internal22concurrent_vector_base16internal_reserveEjjj;
+_ZN3tbb8internal22concurrent_vector_base18internal_push_backEjRj;
+_ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEjjPFvPvjE;
+_ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv;
+#endif
+
+/* concurrent_vector v3 */
+_ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_jPFvPvPKvjE;
+_ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvjE;
+_ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_jPFvPvjEPFvS4_PKvjESA_;
+_ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEjjPFvPvPKvjES4_;
+_ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEjjj;
+_ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEjRj;
+_ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEjjPFvPvPKvjES4_;
+_ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv;
+_ZN3tbb8internal25concurrent_vector_base_v316internal_compactEjPvPFvS2_jEPFvS2_PKvjE;
+_ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_;
+_ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEj;
+_ZN3tbb8internal25concurrent_vector_base_v3D2Ev;
+
+/* tbb_thread */
+_ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_;
+_ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv;
+_ZN3tbb8internal13tbb_thread_v34joinEv;
+_ZN3tbb8internal13tbb_thread_v36detachEv;
+_ZN3tbb8internal15free_closure_v3EPv;
+_ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE;
+_ZN3tbb8internal15thread_yield_v3Ev;
+_ZN3tbb8internal16thread_get_id_v3Ev;
+_ZN3tbb8internal19allocate_closure_v3Ej;
+_ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_;
+
+local:
+
+/* TBB symbols */
+*3tbb*;
+*__TBB*;
+
+/* 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/tbb/lin64-tbb-export.def b/src/tbb/lin64-tbb-export.def
new file mode 100644
index 0000000..017fd97
--- /dev/null
+++ b/src/tbb/lin64-tbb-export.def
@@ -0,0 +1,288 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+{
+global:
+
+/* cache_aligned_allocator.cpp */
+_ZN3tbb8internal12NFS_AllocateEmmPv;
+_ZN3tbb8internal15NFS_GetLineSizeEv;
+_ZN3tbb8internal8NFS_FreeEPv;
+_ZN3tbb8internal23allocate_via_handler_v3Em;
+_ZN3tbb8internal25deallocate_via_handler_v3EPv;
+_ZN3tbb8internal17is_malloc_used_v3Ev;
+
+/* task.cpp v3 */
+_ZN3tbb4task13note_affinityEt;
+_ZN3tbb4task22internal_set_ref_countEi;
+_ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE;
+_ZN3tbb4task4selfEv;
+_ZN3tbb4task7destroyERS0_;
+_ZNK3tbb4task26is_owned_by_current_threadEv;
+_ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE;
+_ZN3tbb8internal19allocate_root_proxy8allocateEm;
+_ZN3tbb8internal28affinity_partitioner_base_v36resizeEj;
+_ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE;
+_ZNK3tbb8internal20allocate_child_proxy8allocateEm;
+_ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE;
+_ZNK3tbb8internal27allocate_continuation_proxy8allocateEm;
+_ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE;
+_ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm;
+_ZTIN3tbb4taskE;
+_ZTSN3tbb4taskE;
+_ZTVN3tbb4taskE;
+_ZN3tbb19task_scheduler_init19default_num_threadsEv;
+_ZN3tbb19task_scheduler_init10initializeEim;
+_ZN3tbb19task_scheduler_init10initializeEi;
+_ZN3tbb19task_scheduler_init9terminateEv;
+_ZN3tbb8internal26task_scheduler_observer_v37observeEb;
+_ZN3tbb10empty_task7executeEv;
+_ZN3tbb10empty_taskD0Ev;
+_ZN3tbb10empty_taskD1Ev;
+_ZTIN3tbb10empty_taskE;
+_ZTSN3tbb10empty_taskE;
+_ZTVN3tbb10empty_taskE;
+
+/* exception handling support */
+_ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm;
+_ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE;
+_ZNK3tbb18task_group_context28is_group_execution_cancelledEv;
+_ZN3tbb18task_group_context22cancel_group_executionEv;
+_ZN3tbb18task_group_context5resetEv;
+_ZN3tbb18task_group_context4initEv;
+_ZN3tbb18task_group_contextD1Ev;
+_ZN3tbb18task_group_contextD2Ev;
+_ZNK3tbb18captured_exception4nameEv;
+_ZNK3tbb18captured_exception4whatEv;
+_ZN3tbb18captured_exception10throw_selfEv;
+_ZN3tbb18captured_exception3setEPKcS2_;
+_ZN3tbb18captured_exception4moveEv;
+_ZN3tbb18captured_exception5clearEv;
+_ZN3tbb18captured_exception7destroyEv;
+_ZN3tbb18captured_exception8allocateEPKcS2_;
+_ZN3tbb18captured_exceptionD0Ev;
+_ZN3tbb18captured_exceptionD1Ev;
+_ZTIN3tbb18captured_exceptionE;
+_ZTSN3tbb18captured_exceptionE;
+_ZTVN3tbb18captured_exceptionE;
+_ZN3tbb13tbb_exceptionD2Ev;
+_ZTIN3tbb13tbb_exceptionE;
+_ZTSN3tbb13tbb_exceptionE;
+_ZTVN3tbb13tbb_exceptionE;
+_ZN3tbb14bad_last_allocD0Ev;
+_ZN3tbb14bad_last_allocD1Ev;
+_ZNK3tbb14bad_last_alloc4whatEv;
+_ZTIN3tbb14bad_last_allocE;
+_ZTSN3tbb14bad_last_allocE;
+_ZTVN3tbb14bad_last_allocE;
+
+/* tbb_misc.cpp */
+_ZN3tbb17assertion_failureEPKciS1_S1_;
+_ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E;
+_ZN3tbb8internal36get_initial_auto_partitioner_divisorEv;
+_ZN3tbb8internal13handle_perrorEiPKc;
+_ZN3tbb8internal15runtime_warningEPKcz;
+
+/* itt_notify.cpp */
+_ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv;
+_ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_;
+
+/* pipeline.cpp */
+_ZTIN3tbb6filterE;
+_ZTSN3tbb6filterE;
+_ZTVN3tbb6filterE;
+_ZN3tbb6filterD2Ev;
+_ZN3tbb8pipeline10add_filterERNS_6filterE;
+_ZN3tbb8pipeline12inject_tokenERNS_4taskE;
+_ZN3tbb8pipeline13remove_filterERNS_6filterE;
+_ZN3tbb8pipeline3runEm;
+_ZN3tbb8pipeline5clearEv;
+_ZTIN3tbb8pipelineE;
+_ZTSN3tbb8pipelineE;
+_ZTVN3tbb8pipelineE;
+_ZN3tbb8pipelineC1Ev;
+_ZN3tbb8pipelineC2Ev;
+_ZN3tbb8pipelineD0Ev;
+_ZN3tbb8pipelineD1Ev;
+_ZN3tbb8pipelineD2Ev;
+
+/* queuing_rw_mutex.cpp */
+_ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv;
+_ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv;
+_ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b;
+_ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv;
+_ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b;
+
+#if !TBB_NO_LEGACY
+/* spin_rw_mutex.cpp v2 */
+_ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_;
+_ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_;
+_ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_;
+_ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_;
+_ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_;
+#endif
+
+/* spin_rw_mutex v3 */
+_ZN3tbb16spin_rw_mutex_v316internal_upgradeEv;
+_ZN3tbb16spin_rw_mutex_v318internal_downgradeEv;
+_ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv;
+_ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv;
+_ZN3tbb16spin_rw_mutex_v323internal_release_readerEv;
+_ZN3tbb16spin_rw_mutex_v323internal_release_writerEv;
+_ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv;
+_ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv;
+
+/* spin_mutex.cpp */
+_ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_;
+_ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv;
+_ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_;
+
+/* mutex.cpp */
+_ZN3tbb5mutex11scoped_lock16internal_acquireERS0_;
+_ZN3tbb5mutex11scoped_lock16internal_releaseEv;
+_ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_;
+_ZN3tbb5mutex16internal_destroyEv;
+_ZN3tbb5mutex18internal_constructEv;
+
+/* recursive_mutex.cpp */
+_ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_;
+_ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv;
+_ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_;
+_ZN3tbb15recursive_mutex16internal_destroyEv;
+_ZN3tbb15recursive_mutex18internal_constructEv;
+
+/* QueuingMutex.cpp */
+_ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_;
+_ZN3tbb13queuing_mutex11scoped_lock7releaseEv;
+_ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_;
+
+/* 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;
+_ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm;
+_ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv;
+_ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv;
+_ZN3tbb8internal21concurrent_queue_baseC2Em;
+_ZN3tbb8internal21concurrent_queue_baseD2Ev;
+_ZTIN3tbb8internal21concurrent_queue_baseE;
+_ZTSN3tbb8internal21concurrent_queue_baseE;
+_ZTVN3tbb8internal21concurrent_queue_baseE;
+_ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_;
+_ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv;
+_ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE;
+_ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev;
+_ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv;
+#endif
+
+/* concurrent_queue v3 */
+/* constructors */
+_ZN3tbb8internal24concurrent_queue_base_v3C2Em;
+_ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E;
+/* destructors */
+_ZN3tbb8internal24concurrent_queue_base_v3D2Ev;
+_ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev;
+/* typeinfo */
+_ZTIN3tbb8internal24concurrent_queue_base_v3E;
+_ZTSN3tbb8internal24concurrent_queue_base_v3E;
+/* vtable */
+_ZTVN3tbb8internal24concurrent_queue_base_v3E;
+/* methods */
+_ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_;
+_ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv;
+_ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv;
+_ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv;
+_ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv;
+_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_v324internal_throw_exceptionEv;
+
+#if !TBB_NO_LEGACY
+/* concurrent_vector.cpp v2 */
+_ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE;
+_ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb;
+_ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_;
+_ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE;
+_ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm;
+_ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm;
+_ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE;
+_ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv;
+#endif
+
+/* concurrent_vector v3 */
+_ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE;
+_ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE;
+_ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_;
+_ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_;
+_ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm;
+_ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm;
+_ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_;
+_ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv;
+_ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE;
+_ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_;
+_ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm;
+_ZN3tbb8internal25concurrent_vector_base_v3D2Ev;
+
+/* tbb_thread */
+_ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv;
+_ZN3tbb8internal13tbb_thread_v36detachEv;
+_ZN3tbb8internal16thread_get_id_v3Ev;
+_ZN3tbb8internal15free_closure_v3EPv;
+_ZN3tbb8internal13tbb_thread_v34joinEv;
+_ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_;
+_ZN3tbb8internal19allocate_closure_v3Em;
+_ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_;
+_ZN3tbb8internal15thread_yield_v3Ev;
+_ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE;
+
+local:
+
+/* TBB symbols */
+*3tbb*;
+*__TBB*;
+
+/* Intel Compiler (libirc) symbols */
+__intel_*;
+_intel_*;
+get_msg_buf;
+get_text_buf;
+message_catalog;
+print_buf;
+irc__get_msg;
+irc__print;
+
+};
diff --git a/src/tbb/lin64ipf-tbb-export.def b/src/tbb/lin64ipf-tbb-export.def
new file mode 100644
index 0000000..ad17ead
--- /dev/null
+++ b/src/tbb/lin64ipf-tbb-export.def
@@ -0,0 +1,332 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+{
+global:
+
+/* cache_aligned_allocator.cpp */
+_ZN3tbb8internal12NFS_AllocateEmmPv;
+_ZN3tbb8internal15NFS_GetLineSizeEv;
+_ZN3tbb8internal8NFS_FreeEPv;
+_ZN3tbb8internal23allocate_via_handler_v3Em;
+_ZN3tbb8internal25deallocate_via_handler_v3EPv;
+_ZN3tbb8internal17is_malloc_used_v3Ev;
+
+/* task.cpp v3 */
+_ZN3tbb4task13note_affinityEt;
+_ZN3tbb4task22internal_set_ref_countEi;
+_ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE;
+_ZN3tbb4task4selfEv;
+_ZN3tbb4task7destroyERS0_;
+_ZNK3tbb4task26is_owned_by_current_threadEv;
+_ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE;
+_ZN3tbb8internal19allocate_root_proxy8allocateEm;
+_ZN3tbb8internal28affinity_partitioner_base_v36resizeEj;
+_ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE;
+_ZNK3tbb8internal20allocate_child_proxy8allocateEm;
+_ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE;
+_ZNK3tbb8internal27allocate_continuation_proxy8allocateEm;
+_ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE;
+_ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm;
+_ZTIN3tbb4taskE;
+_ZTSN3tbb4taskE;
+_ZTVN3tbb4taskE;
+_ZN3tbb19task_scheduler_init19default_num_threadsEv;
+_ZN3tbb19task_scheduler_init10initializeEim;
+_ZN3tbb19task_scheduler_init10initializeEi;
+_ZN3tbb19task_scheduler_init9terminateEv;
+_ZN3tbb8internal26task_scheduler_observer_v37observeEb;
+_ZN3tbb10empty_task7executeEv;
+_ZN3tbb10empty_taskD0Ev;
+_ZN3tbb10empty_taskD1Ev;
+_ZTIN3tbb10empty_taskE;
+_ZTSN3tbb10empty_taskE;
+_ZTVN3tbb10empty_taskE;
+
+/* exception handling support */
+_ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm;
+_ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE;
+_ZNK3tbb18task_group_context28is_group_execution_cancelledEv;
+_ZN3tbb18task_group_context22cancel_group_executionEv;
+_ZN3tbb18task_group_context5resetEv;
+_ZN3tbb18task_group_context4initEv;
+_ZN3tbb18task_group_contextD1Ev;
+_ZN3tbb18task_group_contextD2Ev;
+_ZNK3tbb18captured_exception4nameEv;
+_ZNK3tbb18captured_exception4whatEv;
+_ZN3tbb18captured_exception10throw_selfEv;
+_ZN3tbb18captured_exception3setEPKcS2_;
+_ZN3tbb18captured_exception4moveEv;
+_ZN3tbb18captured_exception5clearEv;
+_ZN3tbb18captured_exception7destroyEv;
+_ZN3tbb18captured_exception8allocateEPKcS2_;
+_ZN3tbb18captured_exceptionD0Ev;
+_ZN3tbb18captured_exceptionD1Ev;
+_ZTIN3tbb18captured_exceptionE;
+_ZTSN3tbb18captured_exceptionE;
+_ZTVN3tbb18captured_exceptionE;
+_ZN3tbb13tbb_exceptionD2Ev;
+_ZTIN3tbb13tbb_exceptionE;
+_ZTSN3tbb13tbb_exceptionE;
+_ZTVN3tbb13tbb_exceptionE;
+_ZN3tbb14bad_last_allocD0Ev;
+_ZN3tbb14bad_last_allocD1Ev;
+_ZNK3tbb14bad_last_alloc4whatEv;
+_ZTIN3tbb14bad_last_allocE;
+_ZTSN3tbb14bad_last_allocE;
+_ZTVN3tbb14bad_last_allocE;
+
+/* tbb_misc.cpp */
+_ZN3tbb17assertion_failureEPKciS1_S1_;
+_ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E;
+_ZN3tbb8internal36get_initial_auto_partitioner_divisorEv;
+_ZN3tbb8internal13handle_perrorEiPKc;
+_ZN3tbb8internal15runtime_warningEPKcz;
+
+/* itt_notify.cpp */
+_ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv;
+_ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_;
+
+/* pipeline.cpp */
+_ZTIN3tbb6filterE;
+_ZTSN3tbb6filterE;
+_ZTVN3tbb6filterE;
+_ZN3tbb6filterD2Ev;
+_ZN3tbb8pipeline10add_filterERNS_6filterE;
+_ZN3tbb8pipeline12inject_tokenERNS_4taskE;
+_ZN3tbb8pipeline13remove_filterERNS_6filterE;
+_ZN3tbb8pipeline3runEm;
+_ZN3tbb8pipeline5clearEv;
+_ZTIN3tbb8pipelineE;
+_ZTSN3tbb8pipelineE;
+_ZTVN3tbb8pipelineE;
+_ZN3tbb8pipelineC1Ev;
+_ZN3tbb8pipelineC2Ev;
+_ZN3tbb8pipelineD0Ev;
+_ZN3tbb8pipelineD1Ev;
+_ZN3tbb8pipelineD2Ev;
+
+/* queuing_rw_mutex.cpp */
+_ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv;
+_ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv;
+_ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b;
+_ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv;
+_ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b;
+
+#if !TBB_NO_LEGACY
+/* spin_rw_mutex.cpp v2 */
+_ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_;
+_ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_;
+_ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_;
+_ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_;
+_ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_;
+_ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_;
+#endif
+
+/* spin_rw_mutex v3 */
+_ZN3tbb16spin_rw_mutex_v316internal_upgradeEv;
+_ZN3tbb16spin_rw_mutex_v318internal_downgradeEv;
+_ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv;
+_ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv;
+_ZN3tbb16spin_rw_mutex_v323internal_release_readerEv;
+_ZN3tbb16spin_rw_mutex_v323internal_release_writerEv;
+_ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv;
+_ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv;
+
+/* spin_mutex.cpp */
+_ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_;
+_ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv;
+_ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_;
+
+/* mutex.cpp */
+_ZN3tbb5mutex11scoped_lock16internal_acquireERS0_;
+_ZN3tbb5mutex11scoped_lock16internal_releaseEv;
+_ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_;
+_ZN3tbb5mutex16internal_destroyEv;
+_ZN3tbb5mutex18internal_constructEv;
+
+/* recursive_mutex.cpp */
+_ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_;
+_ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv;
+_ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_;
+_ZN3tbb15recursive_mutex16internal_destroyEv;
+_ZN3tbb15recursive_mutex18internal_constructEv;
+
+/* QueuingMutex.cpp */
+_ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_;
+_ZN3tbb13queuing_mutex11scoped_lock7releaseEv;
+_ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_;
+
+/* 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;
+_ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm;
+_ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv;
+_ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv;
+_ZN3tbb8internal21concurrent_queue_baseC2Em;
+_ZN3tbb8internal21concurrent_queue_baseD2Ev;
+_ZTIN3tbb8internal21concurrent_queue_baseE;
+_ZTSN3tbb8internal21concurrent_queue_baseE;
+_ZTVN3tbb8internal21concurrent_queue_baseE;
+_ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_;
+_ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv;
+_ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE;
+_ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev;
+_ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv;
+#endif
+
+/* concurrent_queue v3 */
+/* constructors */
+_ZN3tbb8internal24concurrent_queue_base_v3C2Em;
+_ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E;
+/* destructors */
+_ZN3tbb8internal24concurrent_queue_base_v3D2Ev;
+_ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev;
+/* typeinfo */
+_ZTIN3tbb8internal24concurrent_queue_base_v3E;
+_ZTSN3tbb8internal24concurrent_queue_base_v3E;
+/* vtable */
+_ZTVN3tbb8internal24concurrent_queue_base_v3E;
+/* methods */
+_ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_;
+_ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv;
+_ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv;
+_ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv;
+_ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv;
+_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_v324internal_throw_exceptionEv;
+
+#if !TBB_NO_LEGACY
+/* concurrent_vector.cpp v2 */
+_ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE;
+_ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb;
+_ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_;
+_ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE;
+_ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm;
+_ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm;
+_ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE;
+_ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv;
+#endif
+
+/* concurrent_vector v3 */
+_ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE;
+_ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE;
+_ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_;
+_ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_;
+_ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm;
+_ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm;
+_ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_;
+_ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv;
+_ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE;
+_ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_;
+_ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm;
+_ZN3tbb8internal25concurrent_vector_base_v3D2Ev;
+
+/* tbb_thread */
+_ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv;
+_ZN3tbb8internal13tbb_thread_v36detachEv;
+_ZN3tbb8internal16thread_get_id_v3Ev;
+_ZN3tbb8internal15free_closure_v3EPv;
+_ZN3tbb8internal13tbb_thread_v34joinEv;
+_ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_;
+_ZN3tbb8internal19allocate_closure_v3Em;
+_ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_;
+_ZN3tbb8internal15thread_yield_v3Ev;
+_ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE;
+
+/* asm functions */
+__TBB_machine_fetchadd1__TBB_full_fence;
+__TBB_machine_fetchadd2__TBB_full_fence;
+__TBB_machine_fetchadd4__TBB_full_fence;
+__TBB_machine_fetchadd8__TBB_full_fence;
+__TBB_machine_fetchstore1__TBB_full_fence;
+__TBB_machine_fetchstore2__TBB_full_fence;
+__TBB_machine_fetchstore4__TBB_full_fence;
+__TBB_machine_fetchstore8__TBB_full_fence;
+__TBB_machine_fetchadd1acquire;
+__TBB_machine_fetchadd1release;
+__TBB_machine_fetchadd2acquire;
+__TBB_machine_fetchadd2release;
+__TBB_machine_fetchadd4acquire;
+__TBB_machine_fetchadd4release;
+__TBB_machine_fetchadd8acquire;
+__TBB_machine_fetchadd8release;
+__TBB_machine_fetchstore1acquire;
+__TBB_machine_fetchstore1release;
+__TBB_machine_fetchstore2acquire;
+__TBB_machine_fetchstore2release;
+__TBB_machine_fetchstore4acquire;
+__TBB_machine_fetchstore4release;
+__TBB_machine_fetchstore8acquire;
+__TBB_machine_fetchstore8release;
+__TBB_machine_cmpswp1acquire;
+__TBB_machine_cmpswp1release;
+__TBB_machine_cmpswp1__TBB_full_fence;
+__TBB_machine_cmpswp2acquire;
+__TBB_machine_cmpswp2release;
+__TBB_machine_cmpswp2__TBB_full_fence;
+__TBB_machine_cmpswp4acquire;
+__TBB_machine_cmpswp4release;
+__TBB_machine_cmpswp4__TBB_full_fence;
+__TBB_machine_cmpswp8acquire;
+__TBB_machine_cmpswp8release;
+__TBB_machine_cmpswp8__TBB_full_fence;
+__TBB_machine_lg;
+__TBB_machine_lockbyte;
+__TBB_machine_pause;
+__TBB_machine_trylockbyte;
+
+local:
+
+/* TBB symbols */
+*3tbb*;
+*__TBB*;
+
+/* Intel Compiler (libirc) symbols */
+__intel_*;
+_intel_*;
+?0_memcopyA;
+?0_memcopyDu;
+?0_memcpyD;
+?1__memcpy;
+?1__memmove;
+?1__serial_memmove;
+memcpy;
+memset;
+
+};
diff --git a/src/tbb/mac32-tbb-export.def b/src/tbb/mac32-tbb-export.def
new file mode 100644
index 0000000..25ec660
--- /dev/null
+++ b/src/tbb/mac32-tbb-export.def
@@ -0,0 +1,276 @@
+# Copyright 2005-2008 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.
+
+# cache_aligned_allocator.cpp
+__ZN3tbb8internal12NFS_AllocateEmmPv
+__ZN3tbb8internal15NFS_GetLineSizeEv
+__ZN3tbb8internal8NFS_FreeEPv
+__ZN3tbb8internal23allocate_via_handler_v3Em
+__ZN3tbb8internal25deallocate_via_handler_v3EPv
+__ZN3tbb8internal17is_malloc_used_v3Ev
+
+# task.cpp v3
+__ZN3tbb4task13note_affinityEt
+__ZN3tbb4task22internal_set_ref_countEi
+__ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE
+__ZN3tbb4task4selfEv
+__ZN3tbb4task7destroyERS0_
+__ZNK3tbb4task26is_owned_by_current_threadEv
+__ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE
+__ZN3tbb8internal19allocate_root_proxy8allocateEm
+__ZN3tbb8internal28affinity_partitioner_base_v36resizeEj
+__ZN3tbb8internal36get_initial_auto_partitioner_divisorEv
+__ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE
+__ZNK3tbb8internal20allocate_child_proxy8allocateEm
+__ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE
+__ZNK3tbb8internal27allocate_continuation_proxy8allocateEm
+__ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE
+__ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm
+__ZTIN3tbb4taskE
+__ZTSN3tbb4taskE
+__ZTVN3tbb4taskE
+__ZN3tbb19task_scheduler_init19default_num_threadsEv
+__ZN3tbb19task_scheduler_init10initializeEim
+__ZN3tbb19task_scheduler_init10initializeEi
+__ZN3tbb19task_scheduler_init9terminateEv
+__ZN3tbb8internal26task_scheduler_observer_v37observeEb
+__ZN3tbb10empty_task7executeEv
+__ZN3tbb10empty_taskD0Ev
+__ZN3tbb10empty_taskD1Ev
+__ZTIN3tbb10empty_taskE
+__ZTSN3tbb10empty_taskE
+__ZTVN3tbb10empty_taskE
+
+# exception handling support
+__ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm
+__ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE
+__ZNK3tbb18task_group_context28is_group_execution_cancelledEv
+__ZN3tbb18task_group_context22cancel_group_executionEv
+__ZN3tbb18task_group_context5resetEv
+__ZN3tbb18task_group_context4initEv
+__ZN3tbb18task_group_contextD1Ev
+__ZN3tbb18task_group_contextD2Ev
+__ZNK3tbb18captured_exception4nameEv
+__ZNK3tbb18captured_exception4whatEv
+__ZN3tbb18captured_exception10throw_selfEv
+__ZN3tbb18captured_exception3setEPKcS2_
+__ZN3tbb18captured_exception4moveEv
+__ZN3tbb18captured_exception5clearEv
+__ZN3tbb18captured_exception7destroyEv
+__ZN3tbb18captured_exception8allocateEPKcS2_
+__ZN3tbb18captured_exceptionD0Ev
+__ZN3tbb18captured_exceptionD1Ev
+__ZTIN3tbb18captured_exceptionE
+__ZTSN3tbb18captured_exceptionE
+__ZTVN3tbb18captured_exceptionE
+__ZTIN3tbb13tbb_exceptionE
+__ZTSN3tbb13tbb_exceptionE
+__ZTVN3tbb13tbb_exceptionE
+__ZN3tbb14bad_last_allocD0Ev
+__ZN3tbb14bad_last_allocD1Ev
+__ZNK3tbb14bad_last_alloc4whatEv
+__ZTIN3tbb14bad_last_allocE
+__ZTSN3tbb14bad_last_allocE
+__ZTVN3tbb14bad_last_allocE
+
+# Symbols for std exception classes thrown from TBB
+__ZNSt11range_errorD1Ev
+__ZNSt12length_errorD1Ev
+__ZNSt12out_of_rangeD1Ev
+__ZTISt11range_error
+__ZTISt12length_error
+__ZTISt12out_of_range
+__ZTSSt11range_error
+__ZTSSt12length_error
+__ZTSSt12out_of_range
+
+# tbb_misc.cpp
+__ZN3tbb17assertion_failureEPKciS1_S1_
+__ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E
+__ZN3tbb8internal13handle_perrorEiPKc
+__ZN3tbb8internal15runtime_warningEPKcz
+___TBB_machine_store8_slow
+
+# itt_notify.cpp
+__ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv
+__ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_
+
+# pipeline.cpp
+__ZTIN3tbb6filterE
+__ZTSN3tbb6filterE
+__ZTVN3tbb6filterE
+__ZN3tbb6filterD2Ev
+__ZN3tbb8pipeline10add_filterERNS_6filterE
+__ZN3tbb8pipeline12inject_tokenERNS_4taskE
+__ZN3tbb8pipeline13remove_filterERNS_6filterE
+__ZN3tbb8pipeline3runEm
+__ZN3tbb8pipeline5clearEv
+__ZN3tbb8pipelineC1Ev
+__ZN3tbb8pipelineC2Ev
+__ZN3tbb8pipelineD0Ev
+__ZN3tbb8pipelineD1Ev
+__ZN3tbb8pipelineD2Ev
+__ZTIN3tbb8pipelineE
+__ZTSN3tbb8pipelineE
+__ZTVN3tbb8pipelineE
+
+# queuing_rw_mutex.cpp
+__ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv
+__ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv
+__ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b
+__ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv
+__ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b
+
+#if !TBB_NO_LEGACY
+# spin_rw_mutex.cpp v2
+__ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_
+__ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_
+__ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_
+__ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_
+__ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_
+__ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_
+__ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_
+__ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_
+__ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_
+#endif
+
+# spin_rw_mutex v3
+__ZN3tbb16spin_rw_mutex_v316internal_upgradeEv
+__ZN3tbb16spin_rw_mutex_v318internal_downgradeEv
+__ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv
+__ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv
+__ZN3tbb16spin_rw_mutex_v323internal_release_readerEv
+__ZN3tbb16spin_rw_mutex_v323internal_release_writerEv
+__ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv
+__ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv
+
+# spin_mutex.cpp
+__ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_
+__ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv
+__ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_
+
+# mutex.cpp
+__ZN3tbb5mutex11scoped_lock16internal_acquireERS0_
+__ZN3tbb5mutex11scoped_lock16internal_releaseEv
+__ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_
+__ZN3tbb5mutex16internal_destroyEv
+__ZN3tbb5mutex18internal_constructEv
+
+# recursive_mutex.cpp
+__ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_
+__ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv
+__ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_
+__ZN3tbb15recursive_mutex16internal_destroyEv
+__ZN3tbb15recursive_mutex18internal_constructEv
+
+# queuing_mutex.cpp
+__ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_
+__ZN3tbb13queuing_mutex11scoped_lock7releaseEv
+__ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_
+
+# 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
+__ZN3tbb8internal21concurrent_queue_base21internal_set_capacityEim
+__ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv
+__ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv
+__ZN3tbb8internal21concurrent_queue_baseC2Em
+__ZN3tbb8internal21concurrent_queue_baseD2Ev
+__ZTIN3tbb8internal21concurrent_queue_baseE
+__ZTSN3tbb8internal21concurrent_queue_baseE
+__ZTVN3tbb8internal21concurrent_queue_baseE
+__ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_
+__ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv
+__ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE
+__ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev
+__ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv
+#endif
+
+# concurrent_queue v3
+# constructors
+__ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E
+__ZN3tbb8internal24concurrent_queue_base_v3C2Em
+# destructors
+__ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev
+__ZN3tbb8internal24concurrent_queue_base_v3D2Ev
+# typeinfo
+__ZTIN3tbb8internal24concurrent_queue_base_v3E
+__ZTSN3tbb8internal24concurrent_queue_base_v3E
+#vtable
+__ZTVN3tbb8internal24concurrent_queue_base_v3E
+# methods
+__ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv
+__ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_
+__ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv
+__ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv
+__ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv
+__ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv
+__ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityEim
+__ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv
+__ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv
+__ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv
+
+#if !TBB_NO_LEGACY
+# concurrent_vector.cpp v2
+__ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE
+__ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb
+__ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_
+__ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE
+__ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm
+__ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm
+__ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE
+__ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv
+#endif
+
+# concurrent_vector v3
+__ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE
+__ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE
+__ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_
+__ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_
+__ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm
+__ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm
+__ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_
+__ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv
+__ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE
+__ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_
+__ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm
+__ZN3tbb8internal25concurrent_vector_base_v3D2Ev
+
+# tbb_thread
+__ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_
+__ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv
+__ZN3tbb8internal13tbb_thread_v34joinEv
+__ZN3tbb8internal13tbb_thread_v36detachEv
+__ZN3tbb8internal15free_closure_v3EPv
+__ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE
+__ZN3tbb8internal15thread_yield_v3Ev
+__ZN3tbb8internal16thread_get_id_v3Ev
+__ZN3tbb8internal19allocate_closure_v3Em
+__ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_
diff --git a/src/tbb/mac64-tbb-export.def b/src/tbb/mac64-tbb-export.def
new file mode 100644
index 0000000..bebbb23
--- /dev/null
+++ b/src/tbb/mac64-tbb-export.def
@@ -0,0 +1,275 @@
+# Copyright 2005-2008 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.
+
+# cache_aligned_allocator.cpp
+__ZN3tbb8internal12NFS_AllocateEmmPv
+__ZN3tbb8internal15NFS_GetLineSizeEv
+__ZN3tbb8internal8NFS_FreeEPv
+__ZN3tbb8internal23allocate_via_handler_v3Em
+__ZN3tbb8internal25deallocate_via_handler_v3EPv
+__ZN3tbb8internal17is_malloc_used_v3Ev
+
+# task.cpp v3
+__ZN3tbb4task13note_affinityEt
+__ZN3tbb4task22internal_set_ref_countEi
+__ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE
+__ZN3tbb4task4selfEv
+__ZN3tbb4task7destroyERS0_
+__ZNK3tbb4task26is_owned_by_current_threadEv
+__ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE
+__ZN3tbb8internal19allocate_root_proxy8allocateEm
+__ZN3tbb8internal28affinity_partitioner_base_v36resizeEj
+__ZN3tbb8internal36get_initial_auto_partitioner_divisorEv
+__ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE
+__ZNK3tbb8internal20allocate_child_proxy8allocateEm
+__ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE
+__ZNK3tbb8internal27allocate_continuation_proxy8allocateEm
+__ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE
+__ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm
+__ZTIN3tbb4taskE
+__ZTSN3tbb4taskE
+__ZTVN3tbb4taskE
+__ZN3tbb19task_scheduler_init19default_num_threadsEv
+__ZN3tbb19task_scheduler_init10initializeEim
+__ZN3tbb19task_scheduler_init10initializeEi
+__ZN3tbb19task_scheduler_init9terminateEv
+__ZN3tbb8internal26task_scheduler_observer_v37observeEb
+__ZN3tbb10empty_task7executeEv
+__ZN3tbb10empty_taskD0Ev
+__ZN3tbb10empty_taskD1Ev
+__ZTIN3tbb10empty_taskE
+__ZTSN3tbb10empty_taskE
+__ZTVN3tbb10empty_taskE
+
+# exception handling support
+__ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm
+__ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE
+__ZNK3tbb18task_group_context28is_group_execution_cancelledEv
+__ZN3tbb18task_group_context22cancel_group_executionEv
+__ZN3tbb18task_group_context5resetEv
+__ZN3tbb18task_group_context4initEv
+__ZN3tbb18task_group_contextD1Ev
+__ZN3tbb18task_group_contextD2Ev
+__ZNK3tbb18captured_exception4nameEv
+__ZNK3tbb18captured_exception4whatEv
+__ZN3tbb18captured_exception10throw_selfEv
+__ZN3tbb18captured_exception3setEPKcS2_
+__ZN3tbb18captured_exception4moveEv
+__ZN3tbb18captured_exception5clearEv
+__ZN3tbb18captured_exception7destroyEv
+__ZN3tbb18captured_exception8allocateEPKcS2_
+__ZN3tbb18captured_exceptionD0Ev
+__ZN3tbb18captured_exceptionD1Ev
+__ZTIN3tbb18captured_exceptionE
+__ZTSN3tbb18captured_exceptionE
+__ZTVN3tbb18captured_exceptionE
+__ZTIN3tbb13tbb_exceptionE
+__ZTSN3tbb13tbb_exceptionE
+__ZTVN3tbb13tbb_exceptionE
+__ZN3tbb14bad_last_allocD0Ev
+__ZN3tbb14bad_last_allocD1Ev
+__ZNK3tbb14bad_last_alloc4whatEv
+__ZTIN3tbb14bad_last_allocE
+__ZTSN3tbb14bad_last_allocE
+__ZTVN3tbb14bad_last_allocE
+
+# Symbols for std exception classes thrown from TBB
+__ZNSt11range_errorD1Ev
+__ZNSt12length_errorD1Ev
+__ZNSt12out_of_rangeD1Ev
+__ZTISt11range_error
+__ZTISt12length_error
+__ZTISt12out_of_range
+__ZTSSt11range_error
+__ZTSSt12length_error
+__ZTSSt12out_of_range
+
+# tbb_misc.cpp
+__ZN3tbb17assertion_failureEPKciS1_S1_
+__ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E
+__ZN3tbb8internal13handle_perrorEiPKc
+__ZN3tbb8internal15runtime_warningEPKcz
+
+# itt_notify.cpp
+__ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv
+__ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_
+
+# pipeline.cpp
+__ZTIN3tbb6filterE
+__ZTSN3tbb6filterE
+__ZTVN3tbb6filterE
+__ZN3tbb6filterD2Ev
+__ZN3tbb8pipeline10add_filterERNS_6filterE
+__ZN3tbb8pipeline12inject_tokenERNS_4taskE
+__ZN3tbb8pipeline13remove_filterERNS_6filterE
+__ZN3tbb8pipeline3runEm
+__ZN3tbb8pipeline5clearEv
+__ZN3tbb8pipelineC1Ev
+__ZN3tbb8pipelineC2Ev
+__ZN3tbb8pipelineD0Ev
+__ZN3tbb8pipelineD1Ev
+__ZN3tbb8pipelineD2Ev
+__ZTIN3tbb8pipelineE
+__ZTSN3tbb8pipelineE
+__ZTVN3tbb8pipelineE
+
+# queuing_rw_mutex.cpp
+__ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv
+__ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv
+__ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b
+__ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv
+__ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b
+
+#if !TBB_NO_LEGACY
+# spin_rw_mutex.cpp v2
+__ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_
+__ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_
+__ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_
+__ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_
+__ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_
+__ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_
+__ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_
+__ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_
+__ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_
+#endif
+
+# spin_rw_mutex v3
+__ZN3tbb16spin_rw_mutex_v316internal_upgradeEv
+__ZN3tbb16spin_rw_mutex_v318internal_downgradeEv
+__ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv
+__ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv
+__ZN3tbb16spin_rw_mutex_v323internal_release_readerEv
+__ZN3tbb16spin_rw_mutex_v323internal_release_writerEv
+__ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv
+__ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv
+
+# spin_mutex.cpp
+__ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_
+__ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv
+__ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_
+
+# mutex.cpp
+__ZN3tbb5mutex11scoped_lock16internal_acquireERS0_
+__ZN3tbb5mutex11scoped_lock16internal_releaseEv
+__ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_
+__ZN3tbb5mutex16internal_destroyEv
+__ZN3tbb5mutex18internal_constructEv
+
+# recursive_mutex.cpp
+__ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_
+__ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv
+__ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_
+__ZN3tbb15recursive_mutex16internal_destroyEv
+__ZN3tbb15recursive_mutex18internal_constructEv
+
+# queuing_mutex.cpp
+__ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_
+__ZN3tbb13queuing_mutex11scoped_lock7releaseEv
+__ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_
+
+# 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
+__ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm
+__ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv
+__ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv
+__ZN3tbb8internal21concurrent_queue_baseC2Em
+__ZN3tbb8internal21concurrent_queue_baseD2Ev
+__ZTIN3tbb8internal21concurrent_queue_baseE
+__ZTSN3tbb8internal21concurrent_queue_baseE
+__ZTVN3tbb8internal21concurrent_queue_baseE
+__ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_
+__ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv
+__ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE
+__ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev
+__ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv
+#endif
+
+# concurrent_queue v3
+# constructors
+__ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E
+__ZN3tbb8internal24concurrent_queue_base_v3C2Em
+# destructors
+__ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev
+__ZN3tbb8internal24concurrent_queue_base_v3D2Ev
+# typeinfo
+__ZTIN3tbb8internal24concurrent_queue_base_v3E
+__ZTSN3tbb8internal24concurrent_queue_base_v3E
+#vtable
+__ZTVN3tbb8internal24concurrent_queue_base_v3E
+# methods
+__ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_
+__ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv
+__ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv
+__ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv
+__ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv
+__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_v324internal_throw_exceptionEv
+
+#if !TBB_NO_LEGACY
+# concurrent_vector.cpp v2
+__ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE
+__ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb
+__ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_
+__ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE
+__ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm
+__ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm
+__ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE
+__ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv
+#endif
+
+# concurrent_vector v3
+__ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE
+__ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE
+__ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_
+__ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_
+__ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm
+__ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm
+__ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_
+__ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv
+__ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE
+__ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_
+__ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm
+__ZN3tbb8internal25concurrent_vector_base_v3D2Ev
+
+# tbb_thread
+__ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv
+__ZN3tbb8internal13tbb_thread_v36detachEv
+__ZN3tbb8internal16thread_get_id_v3Ev
+__ZN3tbb8internal15free_closure_v3EPv
+__ZN3tbb8internal13tbb_thread_v34joinEv
+__ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_
+__ZN3tbb8internal19allocate_closure_v3Em
+__ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_
+__ZN3tbb8internal15thread_yield_v3Ev
+__ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE
diff --git a/src/tbb/mutex.cpp b/src/tbb/mutex.cpp
index 30330e4..75daf4d 100644
--- a/src/tbb/mutex.cpp
+++ b/src/tbb/mutex.cpp
@@ -34,7 +34,14 @@ namespace tbb {
 #if _WIN32||_WIN64
         switch( m.state ) {
         case INITIALIZED: 
-            EnterCriticalSection(&m.impl);
+        case HELD:
+            EnterCriticalSection( &m.impl );
+            // If a thread comes here, and another thread holds the lock, it will block
+            // in EnterCriticalSection.  When it returns from EnterCriticalSection,
+            // m.state must be set to INITIALIZED.  If the same thread tries to acquire a lock it
+            // aleady holds, the the lock is in HELD state, thus will cause the assertion to fail.
+            __TBB_ASSERT(m.state!=HELD, "mutex::scoped_lock: deadlock caused by attempt to reacquire held mutex");
+            m.state = HELD;
             break;
         case DESTROYED: 
             __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); 
@@ -55,6 +62,10 @@ void mutex::scoped_lock::internal_release() {
 #if _WIN32||_WIN64    
      switch( my_mutex->state ) {
         case INITIALIZED: 
+            __TBB_ASSERT(false,"mutex::scoped_lock: try to release the lock without acquisition");
+            break;
+        case HELD:
+            my_mutex->state = INITIALIZED;
             LeaveCriticalSection(&my_mutex->impl);
             break;
         case DESTROYED: 
@@ -75,6 +86,7 @@ bool mutex::scoped_lock::internal_try_acquire( mutex& m ) {
 #if _WIN32||_WIN64
     switch( m.state ) {
         case INITIALIZED: 
+        case HELD:
             break;
         case DESTROYED: 
             __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); 
@@ -87,11 +99,15 @@ bool mutex::scoped_lock::internal_try_acquire( mutex& m ) {
 
     bool result;
 #if _WIN32||_WIN64
-            result = TryEnterCriticalSection(&m.impl)!=0;
+    result = TryEnterCriticalSection(&m.impl)!=0;
+    if( result ) {
+        __TBB_ASSERT(m.state!=HELD, "mutex::scoped_lock: deadlock caused by attempt to reacquire held mutex");
+        m.state = HELD;
+    }
 #else
-            result = pthread_mutex_trylock(&m.impl)==0;
+    result = pthread_mutex_trylock(&m.impl)==0;
 #endif /* _WIN32||_WIN64 */
-    if( result )
+    if( result ) 
         my_mutex = &m;
     return result;
 }
@@ -110,13 +126,15 @@ void mutex::internal_construct() {
 void mutex::internal_destroy() {
 #if _WIN32||_WIN64
     switch( state ) {
-       case INITIALIZED: {
-           DeleteCriticalSection(&impl);
-       } break;
-       case DESTROYED: 
-           __TBB_ASSERT(false,"mutex: already destroyed"); break;
-       default: 
-           __TBB_ASSERT(false,"mutex: illegal state for destruction");
+      case INITIALIZED:
+        DeleteCriticalSection(&impl);
+       break;
+      case DESTROYED: 
+        __TBB_ASSERT(false,"mutex: already destroyed");
+        break;
+      default: 
+        __TBB_ASSERT(false,"mutex: illegal state for destruction");
+        break;
     }
     state = DESTROYED;
 #else
diff --git a/src/tbb/pipeline.cpp b/src/tbb/pipeline.cpp
index 238988b..d1912fc 100644
--- a/src/tbb/pipeline.cpp
+++ b/src/tbb/pipeline.cpp
@@ -81,10 +81,13 @@ public:
     /** The putter must be in state that works if enqueued for later wakeup 
         If putter was enqueued, returns NULL.  Otherwise returns putter,
         which the caller is expected to spawn. */
-    task* put_token( task& putter, Token token ) {
+    // Using template to avoid explicit dependency on stage_task
+    template<typename StageTask>
+    task* put_token( StageTask& putter ) {
         task* result = &putter;
         {
             spin_mutex::scoped_lock lock( array_mutex );
+            Token token = putter.next_token_number();
             if( token!=low_token ) {
                 // Trying to put token that is beyond low_token.
                 // Need to wait until low_token catches up before dispatching.
@@ -143,8 +146,10 @@ private:
     pipeline& my_pipeline;
     void* my_object;
     filter* my_filter;  
-    //! Invalid until this task has read the input.
+    //! 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:
@@ -154,30 +159,57 @@ public:
         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 ) : 
         my_pipeline(pipeline), 
         my_filter(filter_list),
+        my_token_ready(false),
         my_at_start(false)
     {}
-    task* execute();
+    //! 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();
 };
 
 task* stage_task::execute() {
     __TBB_ASSERT( !my_at_start || !my_object, NULL );
-    my_object = (*my_filter)(my_object);
     if( my_at_start ) {
-        if( my_object ) {
-            my_token = my_pipeline.token_counter++;
-            if( --my_pipeline.input_tokens>0 ) 
+        if( my_filter->is_serial() ) {
+            if( (my_object = (*my_filter)(my_object)) ) {
+                my_token = my_pipeline.token_counter++;
+                my_token_ready = true;
+                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 ) );
+            } else {
+                my_pipeline.end_of_input = true; 
+                return NULL;
+            }
+        } else /*not is_serial*/ {
+            if( my_pipeline.end_of_input )
+                return NULL;
+            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 ) );
-        } else {
-            my_pipeline.end_of_input = true;
-            return NULL;
+            if( !(my_object = (*my_filter)(my_object)) ) {
+                my_pipeline.end_of_input = true; 
+                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);
     }
@@ -191,9 +223,13 @@ task* stage_task::execute() {
             // The next filter must execute tokens in order.
             stage_task& clone = *new( allocate_continuation() ) stage_task( my_pipeline, my_filter );
             clone.my_token = my_token;
+            clone.my_token_ready = my_token_ready;
             clone.my_object = my_object;
-            next = input_buffer->put_token(clone,my_token);
+            next = input_buffer->put_token(clone);
         } else {
+            /* A semi-hackish way to reexecute the same task object immediately without spawning.
+               recycle_as_continuation marks the task for future execution,
+               and then 'this' pointer is returned to bypass spawning. */
             recycle_as_continuation();
             next = this;
         }
@@ -202,9 +238,11 @@ task* stage_task::execute() {
         // 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 ); 
-        if( ++my_pipeline.input_tokens==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 ) );
+        }
     }
     return next;
 }
@@ -217,7 +255,7 @@ void pipeline::inject_token( task& ) {
 
 pipeline::pipeline() : 
     filter_list(NULL),
-    filter_end(&filter_list),
+    filter_end(NULL),
     end_counter(NULL),
     token_counter(0),
     end_of_input(false)
@@ -238,26 +276,71 @@ void pipeline::clear() {
         }
         next=f->next_filter_in_pipeline;
         f->next_filter_in_pipeline = filter::not_in_pipeline();
+        if ( (f->my_filter_mode & internal::VERSION_MASK) >= __TBB_PIPELINE_VERSION(3) ) {
+            f->prev_filter_in_pipeline = filter::not_in_pipeline();
+            f->my_pipeline = NULL;
+        }
     }
-    filter_list = NULL;
+    filter_list = filter_end = NULL;
 }
 
-void pipeline::add_filter( filter& filter ) {
-    __TBB_ASSERT( filter.next_filter_in_pipeline==filter::not_in_pipeline(), "filter already part of pipeline?" );
+void pipeline::add_filter( filter& filter_ ) {
+#if TBB_DO_ASSERT
+    if ( (filter_.my_filter_mode & internal::VERSION_MASK) >= __TBB_PIPELINE_VERSION(3) ) 
+        __TBB_ASSERT( filter_.prev_filter_in_pipeline==filter::not_in_pipeline(), "filter already part of pipeline?" );
+    __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" );
-    if( filter.is_serial() ) {
-        filter.input_buffer = new internal::ordered_buffer();
+#endif    
+    if( filter_.is_serial() ) {
+        filter_.input_buffer = new internal::ordered_buffer();
+    }
+    if ( (filter_.my_filter_mode & internal::VERSION_MASK) >= __TBB_PIPELINE_VERSION(3) ) {
+        filter_.my_pipeline = this;
+        filter_.prev_filter_in_pipeline = filter_end;
+        if ( filter_list == NULL)
+            filter_list = &filter_;
+        else
+            filter_end->next_filter_in_pipeline = &filter_;
+        filter_.next_filter_in_pipeline = NULL;
+        filter_end = &filter_;
+    }
+    else
+    {
+        if( !filter_end )
+            filter_end = reinterpret_cast<filter*>(&filter_list);
+        
+        *reinterpret_cast<filter**>(filter_end) = &filter_;
+        filter_end = reinterpret_cast<filter*>(&filter_.next_filter_in_pipeline);
+        *reinterpret_cast<filter**>(filter_end) = NULL;
     }
-    *filter_end = &filter;
-    filter_end = &filter.next_filter_in_pipeline;
-    *filter_end = NULL;
+}
+
+void pipeline::remove_filter( filter& filter_ ) {
+    if (&filter_ == filter_list) 
+        filter_list = filter_.next_filter_in_pipeline;
+    else {
+        __TBB_ASSERT( filter_.prev_filter_in_pipeline, "filter list broken?" ); 
+        filter_.prev_filter_in_pipeline->next_filter_in_pipeline = filter_.next_filter_in_pipeline;
+    }
+    if (&filter_ == filter_end)
+        filter_end = filter_.prev_filter_in_pipeline;
+    else {
+        __TBB_ASSERT( filter_.next_filter_in_pipeline, "filter list broken?" ); 
+        filter_.next_filter_in_pipeline->prev_filter_in_pipeline = filter_.prev_filter_in_pipeline;
+    }
+    if( internal::ordered_buffer* b = filter_.input_buffer ) {
+        delete b; 
+        filter_.input_buffer = NULL;
+    }
+    filter_.next_filter_in_pipeline = filter_.prev_filter_in_pipeline = filter::not_in_pipeline();
+    filter_.my_pipeline = NULL;
 }
 
 void pipeline::run( size_t max_number_of_live_tokens ) {
     __TBB_ASSERT( max_number_of_live_tokens>0, "pipeline::run must have at least one token" );
     __TBB_ASSERT( !end_counter, "pipeline already running?" );
     if( filter_list ) {
-        if( filter_list->next_filter_in_pipeline ) {
+        if( filter_list->next_filter_in_pipeline || !filter_list->is_serial() ) {
             end_of_input = false;
             end_counter = new( task::allocate_root() ) empty_task;
             // 2 = 1 for spawned child + 1 for wait
@@ -277,7 +360,15 @@ void pipeline::run( size_t max_number_of_live_tokens ) {
 }
 
 filter::~filter() {
-    __TBB_ASSERT( next_filter_in_pipeline==filter::not_in_pipeline(), "cannot destroy filter that is part of pipeline" );
+    if ( (my_filter_mode & internal::VERSION_MASK) >= __TBB_PIPELINE_VERSION(3) ) {
+        if ( next_filter_in_pipeline != filter::not_in_pipeline() ) { 
+            __TBB_ASSERT( prev_filter_in_pipeline != filter::not_in_pipeline(), "probably filter list is broken" );
+            my_pipeline->remove_filter(*this);
+        } else 
+            __TBB_ASSERT( prev_filter_in_pipeline == filter::not_in_pipeline(), "probably filter list is broken" );
+    } else {
+        __TBB_ASSERT( next_filter_in_pipeline==filter::not_in_pipeline(), "cannot destroy filter that is part of pipeline" );
+    }
 }
 
 } // tbb
diff --git a/src/tbb/recursive_mutex.cpp b/src/tbb/recursive_mutex.cpp
new file mode 100644
index 0000000..4f44a09
--- /dev/null
+++ b/src/tbb/recursive_mutex.cpp
@@ -0,0 +1,141 @@
+/*
+    Copyright 2005-2008 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/recursive_mutex.h"
+
+namespace tbb {
+
+void recursive_mutex::scoped_lock::internal_acquire( recursive_mutex& m ) {
+#if _WIN32||_WIN64
+    switch( m.state ) {
+      case INITIALIZED: 
+        // since we cannot look into the internal of the CriticalSection object
+        // we won't know how many times the lock has been acquired, and thus
+        // we won't know when we may safely set the state back to INITIALIZED
+        // if we change the state to HELD as in mutex.cpp.  thus, we won't change
+        // the state for recursive_mutex
+        EnterCriticalSection( &m.impl );
+        break;
+      case DESTROYED: 
+        __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); 
+        break;
+      default: 
+        __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state");
+        break;
+    }
+#else
+    int error_code = pthread_mutex_lock(&m.impl);
+    __TBB_ASSERT_EX(!error_code,"recursive_mutex::scoped_lock: pthread_mutex_lock failed");
+#endif /* _WIN32||_WIN64 */
+    my_mutex = &m;
+}
+
+void recursive_mutex::scoped_lock::internal_release() {
+    __TBB_ASSERT( my_mutex, "recursive_mutex::scoped_lock: not holding a mutex" );
+#if _WIN32||_WIN64    
+    switch( my_mutex->state ) {
+      case INITIALIZED: 
+        LeaveCriticalSection( &my_mutex->impl );
+        break;
+      case DESTROYED: 
+        __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); 
+        break;
+      default: 
+        __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state");
+        break;
+    }
+#else
+     int error_code = pthread_mutex_unlock(&my_mutex->impl);
+     __TBB_ASSERT_EX(!error_code, "recursive_mutex::scoped_lock: pthread_mutex_unlock failed");
+#endif /* _WIN32||_WIN64 */
+     my_mutex = NULL;
+}
+
+bool recursive_mutex::scoped_lock::internal_try_acquire( recursive_mutex& m ) {
+#if _WIN32||_WIN64
+    switch( m.state ) {
+      case INITIALIZED: 
+        break;
+      case DESTROYED: 
+        __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); 
+        break;
+      default: 
+        __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state");
+        break;
+    }
+#endif /* _WIN32||_WIN64 */
+    bool result;
+#if _WIN32||_WIN64
+    result = TryEnterCriticalSection(&m.impl)!=0;
+#else
+    result = pthread_mutex_trylock(&m.impl)==0;
+#endif /* _WIN32||_WIN64 */
+    if( result )
+        my_mutex = &m;
+    return result;
+}
+
+void recursive_mutex::internal_construct() {
+#if _WIN32||_WIN64
+    InitializeCriticalSection(&impl);
+    state = INITIALIZED;
+#else
+    pthread_mutexattr_t mtx_attr;
+    int error_code = pthread_mutexattr_init( &mtx_attr );
+    if( error_code )
+        tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutexattr_init failed");
+
+    pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE );
+    error_code = pthread_mutex_init( &impl, &mtx_attr );
+    if( error_code )
+        tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutex_init failed");
+    pthread_mutexattr_destroy( &mtx_attr );
+#endif /* _WIN32||_WIN64*/    
+}
+
+void recursive_mutex::internal_destroy() {
+#if _WIN32||_WIN64
+    switch( state ) {
+      case INITIALIZED:
+        DeleteCriticalSection(&impl);
+        break;
+      case DESTROYED: 
+        __TBB_ASSERT(false,"recursive_mutex: already destroyed");
+        break;
+      default: 
+         __TBB_ASSERT(false,"recursive_mutex: illegal state for destruction");
+         break;
+    }
+    state = DESTROYED;
+#else
+    int error_code = pthread_mutex_destroy(&impl); 
+    __TBB_ASSERT_EX(!error_code,"recursive_mutex: pthread_mutex_destroy failed");
+#endif /* _WIN32||_WIN64 */
+}
+
+} // namespace tbb
diff --git a/src/tbb/spin_mutex.cpp b/src/tbb/spin_mutex.cpp
index 50eb7dd..23758f7 100644
--- a/src/tbb/spin_mutex.cpp
+++ b/src/tbb/spin_mutex.cpp
@@ -46,7 +46,7 @@ void spin_mutex::scoped_lock::internal_release() {
     __TBB_ASSERT( !(my_unlock_value&1), "corrupted scoped_lock?" );
 
     ITT_NOTIFY(sync_releasing, my_mutex);
-    my_mutex->flag = static_cast<unsigned char>(my_unlock_value);
+    __TBB_store_with_release(my_mutex->flag, static_cast<unsigned char>(my_unlock_value));
     my_mutex = NULL;
 }
 
diff --git a/src/tbb/spin_rw_mutex.cpp b/src/tbb/spin_rw_mutex.cpp
index ca818ab..b59908e 100644
--- a/src/tbb/spin_rw_mutex.cpp
+++ b/src/tbb/spin_rw_mutex.cpp
@@ -27,137 +27,143 @@
 */
 
 #include "tbb/spin_rw_mutex.h"
-#include "tbb/tbb_machine.h"
 #include "tbb_misc.h"
 #include "itt_notify.h"
 
-namespace tbb {
-
-using namespace internal;
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (disable: 4244)
+#endif /* _MSC_VER && _Wp64 */
 
-static inline bool CAS(volatile uintptr &addr, uintptr newv, uintptr oldv) {
-    return __TBB_CompareAndSwapW((volatile void *)&addr, (intptr)newv, (intptr)oldv) == (intptr)oldv;
-}
+namespace tbb {
 
-//! Signal that write lock is released
-void spin_rw_mutex::internal_itt_releasing(spin_rw_mutex *mutex) {
-    ITT_NOTIFY(sync_releasing, mutex);
+template<typename T> // a template can work with private spin_rw_mutex::state_t
+static inline T CAS(volatile T &addr, T newv, T oldv) {
+    // ICC (9.1 and 10.1 tried) unable to do implicit conversion 
+    // from "volatile T*" to "volatile void*", so explicit cast added.
+    return T(__TBB_CompareAndSwapW((volatile void *)&addr, (intptr_t)newv, (intptr_t)oldv));
 }
 
-bool spin_rw_mutex::internal_acquire_writer(spin_rw_mutex *mutex)
+//! Acquire write lock on the given mutex.
+bool spin_rw_mutex_v3::internal_acquire_writer()
 {
-    ITT_NOTIFY(sync_prepare, mutex);
-    ExponentialBackoff backoff;
+    ITT_NOTIFY(sync_prepare, this);
+    internal::ExponentialBackoff backoff;
     while(true) {
-        state_t s = mutex->state;
+        state_t s = const_cast<volatile state_t&>(state); // ensure reloading
         if( !(s & BUSY) ) { // no readers, no writers
-            if( CAS(mutex->state, WRITER, s) )
+            if( CAS(state, WRITER, s)==s )
                 break; // successfully stored writer flag
             backoff.reset(); // we could be very close to complete op.
         } else if( !(s & WRITER_PENDING) ) { // no pending writers
-            __TBB_AtomicOR(&mutex->state, WRITER_PENDING);
+            __TBB_AtomicOR(&state, WRITER_PENDING);
         }
         backoff.pause();
     }
-    ITT_NOTIFY(sync_acquired, mutex);
-    __TBB_ASSERT( (mutex->state & BUSY)==WRITER, "invalid state of a write lock" );
+    ITT_NOTIFY(sync_acquired, this);
     return false;
 }
 
-//! Signal that write lock is released
-void spin_rw_mutex::internal_release_writer(spin_rw_mutex *mutex) {
-    __TBB_ASSERT( (mutex->state & BUSY)==WRITER, "invalid state of a write lock" );
-    ITT_NOTIFY(sync_releasing, mutex);
-    mutex->state = 0; 
+//! Release writer lock on the given mutex
+void spin_rw_mutex_v3::internal_release_writer() 
+{
+    ITT_NOTIFY(sync_releasing, this);
+    __TBB_AtomicAND( &state, READERS );
 }
 
-//! Acquire lock on given mutex.
-void spin_rw_mutex::internal_acquire_reader(spin_rw_mutex *mutex) {
-    ITT_NOTIFY(sync_prepare, mutex);
-    ExponentialBackoff backoff;
+//! Acquire read lock on given mutex.
+void spin_rw_mutex_v3::internal_acquire_reader() 
+{
+    ITT_NOTIFY(sync_prepare, this);
+    internal::ExponentialBackoff backoff;
     while(true) {
-        state_t s = mutex->state;
+        state_t s = const_cast<volatile state_t&>(state); // ensure reloading
         if( !(s & (WRITER|WRITER_PENDING)) ) { // no writer or write requests
-            if( CAS(mutex->state, s+ONE_READER, s) )
+            state_t t = (state_t)__TBB_FetchAndAddW( &state, (intptr_t) ONE_READER );
+            if( !( t&WRITER )) 
                 break; // successfully stored increased number of readers
-            backoff.reset(); // we could be very close to complete op.
+            // writer got there first, undo the increment
+            __TBB_FetchAndAddW( &state, -(intptr_t)ONE_READER );
         }
         backoff.pause();
     }
-    ITT_NOTIFY(sync_acquired, mutex);
-    __TBB_ASSERT( mutex->state & READERS, "invalid state of a read lock: no readers" );
-    __TBB_ASSERT( !(mutex->state & WRITER), "invalid state of a read lock: active writer" );
+
+    ITT_NOTIFY(sync_acquired, this);
+    __TBB_ASSERT( state & READERS, "invalid state of a read lock: no readers" );
 }
 
 //! Upgrade reader to become a writer.
 /** Returns true if the upgrade happened without re-acquiring the lock and false if opposite */
-bool spin_rw_mutex::internal_upgrade(spin_rw_mutex *mutex) {
-    state_t s = mutex->state;
+bool spin_rw_mutex_v3::internal_upgrade() 
+{
+    state_t s = state;
     __TBB_ASSERT( s & READERS, "invalid state before upgrade: no readers " );
-    __TBB_ASSERT( !(s & WRITER), "invalid state before upgrade: active writer " );
     // check and set writer-pending flag
     // required conditions: either no pending writers, or we are the only reader
     // (with multiple readers and pending writer, another upgrade could have been requested)
     while( (s & READERS)==ONE_READER || !(s & WRITER_PENDING) ) {
-        if( CAS(mutex->state, s | WRITER_PENDING, s) )
-        {
-            ExponentialBackoff backoff;
-            ITT_NOTIFY(sync_prepare, mutex);
-            while( (mutex->state & READERS) != ONE_READER ) // more than 1 reader
-                backoff.pause();
-            // the state should be 0...0110, i.e. 1 reader and waiting writer;
+        state_t old_s = s;
+        if( (s=CAS(state, s | WRITER | WRITER_PENDING, s))==old_s ) {
+            internal::ExponentialBackoff 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
-            __TBB_ASSERT(mutex->state == (ONE_READER | WRITER_PENDING),"invalid state when upgrading to writer");
-            mutex->state = WRITER;
-            ITT_NOTIFY(sync_acquired, mutex);
-            __TBB_ASSERT( (mutex->state & BUSY) == WRITER, "invalid state after upgrade" );
+            while( (state & READERS) != ONE_READER ) // more than 1 reader
+                backoff.pause(); 
+            __TBB_ASSERT((state&(WRITER_PENDING|WRITER))==(WRITER_PENDING|WRITER),"invalid state when upgrading to writer");
+
+            __TBB_FetchAndAddW( &state,  - (intptr_t)(ONE_READER+WRITER_PENDING));
+            ITT_NOTIFY(sync_acquired, this);
             return true; // successfully upgraded
-        } else {
-            s = mutex->state; // re-read
         }
     }
     // slow reacquire
-    internal_release_reader(mutex);
-    return internal_acquire_writer(mutex); // always returns false
+    internal_release_reader();
+    return internal_acquire_writer(); // always returns false
 }
 
-void spin_rw_mutex::internal_downgrade(spin_rw_mutex *mutex) {
-    __TBB_ASSERT( (mutex->state & BUSY) == WRITER, "invalid state before downgrade" );
-    ITT_NOTIFY(sync_releasing, mutex);
-    mutex->state = ONE_READER;
-    __TBB_ASSERT( mutex->state & READERS, "invalid state after downgrade: no readers" );
-    __TBB_ASSERT( !(mutex->state & WRITER), "invalid state after downgrade: active writer" );
+//! Downgrade writer to a reader
+void spin_rw_mutex_v3::internal_downgrade() {
+    ITT_NOTIFY(sync_releasing, this);
+    __TBB_FetchAndAddW( &state, (intptr_t)(ONE_READER-WRITER));
+    __TBB_ASSERT( state & READERS, "invalid state after downgrade: no readers" );
 }
 
-void spin_rw_mutex::internal_release_reader(spin_rw_mutex *mutex)
+//! Release read lock on the given mutex
+void spin_rw_mutex_v3::internal_release_reader()
 {
-    __TBB_ASSERT( mutex->state & READERS, "invalid state of a read lock: no readers" );
-    __TBB_ASSERT( !(mutex->state & WRITER), "invalid state of a read lock: active writer" );
-    ITT_NOTIFY(sync_releasing, mutex); // release reader
-    __TBB_FetchAndAddWrelease((volatile void *)&(mutex->state),-(intptr)ONE_READER);
+    __TBB_ASSERT( state & READERS, "invalid state of a read lock: no readers" );
+    ITT_NOTIFY(sync_releasing, this); // release reader
+    __TBB_FetchAndAddWrelease( &state,-(intptr_t)ONE_READER);
 }
 
-bool spin_rw_mutex::internal_try_acquire_writer( spin_rw_mutex * mutex )
+//! Try to acquire write lock on the given mutex
+bool spin_rw_mutex_v3::internal_try_acquire_writer()
 {
-// for a writer: only possible to acquire if no active readers or writers
-    state_t s = mutex->state; // on Itanium, this volatile load has acquire semantic
+    // for a writer: only possible to acquire if no active readers or writers
+    state_t s = state;
     if( !(s & BUSY) ) // no readers, no writers; mask is 1..1101
-        if( CAS(mutex->state, WRITER, s) ) {
-            ITT_NOTIFY(sync_acquired, mutex);
+        if( CAS(state, WRITER, s)==s ) {
+            ITT_NOTIFY(sync_acquired, this);
             return true; // successfully stored writer flag
         }
     return false;
 }
 
-bool spin_rw_mutex::internal_try_acquire_reader( spin_rw_mutex * mutex )
+//! Try to acquire read lock on the given mutex
+bool spin_rw_mutex_v3::internal_try_acquire_reader()
 {
-// for a reader: acquire if no active or waiting writers
-    state_t s = mutex->state;    // on Itanium, a load of volatile variable has acquire semantic
-    while( !(s & (WRITER|WRITER_PENDING)) ) // no writers
-        if( CAS(mutex->state, s+ONE_READER, s) ) {
-            ITT_NOTIFY(sync_acquired, mutex);
+    // for a reader: acquire if no active or waiting writers
+    state_t s = state;
+    if( !(s & (WRITER|WRITER_PENDING)) ) { // no writers
+        state_t t = (state_t)__TBB_FetchAndAddW( &state, (intptr_t) ONE_READER );
+        if( !( t&WRITER )) {  // got the lock
+            ITT_NOTIFY(sync_acquired, this);
             return true; // successfully stored increased number of readers
         }
+        // writer got there first, undo the increment
+        __TBB_FetchAndAddW( &state, -(intptr_t)ONE_READER );
+    }
     return false;
 }
 
diff --git a/src/tbb/task.cpp b/src/tbb/task.cpp
index 88fd8a8..389e42c 100644
--- a/src/tbb/task.cpp
+++ b/src/tbb/task.cpp
@@ -41,7 +41,6 @@
     #include <windows.h>
     #include <process.h>        /* Need _beginthreadex from there */
     #include <malloc.h>         /* Need _alloca from there */
-    const size_t ThreadStackSize = 1<<20;
 
 #else
 
@@ -57,12 +56,14 @@
 #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. */
 #define private public
 #include "tbb/task.h"
+#if __TBB_EXCEPTIONS
+#include "tbb/tbb_exception.h"
+#endif /* __TBB_EXCEPTIONS */
 #undef private
 
 #include "tbb/task_scheduler_init.h"
@@ -73,6 +74,21 @@
 #include "tbb/mutex.h"
 #include "tbb/atomic.h"
 #include "tbb/gate.h"
+#if __TBB_SCHEDULER_OBSERVER
+#include "tbb/task_scheduler_observer.h"
+#include "tbb/spin_rw_mutex.h"
+#include "tbb/aligned_space.h"
+#endif /* __TBB_SCHEDULER_OBSERVER */
+#if __TBB_EXCEPTIONS
+#include "tbb/spin_mutex.h"
+#endif /* __TBB_EXCEPTIONS */
+
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (disable: 4312 4244 4267)
+#endif /* _MSC_VER && _Wp64 */
+
+#include "tbb/partitioner.h"
 
 #if DO_TBB_TRACE
 #include <cstdio>
@@ -96,6 +112,15 @@
 #define GATHER_STATISTIC(x) ((void)0)
 #endif /* STATISTICS */
 
+#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_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 */
+
 namespace tbb {
 
 using namespace std;
@@ -105,10 +130,188 @@ namespace internal {
 //! 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;
+
 template<typename SchedulerTraits> class CustomScheduler;
 
 typedef task::depth_type depth_type;
 
+class mail_outbox;
+
+struct task_proxy: public task {
+    static const intptr pool_bit = 1;
+    static const intptr mailbox_bit = 2;
+    /* All but two low-order bits represent a (task*).
+       Two low-order bits mean:
+       1 = proxy is/was/will be in task pool
+       2 = proxy is/was/will be in mailbox */
+    intptr task_and_tag;
+
+    //! Pointer to next task_proxy in a mailbox
+    task_proxy* next_in_mailbox;
+
+    //! Mailbox to which this was mailed.
+    mail_outbox* outbox;
+};
+
+//! Internal representation of mail_outbox, without padding.
+class unpadded_mail_outbox {
+protected:
+    //! Pointer to first task_proxy in mailbox, or NULL if box is empty. 
+    task_proxy* my_first;
+
+    //! Pointer to last task_proxy in mailbox, or NULL if box is empty. 
+    /** Low-order bit set to 1 to represent lock on the box. */
+    task_proxy* my_last;
+
+    //! Owner of mailbox is not executing a task, and has drained its own task pool.
+    bool my_is_idle;
+};
+
+//! Class representing where mail is put.
+/** Padded to occupy a cache line. */
+class mail_outbox: unpadded_mail_outbox {
+    char pad[NFS_MaxLineSize-sizeof(unpadded_mail_outbox)];
+
+    //! Acquire lock on the box.
+    task_proxy* acquire() {
+        ExponentialBackoff backoff;
+        for(;;) {
+            // No fence on load, because subsequent compare-and-swap has the necessary fence.
+            intptr last = (intptr)my_last;
+            if( (last&1)==0 && __TBB_CompareAndSwapW(&my_last,last|1,last)==last) {
+                __TBB_ASSERT( (my_first==NULL)==((intptr(my_last)&~1)==0), NULL );
+                return (task_proxy*)last;
+            }
+            backoff.pause();
+        }
+    }
+    task_proxy* internal_pop() {
+        //! No fence on load of my_first, because if it is NULL, there's nothing further to read from another thread.
+        task_proxy* result = my_first;
+        if( result ) {
+            if( task_proxy* f = __TBB_load_with_acquire(result->next_in_mailbox) ) {
+                // No lock required
+                __TBB_store_with_release( my_first, f );
+            } else {
+                // acquire() has the necessary fence.
+                task_proxy* l = acquire();
+                __TBB_ASSERT(result==my_first,NULL); 
+                if( !(my_first = result->next_in_mailbox) ) 
+                    l=0;
+                __TBB_store_with_release( my_last, l );
+            }
+        }
+        return result;
+    }
+public:
+    friend class mail_inbox;
+
+    //! Push task_proxy onto the mailbox queue of another thread.
+    void push( task_proxy& t ) {
+        __TBB_ASSERT(&t!=NULL, NULL);
+        t.next_in_mailbox = NULL; 
+        if( task_proxy* l = acquire() ) {
+            l->next_in_mailbox = &t;
+        } else {
+            my_first=&t;
+        }
+        // Fence required because caller is sending the task_proxy to another thread.
+        __TBB_store_with_release( my_last, &t );
+    }
+#if TBB_DO_ASSERT
+    //! Verify that *this is initialized empty mailbox.
+    /** Raise assertion if *this is not in initialized state, or sizeof(this) is wrong.
+        Instead of providing a constructor, we provide this assertion, because for
+        brevity and speed, we depend upon a memset to initialize instances of this class */
+    void assert_is_initialized() const {
+        __TBB_ASSERT( sizeof(*this)==NFS_MaxLineSize, NULL );
+        __TBB_ASSERT( !my_first, NULL );
+        __TBB_ASSERT( !my_last, NULL );
+        __TBB_ASSERT( !my_is_idle, NULL );
+    }
+#endif /* TBB_DO_ASSERT */
+
+    //! Drain the mailbox 
+    intptr drain() {
+        intptr k = 0;
+        // No fences here because other threads have already quit.
+        for( ; task_proxy* t = my_first; ++k ) {
+            my_first = t->next_in_mailbox;
+            NFS_Free((char*)t-task_prefix_reservation_size);
+        }
+        return k;  
+    }
+
+    //! True if thread that owns this mailbox is looking for work.
+    bool recipient_is_idle() {
+        return my_is_idle;
+    }
+};
+
+//! Class representing source of mail.
+class mail_inbox {
+    //! Corresponding sink where mail that we receive will be put.
+    mail_outbox* my_putter;
+public:
+    //! Construct unattached inbox
+    mail_inbox() : my_putter(NULL) {}
+
+    //! Attach inbox to a corresponding outbox. 
+    void attach( mail_outbox& putter ) {
+        __TBB_ASSERT(!my_putter,"already attached");
+        my_putter = &putter;
+    }
+    //! Detach inbox from its outbox
+    void detach() {
+        __TBB_ASSERT(my_putter,"not attached");
+        my_putter = NULL;
+    }
+    //! Get next piece of mail, or NULL if mailbox is empty.
+    task_proxy* pop() {
+        return my_putter->internal_pop();
+    }
+    void set_is_idle( bool value ) {
+        if( my_putter ) {
+            __TBB_ASSERT( my_putter->my_is_idle==!value, NULL );
+            my_putter->my_is_idle = value;
+        }
+    }
+#if DO_ITT_NOTIFY
+    //! Get pointer to corresponding outbox used for ITT_NOTIFY calls.
+    void* outbox() const {return my_putter;}
+#endif /* DO_ITT_NOTIFY */ 
+};
+
+#if __TBB_SCHEDULER_OBSERVER
+//------------------------------------------------------------------------
+// observer_proxy
+//------------------------------------------------------------------------
+class observer_proxy {
+    friend class task_scheduler_observer_v3;
+    //! Reference count used for garbage collection.
+    /** 1 for reference from my task_scheduler_observer.
+        1 for each local_last_observer_proxy that points to me. 
+        No accounting for predecessor in the global list. 
+        No accounting for global_last_observer_proxy that points to me. */
+    atomic<int> gc_ref_count;
+    //! Pointer to next task_scheduler_observer 
+    /** Valid even when *this has been removed from the global list. */
+    observer_proxy* next; 
+    //! Pointer to previous task_scheduler_observer in global list.
+    observer_proxy* prev; 
+    //! Associated observer
+    task_scheduler_observer* observer;
+    //! Account for removing reference from p.  No effect if p is NULL.
+    void remove_ref_slow();
+    void remove_from_list(); 
+    observer_proxy( task_scheduler_observer_v3& wo ); 
+public:
+    static observer_proxy* process_list( observer_proxy* local_last, bool is_worker, bool is_entry );
+};
+#endif /* __TBB_SCHEDULER_OBSERVER */
 
 //------------------------------------------------------------------------
 // TaskPool
@@ -125,7 +328,7 @@ class TaskPoolPrefix {
 
     friend class GenericScheduler;
     friend class TaskPool;
-};
+}; // class TaskPoolPrefix
 
 //! Pool of tasks, organized as a deque.
 class TaskPool {
@@ -180,8 +383,8 @@ class GenericScheduler;
 
 struct WorkerDescriptor {
     Arena* arena;
-    //! NULL until worker is published.
-    GenericScheduler* volatile scheduler;
+    //! 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;
@@ -192,6 +395,9 @@ struct WorkerDescriptor {
     unsigned long dummy_handle;
 #endif /* USE_WINTHREAD */
 
+    //! Stack size for working threads.
+    stack_size_type thread_stack_size;
+    
     //! Start worker thread for this descriptor.
     void start_one_worker_thread();
 };
@@ -201,7 +407,9 @@ class UnpaddedArenaPrefix {
     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;
 
     //! One more than index of highest arena slot currently in use.
     atomic<size_t> limit;
@@ -264,7 +472,7 @@ struct UnpaddedArenaSlot {
         -2 denotes an empty task pool
         -3 denotes an unused arena slot that is locked
         -4 denotes an unused arena slot that is unlocked */
-    volatile depth_type steal_end;
+    depth_type steal_end;
     TaskPool* task_pool;
     bool owner_waits;
 };
@@ -276,19 +484,28 @@ struct ArenaSlot: UnpaddedArenaSlot {
 class Arena {
     friend class GenericScheduler;
     template<typename SchedulerTraits> friend class internal::CustomScheduler;
+    friend size_t get_initial_auto_partitioner_divisor();
     friend class tbb::task_scheduler_init;
 
     //! 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" );
+        __TBB_ASSERT( id <= prefix().number_of_slots, "id out of bounds" );
+        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. */
-    static Arena* allocate_arena( unsigned number_of_slots, unsigned number_of_workers );
+    static Arena* allocate_arena( unsigned number_of_slots, unsigned number_of_workers, stack_size_type stack_size );
 
     void free_arena() {
-        NFS_Free( &prefix() );
+        NFS_Free( &mailbox(prefix().number_of_slots) );
     }
 
     //! Terminate worker threads
@@ -308,7 +525,7 @@ class Arena {
 };
 
 //------------------------------------------------------------------------
-// Traits classes for scheduler
+//! Traits classes for scheduler
 //------------------------------------------------------------------------
 
 struct DefaultSchedulerTraits {
@@ -328,15 +545,67 @@ struct IntelSchedulerTraits {
 };
 
 //------------------------------------------------------------------------
+// Class __TBB_InitOnce
+//------------------------------------------------------------------------
+
+//! Class handles acquisition and release of global resources during startup and shutdown. 
+/** Currently, its job is to deal with initializing/deleting
+    OneTimeInitializationCriticalSection (on Windows only)
+    and allocating/freeing thread-local storage. */
+class __TBB_InitOnce {
+    static atomic<int> count;
+
+    //! Platform specific code to acquire resources.
+    static void acquire_resources();
+
+    //! Platform specific code to release resources.
+    static void release_resources();
+public:
+    //! 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 . */
+    ~__TBB_InitOnce();
+
+    //! Add reference to resources.  If first reference added, acquire the resources.
+    static void add_ref() {
+        if( ++count==1 ) 
+            acquire_resources();
+    }
+    //! Remove reference to resources.  If last reference added, release the resources.
+    static void remove_ref() {
+        int k = --count;
+        __TBB_ASSERT(k>=0,"removed __TBB_InitOnce ref that was not added?"); 
+        if( k==0 ) 
+            release_resources();
+    }
+};
+
+//------------------------------------------------------------------------
 // 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 *volatile TheArena;
+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;
@@ -351,19 +620,34 @@ namespace tbb {
 namespace internal {
 
 //! Flag that is set to true after one-time initializations are done.
-static volatile bool OneTimeInitializationsDone;
+static bool OneTimeInitializationsDone;
 
-#if USE_WINTHREAD
+//! Counter of references to TLS.
+atomic<int> __TBB_InitOnce::count;
+
+#if _WIN32||_WIN64
 static CRITICAL_SECTION OneTimeInitializationCriticalSection;
 //! 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
+#if __TBB_TASK_CPP_DIRECTLY_INCLUDED
+static __TBB_InitOnce __TBB_InitOnceHiddenInstance;
+#endif
+
+#else /* not Windows */
 static pthread_mutex_t OneTimeInitializationMutex = PTHREAD_MUTEX_INITIALIZER;
 static pthread_key_t TLS_Key;
-#endif /* USE_WINTHREAD */
+#if (__linux__ || __APPLE__) && __GNUC__ && !(__INTEL_COMPILER && __TBB_ipf)
+// Use GCC-style attribute to set the highest initialization priority (the lowest possible number)
+// ICC for IA-64 has a bug in handling init_priority so skipping in this case
+static __TBB_InitOnce __TBB_InitOnceHiddenInstance __attribute__((init_priority (101)));
+#else
+static __TBB_InitOnce __TBB_InitOnceHiddenInstance;
+#endif
+
+#endif /* _WIN32||_WIN64 */
 
 //! Table of primes used by fast random-number generator.
 /** Also serves to keep anything else from being placed in the same
@@ -387,47 +671,83 @@ static const unsigned Primes[] = {
     0x3d2402a3, 0x6bdef3c9, 0xbec333cd, 0x40c9520f
 };
 
+#if STATISTICS
+//! Class for collecting statistics
+/** There should be only one instance of this class. 
+    Results are written to a file "statistics.txt" in tab-separated format. */
+static class statistics {
+public:
+    statistics() {
+        my_file = fopen("statistics.txt","w");
+        if( !my_file ) {
+            perror("fopen(\"statistics.txt\"\")");
+            exit(1);
+        }
+        fprintf(my_file,"%13s\t%13s\t%13s\t%13s\t%13s\t%13s\n", "execute", "steal", "mail", "proxy_execute", "proxy_steal", "proxy_bypass" );
+    }
+    ~statistics() {
+        fclose(my_file);
+    }
+    void record( long execute_count, long steal_count, long mail_received_count, 
+                 long proxy_execute_count, long proxy_steal_count, long proxy_bypass_count ) {
+        mutex::scoped_lock lock(my_mutex);
+        fprintf (my_file,"%13ld\t%13ld\t%13ld\t%13ld\t%13ld\t%13ld\n", execute_count, steal_count, mail_received_count, 
+                                                           proxy_execute_count, proxy_steal_count, proxy_bypass_count );
+    }
+private:
+    //! File into which statistics are written.
+    FILE* my_file;
+    //! Mutex that serializes accesses to my_file
+    mutex my_mutex;
+} the_statistics;
+#endif /* STATISTICS */
+
+#if __TBB_EXCEPTIONS
+    struct scheduler_list_node_t {
+        scheduler_list_node_t *my_prev,
+                              *my_next;
+    };
+
+    //! Head of the list of master thread schedulers.
+    static scheduler_list_node_t the_scheduler_list_head;
+
+    //! Mutex protecting access to the list of schedulers.
+    static mutex the_scheduler_list_mutex;
+
+//! Counter that is incremented whenever new cancellation signal is sent to a task group.
+/** Together with GenericScheduler::local_cancel_count forms cross-thread signaling
+    mechanism that allows to avoid locking at the hot path of normal execution flow.
+
+    When a descendant task group context is being registered or unregistered,
+    the global and local counters are compared. If they differ, it means that 
+    a cancellation signal is being propagated, and registration/deregistration
+    routines take slower branch that may block (at most one thread of the pool
+    can be blocked at any moment). Otherwise the control path is lock-free and fast. **/
+    static uintptr_t global_cancel_count = 0;
+
+    //! Context to be associated with dummy tasks of worker threads schedulers.
+    /** It is never used for its direct purpose, and is introduced solely for the sake 
+        of avoiding one extra conditional branch in the end of wait_for_all method. **/
+    static task_group_context dummy_context(task_group_context::isolated);
+#endif /* __TBB_EXCEPTIONS */
+
+//------------------------------------------------------------------------
+// End of shared data layout
+//------------------------------------------------------------------------
+
 //! Amount of time to pause between steals.
-/** The default values below were found to be best empircally for K-Means
+/** The default values below were found to be best empirically for K-Means
     on the 32-way Altix and 4-way (*2 for HT) fxqlin04. */
 #if __TBB_ipf
-static long PauseTime = 1500;
+static const long PauseTime = 1500;
 #else 
-static long PauseTime = 80;
+static const long PauseTime = 80;
 #endif
 
 //------------------------------------------------------------------------
-// End of shared data layout
-//------------------------------------------------------------------------
-
-//------------------------------------------------------------------------
 // One-time Initializations
 //------------------------------------------------------------------------
 
-//! True if running on genuine Intel hardware
-static inline bool IsGenuineIntel() {
-    bool result = true;
-#if defined(__TBB_cpuid)
-    char info[16];
-    char *genuine_string = "GenuntelineI";
-    __TBB_x86_cpuid( reinterpret_cast<int *>(info), 0 );
-    // The multibyte chars below spell "GenuineIntel".
-    //if( info[1]=='uneG' && info[3]=='Ieni' && info[2]=='letn' ) {
-    //    result = true;
-    //}
-    for (int i = 4; i < 16; ++i) {
-        if ( info[i] != genuine_string[i-4] ) {
-            result = false;
-            break;
-        }
-    }
-#elif __TBB_ipf
-    result = true;
-#else
-    result = false;
-#endif
-    return result;
-}
 
 //! Defined in cache_aligned_allocator.cpp
 extern void initialize_cache_aligned_allocator();
@@ -440,13 +760,11 @@ void DoOneTimeInitializations() {
 #else
     EnterCriticalSection( &OneTimeInitializationCriticalSection );
 #endif /* USE_PTHREAD */
+    // No fence required for load of OneTimeInitializationsDone, because we are inside a critical section.
     if( !OneTimeInitializationsDone ) {
+        __TBB_InitOnce::add_ref();
         if( GetBoolEnvironmentVariable("TBB_VERSION") )
             PrintVersion();
-#if USE_PTHREAD
-        // Create key for thread-local storage
-        status = pthread_key_create( &TLS_Key, NULL );
-#endif /* USE_PTHREAD */
         bool have_itt = false;
 #if DO_ITT_NOTIFY
         have_itt = InitializeITT();
@@ -456,6 +774,10 @@ void DoOneTimeInitializations() {
             SchedulerTraitsId = IntelSchedulerTraits::id;
         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;
     }
 #if USE_PTHREAD
@@ -467,39 +789,82 @@ void DoOneTimeInitializations() {
 #endif /* USE_PTHREAD */
 }
 
+//------------------------------------------------------------------------
+// Methods of class __TBB_InitOnce
+//------------------------------------------------------------------------
+
+__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) ) {
+        // Remove reference that we added in DoOneTimeInitializations.
+        remove_ref();  
+    }
+} 
+
 #if _WIN32||_WIN64
-extern "C" bool WINAPI DllMain( HANDLE hinstDLL, DWORD reason, LPVOID lpvReserved );
+void __TBB_InitOnce::acquire_resources() {
+    TLS_Index = TlsAlloc();
+    if( TLS_Index!=TLS_OUT_OF_INDEXES ) {
+        InitializeCriticalSection(&OneTimeInitializationCriticalSection);
+    } else {
+#if TBB_DO_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_DO_ASSERT */
+    }
+}
 
+void __TBB_InitOnce::release_resources() {
+    DeleteCriticalSection(&OneTimeInitializationCriticalSection);
+#if TBB_DO_ASSERT
+    if( TlsGetValue(TLS_Index) ) {
+        fprintf( stderr, "TBB is unloaded while tbb::task_scheduler_init object is alive?" );
+    }
+#endif /* TBB_DO_ASSERT */
+    TlsFree(TLS_Index);
+    TLS_Index = 0;
+}
+
+#if !__TBB_TASK_CPP_DIRECTLY_INCLUDED
 //! Windows "DllMain" that handles startup and shutdown of dynamic library.
-/** Currently, its job is to deal with initializing/deleting
-    OneTimeInitializationCriticalSection and allocating/freeing TLS_Index. */
+extern "C" bool WINAPI DllMain( HANDLE hinstDLL, DWORD reason, LPVOID lpvReserved );
 bool WINAPI DllMain( HANDLE hinstDLL, DWORD reason, LPVOID lpvReserved ) {
     switch( reason ) {
         case DLL_PROCESS_ATTACH:
-            TLS_Index = TlsAlloc();
-            if( TLS_Index==TLS_OUT_OF_INDEXES ) {
-#if TBB_DO_ASSERT
-                // Issue diagnostic here, not failing assertion, because client
-                // might want to test graceful recovery from this problem.
-                fprintf( stderr, "DllMain for TBB: TlsAlloc() returned TLS_OUT_OF_INDEXES\n" );
-#endif /* TBB_DO_ASSERT */
-                return false;
-            }
-            InitializeCriticalSection(&OneTimeInitializationCriticalSection);
+            __TBB_InitOnce::add_ref();
             break;
         case DLL_PROCESS_DETACH:
-            DeleteCriticalSection(&OneTimeInitializationCriticalSection);
-#if TBB_DO_ASSERT
-            if( TlsGetValue(TLS_Index) ) {
-                fprintf( stderr, "DllMain for TBB: thread quit without destroying its tbb::task_scheduler_init object?" );
+            __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) ) {
+                // Remove reference that we added in DoOneTimeInitializations.
+                __TBB_InitOnce::remove_ref();
             }
-#endif /* TBB_DO_ASSERT */
-            TlsFree(TLS_Index);
-            TLS_Index = 0;
             break;
     }
     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 */
 
 //------------------------------------------------------------------------
@@ -517,7 +882,7 @@ static inline void SetThreadSpecific( GenericScheduler* s ) {
 //! 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 proved that it cannot be NULL. */
+    contexts, we can prove that it cannot be NULL. */
 static inline GenericScheduler* GetThreadSpecific() {
     GenericScheduler *result;
     // The assertion on OneTimeInitializationsDone checks that we can safely
@@ -579,32 +944,42 @@ class GenericScheduler: public scheduler {
     friend struct WorkerDescriptor;
     friend class Arena;
     friend class allocate_root_proxy;
+#if __TBB_EXCEPTIONS
+    friend class allocate_root_with_context_proxy;
+    friend class tbb::task_group_context;
+#endif /* __TBB_EXCEPTIONS */
+#if __TBB_SCHEDULER_OBSERVER
+    friend class task_scheduler_observer_v3;
+#endif /* __TBB_SCHEDULER_OBSERVER */
     friend class scheduler;
     template<typename SchedulerTraits> friend class internal::CustomScheduler;
 
-    //! Number of bytes reserved for a task prefix
-    /** If not exactly sizeof(task_prefix), the extra bytes *preceed* the task_prefix. */
-    static const size_t task_prefix_reservation_size = ((sizeof(internal::task_prefix)-1)/task_alignment+1)*task_alignment;
-
     //! If sizeof(task) is <=quick_task_size, it is handled on a free list instead of malloc'd.
     static const size_t quick_task_size = 256-task_prefix_reservation_size;
 
-    //! Bit masks
-    enum debug_state_t {
-#if TBB_DO_ASSERT
-        ds_debug = 1<<0,
-        ds_ref_count_active = 1<<1
-#else
-        ds_release = 0
-#endif /* TBB_DO_ASSERT */
+    //! Definitions for bits in task_prefix::extra_state
+    enum internal_state_t {
+        //! Tag for TBB <3.0 tasks.
+        es_version_2_task = 0,
+        //! Tag for TBB 3.0 tasks.
+        es_version_3_task = 1,
+        //! 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
     };
+    
+    static bool is_version_3_task( task& t ) {
+        return (t.prefix().extra_state & 0x3F)==0x1;
+    }
 
     //! Deepest non-empty level.
     /** Not read by thieves. -1 if array is empty. */
     depth_type deepest;
 
     //! The physical number of slots in "array".
-    /** Read by thieves. */
     TaskPool::size_type array_size;
 
     //! Dummy slot used when scheduler is not in arena
@@ -630,14 +1005,60 @@ class GenericScheduler: public scheduler {
     task* dummy_task;
 
     //! Reference count for scheduler
+    /** Number of task_scheduler_init objects that point to this scheduler */
     long ref_count;
 
-#if !IMPROVED_GATING
-    //! Set to non-null temporarily when entering arena
-    /** Always NULL if insert_task is not running. */
-    Gate* open_gate;
-#endif /* IMPROVED_GATING */
+    mail_inbox inbox;
 
+    void attach_mailbox( affinity_id id ) {
+        __TBB_ASSERT(id>0,NULL);
+        inbox.attach( arena->mailbox(id) );
+        my_affinity_id = id;
+    }
+
+    //! 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.
+                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;
+
+    //! 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);
+    }
+
+    //! 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_SCHEDULER_OBSERVER
+    //! Last observer_proxy processed by this scheduler
+    observer_proxy* local_last_observer_proxy;
+
+    //! Notify any entry observers that have been created since the last call by this thread.
+    void notify_entry_observers() {
+        local_last_observer_proxy = observer_proxy::process_list(local_last_observer_proxy,is_worker(),/*is_entry=*/true);
+    }
+ 
+    //! Notify all exit observers that this thread is no longer participating in task scheduling.
+    void notify_exit_observers( bool is_worker ) {
+        observer_proxy::process_list(local_last_observer_proxy,is_worker,/*is_entry=*/false);
+    }
+#endif /* __TBB_SCHEDULER_OBSERVER */
 
 #if COUNT_TASK_NODES
     //! Net number of big task objects that have been allocated but not yet freed.
@@ -645,13 +1066,19 @@ class GenericScheduler: public scheduler {
 #endif /* COUNT_TASK_NODES */
 
 #if STATISTICS
-    long execute_count;
-    long steal_count;
     long current_active;
     long current_length;
     //! Number of big tasks that have been malloc'd.
     /** To find total number of tasks malloc'd, compute (current_big_malloc+small_task_count) */
     long current_big_malloc;
+    long execute_count;
+    //! Number of tasks stolen
+    long steal_count;
+    //! Number of tasks received from mailbox
+    long mail_received_count;
+    long proxy_execute_count;
+    long proxy_steal_count;
+    long proxy_bypass_count;
 #endif /* STATISTICS */
 
     //! Try to enter the arena
@@ -672,6 +1099,21 @@ class GenericScheduler: public scheduler {
         Otherwise returns NULL. */
     task* get_task( depth_type d );
 
+    //! Attempt to get a task from the mailbox.
+    /** Called only by the thread that owns *this.
+        Gets a task only if there is one not yet executed by another thread.
+        If successful, unlinks the task and returns a pointer to it.
+        Otherwise returns NULL. */
+    task* get_mailbox_task();
+
+    //! True if t is a task_proxy
+    static bool is_proxy( const task& t ) {
+        return t.prefix().extra_state==es_task_proxy;
+    }
+
+    /** Return NULL if underlying task was claimed by mailbox. */
+    task* strip_proxy( task_proxy* result );
+
     //! Steal task from another scheduler's ready pool.
     task* steal_task( UnpaddedArenaSlot& arena_slot, depth_type d );
 
@@ -726,7 +1168,11 @@ 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 /* __TBB_EXCEPTIONS */
 
     //! Optimization hint to free_task that enables it omit unnecessary tests and code.
     enum hint {
@@ -747,11 +1193,21 @@ public:
     template<hint h>
     void free_task( task& t );
 
+    void free_task_proxy( task_proxy& tp ) {
+#if TBB_DO_ASSERT
+        poison_pointer( tp.outbox );
+        poison_pointer( tp.next_in_mailbox );
+        tp.task_and_tag = 0xDEADBEEF;
+#endif /* TBB_DO_ASSERT */
+        free_task<is_small>(tp);
+    }
 
+    //! Return task object to the memory allocator.
     void deallocate_task( task& t ) {
 #if TBB_DO_ASSERT
         task_prefix& p = t.prefix();
         p.state = 0xFF;
+        p.extra_state = 0xFF; 
         poison_pointer(p.next);
 #endif /* TBB_DO_ASSERT */
         NFS_Free((char*)&t-task_prefix_reservation_size);
@@ -765,7 +1221,6 @@ public:
         return (dummy_slot.task_pool->prefix().arena_index < arena->prefix().number_of_workers);
     }
 
-#if IMPROVED_GATING
     //! No tasks to steal since last snapshot was taken
     static const Gate::state_t SNAPSHOT_EMPTY = 0;
 
@@ -781,8 +1236,7 @@ public:
     //! 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();
-#endif /* IMPROVED_GATING */
-
+                 
 #if TEST_ASSEMBLY_ROUTINES
     /** Defined in test_assembly.cpp */
     void test_assembly_routines();
@@ -792,7 +1246,7 @@ public:
     intptr get_task_node_count( bool count_arena_workers = false ) {
         return task_node_count + (count_arena_workers? arena->workers_task_node_count(): 0);
     }
-#endif
+#endif /* COUNT_TASK_NODES */
 
     //! Special value used to mark return_list as not taking any more entries.
     static task* plugged_return_list() {return (task*)(intptr)(-1);}
@@ -801,15 +1255,75 @@ public:
     intptr small_task_count;
 
     //! List of small tasks that have been returned to this scheduler by other schedulers.
-    // FIXME - see if puting return_list on separate cache line improves performance, 
-    // e.g. on a prefix of the scheduler
-    task* volatile return_list;    
+    task* return_list;
 
     //! Free a small task t that that was allocated by a different scheduler 
     void free_nonlocal_small_task( task& t ); 
-};
 
+#if __TBB_EXCEPTIONS
+    //! Padding isolating thread local members from members that can be written to by other threads.
+    char _padding1[NFS_MaxLineSize - sizeof(context_list_node_t)];
+
+    //! Head of the thread specific list of task group contexts.
+    context_list_node_t context_list_head;
+
+    //! Mutex protecting access to the list of task group contexts.
+    spin_mutex context_list_mutex;
+
+    //! Used to form the list of master thread schedulers.
+    scheduler_list_node_t my_node;
+
+    //! Thread local counter of cancellation requests.
+    /** When this counter equals global_cancel_count, the cancellation state known
+        to this thread is synchronized with the global cancellation state.
+        \sa #global_cancel_count **/
+    uintptr_t local_cancel_count;
+
+    //! Propagates cancellation request to all descendants of the argument context.
+    void propagate_cancellation ( task_group_context* ctx );
+
+    //! Propagates cancellation request to contexts registered by this scheduler.
+    void propagate_cancellation ();
+#endif /* __TBB_EXCEPTIONS */
+}; // class GenericScheduler
+
+#if __TBB_EXCEPTIONS
+//------------------------------------------------------------------------
+// auto_empty_task
+//------------------------------------------------------------------------
+
+//! Smart holder for the empty task class with automatic destruction
+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 */
+        , my_scheduler(s)
+    {}
+    // empty_task has trivial destructor, so call free_task directly instead of going through destroy_task.
+    ~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
+//------------------------------------------------------------------------
+
+#if __TBB_EXCEPTIONS
+inline task& GenericScheduler::allocate_task( size_t number_of_bytes, depth_type depth, task* parent, task_group_context* context ) {
+#else
 inline task& GenericScheduler::allocate_task( size_t number_of_bytes, depth_type depth, task* parent ) {
+#endif /* __TBB_EXCEPTIONS */
     GATHER_STATISTIC(current_active+=1);
     task* t = free_list;
     if( number_of_bytes<=quick_task_size ) {
@@ -818,9 +1332,11 @@ inline task& GenericScheduler::allocate_task( size_t number_of_bytes, depth_type
             __TBB_ASSERT( t->state()==task::freed, "free list of tasks is corrupted" );
             free_list = t->prefix().next;
         } else if( return_list ) {
+            // No fence required for read of return_list above, because __TBB_FetchAndStoreW has a fence.
             t = (task*)__TBB_FetchAndStoreW( &return_list, 0 );
             __TBB_ASSERT( t, "another thread emptied the return_list" );
             __TBB_ASSERT( t->prefix().origin==this, "task returned to wrong return_list" );
+            ITT_NOTIFY( sync_acquired, &return_list );
             free_list = t->prefix().next;
         } else {
             t = (task*)((char*)NFS_Allocate( task_prefix_reservation_size+quick_task_size, 1, NULL ) + task_prefix_reservation_size );
@@ -839,17 +1355,17 @@ inline task& GenericScheduler::allocate_task( size_t number_of_bytes, depth_type
         t->prefix().origin = NULL;
     }
     task_prefix& p = t->prefix();
+#if __TBB_EXCEPTIONS
+    p.context = context;
+#endif /* __TBB_EXCEPTIONS */
     p.owner = this;
     p.ref_count = 0;
     p.depth = int(depth);
     p.parent = parent;
-#if TBB_DO_ASSERT
-    p.debug_state = GenericScheduler::ds_debug;
-#else
-    // Clear reserved0 so that if client compiles their code with TBB_DO_ASSERT set,
-    // the assertions in task.h that inspect debug_state still work.
-    p.reserved0 = GenericScheduler::ds_release;
-#endif /* TBB_DO_ASSERT */
+    // 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.
+    p.extra_state = 0;
+    p.affinity = 0;
     p.state = task::allocated;
     return *t;
 }
@@ -889,6 +1405,7 @@ void GenericScheduler::free_nonlocal_small_task( task& t ) {
             break;
         // Atomically insert t at head of s.return_list
         t.prefix().next = old; 
+        ITT_NOTIFY( sync_releasing, &s.return_list );
         if( __TBB_CompareAndSwapW( &s.return_list, (intptr)&t, (intptr)old )==(intptr)old ) 
             return;
     }
@@ -900,12 +1417,16 @@ void GenericScheduler::free_nonlocal_small_task( task& t ) {
     }
 }
 
-#if IMPROVED_GATING
 inline void GenericScheduler::mark_pool_full() {
-     // Double-check idiom
-     Gate::state_t snapshot = arena->prefix().gate.get_state();
-     if( snapshot!=SNAPSHOT_FULL && snapshot!=SNAPSHOT_PERMANENTLY_OPEN ) 
-         arena->prefix().gate.try_update( SNAPSHOT_FULL, SNAPSHOT_PERMANENTLY_OPEN, true );
+    // 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 && snapshot!=SNAPSHOT_PERMANENTLY_OPEN ) 
+        arena->prefix().gate.try_update( SNAPSHOT_FULL, SNAPSHOT_PERMANENTLY_OPEN, true );
 }
 
 bool GenericScheduler::wait_while_pool_is_empty() {
@@ -945,7 +1466,6 @@ bool GenericScheduler::wait_while_pool_is_empty() {
         }
     }
 }
-#endif /* IMPROVED_GATING */
 
 //------------------------------------------------------------------------
 // CustomScheduler
@@ -975,7 +1495,6 @@ public:
     }
 };
 
-
 //------------------------------------------------------------------------
 // AssertOkay
 //------------------------------------------------------------------------
@@ -994,13 +1513,14 @@ static bool AssertOkay( const task& task ) {
 //------------------------------------------------------------------------
 // Methods of Arena
 //------------------------------------------------------------------------
-Arena* Arena::allocate_arena( unsigned number_of_slots, unsigned number_of_workers ) {
+Arena* Arena::allocate_arena( unsigned number_of_slots, unsigned number_of_workers, stack_size_type stack_size) {
     __TBB_ASSERT( sizeof(ArenaPrefix) % NFS_GetLineSize()==0, "ArenaPrefix not multiple of cache line size" );
-    size_t n = sizeof(ArenaPrefix) + number_of_slots*sizeof(ArenaSlot);
+    __TBB_ASSERT( sizeof(mail_outbox)==NFS_MaxLineSize, NULL );
+    size_t n = sizeof(ArenaPrefix) + number_of_slots*(sizeof(mail_outbox)+sizeof(ArenaSlot));
 
     unsigned char* storage = (unsigned char*)NFS_Allocate( n, 1, NULL );
     memset( storage, 0, n );
-    Arena* a = (Arena*)(storage+sizeof(ArenaPrefix));
+    Arena* a = (Arena*)(storage + sizeof(ArenaPrefix)+ number_of_slots*(sizeof(mail_outbox)));
     __TBB_ASSERT( sizeof(a->slot[0]) % NFS_GetLineSize()==0, "Arena::slot size not multiple of cache line size" );
     __TBB_ASSERT( (uintptr)a % NFS_GetLineSize()==0, NULL );
     new( &a->prefix() ) ArenaPrefix( number_of_slots, number_of_workers );
@@ -1010,18 +1530,26 @@ Arena* Arena::allocate_arena( unsigned number_of_slots, unsigned number_of_worke
     memset( w, 0, sizeof(WorkerDescriptor)*(number_of_workers));
     a->prefix().worker_list = w;
 
+#if TBB_DO_ASSERT
+    // Verify that earlier memset initialized the mailboxes.
+    for( unsigned j=1; j<=number_of_slots; ++j )
+        a->mailbox(j).assert_is_initialized();
+#endif /* TBB_DO_ASSERT */
 
     size_t k;
     // Mark each worker slot as locked and unused
     for( k=0; k<number_of_workers; ++k ) {
         a->slot[k].steal_end = -3;
         w[k].arena = a;
+        w[k].thread_stack_size = stack_size;
     }
     // Mark rest of slots as unused
     for( ; k<number_of_slots; ++k )
         a->slot[k].steal_end = -4;
 
-    // Publish the Arena
+    // 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;
 
@@ -1035,25 +1563,21 @@ Arena* Arena::allocate_arena( unsigned number_of_slots, unsigned number_of_worke
 void Arena::terminate_workers() {
     int n = prefix().number_of_workers;
     __TBB_ASSERT( n>=0, "negative number of workers; casting error?" );
-#if IMPROVED_GATING
-    prefix().gate.try_update( GenericScheduler::SNAPSHOT_PERMANENTLY_OPEN, GenericScheduler::SNAPSHOT_PERMANENTLY_OPEN, true );
-#endif /* IMPROVED_GATING */
     for( int i=n; --i>=0; ) {
         WorkerDescriptor& w = prefix().worker_list[i];
         if( w.scheduler || __TBB_CompareAndSwapW( &w.scheduler, intptr(-1), intptr(0) ) ) {
             // Worker published itself.  Tell worker to quit.
-        ITT_NOTIFY(sync_acquired, &w.scheduler);
-        task* t = w.scheduler->dummy_task;
-        ITT_NOTIFY(sync_releasing, &t->prefix().ref_count);
-        t->prefix().ref_count = 1;
+            ITT_NOTIFY(sync_acquired, &w.scheduler);
+            task* t = __TBB_load_with_acquire(w.scheduler)->dummy_task;
+            ITT_NOTIFY(sync_releasing, &t->prefix().ref_count);
+            t->prefix().ref_count = 1;
         } else {
             // Worker did not publish itself yet, and we have set w.scheduler to -1, 
             // which tells the worker that it should never publish itself.
         }
     }
-#if !IMPROVED_GATING
-    prefix().gate.open();
-#endif /* IMPROVED_GATING */
+    // 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];
@@ -1074,14 +1598,19 @@ void Arena::terminate_workers() {
         }
     }
     // All workers have quit
-#if !IMPROVED_GATING
-    prefix().gate.close();
-#endif /* !IMPROVED_GATING */
-#if COUNT_TASK_NODES && !TEST_ASSEMBLY_ROUTINES
+    // 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 /* COUNT_TASK_NODES && !TEST_ASSEMBLY_ROUTINES */
+#endif /* !TEST_ASSEMBLY_ROUTINES */
+#endif /* COUNT_TASK_NODES */
     remove_gc_reference();
 }
 
@@ -1113,13 +1642,6 @@ intptr Arena::workers_task_node_count() {
 #pragma warning(disable:4355)
 #endif
 GenericScheduler::GenericScheduler( Arena* arena_ ) :
-#if STATISTICS
-    current_active(0),
-    current_length(0),
-    current_big_malloc(0),
-    steal_count(0),
-    execute_count(0),
-#endif /* STATISTICS */
     deepest(-1),
     array_size(0),
     arena_slot(&dummy_slot),
@@ -1128,15 +1650,28 @@ GenericScheduler::GenericScheduler( Arena* arena_ ) :
     free_list(NULL),
     innermost_running_task(NULL),
     dummy_task(NULL),
-    ref_count(1)
-#if !IMPROVED_GATING
-   ,open_gate(NULL)
-#endif /* !IMPROVE_GATING */
-#if TBB_DO_ASSERT
-   ,task_node_count(0)
-#endif /* TBB_DO_ASSERT */
-   ,small_task_count(1)   // Extra 1 is a guard reference
-   ,return_list(NULL)
+    ref_count(1),
+    my_affinity_id(0),
+    occupy_tls(false),
+#if __TBB_SCHEDULER_OBSERVER
+    local_last_observer_proxy(NULL),
+#endif /* __TBB_SCHEDULER_OBSERVER */
+#if COUNT_TASK_NODES
+   task_node_count(0),
+#endif /* COUNT_TASK_NODES */
+#if STATISTICS
+    current_active(0),
+    current_length(0),
+    current_big_malloc(0),
+    execute_count(0),
+    steal_count(0),
+    mail_received_count(0),
+    proxy_execute_count(0),
+    proxy_steal_count(0),
+    proxy_bypass_count(0),
+#endif /* STATISTICS */
+    small_task_count(1),   // Extra 1 is a guard reference
+    return_list(NULL)
 {
     TaskPool* t = TaskPool::allocate_task_pool(TaskPool::min_array_size);
     dummy_slot.task_pool = t;
@@ -1145,11 +1680,15 @@ GenericScheduler::GenericScheduler( Arena* arena_ ) :
     dummy_slot.steal_end = -2;
     dummy_slot.owner_waits = false;
     array_size = TaskPool::min_array_size;
+#if __TBB_EXCEPTIONS
+    dummy_task = &allocate_task( sizeof(task), -1, NULL, NULL );
+    context_list_head.my_prev = &context_list_head;
+    context_list_head.my_next = &context_list_head;
+#else
     dummy_task = &allocate_task( sizeof(task), -1, NULL );
+#endif /* __TBB_EXCEPTIONS */
     dummy_task->prefix().ref_count = 2;
-    __TBB_ASSERT( assert_okay(), "contructor error" );
-    // Register scheduler in thread local storage
-    SetThreadSpecific(this);
+    __TBB_ASSERT( assert_okay(), "constructor error" );
 }
 
 #if TBB_DO_ASSERT||TEST_ASSEMBLY_ROUTINES
@@ -1172,6 +1711,71 @@ bool GenericScheduler::assert_okay() const {
 }
 #endif /* TBB_DO_ASSERT||TEST_ASSEMBLY_ROUTINES */
 
+#if __TBB_EXCEPTIONS
+
+void GenericScheduler::propagate_cancellation () {
+    spin_mutex::scoped_lock lock(context_list_mutex);
+    // Acquire fence is necessary to ensure that the subsequent node->my_next load 
+    // returned the correct value in case it was just inserted in another thread.
+    // The fence also ensures visibility of the correct my_parent value.
+    context_list_node_t *node = __TBB_load_with_acquire(context_list_head.my_next);
+    while ( node != &context_list_head ) {
+        task_group_context *ctx = __TBB_get_object_addr(task_group_context, my_node, node);
+            // 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.
+        if ( !ctx->my_cancellation_requested )
+            ctx->propagate_cancellation_from_ancestors();
+        node = node->my_next;
+    }
+}
+
+/** Propagates cancellation down the tree of dependent contexts by walking each 
+    thread's local list of contexts **/
+void GenericScheduler::propagate_cancellation ( task_group_context* ctx ) {
+    __TBB_ASSERT ( ctx->my_cancellation_requested, "No cancellation request in the context" );
+    // The whole propagation algorithm is under the lock in order to ensure correctness 
+    // in case of parallel cancellations at the different levels of the context tree.
+    // See the note 2 at the bottom of the file.
+    mutex::scoped_lock lock(the_scheduler_list_mutex);
+    // Advance global cancellation state
+    __TBB_FetchAndAddWrelease(&global_cancel_count, 1);
+    // First propagate to workers using arena to access their context lists
+    size_t num_workers = arena->prefix().number_of_workers;
+    for ( size_t i = 0; i < num_workers; ++i ) {
+        // No fence is necessary here since the context list of worker's scheduler 
+        // can contain anything of interest only after the first stealing was done
+        // by that worker. And doing it applies the necessary fence
+        GenericScheduler *s = arena->prefix().worker_list[i].scheduler;
+        // If the worker is in the middle of its startup sequence, skip it.
+        if ( s )
+            s->propagate_cancellation();
+    }
+    // Then propagate to masters using the global list of master's schedulers
+    scheduler_list_node_t *node = the_scheduler_list_head.my_next;
+    while ( node != &the_scheduler_list_head ) {
+        __TBB_get_object_addr(GenericScheduler, my_node, node)->propagate_cancellation();
+        node = node->my_next;
+    }
+    // Now sync up the local counters
+    for ( size_t i = 0; i < num_workers; ++i ) {
+        GenericScheduler *s = arena->prefix().worker_list[i].scheduler;
+        // If the worker is in the middle of its startup sequence, skip it.
+        if ( s )
+            s->local_cancel_count = global_cancel_count;
+    }
+    node = the_scheduler_list_head.my_next;
+    while ( node != &the_scheduler_list_head ) {
+        __TBB_get_object_addr(GenericScheduler, my_node, node)->local_cancel_count = global_cancel_count;
+        node = node->my_next;
+    }
+}
+#endif /* __TBB_EXCEPTIONS */
+
+
 void GenericScheduler::grow( TaskPool::size_type minimum_size ) {
     TBB_TRACE(("%p.grow(minimum_size=%lx)\n", this, minimum_size ));
     __TBB_ASSERT( assert_okay(), NULL );
@@ -1208,6 +1812,21 @@ void GenericScheduler::free_scheduler() {
     if( arena_slot!=&dummy_slot ) {
         leave_arena(/*compress=*/false);
     }
+    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
+    if ( context != &dummy_context) {
+        //! \todo Add assertion that master's dummy task context does not have children
+        context->task_group_context::~task_group_context();
+        NFS_Free(context);
+        {
+            mutex::scoped_lock lock(the_scheduler_list_mutex);
+            my_node.my_next->my_prev = my_node.my_prev;
+            my_node.my_prev->my_next = my_node.my_next;
+        }
+    }
+#endif /* __TBB_EXCEPTIONS */
     free_task<is_small_local>( *dummy_task );
 
     // k accounts for a guard reference and each task that we deallocate.
@@ -1226,9 +1845,12 @@ void GenericScheduler::free_scheduler() {
 #if COUNT_TASK_NODES
     arena->prefix().task_node_count += task_node_count;
 #endif /* COUNT_TASK_NODES */
+#if STATISTICS
+    the_statistics.record( execute_count, steal_count, mail_received_count,
+                           proxy_execute_count, proxy_steal_count, proxy_bypass_count );
+#endif /* STATISTICS */
     dummy_slot.task_pool->free_task_pool();
     dummy_slot.task_pool = NULL;
-    SetThreadSpecific( 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" );
     if( __TBB_FetchAndAddW( &small_task_count, -k )==k ) 
@@ -1280,7 +1902,7 @@ inline void GenericScheduler::release_task_pool() const {
     __TBB_ASSERT( dummy_slot.task_pool->prefix().steal_begin<=depth_type(array_size), NULL );
     __TBB_ASSERT( deepest<=depth_type(array_size), NULL );
     ITT_NOTIFY(sync_releasing, arena_slot);
-    arena_slot->steal_end = 2*deepest;
+    __TBB_store_with_release( arena_slot->steal_end, 2*deepest );
 }
 
 /** Conceptually, this method should be a member of class scheduler.
@@ -1288,7 +1910,9 @@ inline void GenericScheduler::release_task_pool() const {
 void GenericScheduler::spawn( task& first, task*& next ) {
     __TBB_ASSERT( assert_okay(), NULL );
     TBB_TRACE(("%p.internal_spawn enter\n", this ));
-    for( task* t = &first; ;  t = t->prefix().next ) 
+    task* first_ptr = &first;
+    task** link = &first_ptr;
+    for( task* t = first_ptr; ; t=*link )
     {
         __TBB_ASSERT( t->state()==task::allocated, "attempt to spawn task that is not in 'allocated' state" );
         __TBB_ASSERT( t->prefix().depth==first.prefix().depth, "tasks must have same depth" );
@@ -1299,16 +1923,37 @@ void GenericScheduler::spawn( task& first, task*& next ) {
             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().debug_state |= ds_ref_count_active;
+            parent->prefix().extra_state |= es_ref_count_active;
         }
 #endif /* TBB_DO_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 ) {
+#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 */
+            // Mark as a proxy
+            proxy.prefix().extra_state = es_task_proxy;
+            proxy.outbox = &arena->mailbox(dst_thread);
+            proxy.task_and_tag = intptr(t)|3;
+            proxy.next_in_mailbox = NULL;
+            // Link proxy into list where the original task was.
+            *link = &proxy;
+            link = &proxy.prefix().next;
+            proxy.prefix().next = t->prefix().next;
+            ITT_NOTIFY( sync_releasing, proxy.outbox );
+            // Mail the proxy - after this point, t->prefix().next may be changed by another thread.
+            proxy.outbox->push(proxy);
+            goto advance;
+        }
+        link = &t->prefix().next;
+advance:
         if( &t->prefix().next==&next )
             break;
     }
-    depth_type d = first.prefix().depth;
-#if !IMPROVED_GATING
-    __TBB_ASSERT( !open_gate, NULL );
-#endif /* !IMPROVED_GATING */
+    task::depth_type d = first_ptr->prefix().depth;
     __TBB_ASSERT(depth_type(array_size)>0, "casting overflow?");
     if( d>=depth_type(array_size) ) {
         grow( d+1 );
@@ -1322,8 +1967,8 @@ void GenericScheduler::spawn( task& first, task*& next ) {
     }
     TaskPool* tp = dummy_slot.task_pool;
 
-    next = tp->array[d];
-    tp->array[d] = &first;
+    *link = tp->array[d];
+    tp->array[d] = first_ptr;
 
     if( d>deepest )
         deepest = d;
@@ -1331,14 +1976,7 @@ void GenericScheduler::spawn( task& first, task*& next ) {
         tp->prefix().steal_begin = d;
 
     release_task_pool();
-#if IMPROVED_GATING
     mark_pool_full();
-#else
-    if( open_gate ) {
-        open_gate->open();
-        open_gate = NULL;
-    }
-#endif /* IMPROVED_GATING */
     __TBB_ASSERT( assert_okay(), NULL );
 
     TBB_TRACE(("%p.internal_spawn exit\n", this ));
@@ -1346,7 +1984,11 @@ void GenericScheduler::spawn( task& first, task*& next ) {
 
 void GenericScheduler::spawn_root_and_wait( task& first, task*& next ) {
     __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 */
     internal::reference_count n = 0;
     for( task* t=&first; ; t=t->prefix().next ) {
         ++n;
@@ -1354,20 +1996,76 @@ void GenericScheduler::spawn_root_and_wait( task& first, task*& next ) {
         __TBB_ASSERT( !t->prefix().parent, "not a root task, or already running" );
         t->prefix().parent = &dummy;
         if( &t->prefix().next==&next ) break;
+#if __TBB_EXCEPTIONS
+        __TBB_ASSERT( t->prefix().context == t->prefix().next->prefix().context, 
+                    "all the root tasks in list must share the same context");
+#endif /* __TBB_EXCEPTIONS */
     }
     dummy.prefix().ref_count = n+1;
     if( n>1 )
         spawn( *first.prefix().next, next );
     TBB_TRACE(("spawn_root_and_wait((task_list*)%p): calling %p.loop\n",&first,this));
     wait_for_all( dummy, &first );
+#if !__TBB_EXCEPTIONS
     // empty_task has trivial destructor, so call free_task directly instead of going through destroy_task.
     free_task<is_small_local>( dummy );
+#endif /* __TBB_EXCEPTIONS */
     TBB_TRACE(("spawn_root_and_wait((task_list*)%p): return\n",&first));
 }
 
+inline task* GenericScheduler::get_mailbox_task() {
+    __TBB_ASSERT( my_affinity_id>0, "not in arena" );
+    task* result = NULL;
+    while( task_proxy* t = inbox.pop() ) {
+        intptr tat = __TBB_load_with_acquire(t->task_and_tag);
+        __TBB_ASSERT( tat==task_proxy::mailbox_bit || tat==(tat|3)&&tat!=3, NULL );
+        if( tat!=task_proxy::mailbox_bit && __TBB_CompareAndSwapW( &t->task_and_tag, task_proxy::pool_bit, tat )==tat ) {
+            // Sucessfully grabbed the task, and left pool seeker with job of freeing the proxy.
+            ITT_NOTIFY( sync_acquired, inbox.outbox() );
+            result = (task*)(tat & ~3);
+            result->prefix().owner = this;
+            break;
+        }
+        free_task_proxy( *t );
+    }
+    return result;
+}
+
+inline task* GenericScheduler::strip_proxy( task_proxy* tp ) {
+    __TBB_ASSERT( tp->prefix().extra_state==es_task_proxy, NULL );
+    intptr tat = __TBB_load_with_acquire(tp->task_and_tag);
+    if( (tat&3)==3 ) {
+        // proxy is shared by a pool and a mailbox.
+        // Attempt to transition it to "empty proxy in mailbox" state.
+        if( __TBB_CompareAndSwapW( &tp->task_and_tag, task_proxy::mailbox_bit, tat )==tat ) {
+            // Successfully grabbed the task, and left the mailbox with the job of freeing the proxy.
+            goto success;
+        }
+        __TBB_ASSERT( tp->task_and_tag==task_proxy::pool_bit, NULL );
+        tat = task_proxy::pool_bit;
+    } else {
+        // We have exclusive access to the proxy
+        __TBB_ASSERT( (tat&3)==task_proxy::pool_bit, "task did not come from pool?" );
+    }
+    tp->prefix().state = task::allocated;
+    free_task_proxy( *tp );
+    if(!(tat&~3)) {
+        // Another thread grabbed the underlying task via their mailbox
+        return NULL;
+    }
+success:
+    return (task*)(tat&~3);
+}
 
 inline task* GenericScheduler::get_task( depth_type d ) {
     task* result = NULL;
+    // parallel_reduce has a subtle dependence on the order in which tasks are
+    // selected from the deque for execution.  If the task selected is not the
+    // next immediate task -- i.e. there is a hole between the previous task and
+    // the task selected -- then the selected task must be treated as stolen and
+    // the body of the task split in order to ensure the correctness of the join
+    // operations.
+retry:
     if( deepest>=d ) {
         acquire_task_pool();
         task** a = dummy_slot.task_pool->array;
@@ -1382,6 +2080,19 @@ inline task* GenericScheduler::get_task( depth_type d ) {
         deepest = i;
         release_task_pool();
     }
+    if( result ) {
+        if( is_proxy(*result) ) {
+            result = strip_proxy((task_proxy*)result);
+            if( !result ) {
+                goto retry;
+            }
+            GATHER_STATISTIC( ++proxy_execute_count );
+            // Following assertion should be true because TBB 2.0 tasks never specify affinity, and hence are not proxied.
+            __TBB_ASSERT( is_version_3_task(*result), "backwards compatibility with TBB 2.0 broken" );
+            // Task affinity has changed.
+            result->note_affinity(my_affinity_id);
+        }
+    }
     return result;
 }
 
@@ -1414,7 +2125,7 @@ task* GenericScheduler::steal_task( UnpaddedArenaSlot& arena_slot, depth_type d
             steal_end = arena_slot.steal_end;
         } else {
             depth_type tmp = steal_end;
-            steal_end = __TBB_CompareAndSwapW( (volatile void *)&(arena_slot.steal_end), steal_end+1, steal_end );
+            steal_end = __TBB_CompareAndSwapW( &arena_slot.steal_end, steal_end+1, steal_end );
             if( tmp==steal_end ) {
                 ITT_NOTIFY(sync_acquired, &arena_slot);
                 break;
@@ -1427,15 +2138,23 @@ task* GenericScheduler::steal_task( UnpaddedArenaSlot& arena_slot, depth_type d
     if( i<d )
         i = d;
     for(; i<=steal_end>>1; ++i ) {
-        if( (result = tp->array[i]) ) {
-            // Unlike get_task, we do not adjust i if the next pointer is NULL.
+        for( task** r = &tp->array[i]; (result=*r)!=NULL; r = &result->prefix().next ) {
+            if( is_proxy(*result) ) {
+                task_proxy& tp = *static_cast<task_proxy*>(result);
+                // If task will likely be grabbed by whom it was mailed to, skip it.
+                if( (tp.task_and_tag&3)==3 && tp.outbox->recipient_is_idle() ) 
+                    continue;
+            }
+            // Remove result from linked list
+            *r = result->prefix().next;
+            // Unlike get_task, we do not adjust i if array[i] becomes NULL.
             // The reason is that it is a waste of time, because steal_task
             // is relatively infrequent compared to insert_task, and the
             // latter updates steal_begin too.
-            tp->array[i] = result->prefix().next;
-            break;
+            goto found;
         }
     }
+found:
     if( tp->prefix().steal_begin>=d ) {
         tp->prefix().steal_begin = i;
         if( i>steal_end>>1 ) {
@@ -1445,12 +2164,14 @@ task* GenericScheduler::steal_task( UnpaddedArenaSlot& arena_slot, depth_type d
     }
     // Release the task pool
     ITT_NOTIFY(sync_releasing, &arena_slot);
-    arena_slot.steal_end = steal_end;
+    __TBB_store_with_release( arena_slot.steal_end, steal_end );
 }
 done:
     return result;
 }
 
+#define CANCELLATION_INFO_PRESENT(t) __TBB_load_with_acquire(t->prefix().context->my_cancellation_requested)
+
 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));
@@ -1464,6 +2185,9 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
     }
     __TBB_ASSERT( assert_okay(), NULL );
 #endif /* TBB_DO_ASSERT */
+#if __TBB_EXCEPTIONS
+    __TBB_ASSERT( parent.prefix().context || (is_worker() && &parent == dummy_task), "parent task does not have context" );
+#endif /* __TBB_EXCEPTIONS */
     task* t = child;
     depth_type d;
     if( innermost_running_task==dummy_task ) {
@@ -1475,22 +2199,43 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
         d = parent.prefix().depth+1;
     }
     task* old_innermost_running_task = innermost_running_task;
-    // Outer loop steals tasks when necesssary.
+#if __TBB_EXCEPTIONS
+exception_was_caught:
+    try {
+#endif /* __TBB_EXCEPTIONS */
+    // Outer loop steals tasks when necessary.
     for(;;) {
         // Middle loop evaluates tasks that are pulled off "array".
         do {
             // Inner loop evaluates tasks that are handed directly to us by other tasks.
             while(t) {
+                __TBB_ASSERT(!is_proxy(*t),"unexpected proxy");
                 task_prefix& pref = t->prefix();
                 __TBB_ASSERT( pref.owner==this, NULL );
-                __TBB_ASSERT( pref.depth>=d, NULL );
+                task* t_next = NULL;
+#if __TBB_EXCEPTIONS
+                if ( !pref.context->my_cancellation_requested ) {
+#endif /* __TBB_EXCEPTIONS */
                 __TBB_ASSERT( 1L<<t->state() & (1L<<task::allocated|1L<<task::ready|1L<<task::reexecute), NULL );
                 pref.state = task::executing;
                 innermost_running_task = t;
                 __TBB_ASSERT(assert_okay(),NULL);
                 TBB_TRACE(("%p.wait_for_all: %p.execute\n",this,t));
                 GATHER_STATISTIC( ++execute_count );
-                task* t_next = t->execute();
+                t_next = t->execute();
+#if STATISTICS
+                if (t_next) {
+                    affinity_id next_affinity=t_next->prefix().affinity;
+                    if (next_affinity != 0 && next_affinity != my_affinity_id)
+                        GATHER_STATISTIC( ++proxy_bypass_count );
+                 }
+#endif
+
+#if __TBB_EXCEPTIONS
+                }
+                else
+                    pref.state = task::executing;
+#endif /* __TBB_EXCEPTIONS */
                 if( t_next ) {
                     __TBB_ASSERT( t_next->state()==task::allocated,
                                 "if task::execute() returns task, it must be marked as allocated" );
@@ -1505,14 +2250,14 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
                         if( task* s = t->parent() ) {
                             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((volatile void *)&(s->prefix().ref_count))==1 ) {
+                            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);
+                                depth_type s_depth = __TBB_load_with_acquire(s->prefix().depth);
 #if TBB_DO_ASSERT
-                                s->prefix().debug_state &= ~ds_ref_count_active;
+                                s->prefix().extra_state &= ~es_ref_count_active;
 #endif /* TBB_DO_ASSERT */
                                 s->prefix().owner = this;
-                                depth_type s_depth = s->prefix().depth;
                                 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,
@@ -1536,11 +2281,13 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
                         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((volatile void *)&(s->prefix().ref_count))==1 ) {
+                        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);
+                            // Unused load is put here for sake of inserting an "acquire" fence.
+                            (void)__TBB_load_with_acquire(s->prefix().depth);
 #if TBB_DO_ASSERT
-                            s->prefix().debug_state &= ~ds_ref_count_active;
+                            s->prefix().extra_state &= ~es_ref_count_active;
                             __TBB_ASSERT( s->prefix().owner==this, "ownership corrupt?" );
                             __TBB_ASSERT( s->prefix().depth>=d, NULL );
 #endif /* TBB_DO_ASSERT */
@@ -1576,11 +2323,11 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
                 }
                 __TBB_ASSERT( !t_next||t_next->prefix().depth>=d, NULL );
                 t = t_next;
-            }
+            } // end of scheduler bypass loop
             __TBB_ASSERT(assert_okay(),NULL);
 
-
             t = get_task( d );
+            __TBB_ASSERT(!t || !is_proxy(*t),"unexpected proxy");
 #if TBB_DO_ASSERT
             __TBB_ASSERT(assert_okay(),NULL);
             if(t) {
@@ -1588,7 +2335,9 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
                 __TBB_ASSERT( t->prefix().owner==this, "thread got task that it does not own" );
             }
 #endif /* TBB_DO_ASSERT */
-        } while( t );
+        } while( t ); // end of local task array processing loop
+
+        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,
@@ -1603,30 +2352,53 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
                     }
                     ITT_NOTIFY(sync_acquired, &parent.prefix().ref_count);
                 }
+                inbox.set_is_idle( false );
                 goto done;
             }
             // Try to steal a task from a random victim.
             size_t n = arena->prefix().limit;
             if( n>1 ) {
-                size_t k = random.get() % (n-1);
-                ArenaSlot* victim = &arena->slot[k];
-                if( victim>=arena_slot )
-                    ++victim;               // Adjusts random distribution to exclude self
-                t = steal_task( *victim, d );
-                if( t ) {
+                if( !my_affinity_id || !(t=get_mailbox_task()) ) {
+                    size_t k = random.get() % (n-1);
+                    ArenaSlot* victim = &arena->slot[k];
+                    if( victim>=arena_slot )
+                        ++victim;               // Adjusts random distribution to exclude self
+                    t = steal_task( *victim, d );
+                    if( !t ) goto fail;
+                    if( is_proxy(*t) ) {
+                        t = strip_proxy((task_proxy*)t);
+                        if( !t ) goto fail;
+                        GATHER_STATISTIC( ++proxy_steal_count );
+                    }
+                    GATHER_STATISTIC( ++steal_count );
+                    if( is_version_3_task(*t) )
+                        t->note_affinity( my_affinity_id );
+                } else {
+                    GATHER_STATISTIC( ++mail_received_count );
+                }
+                __TBB_ASSERT(t,NULL);
+#if __TBB_SCHEDULER_OBSERVER
+                // No memory fence required for read of global_last_observer_proxy, because prior fence on steal/mailbox suffices.
+                if( local_last_observer_proxy!=global_last_observer_proxy ) {
+                    notify_entry_observers();
+                }
+#endif /* __TBB_SCHEDULER_OBSERVER */
+                {
                     __TBB_ASSERT( t->prefix().depth>=d, NULL );
                     if( SchedulerTraits::itt_possible ) {
                         if( failure_count!=-1 ) {
-                            ITT_NOTIFY(sync_prepare, victim);
+                            // FIXME - might be victim, or might be selected from a mailbox
                             // Notify Intel(R) Thread Profiler that thread has stopped spinning.
                             ITT_NOTIFY(sync_acquired, this);
-                            ITT_NOTIFY(sync_acquired, victim);
+                            // FIXME - might be victim, or might be selected from a mailbox
                         }
                     }
                     __TBB_ASSERT(t,NULL);
+                    inbox.set_is_idle( false );
                     break;
                 }
             }
+fail:
             if( SchedulerTraits::itt_possible && failure_count==-1 ) {
                 // The first attempt to steal work failed, so notify Intel(R) Thread Profiler that
                 // the thread has started spinning.  Ideally, we would do this notification
@@ -1637,7 +2409,6 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
             }
             // Pause, even if we are going to yield, because the yield might return immediately.
             __TBB_Pause(PauseTime);
-#if IMPROVED_GATING
             int yield_threshold = 2*int(n);
             if( failure_count>=yield_threshold ) {
                 __TBB_Yield();
@@ -1646,34 +2417,62 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
                         failure_count = 0;
                     else
                         failure_count = yield_threshold;
-#else
-            int yield_threshold = int(n);
-            if( failure_count>=yield_threshold ) {
-                if( failure_count>=2*yield_threshold ) {
-                    __TBB_Yield();
-                    arena->prefix().gate.wait();
-                    failure_count = 0;
-                } else if( failure_count==yield_threshold ) {
-                    // We have paused n times since last yield.
-                    // Odds are that there is no other work to do.
-                    __TBB_Yield();
-#endif /* IMPROVED_GATING */
                 }
             }
         }
         __TBB_ASSERT(t,NULL);
-        GATHER_STATISTIC( ++steal_count );
+        __TBB_ASSERT(!is_proxy(*t),"unexpected proxy");
         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");
+        }
     }
+    goto exception_was_caught;
+#endif /* __TBB_EXCEPTIONS */
 done:
     parent.prefix().ref_count = 0;
 #if TBB_DO_ASSERT
-    parent.prefix().debug_state &= ~ds_ref_count_active;
+    parent.prefix().extra_state &= ~es_ref_count_active;
 #endif /* TBB_DO_ASSERT */
     innermost_running_task = old_innermost_running_task;
     if( deepest<0 && innermost_running_task==dummy_task && arena_slot!=&dummy_slot ) {
         leave_arena(/*compress=*/true);
     }
+#if __TBB_EXCEPTIONS
+    __TBB_ASSERT(parent.prefix().context && dummy_task->prefix().context, "");
+    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 ( innermost_running_task == dummy_task ) {
+            // We are in the innermost 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), 
+                         "Unexpected exception or cancellation data in the dummy task");
+            //! \todo Add assertion that master's dummy task context does not have children
+        }
+        if ( e )
+            e->throw_self();
+    }
+    __TBB_ASSERT(!is_worker() || !CANCELLATION_INFO_PRESENT(dummy_task), 
+                 "Worker's dummy task context modified");
+    __TBB_ASSERT(innermost_running_task != dummy_task || !CANCELLATION_INFO_PRESENT(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));
 }
@@ -1682,27 +2481,26 @@ 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?" );
+    // Sync up the local cancellation state with the global one.
     unsigned n = arena->prefix().number_of_slots;
     unsigned j = unsigned(arena->prefix().limit);
     for( unsigned k=j; k<n; ++k ) {
-        if( arena->slot[k].steal_end==-4 && __TBB_CompareAndSwapW( (volatile void *)&(arena->slot[k].steal_end), -4|1, -4 )==-4 ) {
+        if( arena->slot[k].steal_end==-4 && __TBB_CompareAndSwapW( &arena->slot[k].steal_end, -4|1, -4 )==-4 ) {
             __TBB_ASSERT( arena->slot[k].steal_end==-3, "slot not really acquired?" );
             ITT_NOTIFY(sync_acquired,&arena->slot[k]);
             dummy_slot.task_pool->prefix().arena_index = k;
             arena->slot[k].task_pool = dummy_slot.task_pool;
             arena->slot[k].owner_waits = false;
             arena_slot = &arena->slot[k];
-#if !IMPROVED_GATING
-            open_gate = &arena->prefix().gate;
-#endif /* !IMPROVED_GATING */
             // Successfully claimed a spot in the arena.  Update arena->prefix().limit.
             do {
                 j = unsigned(arena->prefix().limit.compare_and_swap( k+1, j ));
             } while( j<=k );
+            attach_mailbox( k+1 );
             break;
         }
     }
-    arena_slot->steal_end = 2*deepest+1;
+    __TBB_store_with_release( arena_slot->steal_end, 2*deepest+1 );
 }
 
 void GenericScheduler::leave_arena( bool compress ) {
@@ -1716,14 +2514,12 @@ void GenericScheduler::leave_arena( bool compress ) {
     size_t k = dummy_slot.task_pool->prefix().arena_index;
     __TBB_ASSERT( &arena->slot[k]==arena_slot, NULL );
     arena_slot->task_pool = NULL;
+    my_affinity_id = 0;
+    inbox.detach();
     dummy_slot.task_pool->prefix().arena_index = TaskPoolPrefix::null_arena_index;
     arena_slot = &dummy_slot;
     arena_slot->owner_waits  = false;
     size_t n = arena->prefix().number_of_workers;
-#if !IMPROVED_GATING
-    if( k>=n )
-        arena->prefix().gate.close();
-#endif /* !IMPROVED_GATING */
     __TBB_ASSERT( !compress || k>=n, "must be master to compress" );
     size_t new_limit = arena->prefix().limit;
     if( compress && new_limit==k+1 ) {
@@ -1731,10 +2527,10 @@ void GenericScheduler::leave_arena( bool compress ) {
         for(;;) {
             new_limit = arena->prefix().limit.compare_and_swap( k, k+1 );
             ITT_NOTIFY(sync_releasing, &arena->slot[k]);
-            arena->slot[k].steal_end = -4;
+            __TBB_store_with_release( arena->slot[k].steal_end, -4 );
             if( new_limit!=k+1 ) break;
             if( --k<n ) break;
-            if( arena->slot[k].steal_end==-4 && __TBB_CompareAndSwapW( (volatile void *)&(arena->slot[k].steal_end), -4|1, -4 )==-4 ) {
+            if( arena->slot[k].steal_end==-4 && __TBB_CompareAndSwapW( &arena->slot[k].steal_end, -4|1, -4 )==-4 ) {
                 ITT_NOTIFY(sync_acquired,&arena->slot[k]);
             } else {
                 break;
@@ -1742,11 +2538,12 @@ void GenericScheduler::leave_arena( bool compress ) {
         }
     } else {
         ITT_NOTIFY(sync_releasing, &arena->slot[k]);
-        arena->slot[k].steal_end = -4;
+        __TBB_store_with_release( arena->slot[k].steal_end, -4 );
     }
 }
 
 GenericScheduler* GenericScheduler::create_worker( WorkerDescriptor& w ) {
+    __TBB_ASSERT( (uintptr)w.scheduler+1<2u, NULL );
     unsigned n = w.arena->prefix().number_of_workers;
     WorkerDescriptor* worker_list = w.arena->prefix().worker_list;
     __TBB_ASSERT( &w >= worker_list, NULL );
@@ -1763,11 +2560,18 @@ GenericScheduler* GenericScheduler::create_worker( WorkerDescriptor& w ) {
         }
     }
 
-    // Put myself into the arena
     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);
@@ -1800,8 +2604,10 @@ GenericScheduler* GenericScheduler::create_worker( WorkerDescriptor& w ) {
         if( status )
             handle_perror(status,"pthread_detach");
 #endif /* USE_PTHREAD */
+        // 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();
     }
     return s;
 }
@@ -1811,7 +2617,28 @@ GenericScheduler* GenericScheduler::create_master( Arena* arena ) {
     task& t = *s->dummy_task;
     s->innermost_running_task = &t;
     t.prefix().ref_count = 1;
+    s->register_in_thread_local_storage();
+#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 
+    // for task objects since the free list is empty at the moment.
+    t.prefix().context = new ( NFS_Allocate(sizeof(task_group_context), 1, NULL) ) task_group_context(task_group_context::isolated);
+    scheduler_list_node_t &node = s->my_node;
+    {
+        mutex::scoped_lock lock(the_scheduler_list_mutex);
+        node.my_next = the_scheduler_list_head.my_next;
+        node.my_prev = &the_scheduler_list_head;
+        the_scheduler_list_head.my_next->my_prev = &node;
+        the_scheduler_list_head.my_next = &node;
+    }
+    // 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 */
     __TBB_ASSERT( &task::self()==&t, NULL );
+#if __TBB_SCHEDULER_OBSERVER
+    // Process any existing observers.
+    s->notify_entry_observers();
+#endif /* __TBB_SCHEDULER_OBSERVER */
     return s;
 }
 
@@ -1832,6 +2659,7 @@ void* GenericScheduler::worker_routine( void* arg )
     // accidentally cancel out other 64K aliasing schemes that Microsoft might implement later.
     // See Knuth Vol 3. "Theorem S" for details on Fibonacci hashing.
     size_t offset = (scheduler.dummy_slot.task_pool->prefix().arena_index+1) * 40503U % (1U<<16);
+    // The following statement is really does need "volatile", otherwise the compiler might remove the _alloca.
     void* volatile sink_for_alloca = _alloca(offset);
 #else
     // Linux thread allocators avoid 64K aliasing.
@@ -1864,6 +2692,9 @@ void GenericScheduler::cleanup_worker_thread( void* arg ) {
     TBB_TRACE(("%p.cleanup_worker_thread enter\n",arg));
     GenericScheduler& s = *(GenericScheduler*)arg;
     __TBB_ASSERT( s.dummy_slot.task_pool, "cleaning up worker with missing TaskPool" );
+#if __TBB_SCHEDULER_OBSERVER
+    s.notify_exit_observers(/*is_worker=*/true);
+#endif /* __TBB_SCHEDULER_OBSERVER */
     Arena* a = s.arena;
     __TBB_ASSERT( s.arena_slot!=&s.dummy_slot, "worker not in arena?" );
     s.free_scheduler();
@@ -1876,14 +2707,26 @@ void GenericScheduler::cleanup_worker_thread( void* arg ) {
 void WorkerDescriptor::start_one_worker_thread() {
 #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" );
     // 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, ThreadStackSize, GenericScheduler::worker_routine, this, 0, &thread_id );
+    uintptr status = _beginthreadex( NULL, local_thread_stack_size, GenericScheduler::worker_routine, this, 0, &thread_id );
     if( status==0 )
         handle_perror(errno,"__beginthreadex");
     else
         CloseHandle((HANDLE)status);
 #else
+    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.
     pthread_t handle;
@@ -1891,12 +2734,12 @@ void WorkerDescriptor::start_one_worker_thread() {
     // This #if should be removed as soon as the bug is fixed
 #if __APPLE__ && __TBB_x86_64
     static void *(*r)(void*) = GenericScheduler::worker_routine;
-    int status = pthread_create( &handle, NULL, r, this );
+    status = pthread_create( &handle, &stack_size, r, this );
 #else
-    int status = pthread_create( &handle, NULL, GenericScheduler::worker_routine, this );
+    status = pthread_create( &handle, &stack_size, GenericScheduler::worker_routine, this );
 #endif
     if( status )
-        handle_perror(status,"pthread_create");
+        handle_perror( status, "pthread_create" );
 #endif /* USE_WINTHREAD */
 }
 
@@ -1906,14 +2749,76 @@ void WorkerDescriptor::start_one_worker_thread() {
 task& allocate_root_proxy::allocate( size_t size ) {
     internal::GenericScheduler* v = GetThreadSpecific();
     __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 /* __TBB_EXCEPTIONS */
 }
 
 void allocate_root_proxy::free( task& task ) {
     internal::GenericScheduler* v = GetThreadSpecific();
     __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
+#endif /* __TBB_EXCEPTIONS */
+    v->free_task<GenericScheduler::is_local>( task );
+}
+
+#if __TBB_EXCEPTIONS
+//------------------------------------------------------------------------
+// Methods of allocate_root_with_context_proxy
+//------------------------------------------------------------------------
+task& allocate_root_with_context_proxy::allocate( size_t size ) const {
+    internal::GenericScheduler* v = GetThreadSpecific();
+    __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 );
+    // 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
+        // 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 
+            // flow in exchange of a bit higher probability that in cases when cancellation 
+            // is in flight we will take deeper traversal branch. Normally cache coherency 
+            // mechanisms are efficient enough to deliver updated value most of the time.
+            uintptr_t local_count_snapshot = ((GenericScheduler*)my_context.my_owner)->local_cancel_count;
+            __TBB_store_with_release(my_context.my_parent, p.context);
+            uintptr_t global_count_snapshot = __TBB_load_with_acquire(global_cancel_count);
+            if ( local_count_snapshot == global_count_snapshot ) {
+                // It is possible that there is active cancellation request in our 
+                // parents chain. Fortunately the equality of the local and global 
+                // counters means that if this is the case it's already been propagated
+                // to our parent.
+                my_context.my_cancellation_requested = p.context->my_cancellation_requested;
+            }
+            else if ( !my_context.my_cancellation_requested ) {
+                // Another thread was propagating cancellation request at the moment 
+                // when we set our parent, but since we do not use locks we could've 
+                // been skipped. So we have to make sure that we get the cancellation 
+                // request if one of our ancestors has been canceled.
+                my_context.propagate_cancellation_from_ancestors();
+            }
+        }
+        my_context.my_kind = task_group_context::binding_completed;
+    }
+    // else the context either has already been associated with its parent or is isolated
+    return t;
+}
+
+void allocate_root_with_context_proxy::free( task& task ) const {
+    internal::GenericScheduler* v = GetThreadSpecific();
+    __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 );
 }
+#endif /* __TBB_EXCEPTIONS */
 
 //------------------------------------------------------------------------
 // Methods of allocate_continuation_proxy
@@ -1925,7 +2830,11 @@ task& allocate_continuation_proxy::allocate( size_t size ) const {
     __TBB_ASSERT( GetThreadSpecific()==v, "thread does not own this" );
     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 */
 }
 
 void allocate_continuation_proxy::free( task& mytask ) const {
@@ -1943,7 +2852,11 @@ task& allocate_child_proxy::allocate( size_t size ) const {
     __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 */
 }
 
 void allocate_child_proxy::free( task& mytask ) const {
@@ -1957,9 +2870,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( (volatile void *)&(parent.prefix().ref_count) );
+    __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 */
 }
 
 void allocate_additional_child_of_proxy::free( task& task ) const {
@@ -1970,24 +2887,215 @@ 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( (volatile void *)&(parent.prefix().ref_count) );
+    __TBB_FetchAndDecrementWrelease( &parent.prefix().ref_count );
     GenericScheduler* v = static_cast<GenericScheduler*>(self.prefix().owner);
 
     v->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;
+}
+
+//------------------------------------------------------------------------
+// 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;
+    if( new_size!=my_size ) {
+        if( my_array ) {
+            NFS_Free( my_array );
+            // Following two assignments must be done here for sake of exception safety.
+            my_array = NULL;
+            my_size = 0;
+        } 
+        if( new_size ) {
+            my_array = static_cast<affinity_id*>(NFS_Allocate(new_size,sizeof(affinity_id), NULL ));
+            memset( my_array, 0, sizeof(affinity_id)*new_size );
+            my_size = new_size;
+        } 
+    } 
+}
+
 } // namespace internal
 
-using namespace tbb;
 using namespace tbb::internal;
 
+#if __TBB_EXCEPTIONS
+
+//------------------------------------------------------------------------
+// captured_exception
+//------------------------------------------------------------------------
+
+inline 
+void copy_string ( char*& dst, const char* src ) {
+    if ( src ) {
+        size_t len = strlen(src) + 1;
+        dst = (char*)allocate_via_handler_v3(len);
+        strncpy (dst, src, len);
+    }
+    else
+        dst = NULL;
+}
+
+void captured_exception::set ( const char* name, const char* info ) throw()
+{
+    copy_string(const_cast<char*&>(my_exception_name), name);
+    copy_string(const_cast<char*&>(my_exception_info), info);
+}
+
+void captured_exception::clear () throw() {
+    deallocate_via_handler_v3 (const_cast<char*>(my_exception_name));
+    deallocate_via_handler_v3 (const_cast<char*>(my_exception_info));
+}
+
+captured_exception* captured_exception::move () throw() {
+    captured_exception *e = (captured_exception*)allocate_via_handler_v3(sizeof(captured_exception));
+    if ( e ) {
+        new (e) captured_exception();
+        e->my_exception_name = my_exception_name;
+        e->my_exception_info = my_exception_info;
+        e->my_dynamic = true;
+        my_exception_name = my_exception_info = NULL;
+    }
+    return e;
+}
+
+void captured_exception::destroy () throw() {
+    __TBB_ASSERT ( my_dynamic, "Method destroy can be used only on objects created by clone or allocate" );
+    if ( my_dynamic ) {
+        this->captured_exception::~captured_exception();
+        deallocate_via_handler_v3 (this);
+    }
+}
+
+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;
+    }
+    return e;
+}
+
+const char* captured_exception::name() const throw() {
+    return my_exception_name;
+}
+
+const char* captured_exception::what() const throw() {
+    return my_exception_info;
+}
+
+//------------------------------------------------------------------------
+// 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" );
+        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) ) {
+            // 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 
+            // below only after the other thread finishes with us.
+            spin_mutex::scoped_lock lock(s->context_list_mutex);
+        }
+    }
+    if ( my_exception )
+        my_exception->destroy();
+}
+
+void task_group_context::init () {
+    __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" );
+    my_parent = NULL;
+    my_cancellation_requested = 0;
+    my_exception = NULL;
+    if ( my_kind == bound ) {
+        GenericScheduler *s = GetThreadSpecific();
+        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
+        my_node.my_prev = &s->context_list_head;
+        s->context_list_head.my_next->my_prev = &my_node;
+        // The only operation on the thread local list of contexts that may be performed 
+        // concurrently is its traversal by another thread while propagating cancellation
+        // request. Therefore the release fence below is necessary to ensure that the new 
+        // value of my_node.my_next is visible to the traversing thread 
+        // after it reads new value of v->context_list_head.my_next.
+        my_node.my_next = s->context_list_head.my_next;
+        __TBB_store_with_release(s->context_list_head.my_next, &my_node);
+    }
+}
+
+bool task_group_context::cancel_group_execution () {
+    __TBB_ASSERT ( my_cancellation_requested == 0 || my_cancellation_requested == 1, "Invalid cancellation state");
+    if ( my_cancellation_requested || __TBB_CompareAndSwapW(&my_cancellation_requested, 1, 0) ) {
+        // This task group has already been canceled
+        return false;
+    }
+    GetThreadSpecific()->propagate_cancellation(this);
+    return true;
+}
+
+bool task_group_context::is_group_execution_cancelled () const {
+    return __TBB_load_with_acquire(my_cancellation_requested) != 0;
+}
+
+// IMPORTANT: It is assumed that this method is not used concurrently!
+void task_group_context::reset () {
+    //! \todo Add assertion that this context does not have children
+    // No fences are necessary since this context can be accessed from another thread
+    // only after stealing happened (which means necessary fences were used).
+    if ( my_exception )  {
+        my_exception->destroy();
+        my_exception = NULL;
+    }
+    my_cancellation_requested = 0;
+}
+
+void task_group_context::propagate_cancellation_from_ancestors () {
+    task_group_context *parent = my_parent;
+    while ( parent && !parent->my_cancellation_requested )
+        parent = parent->my_parent;
+    if ( parent ) {
+        // One of our ancestor groups was canceled. Cancel all its descendants.
+        task_group_context *ctx = this;
+        do {
+            __TBB_store_with_release(ctx->my_cancellation_requested, 1);
+            ctx = ctx->my_parent;
+        } while ( ctx != parent );
+    }
+}
+
+#endif /* __TBB_EXCEPTIONS */
+
 //------------------------------------------------------------------------
 // task
 //------------------------------------------------------------------------
 
 void task::internal_set_ref_count( int count ) {
     __TBB_ASSERT( count>0, "count must be positive" );
-    __TBB_ASSERT( !(prefix().debug_state&GenericScheduler::ds_ref_count_active), "ref_count race detected" );
+    __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;
 }
@@ -2008,7 +3116,7 @@ void task::destroy( task& victim ) {
     if( task* parent = victim.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((volatile void *)&(parent->prefix().ref_count));
+        __TBB_FetchAndDecrementWrelease(&parent->prefix().ref_count);
         ITT_NOTIFY(sync_acquired, &parent->prefix().ref_count);
     }
     internal::GenericScheduler* v = static_cast<internal::GenericScheduler*>(prefix().owner);
@@ -2028,16 +3136,36 @@ void task::spawn_and_wait_for_all( task_list& list ) {
     prefix().owner->wait_for_all( *this, t );
 }
 
+/** Defined out of line so that compiler does not replicate task's vtable. 
+    It's pointless to define it inline anyway, because all call sites to it are virtual calls
+    that the compiler is unlikely to optimize. */
+void task::note_affinity( affinity_id 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 );
+}
+
+void task_scheduler_init::initialize( int number_of_threads, stack_size_type thread_stack_size ) {
     if( number_of_threads!=deferred ) {
         __TBB_ASSERT( !my_scheduler, "task_scheduler_init already initialized" );
         __TBB_ASSERT( number_of_threads==-1 || number_of_threads>=1,
                     "number_of_threads for task_scheduler_init must be -1 or positive" );
         // Double-check
-        if( !OneTimeInitializationsDone ) {
+        if( !__TBB_load_with_acquire(OneTimeInitializationsDone) ) {
             DoOneTimeInitializations();
         }
         GenericScheduler* s = GetThreadSpecific();
@@ -2052,9 +3180,10 @@ void task_scheduler_init::initialize( int number_of_threads ) {
                     a->prefix().number_of_masters += 1;
                 } else {
                     if( number_of_threads==-1 )
-                        number_of_threads = DetectNumberOfWorkers();
+                        number_of_threads = default_num_threads();
                     // Put cold path in separate routine.
-                    a = Arena::allocate_arena( 2*number_of_threads, number_of_threads-1 );
+                    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 );
                 }
@@ -2062,6 +3191,8 @@ void task_scheduler_init::initialize( int number_of_threads ) {
             s = GenericScheduler::create_master( a );
         }
         my_scheduler = s;
+    } else {
+        __TBB_ASSERT( !thread_stack_size, "deferred initialization ignores stack size setting" );
     }
 }
 
@@ -2071,6 +3202,9 @@ void task_scheduler_init::terminate() {
     __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;
         {
@@ -2089,6 +3223,207 @@ void task_scheduler_init::terminate() {
     }
 }
 
+int task_scheduler_init::default_num_threads() {
+    // No memory fence required, because at worst each invoking thread calls NumberOfHardwareThreads.
+    int n = DefaultNumberOfThreads;
+    if( !n ) {
+        DefaultNumberOfThreads = n = DetectNumberOfWorkers();
+    }
+    return n;
+}
+
+#if __TBB_SCHEDULER_OBSERVER
+//------------------------------------------------------------------------
+// Methods of observer_proxy
+//------------------------------------------------------------------------
+namespace internal {
+
+#if TBB_DO_ASSERT
+static atomic<int> observer_proxy_count;
+
+struct check_observer_proxy_count {
+    ~check_observer_proxy_count() {
+        if( observer_proxy_count!=0 ) {
+            fprintf(stderr,"warning: leaked %ld observer_proxy objects\n", long(observer_proxy_count));
+        }
+    }
+};
+
+static check_observer_proxy_count the_check_observer_proxy_count;
+#endif /* TBB_DO_ASSERT */
+
+observer_proxy::observer_proxy( task_scheduler_observer_v3& tso ) : next(NULL), observer(&tso) {
+#if TBB_DO_ASSERT
+    ++observer_proxy_count;
+#endif /* TBB_DO_ASSERT */
+    // 1 for observer
+    gc_ref_count = 1;
+    {
+        // Append to the global list
+        task_scheduler_observer_mutex_scoped_lock lock(the_task_scheduler_observer_mutex.begin()[0],/*is_writer=*/true);
+        observer_proxy* p = global_last_observer_proxy;
+        prev = p;
+        if( p ) 
+            p->next=this;
+        else 
+            global_first_observer_proxy = this;
+        global_last_observer_proxy = this;
+    }
+}
+
+void observer_proxy::remove_from_list() {
+    // Take myself off the global list.  
+    if( next ) 
+        next->prev = prev;
+    else 
+        global_last_observer_proxy = prev;
+    if( prev )
+        prev->next = next;
+    else 
+        global_first_observer_proxy = next;
+#if TBB_DO_ASSERT
+    poison_pointer(prev);
+    poison_pointer(next);
+    gc_ref_count = -666;
+#endif /* TBB_DO_ASSERT */
+}
+
+void observer_proxy::remove_ref_slow() {
+    int r = gc_ref_count;
+    while(r>1) {
+        __TBB_ASSERT( r!=0, NULL );
+        int r_old = gc_ref_count.compare_and_swap(r-1,r);
+        if( r_old==r ) {
+            // Successfully decremented count.
+            return;
+        } 
+        r = r_old;
+    } 
+    __TBB_ASSERT( r==1, NULL );
+    // Reference count might go to zero
+    {
+        task_scheduler_observer_mutex_scoped_lock lock(the_task_scheduler_observer_mutex.begin()[0],/*is_writer=*/true);
+        r = --gc_ref_count;
+        if( !r ) {
+            remove_from_list();
+        } 
+    }
+    if( !r ) {
+        __TBB_ASSERT( gc_ref_count == -666, NULL );
+#if TBB_DO_ASSERT
+        --observer_proxy_count;
+#endif /* TBB_DO_ASSERT */
+        delete this;
+    }
+}
+
+observer_proxy* observer_proxy::process_list( observer_proxy* local_last, bool is_worker, bool is_entry ) {
+    // Pointer p marches though the list.
+    // If is_entry, start with our previous list position, otherwise start at beginning of list.
+    observer_proxy* p = is_entry ? local_last : NULL;
+    for(;;) { 
+        task_scheduler_observer* tso=NULL;
+        // Hold lock on list only long enough to advance to next proxy in list.
+        { 
+            task_scheduler_observer_mutex_scoped_lock lock(the_task_scheduler_observer_mutex.begin()[0],/*is_writer=*/false);
+            do {
+                if( local_last && local_last->observer ) {
+                    // 2 = 1 for observer and 1 for local_last
+                    __TBB_ASSERT( local_last->gc_ref_count>=2, NULL );  
+                    // Can decrement count quickly, because it cannot become zero here.
+                    --local_last->gc_ref_count;
+                    local_last = NULL;
+                } else {
+                    // Use slow form of decrementing the reference count, after lock is released.
+                }  
+                if( p ) {
+                    // We were already processing the list.
+                    if( observer_proxy* q = p->next ) {
+                        // Step to next item in list.
+                        p=q;
+                    } else {
+                        // At end of list.
+                        if( is_entry ) {  
+                            // Remember current position in the list, so we can start at on the next call.
+                            ++p->gc_ref_count;
+                        } else {
+                            // Finishin running off the end of the list
+                            p=NULL;
+                        }
+                        goto done;
+                    }
+                } else {
+                    // Starting pass through the list
+                    p = global_first_observer_proxy;
+                    if( !p ) 
+                        goto done;
+                } 
+                tso = p->observer;
+            } while( !tso );
+            ++p->gc_ref_count;
+            ++tso->my_busy_count;
+        }
+        __TBB_ASSERT( !local_last || p!=local_last, NULL );
+        if( local_last )
+            local_last->remove_ref_slow();
+        // Do not hold any locks on the list while calling user's code.
+        try {    
+            if( is_entry )
+                tso->on_scheduler_entry( is_worker );
+            else
+                tso->on_scheduler_exit( is_worker );
+        } catch(...) {
+            // Suppress exception, because user routines are supposed to be observing, not changing
+            // behavior of a master or worker thread.
+#if __TBB_DO_ASSERT
+            fprintf(stderr,"warning: %s threw exception\n",is_entry?"on_scheduler_entry":"on_scheduler_exit"); 
+#endif /* __TBB_DO_ASSERT */        
+        }
+        intptr bc = --tso->my_busy_count;
+        __TBB_ASSERT_EX( bc>=0, "my_busy_count underflowed" );
+        local_last = p;
+    }
+done:
+    // Return new value to be used as local_last next time.
+    if( local_last )
+        local_last->remove_ref_slow();
+    __TBB_ASSERT( !p || is_entry, NULL );
+    return p;
+}
+
+void task_scheduler_observer_v3::observe( bool state ) {
+    if( state ) {
+        if( !my_proxy ) {
+            if( !__TBB_load_with_acquire(OneTimeInitializationsDone) ) {
+                DoOneTimeInitializations();
+            }
+            my_busy_count = 0;
+            my_proxy = new observer_proxy(*this);
+            if( GenericScheduler* s = GetThreadSpecific() ) {
+                // Notify newly created observer of its own thread.
+                // Any other pending observers are notified too.
+                s->notify_entry_observers();
+            }
+        } 
+    } else {
+        if( observer_proxy* proxy = my_proxy ) {
+            my_proxy = NULL;
+            __TBB_ASSERT( proxy->gc_ref_count>=1, "reference for observer missing" );
+            {
+                task_scheduler_observer_mutex_scoped_lock lock(the_task_scheduler_observer_mutex.begin()[0],/*is_writer=*/true);
+                proxy->observer = NULL;
+            }
+            proxy->remove_ref_slow();
+            while( my_busy_count ) {
+                __TBB_Yield();
+            }
+        }
+    }
+}
 
+} // namespace internal */
+#endif /* __TBB_SCHEDULER_OBSERVER */
 
 } // namespace tbb
+
+
diff --git a/src/tbb/tbb_assert_impl.h b/src/tbb/tbb_assert_impl.h
new file mode 100644
index 0000000..00e06fa
--- /dev/null
+++ b/src/tbb/tbb_assert_impl.h
@@ -0,0 +1,93 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+// IMPORTANT: To use assertion handling in TBB, exactly one of the TBB source files
+// should #include tbb_assert_impl.h thus instantiating assertion handling routines.
+// The intent of putting it to a separate file is to allow some tests to use it
+// as well in order to avoid dependency on the library.
+
+// include headers for required function declarations
+#include <cstdlib>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#if _WIN32||_WIN64
+#include <crtdbg.h>
+#endif
+
+using namespace std;
+
+namespace tbb {
+    //! Type for an assertion handler
+    typedef void(*assertion_handler_type)( const char* filename, int line, const char* expression, const char * comment );
+
+    static assertion_handler_type assertion_handler;
+
+    assertion_handler_type set_assertion_handler( assertion_handler_type new_handler ) {
+        assertion_handler_type old_handler = assertion_handler;
+        assertion_handler = new_handler;
+        return old_handler;
+    }
+
+    void assertion_failure( const char* filename, int line, const char* expression, const char* comment ) {
+        if( assertion_handler_type a = assertion_handler ) {
+            (*a)(filename,line,expression,comment);
+        } else {
+            static bool already_failed;
+            if( !already_failed ) {
+                already_failed = true;
+                fprintf( stderr, "Assertion %s failed on line %d of file %s\n",
+                         expression, line, filename );
+                if( comment )
+                    fprintf( stderr, "Detailed description: %s\n", comment );
+#if (_WIN32||_WIN64) && defined(_DEBUG)
+                if(1 == _CrtDbgReport(_CRT_ASSERT, filename, line, "tbb_debug.dll", "%s\r\n%s", expression, comment?comment:""))
+                        _CrtDbgBreak();
+#else
+                abort();
+#endif
+            }
+        }
+    }
+
+#if defined(_MSC_VER)&&_MSC_VER<1400
+#   define vsnprintf _vsnprintf
+#endif
+
+    namespace internal {
+        //! Report a runtime warning.
+        void runtime_warning( const char* format, ... )
+        {
+            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);
+        }
+    } // namespace internal
+
+} /* namespace tbb */
diff --git a/src/tbb/tbb_misc.cpp b/src/tbb/tbb_misc.cpp
index ed949af..9ee3595 100644
--- a/src/tbb/tbb_misc.cpp
+++ b/src/tbb/tbb_misc.cpp
@@ -30,60 +30,31 @@
 // an executing program.
 
 #include "tbb/tbb_stddef.h"
+// Out-of-line TBB assertion handling routines are instantiated here.
+#include "tbb_assert_impl.h"
+
 #include "tbb_misc.h"
 #include <cstdio>
 #include <cstdlib>
 #include <cstring>
-#if defined(__EXCEPTIONS) || defined(_CPPUNWIND)
+#if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)
 #include <stdexcept>
 #endif
-#if _WIN32||_WIN64
-#include <crtdbg.h>
-#else
+#if !(_WIN32||_WIN64)
 #include <dlfcn.h>
 #endif 
 
+using namespace std;
+
 #include "tbb/tbb_machine.h"
 
-static tbb::assertion_handler_type assertion_handler;
+#include <iterator>
 
 namespace tbb {
 
-assertion_handler_type set_assertion_handler( assertion_handler_type new_handler ) {
-    assertion_handler_type old_handler = assertion_handler;
-    assertion_handler = new_handler;
-    return old_handler;
-}
-    
-void assertion_failure( const char * filename, int line, const char * expression, const char * comment ) {
-    if( assertion_handler_type a = assertion_handler ) {
-        (*a)(filename,line,expression,comment);
-    } else {
-        static bool already_failed;
-        if( !already_failed ) {
-            already_failed = true;
-            fprintf( stderr, "Assertion %s failed on line %d of file %s\n",
-                     expression, line, filename );
-            if( comment )
-                fprintf( stderr, "Detailed description: %s\n", comment );
-#if (_WIN32||_WIN64) && defined(_DEBUG)
-            if(1 == _CrtDbgReport(_CRT_ASSERT, filename, line, "tbb_debug.dll", "%s\r\n%s", expression, comment?comment:""))
-                    _CrtDbgBreak();
-#else
-            abort();
-#endif
-        }
-    }
-}
-
 namespace internal {
 
-size_t get_initial_auto_partitioner_divisor() {
-  const size_t X_FACTOR = 4;
-  return X_FACTOR * DetectNumberOfWorkers();
-}
-
-#if defined(__EXCEPTIONS) || defined(_CPPUNWIND)
+#if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)
 // The above preprocessor symbols are defined by compilers when exception handling is enabled.
 // However, in some cases it could be disabled for this file.
 
@@ -95,7 +66,7 @@ void handle_perror( int error_code, const char* what ) {
     strncpy( end, strerror( error_code ), n );
     // Ensure that buffer ends in terminator.
     buf[sizeof(buf)-1] = 0; 
-    throw std::runtime_error(buf);
+    throw runtime_error(buf);
 }
 #endif //__EXCEPTIONS || _CPPUNWIND
 
@@ -105,36 +76,64 @@ bool GetBoolEnvironmentVariable( const char * name ) {
     return false;
 }
 
-bool FillDynamicLinks( const char* library, const DynamicLinkDescriptor list[], size_t n ) {
+#if __TBB_WEAK_SYMBOLS
+
+bool FillDynamicLinks( const char* /*library*/, const DynamicLinkDescriptor descriptors[], size_t n )
+{
+    size_t k = 0;
+    for ( ; k < n  &&  descriptors[k].ptr; ++k )
+        *descriptors[k].handler = (PointerToHandler) descriptors[k].ptr;
+    return k == n;
+}
+
+#else /* !__TBB_WEAK_SYMBOLS */
+
+bool FillDynamicLinks( void* module, const DynamicLinkDescriptor descriptors[], size_t n )
+{
     const size_t max_n = 5;
     __TBB_ASSERT( 0<n && n<=max_n, NULL );
+    PointerToHandler h[max_n];
+    size_t k = 0;
+    for ( ; k < n; ++k ) {
 #if _WIN32||_WIN64
-    HMODULE module = LoadLibrary( library );
+        h[k] = (PointerToHandler) GetProcAddress( (HMODULE)module, descriptors[k].name );
 #else
-    void* module = dlopen( library, RTLD_LAZY ); 
+        h[k] = (PointerToHandler) dlsym( module, descriptors[k].name );
 #endif /* _WIN32||_WIN64 */
-    size_t count = 0;
-    if( module ) {
-        // The library is there, so get the entry points.
-        PointerToHandler h[max_n];
-        for( size_t k=0; k<n; ++k ) {
+        if ( !h[k] )
+            break;
+    }
+    // Commit the entry points if they are all present.
+    if ( k == n ) {
+        // Cannot use memset here, because the writes must be atomic.
+        for( size_t k=0; k<n; ++k )
+            *descriptors[k].handler = h[k];
+        return true;
+    }
+    return false;
+}
+
+bool FillDynamicLinks( const char* library, const DynamicLinkDescriptor descriptors[], size_t n )
+{
 #if _WIN32||_WIN64
-            h[k] = (PointerToHandler) GetProcAddress( module, list[k].name );
+    if ( FillDynamicLinks( GetModuleHandle(NULL), descriptors, n ) )
+        // 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 those crazy manifest related ones)
+    UINT prev_mode = SetErrorMode (SEM_FAILCRITICALERRORS);
+    void* module = LoadLibrary (library);
+    SetErrorMode (prev_mode);
 #else
-            h[k] = (PointerToHandler) dlsym( module, list[k].name );
+    void* module = dlopen( library, RTLD_LAZY ); 
 #endif /* _WIN32||_WIN64 */
-            count += h[k]!=NULL;
-        }
-        // Commit the entry points if they are all present.
-        if( count==n ) {
-            // Cannot use memset here, because the writes must be atomic.
-            for( size_t k=0; k<n; ++k )
-                *list[k].handler = h[k];
-        }
-    }
-    return count==n;
+    // Return true if the library is there and it contains all the expected entry points.
+    return module != NULL  &&  FillDynamicLinks( module, descriptors, n );
 }
 
+#endif /* !__TBB_WEAK_SYMBOLS */
+
+
 #include "tbb_version.h"
 
 /** The leading "\0" is here so that applying "strings" to the binary delivers a clean result. */
@@ -156,6 +155,39 @@ void PrintExtraVersionInfo( const char* category, const char* description ) {
  
 } // namespace tbb
 
+#if __TBB_x86_32
+
+#include "tbb/atomic.h"
+
+namespace tbb {
+namespace internal {
+
+//! Handle 8-byte store that crosses a cache line.
+extern "C" void __TBB_machine_store8_slow( volatile void *ptr, int64_t value ) {
+#if TBB_DO_ASSERT
+    // Report run-time warning unless we have already recently reported warning for that address.
+    const unsigned n = 4;
+    static atomic<void*> cache[n];
+    static atomic<unsigned> k;
+    for( unsigned i=0; i<n; ++i ) 
+        if( ptr==cache[i] ) 
+            goto done;
+    cache[(k++)%n] = const_cast<void*>(ptr);
+    runtime_warning( "atomic store on misaligned 8-byte location %p is slow", ptr );
+done:;
+#endif /* TBB_DO_ASSERT */
+    for( AtomicBackoff b;; b.pause() ) {
+        int64_t tmp = *(int64_t*)ptr;
+        if( __TBB_machine_cmpswp8(ptr,value,tmp)==tmp ) 
+            break;
+        b.pause();
+    }
+}
+
+} // namespace internal
+} // namespace tbb
+#endif /* __TBB_x86_32 */
+
 #if __TBB_ipf
 extern "C" intptr_t __TBB_machine_lockbyte( volatile unsigned char& flag ) {
     if ( !__TBB_TryLockByte(flag) ) {
diff --git a/src/tbb/tbb_misc.h b/src/tbb/tbb_misc.h
index bc1cb4d..4965b50 100644
--- a/src/tbb/tbb_misc.h
+++ b/src/tbb/tbb_misc.h
@@ -32,65 +32,72 @@
 #include "tbb/tbb_stddef.h"
 #include "tbb/tbb_machine.h"
 
-#if __linux__
+#if defined(__linux__)
 #include <sys/sysinfo.h>
-#elif __APPLE__
+#elif defined(__sun)
+#include <sys/sysinfo.h>
+#include <unistd.h>
+#elif defined(__APPLE__)
 #include <sys/types.h>
 #include <sys/sysctl.h>
+#elif defined(__FreeBSD__)
+#include <unistd.h>
 #endif
 
 namespace tbb {
 
-static volatile int number_of_workers = 0;
+namespace internal {
 
 #if defined(__TBB_DetectNumberOfWorkers)
 static inline int DetectNumberOfWorkers() {
     return __TBB_DetectNumberOfWorkers(); 
 }
+
 #else
-#if _WIN32||_WIN64
 
+#if _WIN32||_WIN64
 static inline int DetectNumberOfWorkers() {
-    if (!number_of_workers) {
-        SYSTEM_INFO si;
-        GetSystemInfo(&si);
-        number_of_workers = static_cast<int>(si.dwNumberOfProcessors);
-    }
-    return number_of_workers; 
-}
-
-#elif __linux__ 
-
-static inline int DetectNumberOfWorkers( void ) {
-    if (!number_of_workers) {
-        number_of_workers = get_nprocs();
-    }
-    return number_of_workers; 
+    SYSTEM_INFO si;
+    GetSystemInfo(&si);
+    return static_cast<int>(si.dwNumberOfProcessors);
 }
 
-#elif __APPLE__
+#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) 
+static inline int DetectNumberOfWorkers() {
+    long number_of_workers;
+
+#if (defined(__FreeBSD__) || defined(__sun)) && defined(_SC_NPROCESSORS_ONLN) 
+    number_of_workers = sysconf(_SC_NPROCESSORS_ONLN);
+
+// In theory, sysconf should work everywhere.
+// But in practice, system-specific methods are more reliable
+#elif defined(__linux__)
+    number_of_workers = get_nprocs();
+#elif defined(__APPLE__)
+    int name[2] = {CTL_HW, HW_AVAILCPU};
+    int ncpu;
+    size_t size = sizeof(ncpu);
+    sysctl( name, 2, &ncpu, &size, NULL, 0 );
+    number_of_workers = ncpu;
+#else
+#error DetectNumberOfWorkers: Method to detect the number of online CPUs is unknown
+#endif
 
-static inline int DetectNumberOfWorkers( void ) {
-    if (!number_of_workers) {
-        int name[2] = {CTL_HW, HW_AVAILCPU};
-        int ncpu;
-        size_t size = sizeof(ncpu);
-        sysctl( name, 2, &ncpu, &size, NULL, 0 );
-        number_of_workers = ncpu;
+// Fail-safety strap
+    if ( number_of_workers < 1 ) {
+        number_of_workers = 1;
     }
-    return number_of_workers; 
+    
+    return number_of_workers;
 }
 
 #else
-
-#error Unknown OS
+#error DetectNumberOfWorkers: OS detection method is unknown
 
 #endif /* os kind */
 
 #endif
 
-namespace internal {
-
 // assertion_failure is declared in tbb/tbb_stddef.h because it user code
 // needs to see its declaration.
 
@@ -116,10 +123,22 @@ void PrintExtraVersionInfo( const char* category, const char* description );
 //! Type definition for a pointer to a void somefunc(void)
 typedef void (*PointerToHandler)();
 
-//! The macro casts "address of a pointer to a function" to PointerToHandler*.
-/** Need it because (PointerToHandler*)&ptr_to_func causes warnings from g++ 4.1 */
-#define ADDRESS_OF_HANDLER(x) (PointerToHandler*)(void*)(x)
+// 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
@@ -128,27 +147,14 @@ struct DynamicLinkDescriptor {
     PointerToHandler* handler;
 };
 
+#endif /* !__TBB_WEAK_SYMBOLS */
+
 //! Fill in dynamically linked handlers.
 /** n is the length of array list[], must not exceed 4, which is all we currently need. 
     If the library and all of the handlers are found, then all corresponding handler pointers are set.
     Otherwise all corresponding handler pointers are untouched. */
 bool FillDynamicLinks( const char* libraryname, const DynamicLinkDescriptor list[], size_t n );
 
-//! Template functions to temporary add volatile attribute to a variable.
-/** Allow to perform operations with volatile semantics on non-volatile variables
-    which is useful to improve performance on IPF where Intel compiler
-    translates volatile reads to "load with acquire semantics" (ld*.acq)
-    and volatile writes to "store with release semantics" (st*.rel). */
-template<typename T>
-static inline T volatile& volatile_cast(T& location) {
-    return const_cast<T volatile&>(location);
-}
-
-template<typename T>
-static inline T const volatile& volatile_cast(T const& location) {
-    return const_cast<T const volatile&>(location);
-}
-
 //! Class that implements exponential backoff.
 /** See implementation of SpinwaitWhileEq for an example. */
 class ExponentialBackoff {
diff --git a/src/tbb/tbb_thread.cpp b/src/tbb/tbb_thread.cpp
new file mode 100644
index 0000000..914cad6
--- /dev/null
+++ b/src/tbb/tbb_thread.cpp
@@ -0,0 +1,209 @@
+/*
+    Copyright 2005-2008 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 _WIN32||_WIN64
+#include <process.h>        /* Need _beginthreadex from there */
+#include <stdexcept>        /* Need std::runtime_error from there */
+#include <string>           /* Need std::string from there */
+#endif // _WIN32||_WIN64
+#include "tbb_misc.h" // for handle_perror
+#include "tbb/tbb_stddef.h"
+#include "tbb/tbb_thread.h"
+#include "tbb/tbb_allocator.h"
+#include "tbb/task_scheduler_init.h" /* Need task_scheduler_init::default_num_threads() */
+
+namespace tbb {
+
+namespace internal {
+
+//! Allocate a closure
+void* allocate_closure_v3( size_t size )
+{
+    return allocate_via_handler_v3( size );
+}
+
+//! Free a closure allocated by allocate_closure_v3
+void free_closure_v3( void *ptr )
+{
+    deallocate_via_handler_v3( ptr );
+}
+
+#if _WIN32||_WIN64 
+#if defined(__EXCEPTIONS) || defined(_CPPUNWIND)
+// The above preprocessor symbols are defined by compilers when exception handling is enabled.
+
+void handle_win_error( int error_code ) 
+{
+    LPTSTR msg_buf;
+
+    FormatMessage(
+        FORMAT_MESSAGE_ALLOCATE_BUFFER | 
+        FORMAT_MESSAGE_FROM_SYSTEM |
+        FORMAT_MESSAGE_IGNORE_INSERTS,
+        NULL,
+        error_code,
+        0,
+        (LPTSTR) &msg_buf,
+        0, NULL );
+    const std::string msg_str(msg_buf);
+    LocalFree(msg_buf);
+    throw std::runtime_error(msg_str);
+}
+#endif //__EXCEPTIONS || _CPPUNWIND
+#endif // _WIN32||_WIN64
+
+void tbb_thread_v3::join()
+{
+    __TBB_ASSERT( joinable(), "thread should be joinable when join called" );
+#if _WIN32||_WIN64 
+    DWORD status = WaitForSingleObject( my_handle, INFINITE );
+    if ( status == WAIT_FAILED )
+        handle_win_error( GetLastError() );
+    BOOL close_stat = CloseHandle( my_handle );
+    if ( close_stat == 0 )
+        handle_win_error( GetLastError() );
+    my_thread_id = 0;
+#else
+    int status = pthread_join( my_handle, NULL );
+    if( status )
+        handle_perror( status, "pthread_join" );
+#endif // _WIN32||_WIN64 
+    my_handle = 0;
+}
+
+void tbb_thread_v3::detach() {
+    __TBB_ASSERT( joinable(), "only joinable thread can be detached" );
+#if _WIN32||_WIN64
+    BOOL status = CloseHandle( my_handle );
+    if ( status == 0 )
+      handle_win_error( GetLastError() );
+    my_thread_id = 0;
+#else
+    int status = pthread_detach( my_handle );
+    if( status )
+        handle_perror( status, "pthread_detach" );
+#endif // _WIN32||_WIN64
+    my_handle = 0;
+}
+
+const size_t MB = 1<<20;
+#if !defined(__TBB_WORDSIZE)
+const size_t ThreadStackSize = 1*MB;
+#elif __TBB_WORDSIZE<=4
+const size_t ThreadStackSize = 2*MB;
+#else
+const size_t ThreadStackSize = 4*MB;
+#endif
+
+void tbb_thread_v3::internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine),
+                                    void* closure ) {
+#if _WIN32||_WIN64
+    unsigned thread_id;
+    // 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, ThreadStackSize, start_routine,
+                                     closure, 0, &thread_id ); 
+    if( status==0 )
+        handle_perror(errno,"__beginthreadex");
+    else {
+        my_handle = (HANDLE)status;
+        my_thread_id = thread_id;
+    }
+#else
+    pthread_t thread_handle;
+    int status;
+    pthread_attr_t stack_size;
+    status = pthread_attr_init( &stack_size );
+    if( status )
+        handle_perror( status, "pthread_attr_init" );
+    status = pthread_attr_setstacksize( &stack_size, ThreadStackSize );
+    if( status )
+        handle_perror( status, "pthread_attr_setstacksize" );
+
+    status = pthread_create( &thread_handle, &stack_size, start_routine, closure );
+    if( status )
+        handle_perror( status, "pthread_create" );
+
+    my_handle = thread_handle;
+#endif // _WIN32||_WIN64
+}
+
+unsigned tbb_thread_v3::hardware_concurrency() {
+    return task_scheduler_init::default_num_threads();
+}
+
+tbb_thread_v3::id thread_get_id_v3() {
+#if _WIN32||_WIN64
+    return tbb_thread_v3::id( GetCurrentThreadId() );
+#else
+    return tbb_thread_v3::id( pthread_self() );
+#endif // _WIN32||_WIN64
+}
+    
+void move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 )
+{
+    if (t1.joinable())
+        t1.detach();
+    t1.my_handle = t2.my_handle;
+    t2.my_handle = 0;
+#if _WIN32||_WIN64
+    t1.my_thread_id = t2.my_thread_id;
+    t2.my_thread_id = 0;
+#endif // _WIN32||_WIN64
+}
+
+void thread_yield_v3()
+{
+    __TBB_Yield();
+}
+
+void thread_sleep_v3(const tick_count::interval_t &i)
+{
+#if _WIN32||_WIN64
+     tick_count t0 = tick_count::now();
+     tick_count t1 = t0;
+     for(;;) {
+         double remainder = (i-(t1-t0)).seconds()*1e3;  // milliseconds remaining to sleep
+         if( remainder<=0 ) break;
+         DWORD t = remainder>=INFINITE ? INFINITE-1 : DWORD(remainder);
+         Sleep( t );
+         t1 = tick_count::now();
+    }
+#else
+    struct timespec req;
+    double sec = i.seconds();
+
+    req.tv_sec = static_cast<long>(sec);
+    req.tv_nsec = static_cast<long>( (sec - req.tv_sec)*1e9 );
+    nanosleep(&req, NULL);
+#endif // _WIN32||_WIN64
+}
+
+} // internal
+
+} // tbb
diff --git a/src/tbb/tbb_version.h b/src/tbb/tbb_version.h
index 542559f..875a491 100644
--- a/src/tbb/tbb_version.h
+++ b/src/tbb/tbb_version.h
@@ -26,15 +26,8 @@
     the GNU General Public License.
 */
 
-// Please define version number here:
-#define TBB_VERSION_MAJOR 2
-#define TBB_VERSION_MINOR 0
-
-
-
-
-
-
+// Please define version number in the file:
+#include "tbb/tbb_stddef.h"
 
 // And don't touch anything below
 #ifndef ENDL
@@ -60,10 +53,9 @@
 #define __TBB_DATETIME __DATE__ __TIME__
 #endif
 #endif
-#define __TBB_STRING_AUX(x) #x
-#define __TBB_STRING(x) __TBB_STRING_AUX(x)
 
 #define __TBB_VERSION_NUMBER "TBB: VERSION\t\t" __TBB_STRING(TBB_VERSION_MAJOR.TBB_VERSION_MINOR) ENDL
+#define __TBB_INTERFACE_VERSION_NUMBER "TBB: INTERFACE VERSION\t" __TBB_STRING(TBB_INTERFACE_VERSION) ENDL
 #define __TBB_VERSION_DATETIME "TBB: BUILD_DATE\t\t" __TBB_DATETIME ENDL
 #ifndef TBB_DO_ASSERT
     #define __TBB_VERSION_DO_ASSERT "TBB: TBB_DO_ASSERT\tundefined" ENDL
@@ -86,7 +78,7 @@
     #error Unexpected value for DO_ITT_NOTIFY
 #endif
 
-#define TBB_VERSION_STRINGS __TBB_VERSION_NUMBER __TBB_VERSION_DATETIME __TBB_VERSION_STRINGS __TBB_VERSION_DO_ASSERT __TBB_VERSION_DO_NOTIFY
+#define TBB_VERSION_STRINGS __TBB_VERSION_NUMBER __TBB_INTERFACE_VERSION_NUMBER __TBB_VERSION_DATETIME __TBB_VERSION_STRINGS __TBB_VERSION_DO_ASSERT __TBB_VERSION_DO_NOTIFY
 
 // numbers
 #ifndef __TBB_VERSION_YMD
diff --git a/src/tbb/ia32-tbb.def b/src/tbb/win32-tbb-export.def
similarity index 58%
rename from src/tbb/ia32-tbb.def
rename to src/tbb/win32-tbb-export.def
index 1ce12bc..38bd192 100644
--- a/src/tbb/ia32-tbb.def
+++ b/src/tbb/win32-tbb-export.def
@@ -47,8 +47,11 @@ __TBB_machine_trylockbyte
 ?NFS_Allocate at internal@tbb@@YAPAXIIPAX at Z
 ?NFS_GetLineSize at internal@tbb@@YAIXZ
 ?NFS_Free at internal@tbb@@YAXPAX at Z
+?allocate_via_handler_v3 at internal@tbb@@YAPAXI at Z
+?deallocate_via_handler_v3 at internal@tbb@@YAXPAX at Z
+?is_malloc_used_v3 at internal@tbb@@YA_NXZ
 
-; task.cpp
+; task.cpp v3
 ?allocate at allocate_additional_child_of_proxy@internal at tbb@@QBEAAVtask at 3@I at Z
 ?allocate at allocate_child_proxy@internal at tbb@@QBEAAVtask at 3@I at Z
 ?allocate at allocate_continuation_proxy@internal at tbb@@QBEAAVtask at 3@I at Z
@@ -58,18 +61,40 @@ __TBB_machine_trylockbyte
 ?free at allocate_child_proxy@internal at tbb@@QBEXAAVtask at 3@@Z
 ?free at allocate_continuation_proxy@internal at tbb@@QBEXAAVtask at 3@@Z
 ?free at allocate_root_proxy@internal at tbb@@SAXAAVtask at 3@@Z
-?initialize at task_scheduler_init@tbb@@QAEXH at Z
 ?internal_set_ref_count at task@tbb@@AAEXH at Z
 ?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
 ?self at task@tbb@@SAAAV12 at XZ
 ?spawn_and_wait_for_all at task@tbb@@QAEXAAVtask_list at 2@@Z
+?default_num_threads at task_scheduler_init@tbb@@SAHXZ
+?initialize at task_scheduler_init@tbb@@QAEXHI at Z
+?initialize at task_scheduler_init@tbb@@QAEXH at Z
 ?terminate at task_scheduler_init@tbb@@QAEXXZ
+?observe at task_scheduler_observer_v3@internal at tbb@@QAEX_N at Z
+
+; exception handling support
+?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
+??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
 
 ; tbb_misc.cpp
 ?assertion_failure at tbb@@YAXPBDH00 at Z
 ?get_initial_auto_partitioner_divisor at internal@tbb@@YAIXZ
 ?handle_perror at internal@tbb@@YAXHPBD at Z
 ?set_assertion_handler at tbb@@YAP6AXPBDH00 at ZP6AX0H00@Z at Z
+?runtime_warning at internal@tbb@@YAXPBDZZ
+
+; itt_notify.cpp
+?itt_load_pointer_with_acquire_v3 at internal@tbb@@YAPAXPBX at Z
+?itt_store_pointer_with_release_v3 at internal@tbb@@YAXPAX0 at Z
 
 ; pipeline.cpp
 ??0pipeline at tbb@@QAE at XZ
@@ -88,7 +113,8 @@ __TBB_machine_trylockbyte
 ?upgrade_to_writer at scoped_lock@queuing_rw_mutex at tbb@@QAE_NXZ
 ?try_acquire at scoped_lock@queuing_rw_mutex at tbb@@QAE_NAAV23 at _N@Z
 
-; spin_rw_mutex.cpp
+#if !TBB_NO_LEGACY
+; spin_rw_mutex.cpp v2
 ?internal_acquire_reader at spin_rw_mutex@tbb@@CAXPAV12@@Z
 ?internal_acquire_writer at spin_rw_mutex@tbb@@CA_NPAV12@@Z
 ?internal_downgrade at spin_rw_mutex@tbb@@CAXPAV12@@Z
@@ -98,6 +124,17 @@ __TBB_machine_trylockbyte
 ?internal_upgrade at spin_rw_mutex@tbb@@CA_NPAV12@@Z
 ?internal_try_acquire_writer at spin_rw_mutex@tbb@@CA_NPAV12@@Z
 ?internal_try_acquire_reader at spin_rw_mutex@tbb@@CA_NPAV12@@Z
+#endif
+
+; spin_rw_mutex v3
+?internal_upgrade at spin_rw_mutex_v3@tbb@@AAE_NXZ
+?internal_downgrade at spin_rw_mutex_v3@tbb@@AAEXXZ
+?internal_acquire_reader at spin_rw_mutex_v3@tbb@@AAEXXZ
+?internal_acquire_writer at spin_rw_mutex_v3@tbb@@AAE_NXZ
+?internal_release_reader at spin_rw_mutex_v3@tbb@@AAEXXZ
+?internal_release_writer at spin_rw_mutex_v3@tbb@@AAEXXZ
+?internal_try_acquire_reader at spin_rw_mutex_v3@tbb@@AAE_NXZ
+?internal_try_acquire_writer at spin_rw_mutex_v3@tbb@@AAE_NXZ
 
 ; spin_mutex.cpp
 ?internal_acquire at scoped_lock@spin_mutex at tbb@@AAEXAAV23@@Z
@@ -111,6 +148,13 @@ __TBB_machine_trylockbyte
 ?internal_construct at mutex@tbb@@AAEXXZ
 ?internal_destroy at mutex@tbb@@AAEXXZ
 
+; recursive_mutex.cpp
+?internal_acquire at scoped_lock@recursive_mutex at tbb@@AAEXAAV23@@Z
+?internal_release at scoped_lock@recursive_mutex at tbb@@AAEXXZ
+?internal_try_acquire at scoped_lock@recursive_mutex at tbb@@AAE_NAAV23@@Z
+?internal_construct at recursive_mutex@tbb@@AAEXXZ
+?internal_destroy at recursive_mutex@tbb@@AAEXXZ
+
 ; queuing_mutex.cpp
 ?acquire at scoped_lock@queuing_mutex at tbb@@QAEXAAV23@@Z
 ?release at scoped_lock@queuing_mutex at tbb@@QAEXXZ
@@ -119,7 +163,8 @@ __TBB_machine_trylockbyte
 ; concurrent_hash_map.cpp
 ?internal_grow_predicate at hash_map_segment_base@internal at tbb@@QBE_NXZ
 
-; ConcurrentQueue.cpp
+#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
 ?internal_size at concurrent_queue_base@internal at tbb@@IBEHXZ
@@ -132,8 +177,26 @@ __TBB_machine_trylockbyte
 ?internal_push at concurrent_queue_base@internal at tbb@@IAEXPBX at Z
 ?internal_push_if_not_full at concurrent_queue_base@internal at tbb@@IAE_NPBX at Z
 ?internal_set_capacity at concurrent_queue_base@internal at tbb@@IAEXHI at Z
+#endif
 
-; ConcurrentVector.cpp
+; concurrent_queue v3
+??1concurrent_queue_iterator_base_v3 at internal@tbb@@IAE at XZ
+??0concurrent_queue_iterator_base_v3 at internal@tbb@@IAE at ABVconcurrent_queue_base_v3@12@@Z
+?advance at concurrent_queue_iterator_base_v3@internal at tbb@@IAEXXZ
+?assign at concurrent_queue_iterator_base_v3@internal at tbb@@IAEXABV123@@Z
+??0concurrent_queue_base_v3 at internal@tbb@@IAE at I@Z
+??1concurrent_queue_base_v3 at internal@tbb@@MAE at XZ
+?internal_pop at concurrent_queue_base_v3@internal at tbb@@IAEXPAX at Z
+?internal_pop_if_present at concurrent_queue_base_v3@internal at tbb@@IAE_NPAX at Z
+?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_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
+
+#if !TBB_NO_LEGACY
+; concurrent_vector.cpp v2
 ?internal_assign at concurrent_vector_base@internal at tbb@@IAEXABV123 at IP6AXPAXI@ZP6AX1PBXI at Z4@Z
 ?internal_capacity at concurrent_vector_base@internal at tbb@@IBEIXZ
 ?internal_clear at concurrent_vector_base@internal at tbb@@IAEXP6AXPAXI at Z_N@Z
@@ -142,4 +205,30 @@ __TBB_machine_trylockbyte
 ?internal_grow_to_at_least at concurrent_vector_base@internal at tbb@@IAEXIIP6AXPAXI at Z@Z
 ?internal_push_back at concurrent_vector_base@internal at tbb@@IAEPAXIAAI at Z
 ?internal_reserve at concurrent_vector_base@internal at tbb@@IAEXIII at Z
+#endif
+
+; concurrent_vector v3
+??1concurrent_vector_base_v3 at internal@tbb@@IAE at XZ
+?internal_assign at concurrent_vector_base_v3@internal at tbb@@IAEXABV123 at IP6AXPAXI@ZP6AX1PBXI at Z4@Z
+?internal_capacity at concurrent_vector_base_v3@internal at tbb@@IBEIXZ
+?internal_clear at concurrent_vector_base_v3@internal at tbb@@IAEIP6AXPAXI at Z@Z
+?internal_copy at concurrent_vector_base_v3@internal at tbb@@IAEXABV123 at IP6AXPAXPBXI@Z at Z
+?internal_grow_by at concurrent_vector_base_v3@internal at tbb@@IAEIIIP6AXPAXPBXI at Z1@Z
+?internal_grow_to_at_least at concurrent_vector_base_v3@internal at tbb@@IAEXIIP6AXPAXPBXI at Z1@Z
+?internal_push_back at concurrent_vector_base_v3@internal at tbb@@IAEPAXIAAI at Z
+?internal_reserve at concurrent_vector_base_v3@internal at tbb@@IAEXIII at Z
+?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
 
+; tbb_thread
+?join at tbb_thread_v3@internal at tbb@@QAEXXZ
+?detach at tbb_thread_v3@internal at tbb@@QAEXXZ
+?internal_start at tbb_thread_v3@internal at tbb@@AAEXP6GIPAX at Z0@Z
+?allocate_closure_v3 at internal@tbb@@YAPAXI at Z
+?free_closure_v3 at internal@tbb@@YAXPAX at Z
+?hardware_concurrency at tbb_thread_v3@internal at tbb@@SAIXZ
+?thread_yield_v3 at internal@tbb@@YAXXZ
+?thread_sleep_v3 at internal@tbb@@YAXABVinterval_t at tick_count@2@@Z
+?move_v3 at internal@tbb@@YAXAAVtbb_thread_v3 at 12@0 at Z
+?thread_get_id_v3 at internal@tbb@@YA?AVid at tbb_thread_v3@12 at XZ
diff --git a/src/tbb/em64t-tbb.def b/src/tbb/win64-tbb-export.def
similarity index 57%
rename from src/tbb/em64t-tbb.def
rename to src/tbb/win64-tbb-export.def
index 775f72a..b6dc8e5 100644
--- a/src/tbb/em64t-tbb.def
+++ b/src/tbb/win64-tbb-export.def
@@ -42,8 +42,13 @@ __TBB_machine_pause
 ?NFS_Allocate at internal@tbb@@YAPEAX_K0PEAX at Z
 ?NFS_GetLineSize at internal@tbb@@YA_KXZ
 ?NFS_Free at internal@tbb@@YAXPEAX at Z
+?allocate_via_handler_v3 at internal@tbb@@YAPEAX_K at Z
+?deallocate_via_handler_v3 at internal@tbb@@YAXPEAX at Z
+?is_malloc_used_v3 at internal@tbb@@YA_NXZ
 
-; task.cpp
+
+; task.cpp v3
+?resize at affinity_partitioner_base_v3@internal at tbb@@AEAAXI at Z
 ?allocate at allocate_additional_child_of_proxy@internal at tbb@@QEBAAEAVtask at 3@_K at Z
 ?allocate at allocate_child_proxy@internal at tbb@@QEBAAEAVtask at 3@_K at Z
 ?allocate at allocate_continuation_proxy@internal at tbb@@QEBAAEAVtask at 3@_K at Z
@@ -53,18 +58,39 @@ __TBB_machine_pause
 ?free at allocate_child_proxy@internal at tbb@@QEBAXAEAVtask at 3@@Z
 ?free at allocate_continuation_proxy@internal at tbb@@QEBAXAEAVtask at 3@@Z
 ?free at allocate_root_proxy@internal at tbb@@SAXAEAVtask at 3@@Z
-?initialize at task_scheduler_init@tbb@@QEAAXH at Z
 ?internal_set_ref_count at task@tbb@@AEAAXH at Z
 ?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
 ?spawn_and_wait_for_all at task@tbb@@QEAAXAEAVtask_list at 2@@Z
+?default_num_threads at task_scheduler_init@tbb@@SAHXZ
+?initialize at task_scheduler_init@tbb@@QEAAXH_K at Z
+?initialize at task_scheduler_init@tbb@@QEAAXH at Z
 ?terminate at task_scheduler_init@tbb@@QEAAXXZ
+?observe at task_scheduler_observer_v3@internal at tbb@@QEAAX_N at Z
+
+; exception handling support
+?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
+??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
 
 ; tbb_misc.cpp
 ?assertion_failure at tbb@@YAXPEBDH00 at Z
 ?get_initial_auto_partitioner_divisor at internal@tbb@@YA_KXZ
 ?handle_perror at internal@tbb@@YAXHPEBD at Z
 ?set_assertion_handler at tbb@@YAP6AXPEBDH00 at ZP6AX0H00@Z at Z
+?runtime_warning at internal@tbb@@YAXPEBDZZ
+
+; itt_notify.cpp
+?itt_load_pointer_with_acquire_v3 at internal@tbb@@YAPEAXPEBX at Z
+?itt_store_pointer_with_release_v3 at internal@tbb@@YAXPEAX0 at Z
 
 ; pipeline.cpp
 ??_7pipeline at tbb@@6B@
@@ -83,7 +109,8 @@ __TBB_machine_pause
 ?upgrade_to_writer at scoped_lock@queuing_rw_mutex at tbb@@QEAA_NXZ
 ?try_acquire at scoped_lock@queuing_rw_mutex at tbb@@QEAA_NAEAV23 at _N@Z
 
-; spin_rw_mutex.cpp
+#if !TBB_NO_LEGACY
+; spin_rw_mutex.cpp v2
 ?internal_itt_releasing at spin_rw_mutex@tbb@@CAXPEAV12@@Z
 ?internal_acquire_writer at spin_rw_mutex@tbb@@CA_NPEAV12@@Z
 ?internal_acquire_reader at spin_rw_mutex@tbb@@CAXPEAV12@@Z
@@ -93,6 +120,17 @@ __TBB_machine_pause
 ?internal_release_writer at spin_rw_mutex@tbb@@CAXPEAV12@@Z
 ?internal_try_acquire_writer at spin_rw_mutex@tbb@@CA_NPEAV12@@Z
 ?internal_try_acquire_reader at spin_rw_mutex@tbb@@CA_NPEAV12@@Z
+#endif
+
+; spin_rw_mutex v3
+?internal_upgrade at spin_rw_mutex_v3@tbb@@AEAA_NXZ
+?internal_downgrade at spin_rw_mutex_v3@tbb@@AEAAXXZ
+?internal_acquire_reader at spin_rw_mutex_v3@tbb@@AEAAXXZ
+?internal_acquire_writer at spin_rw_mutex_v3@tbb@@AEAA_NXZ
+?internal_release_reader at spin_rw_mutex_v3@tbb@@AEAAXXZ
+?internal_release_writer at spin_rw_mutex_v3@tbb@@AEAAXXZ
+?internal_try_acquire_reader at spin_rw_mutex_v3@tbb@@AEAA_NXZ
+?internal_try_acquire_writer at spin_rw_mutex_v3@tbb@@AEAA_NXZ
 
 ; spin_mutex.cpp
 ?internal_acquire at scoped_lock@spin_mutex at tbb@@AEAAXAEAV23@@Z
@@ -106,6 +144,13 @@ __TBB_machine_pause
 ?internal_construct at mutex@tbb@@AEAAXXZ
 ?internal_destroy at mutex@tbb@@AEAAXXZ
 
+; recursive_mutex.cpp
+?internal_construct at recursive_mutex@tbb@@AEAAXXZ
+?internal_destroy at recursive_mutex@tbb@@AEAAXXZ
+?internal_acquire at scoped_lock@recursive_mutex at tbb@@AEAAXAEAV23@@Z
+?internal_try_acquire at scoped_lock@recursive_mutex at tbb@@AEAA_NAEAV23@@Z
+?internal_release at scoped_lock@recursive_mutex at tbb@@AEAAXXZ
+
 ; queuing_mutex.cpp
 ?acquire at scoped_lock@queuing_mutex at tbb@@QEAAXAEAV23@@Z
 ?release at scoped_lock@queuing_mutex at tbb@@QEAAXXZ
@@ -114,7 +159,8 @@ __TBB_machine_pause
 ; concurrent_hash_map.cpp
 ?internal_grow_predicate at hash_map_segment_base@internal at tbb@@QEBA_NXZ
 
-; ConcurrentQueue.cpp
+#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
 ??1concurrent_queue_base at internal@tbb@@MEAA at XZ
@@ -127,8 +173,26 @@ __TBB_machine_pause
 ?internal_push_if_not_full at concurrent_queue_base@internal at tbb@@IEAA_NPEBX at Z
 ?internal_set_capacity at concurrent_queue_base@internal at tbb@@IEAAX_J_K at Z
 ?internal_size at concurrent_queue_base@internal at tbb@@IEBA_JXZ
+#endif
+
+; concurrent_queue v3
+??0concurrent_queue_iterator_base_v3 at internal@tbb@@IEAA at AEBVconcurrent_queue_base_v3@12@@Z
+??1concurrent_queue_iterator_base_v3 at internal@tbb@@IEAA at XZ
+?assign at concurrent_queue_iterator_base_v3@internal at tbb@@IEAAXAEBV123@@Z
+?advance at concurrent_queue_iterator_base_v3@internal at tbb@@IEAAXXZ
+??0concurrent_queue_base_v3 at internal@tbb@@IEAA at _K@Z
+??1concurrent_queue_base_v3 at internal@tbb@@MEAA at XZ
+?internal_push at concurrent_queue_base_v3@internal at tbb@@IEAAXPEBX at Z
+?internal_push_if_not_full at concurrent_queue_base_v3@internal at tbb@@IEAA_NPEBX at Z
+?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_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
 
-; ConcurrentVector.cpp
+#if !TBB_NO_LEGACY
+; concurrent_vector.cpp v2
 ?internal_assign at concurrent_vector_base@internal at tbb@@IEAAXAEBV123 at _KP6AXPEAX1@ZP6AX2PEBX1 at Z5@Z
 ?internal_capacity at concurrent_vector_base@internal at tbb@@IEBA_KXZ
 ?internal_clear at concurrent_vector_base@internal at tbb@@IEAAXP6AXPEAX_K at Z_N@Z
@@ -137,3 +201,30 @@ __TBB_machine_pause
 ?internal_grow_to_at_least at concurrent_vector_base@internal at tbb@@IEAAX_K0P6AXPEAX0 at Z@Z
 ?internal_push_back at concurrent_vector_base@internal at tbb@@IEAAPEAX_KAEA_K at Z
 ?internal_reserve at concurrent_vector_base@internal at tbb@@IEAAX_K00 at Z
+#endif
+
+; concurrent_vector v3
+??1concurrent_vector_base_v3 at internal@tbb@@IEAA at XZ
+?internal_assign at concurrent_vector_base_v3@internal at tbb@@IEAAXAEBV123 at _KP6AXPEAX1@ZP6AX2PEBX1 at Z5@Z
+?internal_capacity at concurrent_vector_base_v3@internal at tbb@@IEBA_KXZ
+?internal_clear at concurrent_vector_base_v3@internal at tbb@@IEAA_KP6AXPEAX_K at Z@Z
+?internal_copy at concurrent_vector_base_v3@internal at tbb@@IEAAXAEBV123 at _KP6AXPEAXPEBX1@Z at Z
+?internal_grow_by at concurrent_vector_base_v3@internal at tbb@@IEAA_K_K0P6AXPEAXPEBX0 at Z2@Z
+?internal_grow_to_at_least at concurrent_vector_base_v3@internal at tbb@@IEAAX_K0P6AXPEAXPEBX0 at Z2@Z
+?internal_push_back at concurrent_vector_base_v3@internal at tbb@@IEAAPEAX_KAEA_K at Z
+?internal_reserve at concurrent_vector_base_v3@internal at tbb@@IEAAX_K00 at Z
+?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
+
+; tbb_thread
+?allocate_closure_v3 at internal@tbb@@YAPEAX_K at Z
+?detach at tbb_thread_v3@internal at tbb@@QEAAXXZ
+?free_closure_v3 at internal@tbb@@YAXPEAX at Z
+?hardware_concurrency at tbb_thread_v3@internal at tbb@@SAIXZ
+?internal_start at tbb_thread_v3@internal at tbb@@AEAAXP6AIPEAX at Z0@Z
+?join at tbb_thread_v3@internal at tbb@@QEAAXXZ
+?move_v3 at internal@tbb@@YAXAEAVtbb_thread_v3 at 12@0 at Z
+?thread_get_id_v3 at internal@tbb@@YA?AVid at tbb_thread_v3@12 at XZ
+?thread_sleep_v3 at internal@tbb@@YAXAEBVinterval_t at tick_count@2@@Z
+?thread_yield_v3 at internal@tbb@@YAXXZ
diff --git a/src/tbbmalloc/Customize.h b/src/tbbmalloc/Customize.h
index cf2a1be..78a621d 100644
--- a/src/tbbmalloc/Customize.h
+++ b/src/tbbmalloc/Customize.h
@@ -44,6 +44,19 @@ extern "C" void mallocProcessShutdownNotification(void);
 
 #include "tbb/tbb_machine.h"
 
+#if DO_ITT_NOTIFY
+#include "tbb/itt_notify.h"
+#define MALLOC_ITT_SYNC_PREPARE(pointer) ITT_NOTIFY(sync_prepare, (pointer))
+#define MALLOC_ITT_SYNC_ACQUIRED(pointer) ITT_NOTIFY(sync_acquired, (pointer))
+#define MALLOC_ITT_SYNC_RELEASING(pointer) ITT_NOTIFY(sync_releasing, (pointer))
+#define MALLOC_ITT_SYNC_CANCEL(pointer) ITT_NOTIFY(sync_cancel, (pointer))
+#else
+#define MALLOC_ITT_SYNC_PREPARE(pointer) ((void)0)
+#define MALLOC_ITT_SYNC_ACQUIRED(pointer) ((void)0)
+#define MALLOC_ITT_SYNC_RELEASING(pointer) ((void)0)
+#define MALLOC_ITT_SYNC_CANCEL(pointer) ((void)0)
+#endif
+
 //! Stripped down version of spin_mutex.
 /** Instances of MallocMutex must be declared in memory that is zero-initialized.
     There are no constructors.  This is a feature that lets it be
@@ -54,7 +67,7 @@ extern "C" void mallocProcessShutdownNotification(void);
     in a strict block-scoped locking pattern.  Omitting these methods permitted
     further simplication. */
 class MallocMutex {
-    volatile unsigned char value;
+    unsigned char value;
 
     //! Deny assignment
     void operator=( MallocMutex& MallocMutex );
@@ -64,7 +77,7 @@ public:
         MallocMutex& mutex;
     public:
         scoped_lock( MallocMutex& m ) : value( __TBB_LockByte(m.value)), mutex(m) {}
-        ~scoped_lock() { mutex.value = value; }
+        ~scoped_lock() { __TBB_store_with_release(mutex.value, value); }
     };
     friend class scoped_lock;
 };
@@ -79,4 +92,19 @@ inline intptr_t AtomicCompareExchange( volatile intptr_t& location, intptr_t new
 
 #define USE_DEFAULT_MEMORY_MAPPING 1
 
+namespace tbb {
+namespace internal {
+
+void MallocInitializeITT();
+
+inline void init_tbbmalloc() {
+#if DO_ITT_NOTIFY
+    MallocInitializeITT();
+#endif
+}
+
+} } // namespaces
+
+#define MALLOC_EXTRA_INITIALIZATION tbb::internal::init_tbbmalloc()
+
 #endif /* _TBB_malloc_Customize_H_ */
diff --git a/src/tbbmalloc/MemoryAllocator.cpp b/src/tbbmalloc/MemoryAllocator.cpp
index aa6a77c..9fe7776 100644
--- a/src/tbbmalloc/MemoryAllocator.cpp
+++ b/src/tbbmalloc/MemoryAllocator.cpp
@@ -32,7 +32,7 @@
 #ifdef MALLOC_TRACE
 #define TRACEF printf
 #else
-static inline int TRACEF(char *arg, ...)
+static inline int TRACEF(const char *arg, ...)
 {
     return 0;
 }
@@ -68,7 +68,7 @@ static inline int TRACEF(char *arg, ...)
 #include <string.h>
 #include <errno.h>
 
-#if __linux__||__APPLE__
+#if __linux__||__APPLE__ || __FreeBSD__ || __sun
 #include <fcntl.h>
 #endif
 
@@ -106,7 +106,7 @@ namespace Internal {
 
 typedef intptr_t ThreadId;
 
-static volatile ThreadId ThreadIdCount;
+static ThreadId ThreadIdCount;
 
 static tls_key_t TLS_pointer_key;
 static tls_key_t Tid_key;
@@ -138,89 +138,87 @@ static inline void  setThreadMallocTLS( void * newvalue ) {
 
 /*********** End code to provide thread ID and a TLS pointer **********/
 
+/********** Various numeric parameters controlling allocations ********/
 
-/*********** Code to acquire memory from the OS or other executive ****************/
-
-#if USE_DEFAULT_MEMORY_MAPPING
-#include "MapMemory.h"
-#else
-/* assume MapMemory and UnmapMemory are customized */
-#endif
+/*
+ * There are bins for all 8 byte aligned objects less than this segregated size; 8 bins in total
+ */
+static const uint32_t maxSmallObjectSize = 64;
 
 /*
- * Get memory in pieces of this size. 0x0100000;is 1 megabyte decimal
- *
+ * There are 4 bins between each couple of powers of 2 [64-128-256-...]
+ * from maxSmallObjectSize till this size; 16 bins in total
  */
+static const uint32_t maxSegregatedObjectSize = 1024;
 
-static size_t mmapRequestSize = 0x0100000;
+/*
+ * And there are 5 bins with the following allocation sizes: 1792, 2688, 3968, 5376, 8064.
+ * They selected to fit 9, 6, 4, 3, and 2 sizes per a block, and also are multiples of 128.
+ * If sizeof(Block) changes from 128, these sizes require close attention!
+ */
+static const uint32_t fittingSize1 = 1792;
+static const uint32_t fittingSize2 = 2688;
+static const uint32_t fittingSize3 = 3968;
+static const uint32_t fittingSize4 = 5376;
+static const uint32_t fittingSize5 = 8064;
 
 /*
  * Objects of this size and larger are considered large objects.
  */
-static const uint32_t minLargeObjectSize = 8129; // 8128 is the biggest size to be held in a bin
+static const uint32_t minLargeObjectSize = fittingSize5 + 1;
 
 /*
- * Returns 0 if failure for any reason
- * otherwise returns a pointer to the newly available memory.
+ * This number of bins in the TLS that leads to blocks that we can allocate in.
  */
-static void* getMemory (size_t bytes)
-{
-    void *result = 0;
-    MALLOC_ASSERT( bytes>=minLargeObjectSize, "request too small" );
-    result = MapMemory(bytes);
-#ifdef MALLOC_TRACE
-    if (!result) {
-        TRACEF("ScalableMalloc trace - getMemory unsuccess, can't get %d bytes from OS\n", bytes);
-    } else {
-        TRACEF("ScalableMalloc trace - getMemory success returning %p\n", result);
-    }
-#endif
-    return result;
-}
+static const uint32_t numBlockBinLimit = 32;
+static const uint32_t numBlockBins = 29;
 
-static void returnMemory(void *area, size_t bytes)
-{
-    int retcode = UnmapMemory(area, bytes);
-#ifdef MALLOC_TRACE
-    if (retcode) {
-        TRACEF("ScalableMalloc trace - returnMemory unsuccess for %p; perhaps it has already been freed or was never allocated.\n", area);
-    }
-#endif
-    return;
-}
+/*
+ * blockSize - the size of a block, it must be larger than maxSegregatedObjectSize.
+ * we may well want to play around with this, a 4K page size is another interesting size.
+ *
+ */
+static const uintptr_t blockSize = 16384;
 
-/********* End memory acquisition code ********************************/
+/*
+ * Get virtual memory in pieces of this size: 0x0100000 is 1 megabyte decimal
+ */
+static size_t mmapRequestSize = 0x0100000;
 
-/********* The data structures                           **************/
+/********** End of numeric parameters controlling allocations *********/
 
-typedef struct FreeObjectS *FreeObjectPtr;
+/********* The data structures and global objects        **************/
 
-typedef struct FreeObjectS {
+typedef struct FreeObject *FreeObjectPtr;
+
+struct FreeObject {
     FreeObjectPtr  next;
-} FreeObject;
+};
 
 /*
- * The intent is to make sure that the size of a Block is the same as a cache line size, this allows us to
- * get good alignement at the cost of some overhead equal to the amount of padding included in the Block.
- *
- */
+ * The following constant is used to define the size of struct Block, the block header.
+ * The intent is to have the size of a Block multiple of the cache line size, this allows us to
+ * get good alignment at the cost of some overhead equal to the amount of padding included in the Block.
+  */
 
-#define CACHE_LINE_SIZE 64
+#define ALIGNED_SIZE 64 // 64 is a common size of a cache line
 
-typedef struct BlockS *BlockPtr;
+typedef struct Block* BlockPtr;
 
-/* The next field in this structure has to maintain some invariants.
+/* The 'next' field in the block header has to maintain some invariants:
  *   it needs to be on a 16K boundary and the first field in the block.
  *   Any value stored there needs to have the lower 14 bits set to 0
  *   so that various assert work. This means that if you want to smash this memory
  *   for debugging purposes you will need to obey this invariant.
- * The total size of this structure needs to be a power of 2 to simplify
- * the alignement requirements. For now it is a 64 byte structure.
- * Moreover, changing the size would require to change some bin allocation sizes,
- * in particular "fitting" sizes (see below).
+ * The total size of the header needs to be a power of 2 to simplify
+ * the alignement requirements. For now it is a 128 byte structure.
+ * To avoid false sharing, the fields changed only locally are separated 
+ * from the fields changed by foreign threads.
+ * Changing the size of the block header would require to change
+ * some bin allocation sizes, in particular "fitting" sizes (see above).
  */
 
-typedef struct BlockS {
+struct LocalBlockFields {
     BlockPtr     next;     /* This field needs to be on a 16K boundary and the first field in the block
                               so non-blocking LifoQueues will work. */
     BlockPtr     previous; /* Use double linked list to speed up removal */
@@ -228,61 +226,22 @@ typedef struct BlockS {
     unsigned int owner;
     FreeObject  *bumpPtr;         /* bump pointer moves from the end to the beginning of a block */
     FreeObject  *freeList;
-    FreeObject  *publicFreeList;
-    BlockPtr     nextPrivatizable;
     unsigned int allocatedCount;  /* Number of objects allocated (obviously by the owning thread) */
     unsigned int isFull;
-#if !( __ARCH_x86_64 || __ARCH_ipf )
-#define BLOCK_IS_PADDED 1
-    void        *pad1;    /* Pad so bytesForObjects is at 64 bytes to help with alignment */
-    void        *pad2;
-    void        *pad3;
-    void        *pad4;
-    void        *pad5;
-    void        *pad6;
-#endif
-} Block;
+};
 
-//typedef Block SizeBins[]; /* an array of blocks */
+struct Block : public LocalBlockFields {
+    size_t       __pad_local_fields[(ALIGNED_SIZE-sizeof(LocalBlockFields))/sizeof(size_t)];
+    FreeObject  *publicFreeList;
+    BlockPtr     nextPrivatizable;
+    size_t       __pad_public_fields[(ALIGNED_SIZE-2*sizeof(void*))/sizeof(size_t)];
+};
 
-typedef struct BinS {
+struct Bin {
     BlockPtr  activeBlk;
     BlockPtr  mailbox;
     MallocMutex mailLock;
-} Bin;
-
-/********* End of the data structures                    **************/
-
-
-/********* Now some rough utility code to deal with indexing the size bins. **************/
-
-/*
- * There are bins for all 8 byte aligned objects less than this segregated size; 8 bins in total
- */
-static const uint32_t maxSmallObjectSize = 64;
-
-/*
- * There are 4 bins between each couple of powers of 2 [64-128-256-...]
- * from maxSmallObjectSize till this size; 16 bins in total
- */
-static const uint32_t maxSegregatedObjectSize = 1024;
-
-/*
- * And there are 5 bins with the following allocation sizes: 1600, 2688, 4032, 5440, 8128.
- * They selected to fit 10, 6, 4, 3, and 2 sizes per a block, and also are multiples of 64.
- * If sizeof(Block) changes from 64, these sizes require close attention!
- */
-static const uint32_t fittingSize1 = 1600;
-static const uint32_t fittingSize2 = 2688;
-static const uint32_t fittingSize3 = 4032;
-static const uint32_t fittingSize4 = 5440;
-static const uint32_t fittingSize5 = 8128;
-
-/*
- * This number of bins in the TLS that leads to blocks that we can allocate in.
- */
-static const uint32_t numBlockBinLimit = 32;
-static const uint32_t numBlockBins = 29;
+};
 
 /*
  * The size of the TLS should be enough to hold twice as many as numBlockBinLimit pointers
@@ -292,13 +251,6 @@ static const uint32_t numBlockBins = 29;
 static const uint32_t tlsSize = numBlockBinLimit * sizeof(Bin);
 
 /*
- * blockSize - the size of a block, it must be larger than maxSegregatedObjectSize.
- * we may well want to play around with this, a 4K page size is another interesting size.
- *
- */
-static const uintptr_t blockSize = 16384;
-
-/*
  * This is a lifo queue that one can init, push or pop from */
 static LifoQueue freeBlockQueue;
 
@@ -311,6 +263,50 @@ static LifoQueue freeBlockQueue;
 static char globalBinSpace[sizeof(LifoQueue)*numBlockBinLimit];
 static LifoQueue* globalSizeBins = (LifoQueue*)globalBinSpace;
 
+/********* End of the data structures                    **************/
+
+/*********** Code to acquire memory from the OS or other executive ****************/
+
+#if USE_DEFAULT_MEMORY_MAPPING
+#include "MapMemory.h"
+#else
+/* assume MapMemory and UnmapMemory are customized */
+#endif
+
+/*
+ * Returns 0 if failure for any reason
+ * otherwise returns a pointer to the newly available memory.
+ */
+static void* getMemory (size_t bytes)
+{
+    void *result = 0;
+    MALLOC_ASSERT( bytes>=minLargeObjectSize, "request too small" );
+    result = MapMemory(bytes);
+#ifdef MALLOC_TRACE
+    if (!result) {
+        TRACEF("ScalableMalloc trace - getMemory unsuccess, can't get %d bytes from OS\n", bytes);
+    } else {
+        TRACEF("ScalableMalloc trace - getMemory success returning %p\n", result);
+    }
+#endif
+    return result;
+}
+
+static void returnMemory(void *area, size_t bytes)
+{
+    int retcode = UnmapMemory(area, bytes);
+#ifdef MALLOC_TRACE
+    if (retcode) {
+        TRACEF("ScalableMalloc trace - returnMemory unsuccess for %p; perhaps it has already been freed or was never allocated.\n", area);
+    }
+#endif
+    return;
+}
+
+/********* End memory acquisition code ********************************/
+
+/********* Now some rough utility code to deal with indexing the size bins. **************/
+
 /*
  * Given a number return the highest non-zero bit in it. It is intended to work with 32-bit values only.
  * Moreover, on IPF, for sake of simplicity and performance, it is narrowed to only serve for 64 to 1023.
@@ -325,7 +321,7 @@ static inline unsigned int highestBitPos(unsigned int number)
     unsigned int pos;
 #if __ARCH_x86_32||__ARCH_x86_64
 
-# if __linux__||__APPLE__
+# if __linux__||__APPLE__||__FreeBSD__ || __sun
     __asm__ ("bsr %1,%0" : "=r"(pos) : "r"(number));
 # elif (_WIN32 && (!_WIN64 || __INTEL_COMPILER))
     __asm
@@ -339,7 +335,7 @@ static inline unsigned int highestBitPos(unsigned int number)
 #   error highestBitPos() not implemented for this platform
 # endif
 
-#elif __ARCH_ipf || __ARCH_unknown
+#elif __ARCH_ipf || __ARCH_other
     static unsigned int bsr[16] = {0,6,7,7,8,8,8,8,9,9,9,9,9,9,9,9};
     MALLOC_ASSERT( number>=64 && number<1024, ASSERT_TEXT );
     pos = bsr[ number>>6 ];
@@ -490,43 +486,6 @@ static int mallocBigBlock()
     return 1;
 }
 
-/**************** Some forward references ******************/
-static void *bootStrapMalloc(size_t size);
-extern "C" void mallocThreadShutdownNotification(void*);
-/**************** End Forward references  ******************/
-
-/*
- * Obviously this needs to be called before malloc is available.
- */
-/*  THIS IS DONE ON-DEMAND ON FIRST MALLOC, SO ASSUME MANUAL CALL TO IT IS NOT REQUIRED  */
-static void initMemoryManager()
-{
-    int result;
-    /* Hard code this size to 64 so that we get natural alignement for several useful sizes.. */
-    TRACEF("sizeof(Block) is %d (expected 64); sizeof(uintptr_t) is %d\n", sizeof(Block), sizeof(uintptr_t));
-    MALLOC_ASSERT( CACHE_LINE_SIZE == sizeof(Block), ASSERT_TEXT );
-
-// Create keys for thread-local storage and for thread id
-// TODO: add error handling
-#if USE_WINTHREAD
-    TLS_pointer_key = TlsAlloc();
-    Tid_key = TlsAlloc();
-#else
-    int status = pthread_key_create( &TLS_pointer_key, mallocThreadShutdownNotification );
-    status = pthread_key_create( &Tid_key, NULL );
-//    if( status )
-//        HandlePerror(status,"pthread_key_create");
-#endif /* USE_WINTHREAD */
-    // no more necessary: lifoQueueInit(&freeBlockQueue);
-    TRACEF("Asking for a mallocBigBlock\n");
-    result = mallocBigBlock();
-    if (!result) {
-        printf ("initMemoryManager cannot access sufficient memory to initialize; aborting \n");
-        exit(0);
-    }
-}
-
-
 /*
  * The malloc routines themselves need to be able to occasionally malloc some space,
  * in order to set up the structures used by the thread local structures. This
@@ -772,9 +731,10 @@ static void freePublicObject (Block *block, FreeObject *objectToFree)
     FreeObject *publicFreeList;
 
 #if FREELIST_NONBLOCKING
-    FreeObject *temp;
+    FreeObject *temp = block->publicFreeList;
+    MALLOC_ITT_SYNC_RELEASING(&block->publicFreeList);
     do {
-        publicFreeList = objectToFree->next = const_cast<FreeObject* volatile &>(block->publicFreeList);
+        publicFreeList = objectToFree->next = temp;
         temp = (FreeObject*)AtomicCompareExchange(
                                 (intptr_t&)block->publicFreeList,
                                 (intptr_t)objectToFree, (intptr_t)publicFreeList );
@@ -826,13 +786,15 @@ static void privatizePublicFreeList (Block *mallocBlock)
 
     MALLOC_ASSERT( mallocBlock->owner == getThreadId(), ASSERT_TEXT );
 #if FREELIST_NONBLOCKING
+    temp = mallocBlock->publicFreeList;
     do {
-        publicFreeList = const_cast<FreeObject* volatile &>(mallocBlock->publicFreeList);
+        publicFreeList = temp;
         temp = (FreeObject*)AtomicCompareExchange(
                                 (intptr_t&)mallocBlock->publicFreeList,
                                 0, (intptr_t)publicFreeList);
         //no backoff necessary because trying to make change, not waiting for a change
     } while( temp != publicFreeList );
+    MALLOC_ITT_SYNC_ACQUIRED(&mallocBlock->publicFreeList);
 #else
     STAT_increment(mallocBlock->owner, ThreadCommonCounters, lockPublicFreeList);
     {
@@ -982,17 +944,8 @@ static void initEmptyBlock(Block *block, size_t size)
     block->isFull = 0;
     block->objectSize = allocatedSize;
     block->owner = getThreadId();
-#if BLOCK_IS_PADDED
-    block->pad1 = 0;
-    block->pad2 = 0;
-    block->pad3 = 0;
-    block->pad4 = 0;
-    block->pad5 = 0;
-    block->pad6 = 0;
-#endif /* BLOCK_IS_PADDED */
-/*    printf ("Empty block %p is initialized, owner is %d, objectSize is %d, bumpPtr is %p\n",
+    TRACEF ("Empty block %p is initialized, owner is %d, objectSize is %d, bumpPtr is %p\n",
         block, block->owner, block->objectSize, block->bumpPtr);
- */
   }
 
 /* Return an empty uninitialized block in a non-blocking fashion. */
@@ -1098,11 +1051,11 @@ inline static Block* setPreviousBlockActive( Bin* bin )
 
 static unsigned int isLargeObject(void *object); /* Forward Ref */
 
-typedef struct LargeObjectHeaderS {
+struct LargeObjectHeader {
     void        *unalignedResult;   /* The base of the memory returned from getMemory, this is what is used to return this to the OS */
     size_t       unalignedSize;     /* The size that was requested from getMemory */
     size_t       objectSize;        /* The size originally requested by a client */
-} LargeObjectHeader;
+};
 
 static inline void *mallocLargeObject (size_t size)
 {
@@ -1113,15 +1066,12 @@ static inline void *mallocLargeObject (size_t size)
 
     // TODO: can the requestedSize be optimized somehow?
     size_t requestedSize = size + sizeof(LargeObjectHeader) + blockSize;
-    /* errno should be tested because some Linux versions have a known issue
-       of returning non-NULL even if there is no memory */
-    errno = 0;
 #if USE_MALLOC_FOR_LARGE_OBJECT
     unalignedArea = malloc(requestedSize);
 #else
     unalignedArea = getMemory(requestedSize);
 #endif /* USE_MALLOC_FOR_LARGE_OBJECT */
-    if (!unalignedArea || errno) {
+    if (!unalignedArea) {
         /* We can't get any more memory from the OS or executive so return 0 */
         return 0;
     }
@@ -1161,31 +1111,6 @@ static inline unsigned int getLargeObjectSize(void *object)
     return header->objectSize;
 }
 
-//! Value indicating state of package initialization.
-/* 0 = initialization not started.
-   1 = initialization started but not finished.
-   2 = initialization finished.
-   In theory, we only need values 0 and 2.  But value 1 is nonetheless useful for
-   detecting errors in the double-check pattern. */
-static volatile int mallocInitialized;   // implicitly initialized to 0
-static MallocMutex initAndShutMutex;
-
-//! Ensures that initMemoryManager() is called once and only once.
-/** Does not return until initMemoryManager() has been completed by a thread.
-    There is no need to call this routine if mallocInitialized==2 . */
-static void checkInitialization()
-{
-    MallocMutex::scoped_lock lock( initAndShutMutex );
-    if(mallocInitialized!=2) {
-        MALLOC_ASSERT(mallocInitialized==0, ASSERT_TEXT);
-        mallocInitialized = 1;
-        initMemoryManager();
-        MALLOC_ASSERT(mallocInitialized==1, ASSERT_TEXT);
-        mallocInitialized = 2;
-    }
-    MALLOC_ASSERT(mallocInitialized==2, ASSERT_TEXT); /* It can't be 0 or I would have initialized it */
-}
-
 static FreeObject *allocateFromFreeList(Block *mallocBlock)
 {
     FreeObject *result;
@@ -1227,21 +1152,21 @@ inline static FreeObject* allocateFromBlock( Block *mallocBlock )
 
     MALLOC_ASSERT( mallocBlock->owner == getThreadId(), ASSERT_TEXT );
     /*
-     * use thread local bump pointer allocation.
+     * for better cache locality, first looking in the free list
      */
-    if ( (result = allocateFromBumpPtr(mallocBlock)) ) { /* avoid initing free list */
+    if ( (result = allocateFromFreeList(mallocBlock)) ) {
         return result;
     }
-    MALLOC_ASSERT( !mallocBlock->bumpPtr, ASSERT_TEXT );
+    MALLOC_ASSERT( !mallocBlock->freeList, ASSERT_TEXT );
     /*
-     * else use allocation from free lists
+     * if free list is empty, try thread local bump pointer allocation.
      */
-    if ( (result = allocateFromFreeList(mallocBlock)) ) {
+    if ( (result = allocateFromBumpPtr(mallocBlock)) ) {
         return result;
     }
-    MALLOC_ASSERT( !mallocBlock->freeList, ASSERT_TEXT );
+    MALLOC_ASSERT( !mallocBlock->bumpPtr, ASSERT_TEXT );
     /*
-     * else the block is considered full
+     * the block is considered full
      */
     mallocBlock->isFull = 1;
     return NULL;
@@ -1260,6 +1185,64 @@ inline void* set_errno_if_NULL(void* arg)
 using namespace ThreadingSubstrate;
 using namespace ThreadingSubstrate::Internal;
 
+//! Value indicating state of package initialization.
+/* 0 = initialization not started.
+   1 = initialization started but not finished.
+   2 = initialization finished.
+   In theory, we only need values 0 and 2.  But value 1 is nonetheless useful for
+   detecting errors in the double-check pattern. */
+static int mallocInitialized;   // implicitly initialized to 0
+static MallocMutex initAndShutMutex;
+
+extern "C" void mallocThreadShutdownNotification(void*);
+
+/*
+ * Obviously this needs to be called before malloc is available.
+ */
+/*  THIS IS DONE ON-DEMAND ON FIRST MALLOC, SO ASSUME MANUAL CALL TO IT IS NOT REQUIRED  */
+static void initMemoryManager()
+{
+    int result;
+    TRACEF("sizeof(Block) is %d (expected 128); sizeof(uintptr_t) is %d\n", sizeof(Block), sizeof(uintptr_t));
+    MALLOC_ASSERT( 2*ALIGNED_SIZE == sizeof(Block), ASSERT_TEXT );
+
+// Create keys for thread-local storage and for thread id
+// TODO: add error handling
+#if USE_WINTHREAD
+    TLS_pointer_key = TlsAlloc();
+    Tid_key = TlsAlloc();
+#else
+    int status = pthread_key_create( &TLS_pointer_key, mallocThreadShutdownNotification );
+    status = pthread_key_create( &Tid_key, NULL );
+#endif /* USE_WINTHREAD */
+    // no more necessary: lifoQueueInit(&freeBlockQueue);
+    TRACEF("Asking for a mallocBigBlock\n");
+    result = mallocBigBlock();
+    if (!result) {
+        printf ("The memory manager cannot access sufficient memory to initialize; aborting \n");
+        exit(0);
+    }
+}
+
+//! Ensures that initMemoryManager() is called once and only once.
+/** Does not return until initMemoryManager() has been completed by a thread.
+    There is no need to call this routine if mallocInitialized==2 . */
+static void checkInitialization()
+{
+    MallocMutex::scoped_lock lock( initAndShutMutex );
+    if(mallocInitialized!=2) {
+        MALLOC_ASSERT(mallocInitialized==0, ASSERT_TEXT);
+        mallocInitialized = 1;
+        initMemoryManager();
+#ifdef  MALLOC_EXTRA_INITIALIZATION
+        MALLOC_EXTRA_INITIALIZATION;
+#endif /* MALLOC_EXTRA_INITIALIZATION */
+        MALLOC_ASSERT(mallocInitialized==1, ASSERT_TEXT);
+        mallocInitialized = 2;
+    }
+    MALLOC_ASSERT(mallocInitialized==2, ASSERT_TEXT); /* It can't be 0 or I would have initialized it */
+}
+
 /*
  * When a thread is shuting down this routine should be called to remove all the thread ids
  * from the malloc blocks and replace them with a NULL thread id.
@@ -1281,8 +1264,8 @@ extern "C" void mallocThreadShutdownNotification(void* arg)
     unsigned int index;
 
     {
-        MallocMutex::scoped_lock lock( ThreadingSubstrate::Internal::initAndShutMutex );
-        if ( ThreadingSubstrate::Internal::mallocInitialized == 0 ) return;
+        MallocMutex::scoped_lock lock( initAndShutMutex );
+        if ( mallocInitialized == 0 ) return;
     }
 
     TRACEF("Thread id %d blocks return start %d\n", getThreadId(),  threadGoingDownCount++);
diff --git a/src/tbbmalloc/TypeDefinitions.h b/src/tbbmalloc/TypeDefinitions.h
index 27b21e8..b669a6d 100644
--- a/src/tbbmalloc/TypeDefinitions.h
+++ b/src/tbbmalloc/TypeDefinitions.h
@@ -46,10 +46,10 @@
 #       define __ARCH_x86_64 1
 #   elif __ia64__
 #       define __ARCH_ipf 1
-#   elif __i386__
+#   elif __i386__ || __i386
 #       define __ARCH_x86_32 1
 #   else
-#       define __ARCH_unknown 1
+#       define __ARCH_other 1
 #   endif
 #   define USE_PTHREAD 1
 #endif
diff --git a/src/test/test_cache_aligned_allocator.cpp b/src/tbbmalloc/lin-tbbmalloc-export.def
similarity index 79%
copy from src/test/test_cache_aligned_allocator.cpp
copy to src/tbbmalloc/lin-tbbmalloc-export.def
index 5b9deb3..7c68402 100644
--- a/src/test/test_cache_aligned_allocator.cpp
+++ b/src/tbbmalloc/lin-tbbmalloc-export.def
@@ -26,17 +26,11 @@
     the GNU General Public License.
 */
 
-// Test whether cache_aligned_allocator works with some of the host's STL containers.
-
-#include "tbb/cache_aligned_allocator.h"
-
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-// the real body of the test is there:
-#include "test_allocator.h"
-
-int main(void)
 {
-    int result = TestMain<tbb::cache_aligned_allocator<void> >();
-    printf("done\n");
-    return result;
-}
+global:
+scalable_calloc;
+scalable_free;
+scalable_malloc;
+scalable_realloc;
+local:*;
+};
diff --git a/src/tbbmalloc/em64t-malloc-mac-export.txt b/src/tbbmalloc/mac32-tbbmalloc-export.def
similarity index 100%
rename from src/tbbmalloc/em64t-malloc-mac-export.txt
rename to src/tbbmalloc/mac32-tbbmalloc-export.def
diff --git a/src/tbbmalloc/ia32-malloc-mac-export.txt b/src/tbbmalloc/mac64-tbbmalloc-export.def
similarity index 100%
rename from src/tbbmalloc/ia32-malloc-mac-export.txt
rename to src/tbbmalloc/mac64-tbbmalloc-export.def
diff --git a/src/tbbmalloc/tbbmalloc.cpp b/src/tbbmalloc/tbbmalloc.cpp
index c39b551..769c5a6 100644
--- a/src/tbbmalloc/tbbmalloc.cpp
+++ b/src/tbbmalloc/tbbmalloc.cpp
@@ -26,10 +26,37 @@
     the GNU General Public License.
 */
 
-//#define INSTANTIATE_ITT_NOTIFY 1
-//#include "tbb/itt_notify.h"
+#define INSTANTIATE_ITT_NOTIFY 1
 #include "Customize.h"
 
+#define DoOneTimeInitializations __TBB_malloc_DoOneTimeInitializations_stub
+#include "tbb/itt_notify.cpp"
+
+namespace tbb {
+namespace internal {
+
+void DoOneTimeInitializations() {}
+
+#if DO_ITT_NOTIFY
+
+/** Caller is responsible for ensuring this routine is called exactly once. */
+void MallocInitializeITT() {
+    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 );
+    }
+    if (!success){
+        for (int i = 0; i < 5; i++)
+            *ITT_HandlerTable[i].handler = NULL;
+    }
+}
+
+#endif /* DO_ITT_NOTIFY */
+
+} } // namespaces
+
 #ifdef _WIN32
 #include <windows.h>
 
@@ -46,3 +73,5 @@ BOOL WINAPI DllMain( HINSTANCE hInst, DWORD callReason, LPVOID )
     return TRUE;
 }
 #endif //_WIN32
+
+
diff --git a/src/tbbmalloc/em64t-malloc.def b/src/tbbmalloc/win32-tbbmalloc-export.def
similarity index 100%
rename from src/tbbmalloc/em64t-malloc.def
rename to src/tbbmalloc/win32-tbbmalloc-export.def
diff --git a/src/tbbmalloc/ia32-malloc.def b/src/tbbmalloc/win64-tbbmalloc-export.def
similarity index 100%
rename from src/tbbmalloc/ia32-malloc.def
rename to src/tbbmalloc/win64-tbbmalloc-export.def
diff --git a/src/test/Makefile b/src/test/Makefile
deleted file mode 100644
index 350e328..0000000
--- a/src/test/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 2005-2008 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?=../..
-include $(tbb_root)/build/common.inc
-
-all: release debug
-
-release debug: 
-	@-$(MD) "$(work_dir)_$@"
-	$(MAKE) -C "$(work_dir)_$@" -r -f $(tbb_root)/build/Makefile.test cfg=$@
-
-clean: clean_release clean_debug
-
-clean_release:
-	@-$(RM) $(work_dir)_release$(SLASH)*.*
-	@-rmdir "$(work_dir)_release"
-
-clean_debug:
-	@-$(RM) $(work_dir)_debug$(SLASH)*.*
-	@-rmdir "$(work_dir)_debug"
diff --git a/src/test/harness.h b/src/test/harness.h
index 9c59df1..dec6838 100644
--- a/src/test/harness.h
+++ b/src/test/harness.h
@@ -31,14 +31,19 @@
 // Every test is presumed to have a command line of the form "foo [-v] [nthread]"
 // The default for nthread is 2.
 
+#if __SUNPRO_CC
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#else
 #include <cstdio>
 #include <cstdlib>
 #include <cstring>
+#endif
 #include <new>
-#include "tbb/tbb_stddef.h"
 #include "harness_assert.h"
 
-#if __linux__||__APPLE__
+#if __linux__||__APPLE__||__FreeBSD__ || __sun
     #include <pthread.h>
 #elif _WIN32||WIN64
     #include <windows.h>
@@ -47,9 +52,17 @@
     #error unknown OS
 #endif
 
-static void ReportError( int line, const char* expression, const char * message ) {
-    fprintf(stderr,"Line %d, assertion %s: %s\n", line, expression, message ? message : "failed" );
-    abort();
+static void ReportError( int line, const char* expression, const char * message, bool is_error ) {
+    if ( is_error ) {
+        fprintf(stderr,"Line %d, assertion %s: %s\n", line, expression, message ? message : "failed" );
+#if TBB_EXIT_ON_ASSERT
+        exit(1);
+#else
+        abort();
+#endif /* TBB_EXIT_ON_ASSERT */
+    }
+    else
+        printf("WARNING: at line %d, assertion %s: %s\n", line, expression, message ? message : "failed" );
 }
 
 #if !HARNESS_NO_PARSE_COMMAND_LINE
@@ -120,7 +133,7 @@ public:
 
     //! Start task
     void start() {
-#if __linux__||__APPLE__
+#if __linux__||__APPLE__||__FreeBSD__ || __sun
         int status = pthread_create(&thread_id, NULL, thread_function, this);
         ASSERT(0==status, "NativeParallelFor: pthread_create failed");
 #else
@@ -132,7 +145,7 @@ public:
 
     //! Wait for task to finish
     void wait_to_finish() {
-#if __linux__||__APPLE__
+#if __linux__||__APPLE__||__FreeBSD__ || __sun
         int status = pthread_join( thread_id, NULL );
         ASSERT( !status, "pthread_join failed" );
 #else
@@ -148,7 +161,7 @@ public:
         Top-level caller should let index default to 0. */
     static size_t build_task_array( const Range& range, const Body& body, NativeParalleForTask* array, size_t index ); 
 private:
-#if __linux__||__APPLE__
+#if __linux__||__APPLE__||__FreeBSD__ || __sun
     pthread_t thread_id;
 #else
     HANDLE thread_handle;
@@ -160,7 +173,7 @@ private:
     //! Body to invoke over the range.
     const Body body;
 
-#if __linux__||__APPLE__
+#if __linux__||__APPLE__||__FreeBSD__ || __sun
     static void* thread_function(void* object)
 #else
     static unsigned __stdcall thread_function( void* object )
@@ -172,6 +185,8 @@ private:
     }
 };
 
+#include "tbb/tbb_stddef.h"
+
 template<typename Range,typename Body>
 size_t NativeParalleForTask<Range,Body>::build_task_array( const Range& range, const Body& body, NativeParalleForTask* array, size_t index ) {
     if( !range.is_divisible() ) { 
@@ -224,3 +239,25 @@ template <typename T>
 void zero_fill(void* array, size_t N) {
     memset(array, 0, sizeof(T)*N);
 }
+
+#ifndef min
+    //! Utility template function returning lesser of the two values.
+    /** Provided here to avoid including not strict safe <algorithm>.\n
+        In case operands cause sined/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 ) {
+        return val1 < val2 ? val1 : val2;
+    }
+#endif /* !min */
+
+#ifndef max
+    //! Utility template function returning greater of the two values. Provided here to avoid including not strict safe <algorithm>.
+    /** Provided here to avoid including not strict safe <algorithm>.\n
+        In case operands cause sined/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 ) {
+        return val1 < val2 ? val2 : val1;
+    }
+#endif /* !max */
diff --git a/src/test/harness_allocator.h b/src/test/harness_allocator.h
index 149224a..6fe5826 100644
--- a/src/test/harness_allocator.h
+++ b/src/test/harness_allocator.h
@@ -33,14 +33,26 @@
 
 #if __linux__
 #include <unistd.h>
-#elif __APPLE__
+#elif __APPLE__ || __sun
 #include <unistd.h>
 #elif _WIN32
 #include <windows.h>
 #endif
 #include <new>
+#include <stdexcept>
 #include <tbb/atomic.h>
 
+#if __SUNPRO_CC
+using std::printf;
+#endif
+
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (push)
+    #pragma warning (disable: 4267)
+#endif /* _MSC_VER && _Wp64 */
+
+
 template <typename base_alloc_t, typename count_t = tbb::atomic<size_t> >
 class static_counting_allocator : public base_alloc_t
 {
@@ -52,21 +64,16 @@ public:
     typedef typename base_alloc_t::value_type value_type;
     typedef typename base_alloc_t::size_type size_type;
     typedef typename base_alloc_t::difference_type difference_type;
-#if defined(_WIN64) && !defined(_CPPLIB_VER)
-    template<typename U, typename C = count_t> struct rebind {
-        typedef static_counting_allocator<base_alloc_t,C> other;
+    template<typename U> struct rebind {
+        typedef static_counting_allocator<typename base_alloc_t::template rebind<U>::other,count_t> other;
     };
-#else
-    template<typename U, typename C = count_t> struct rebind {
-        typedef static_counting_allocator<typename base_alloc_t::template rebind<U>::other,C> other;
-    };
-#endif
 
+    static size_t max_items;
     static count_t items_allocated;
     static count_t items_freed;
     static count_t allocations;
     static count_t frees;
-    static bool verbose;
+    static bool verbose, throwing;
 
     static_counting_allocator() throw() { }
 
@@ -81,6 +88,11 @@ public:
     pointer allocate(const size_type n)
     {
         if(verbose) printf("\t+%d|", int(n));
+        if(max_items && items_allocated + n >= max_items) {
+            if(verbose) printf("items limit hits!");
+            if(throwing) throw std::bad_alloc();
+            return NULL;
+        }
         allocations++;
         items_allocated += n;
         return base_alloc_t::allocate(n, pointer(0));
@@ -104,10 +116,18 @@ public:
         items_freed = 0;
         allocations = 0;
         frees = 0;
+        max_items = 0;
+    }
+
+    static void set_limits(size_type max = 0, bool do_throw = true) {
+        max_items = max;
+        throwing = do_throw;
     }
 };
 
 template <typename base_alloc_t, typename count_t>
+size_t static_counting_allocator<base_alloc_t, count_t>::max_items;
+template <typename base_alloc_t, typename count_t>
 count_t static_counting_allocator<base_alloc_t, count_t>::items_allocated;
 template <typename base_alloc_t, typename count_t>
 count_t static_counting_allocator<base_alloc_t, count_t>::items_freed;
@@ -117,6 +137,8 @@ template <typename base_alloc_t, typename count_t>
 count_t static_counting_allocator<base_alloc_t, count_t>::frees;
 template <typename base_alloc_t, typename count_t>
 bool static_counting_allocator<base_alloc_t, count_t>::verbose;
+template <typename base_alloc_t, typename count_t>
+bool static_counting_allocator<base_alloc_t, count_t>::throwing;
 
 template <typename base_alloc_t, typename count_t = tbb::atomic<size_t> >
 class local_counting_allocator : public base_alloc_t
@@ -129,33 +151,30 @@ public:
     typedef typename base_alloc_t::value_type value_type;
     typedef typename base_alloc_t::size_type size_type;
     typedef typename base_alloc_t::difference_type difference_type;
-#if defined(_WIN64) && !defined(_CPPLIB_VER)
-    template<typename U, typename C = count_t> struct rebind {
-        typedef local_counting_allocator<base_alloc_t,C> other;
+    template<typename U> struct rebind {
+        typedef local_counting_allocator<typename base_alloc_t::template rebind<U>::other,count_t> other;
     };
-#else
-    template<typename U, typename C = count_t> struct rebind {
-        typedef local_counting_allocator<typename base_alloc_t::template rebind<U>::other,C> other;
-    };
-#endif
 
     count_t items_allocated;
     count_t items_freed;
     count_t allocations;
     count_t frees;
+    size_t max_items;
 
-    local_counting_allocator() throw()
-        : items_allocated(0)
-        , items_freed(0)
-        , allocations(0)
-        , frees(0)
-    { }
+    local_counting_allocator() throw() {
+        items_allocated = 0;
+        items_freed = 0;
+        allocations = 0;
+        frees = 0;
+        max_items = 0;
+    }
 
     local_counting_allocator(const local_counting_allocator &a) throw()
         : items_allocated(a.items_allocated)
         , items_freed(a.items_freed)
         , allocations(a.allocations)
         , frees(a.frees)
+        , max_items(a.max_items)
     { }
 
     template<typename U, typename C>
@@ -164,14 +183,16 @@ public:
         items_freed = static_counting_allocator<U,C>::items_freed;
         allocations = static_counting_allocator<U,C>::allocations;
         frees = static_counting_allocator<U,C>::frees;
+        max_items = static_counting_allocator<U,C>::max_items;
     }
 
     template<typename U, typename C>
-    local_counting_allocator(const local_counting_allocator<U,C>&) throw()
-        : items_allocated(0)
-        , items_freed(0)
-        , allocations(0)
-        , frees(0)
+    local_counting_allocator(const local_counting_allocator<U,C> &a) throw()
+        : items_allocated(a.items_allocated)
+        , items_freed(a.items_freed)
+        , allocations(a.allocations)
+        , frees(a.frees)
+        , max_items(a.max_items)
     { }
 
     bool operator==(const local_counting_allocator &a) const
@@ -179,6 +200,8 @@ public:
 
     pointer allocate(const size_type n)
     {
+        if(max_items && items_allocated + n >= max_items)
+            throw std::bad_alloc();
         ++allocations;
         items_allocated += n;
         return base_alloc_t::allocate(n, pointer(0));
@@ -193,4 +216,13 @@ public:
         items_freed += n;
         base_alloc_t::deallocate(ptr, n);
     }
+
+    void set_limits(size_type max = 0) {
+        max_items = max;
+    }
 };
+
+#if defined(_MSC_VER) && defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (pop)
+#endif /* _MSC_VER && _Wp64 */
diff --git a/src/test/harness_assert.h b/src/test/harness_assert.h
index ec80034..91284bf 100644
--- a/src/test/harness_assert.h
+++ b/src/test/harness_assert.h
@@ -35,8 +35,10 @@
 #ifndef harness_assert_H
 #define harness_assert_H
 
-static void ReportError( int line, const char* expression, const char * message ); 
+static void ReportError( int line, const char* expression, const char* message, bool is_error = true ); 
+
 #define ASSERT(p,message) ((p)?(void)0:ReportError(__LINE__,#p,message))
+#define ASSERT_WARNING(p,message) ((p)?(void)0:ReportError(__LINE__,#p,message, false))
 
 //! Compile-time error if x and y have different types
 template<typename T>
diff --git a/src/test/harness_bad_expr.h b/src/test/harness_bad_expr.h
index 1f2111a..faae910 100644
--- a/src/test/harness_bad_expr.h
+++ b/src/test/harness_bad_expr.h
@@ -55,8 +55,8 @@ AssertionFailure::AssertionFailure( const char* filename, int line, const char*
 {
     ASSERT(filename,"missing filename");
     ASSERT(0<line,"line number must be positive");
-    // All of our current files have fewer than 3000 lines.
-    ASSERT(line<3000,"dubiously high line number");
+    // All of our current files have fewer than 4000 lines.
+    ASSERT(line<4000,"dubiously high line number");
     ASSERT(expression,"missing expression");
 }
 
diff --git a/src/test/harness_cpu.h b/src/test/harness_cpu.h
index 6884606..9c6c87d 100644
--- a/src/test/harness_cpu.h
+++ b/src/test/harness_cpu.h
@@ -41,15 +41,23 @@
 /*  Returns 0 if not implemented on platform. */
 static double GetCPUUserTime() { 
 #if _WIN32
-    FILETIME times[4];
-    bool status = GetProcessTimes(GetCurrentProcess(), times, times+1, times+2, times+3)!=0;
+    FILETIME my_times[4];
+    bool status = GetProcessTimes(GetCurrentProcess(), my_times, my_times+1, my_times+2, my_times+3)!=0;
     ASSERT( status, NULL );
     LARGE_INTEGER usrtime;
-    usrtime.LowPart = times[3].dwLowDateTime;
-    usrtime.HighPart = times[3].dwHighDateTime;
+    usrtime.LowPart = my_times[3].dwLowDateTime;
+    usrtime.HighPart = my_times[3].dwHighDateTime;
     return double(usrtime.QuadPart)*1E-7;
 #else
-    // Generic UNIX, including __linux__ or __APPLE__
+    // Generic UNIX, including __APPLE__
+
+    // On Linux, there is no good way to get CPU usage info for the current process:
+    //   getrusage(RUSAGE_SELF, ...) that is used now only returns info for the calling thread;
+    //   getrusage(RUSAGE_CHILDREN, ...) only counts for finished children threads;
+    //   tms_utime and tms_cutime got with times(struct tms*) are equivalent to the above items;
+    //   finally, /proc/self/task/<task_id>/stat doesn't exist on older kernels 
+    //      and it isn't quite convenient to read it for every task_id.
+
     struct rusage resources;
     bool status = getrusage(RUSAGE_SELF, &resources)==0;
     ASSERT( status, NULL );
@@ -58,25 +66,40 @@ static double GetCPUUserTime() {
 }
 
 #include "tbb/tick_count.h"
+#include "tbb/tbb_machine.h"
 #include <cstdio>
 
 // The resolution of GetCPUUserTime is 10-15 ms or so; waittime should be a few times bigger.
 const double WAITTIME = 0.1; // in seconds, i.e. 100 ms
+const double THRESHOLD = WAITTIME/100;
+
+static void TestCPUUserTime( int nthreads, int nactive = 1 ) {
+    // The test will always pass on Linux; read the comments in GetCPUUserTime for details
+    // Also it will not detect spinning issues on systems with only one processing core.
 
-static void TestCPUUserTime( int nworkers ) {
     static double minimal_waittime = WAITTIME;
+    int nworkers = nthreads-nactive;
     if( !nworkers ) return;
 
-    // Test that all workers sleep when no work
-    // So far this will not detect the issue on systems with only one processing core
+    double usrtime;
+    double lastusrtime = GetCPUUserTime();
+    while( (usrtime=GetCPUUserTime())-lastusrtime < THRESHOLD )
+        ; // wait for GetCPUUserTime update
+    lastusrtime = usrtime;
+    
+    // Test that all workers sleep when no work.
     double waittime;
-    double usrtime = GetCPUUserTime();
     tbb::tick_count stamp = tbb::tick_count::now();
-    while( (waittime = (tbb::tick_count::now()-stamp).seconds()) < minimal_waittime )
-        ;  // Wait for workers to sleep
-    usrtime = GetCPUUserTime() - usrtime;
+    while( ((waittime=(tbb::tick_count::now()-stamp).seconds()) < minimal_waittime) 
+        || ((usrtime=GetCPUUserTime()-lastusrtime) < THRESHOLD) )
+        ; // Wait for workers to go sleep
+
+    while( nactive>1 && usrtime-nactive*waittime<0 ) {
+        // probably the number of active threads was mispredicted
+        --nactive; ++nworkers;
+    }
+    double avg_worker_usrtime = (usrtime-nactive*waittime)/nworkers;
 
-    double avg_worker_usrtime = (usrtime-waittime)/nworkers;
     if( avg_worker_usrtime > waittime/2 )
         fprintf(stderr, "ERROR: %d worker threads are spinning; waittime: %g; usrtime: %g; avg worker usrtime: %g\n",
                         nworkers, waittime, usrtime, avg_worker_usrtime);
diff --git a/src/test/test_cache_aligned_allocator.cpp b/src/test/harness_m128.h
similarity index 79%
copy from src/test/test_cache_aligned_allocator.cpp
copy to src/test/harness_m128.h
index 5b9deb3..7bcadc4 100644
--- a/src/test/test_cache_aligned_allocator.cpp
+++ b/src/test/harness_m128.h
@@ -26,17 +26,9 @@
     the GNU General Public License.
 */
 
-// Test whether cache_aligned_allocator works with some of the host's STL containers.
+// Header that sets HAVE_m128 if we have type __m128
 
-#include "tbb/cache_aligned_allocator.h"
-
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-// the real body of the test is there:
-#include "test_allocator.h"
-
-int main(void)
-{
-    int result = TestMain<tbb::cache_aligned_allocator<void> >();
-    printf("done\n");
-    return result;
-}
+#if (__SSE__||_M_IX86) && !defined(__sun)
+#include <xmmintrin.h>
+#define HAVE_m128 1
+#endif /* __SSE__||_M_IX86 */
diff --git a/src/test/harness_memory.h b/src/test/harness_memory.h
index 98ab7f2..c7513c0 100644
--- a/src/test/harness_memory.h
+++ b/src/test/harness_memory.h
@@ -31,7 +31,7 @@
 // This header is an optional part of the test harness.
 // It assumes that "harness_assert.h" has already been included.
 
-#if __linux__
+#if __linux__ || __sun
 #include <sys/resource.h>
 #include <unistd.h>
 
diff --git a/src/test/harness_trace.h b/src/test/harness_trace.h
new file mode 100644
index 0000000..dde5390
--- /dev/null
+++ b/src/test/harness_trace.h
@@ -0,0 +1,132 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+// Just the tracing portion of the harness.
+//
+// This header defines TRACE and TRCAENL macros, which use printf like syntax and 
+// are useful for duplicating trace output to the standard debug output on Windows.
+// It is possible to add the ability of automatic extending messages with additional
+// info (file, line, function, time, thread ID, ...).
+//
+// Macros output nothing when test app runs in non-verbose mode (default).
+//
+// The full "harness.h" must be included before this header.
+
+#ifndef tbb_tests_harness_trace_H
+#define tbb_tests_harness_trace_H
+
+#if defined(MAX_TRACE_SIZE) && MAX_TRACE_SIZE < 1024
+    #undef MAX_TRACE_SIZE
+#endif
+#ifndef MAX_TRACE_SIZE
+    #define MAX_TRACE_SIZE  1024
+#endif
+
+#include <cstdarg>
+
+#if _WIN32||_WIN64
+    #define snprintf _snprintf
+#endif
+#if defined(_MSC_VER) && (_MSC_VER<=1400)
+    #define vsnprintf _vsnprintf
+#endif
+
+namespace harness_internal {
+
+    struct tracer_t
+    {
+        int         my_flags;
+        const char  *my_file;
+        const char  *my_func;
+        size_t      my_line;
+
+        enum  { 
+            prefix = 1,
+            need_lf = 2
+        };
+
+	    tracer_t*  set_trace_info ( int flags, const char *file, size_t line, const char *func )
+	    {
+		    my_flags = flags;
+		    my_line = line;
+            my_file = file;
+            my_func = func;
+		    return  this;
+	    }
+
+        void  trace ( const char* fmt, ... )
+        {
+            if ( !Verbose )
+                return;
+            char    msg[MAX_TRACE_SIZE];
+            char    msg_fmt_buf[MAX_TRACE_SIZE];
+            const char  *msg_fmt = fmt;
+            if ( my_flags & prefix ) {
+                snprintf (msg_fmt_buf, MAX_TRACE_SIZE, "[%s] %s", my_func, fmt);
+                msg_fmt = msg_fmt_buf;
+            }
+            std::va_list argptr;
+            va_start (argptr, fmt);
+            int len = vsnprintf (msg, MAX_TRACE_SIZE, msg_fmt, argptr);
+            va_end (argptr);
+            if ( my_flags & need_lf &&  
+                 len < MAX_TRACE_SIZE - 1  &&  msg_fmt[len-1] != '\n' )
+            {
+                msg[len] = '\n';
+                msg[len + 1] = 0;
+            }
+            printf (msg);
+#if _WIN32 || _WIN64
+            OutputDebugStringA(msg);
+#endif
+        }
+    }; // class tracer_t
+
+    static tracer_t tracer;
+
+} // 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__, ""
+#endif
+
+
+//! printf style tracing macro
+/** This variant of TRACE adds trailing line-feed (new line) character, if it is absent. **/
+#define TRACE  harness_internal::tracer.set_trace_info(harness_internal::tracer_t::need_lf, HARNESS_TRACE_ORIG_INFO)->trace
+
+//! 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
+#define TRACEP harness_internal::tracer.set_trace_info(harness_internal::tracer_t::prefix | \
+                                    harness_internal::tracer_t::need_lf, HARNESS_TRACE_ORIG_INFO)->trace
+
+#endif /* tbb_tests_harness_trace_H */
diff --git a/src/test/test_ScalableAllocator.cpp b/src/test/test_ScalableAllocator.cpp
index 118e067..ff6c10e 100644
--- a/src/test/test_ScalableAllocator.cpp
+++ b/src/test/test_ScalableAllocator.cpp
@@ -28,16 +28,34 @@
 
 // Test whether scalable_allocator complies with the requirements in 20.1.5 of ISO C++ Standard (1998).
 
+/* to avoid dependency on TBB shared library, the following macro should be
+   defined to non-zero _before_ including any TBB or test harness headers.
+   Also tbb_assert_impl.h from src/tbb should be included right after */
+#define __TBB_NO_IMPLICIT_LINKAGE 1
+#include "../tbb/tbb_assert_impl.h"
+
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+
 #include "tbb/scalable_allocator.h"
 
-//namespace TBB = ThreadingBuildingBlocks;
+// the actual body of the test is there:
+#include "test_allocator.h"
 
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-// the real body of the test is there:
-#include "test/test_allocator.h"
+#if _MSC_VER
+#include <windows.h>
+#endif /* _MSC_VER */
 
 int main(void)
 {
+#if _MSC_VER && !__TBB_NO_IMPLICIT_LINKAGE
+    #ifdef _DEBUG
+        ASSERT(!GetModuleHandle("tbbmalloc.dll") && GetModuleHandle("tbbmalloc_debug.dll"),
+            "debug application links with non-debug tbbmalloc library");
+    #else
+        ASSERT(!GetModuleHandle("tbbmalloc_debug.dll") && GetModuleHandle("tbbmalloc.dll"),
+            "non-debug application links with debug tbbmalloc library");
+    #endif
+#endif /* _MSC_VER && !__TBB_NO_IMPLICIT_LINKAGE */
     int result = TestMain<tbb::scalable_allocator<void> >();
     printf("done\n");
     return result;
diff --git a/src/test/test_ScalableAllocator_STL.cpp b/src/test/test_ScalableAllocator_STL.cpp
index f3c7fe4..b2e0487 100644
--- a/src/test/test_ScalableAllocator_STL.cpp
+++ b/src/test/test_ScalableAllocator_STL.cpp
@@ -28,8 +28,16 @@
 
 // Test whether scalable_allocator works with some of the host's STL containers.
 
+/* to avoid dependency on TBB shared library, the following macro should be
+   defined to non-zero _before_ including any TBB or test harness headers.
+   Also tbb_assert_impl.h from src/tbb should be included right after */
+#define __TBB_NO_IMPLICIT_LINKAGE 1
+#include "../tbb/tbb_assert_impl.h"
+
 #define HARNESS_NO_PARSE_COMMAND_LINE 1
 #include "tbb/scalable_allocator.h"
+
+// the actual body of the test is there:
 #include "test/test_allocator.h"
 
 #include <vector>
@@ -38,15 +46,8 @@
 
 int main() {
     TestContainer<std::vector<int,tbb::scalable_allocator<int> > >();
-#if defined(_WIN64) && !defined(_CPPLIB_VER)
-    // Microsoft incorrectly typed the first argument to std::allocator<T>::deallocate
-    // as (void*), and depends upon this error in their early versions of list and deque.
-    printf("Warning: compatibility of NFS_Allocator with list and deque not tested\n"
-           "because they depend on error that Microsoft corrected later.\n");
-#else
     TestContainer<std::list<int,tbb::scalable_allocator<int> > >();
     TestContainer<std::deque<int,tbb::scalable_allocator<int> > >();
-#endif
     printf("done\n");
     return 0;
 }
diff --git a/src/test/test_aligned_space.cpp b/src/test/test_aligned_space.cpp
index 5b7e013..dbbfad7 100644
--- a/src/test/test_aligned_space.cpp
+++ b/src/test/test_aligned_space.cpp
@@ -34,30 +34,45 @@ class Minimal {
     Minimal( Minimal& min );
     ~Minimal();
     void operator=( const Minimal& );
-#if __GNUC__
-    /** If compiling with -Werror, GNU C++ issues an error if all constructors of 
-        a class are private.  Therefore, we add a fake friend. */
-    friend class FakeFriend;
-#endif /* __GNUC__ */
+    T pad;
+public:
+    friend void AssignToCheckAlignment( Minimal& dst, const Minimal& src ) {
+        dst.pad = src.pad;
+    }  
 };
 
 #include "tbb/aligned_space.h"
 #include "harness_assert.h"
 
+static bool SpaceWasted;
+
 template<typename U, size_t N>
 void TestAlignedSpaceN() {
     typedef Minimal<U> T;
-    tbb::aligned_space< T ,N> space;
-    AssertSameType( static_cast< T *>(0), space.begin() );
-    AssertSameType( static_cast< T *>(0), space.end() );
-    ASSERT( reinterpret_cast<void *>(space.begin())==reinterpret_cast< void *>(&space), NULL );
-    ASSERT( space.end()-space.begin()==N, NULL );
-    ASSERT( reinterpret_cast<void *>(space.begin())>=reinterpret_cast< void *>(&space), NULL );
-    ASSERT( space.end()<=reinterpret_cast< T *>(&space+1), NULL );
+    struct {
+        //! Pad byte increases chance that subsequent member will be misaligned if there is a problem.
+        char pad;
+        tbb::aligned_space<T ,N> space;
+    } x;
+    AssertSameType( static_cast< T *>(0), x.space.begin() );
+    AssertSameType( static_cast< T *>(0), x.space.end() );
+    ASSERT( reinterpret_cast<void *>(x.space.begin())==reinterpret_cast< void *>(&x.space), NULL );
+    ASSERT( x.space.end()-x.space.begin()==N, NULL );
+    ASSERT( reinterpret_cast<void *>(x.space.begin())>=reinterpret_cast< void *>(&x.space), NULL );
+    ASSERT( x.space.end()<=reinterpret_cast< T *>(&x.space+1), NULL );
+    // Though not required, a good implementation of aligned_space<T,N> does not use any more space than a T[N].
+    SpaceWasted |= sizeof(x.space)!=sizeof(T)*N;
+    for( size_t k=1; k<N; ++k )
+        AssignToCheckAlignment( x.space.begin()[k-1], x.space.begin()[k] );
 }
 
+static void PrintSpaceWastingWarning( const char* type_name );
+
+#include <typeinfo>
+
 template<typename T>
 void TestAlignedSpace() {
+    SpaceWasted = false;
     TestAlignedSpaceN<T,1>();
     TestAlignedSpaceN<T,2>();
     TestAlignedSpaceN<T,3>();
@@ -66,11 +81,12 @@ void TestAlignedSpace() {
     TestAlignedSpaceN<T,6>();
     TestAlignedSpaceN<T,7>();
     TestAlignedSpaceN<T,8>();
+    if( SpaceWasted )
+        PrintSpaceWastingWarning( typeid(T).name() );
 }
- 
-#include <stdio.h>
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "harness.h"
+
+#include "harness_m128.h"
+#include <cstdio>         // Inclusion of <cstdio> deferred, to improve odds of detecting accidental dependences on it.
 
 int main() {
     TestAlignedSpace<char>();
@@ -80,6 +96,17 @@ int main() {
     TestAlignedSpace<double>();
     TestAlignedSpace<long double>();
     TestAlignedSpace<size_t>();
-    printf("done\n");
+#if HAVE_m128
+    TestAlignedSpace<__m128>();
+#endif /* HAVE_m128 */
+    std::printf("done\n");
     return 0;
 }
+
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
+
+static void PrintSpaceWastingWarning( const char* type_name ) {
+    std::printf("Consider rewriting aligned_space<%s,N> to waste less space\n", type_name ); 
+}
+
diff --git a/src/test/test_assembly.cpp b/src/test/test_assembly.cpp
index 4549a20..0fe2130 100644
--- a/src/test/test_assembly.cpp
+++ b/src/test/test_assembly.cpp
@@ -31,6 +31,9 @@
 // it can get intimate access to the scheduler.
 
 #define TEST_ASSEMBLY_ROUTINES 1
+#define __TBB_TASK_CPP_DIRECTLY_INCLUDED 1
+// to avoid usage of #pragma comment
+#define __TBB_NO_IMPLICIT_LINKAGE 1
 
 #include "../tbb/task.cpp"
 #include <new>
@@ -51,13 +54,7 @@ public:
 
 void GenericScheduler::test_assembly_routines() {
     try_enter_arena();
-#if IMPROVED_GATING
     mark_pool_full();
-#else
-    ASSERT( open_gate==&arena->prefix().gate, NULL );
-    open_gate->open();
-    open_gate = NULL;
-#endif /*IMPROVED_GATING*/
     release_task_pool();
     ASSERT( assert_okay(), NULL );
     long steal_count = 0;
@@ -161,18 +158,18 @@ void GenericScheduler::test_assembly_routines() {
         printf("%ld successful gets and %ld successful steals\n", get_count, steal_count );
 }
 
-//! Test __TBB_CompareExchange
+//! Test __TBB_CompareAndSwapW
 static void TestCompareExchange() {
     ASSERT( intptr(-10)<10, "intptr not a signed integral type?" ); 
     if( Verbose ) 
-        printf("testing __TBB_CompareExchange\n");
+        printf("testing __TBB_CompareAndSwapW\n");
     for( intptr a=-10; a<10; ++a )
         for( intptr b=-10; b<10; ++b )
             for( intptr c=-10; c<10; ++c ) {
 // Workaround for a bug in GCC 4.3.0; and one more is below.
 #if __GNUC__==4&&__GNUC_MINOR__==3&&__GNUC_PATCHLEVEL__==0
                 intptr x;
-		        __TBB_store_with_release( x, a );
+                __TBB_store_with_release( x, a );
 #else
                 intptr x = a;
 #endif
@@ -216,21 +213,6 @@ static void TestAtomicCounter() {
     }
 }
 
-//! Test __TBB_AtomicOR instruction.
-void TestAtomicOr() {
-    uintptr x[3] = {0,0,0};
-    uintptr y = 0; 
-    uintptr z = 0;
-    for( int i=0; i<20; ++i ) {
-        y |= z;
-        __TBB_AtomicOR( &x[1], z );
-        ASSERT( x[0]==0, "__TBB_AtomicOR corrupted nearby bytes" ); 
-        ASSERT( x[1]==y, "__TBB_AtomicOR did not do OR?" );
-        ASSERT( x[2]==0, "__TBB_AtomicOR corrupted nearby bytes" ); 
-        z = i==0 ? 1 : z*(i+1);
-    }
-}
-
 static void TestTinyLock() {
     if( Verbose ) 
         printf("testing __TBB_LockByte\n");
@@ -268,10 +250,6 @@ static void TestPause() {
     __TBB_Pause(1);
 }
 
-static void TestIsGenuineIntel() {
-    if( !IsGenuineIntel() )
-        printf("Warning: not running on genuine Intel hardware\n");
-}
 
 } // namespace internal 
 } // namespace tbb
@@ -279,23 +257,15 @@ static void TestIsGenuineIntel() {
 using namespace tbb;
 
 int main( int argc, char* argv[] ) {
-#if _WIN32||_WIN64
-    // This initialization is normally done by DllMain in task.cpp,
-    // but because this test directly includes task.cpp,
-    // the initialization must be done explicitly.
-    InitializeCriticalSection(&OneTimeInitializationCriticalSection);
-#endif /* _WIN32||_WIN64 */
     try {
         ParseCommandLine( argc, argv );
-        TestIsGenuineIntel();
         TestLog2();
         TestTinyLock();
         TestCompareExchange();
         TestAtomicCounter();
-        TestAtomicOr();
         TestPause();
 
-        task_scheduler_init init(1); 
+        task_scheduler_init init(1);
 
         if( Verbose ) 
             printf("testing __TBB_(scheduler assists)\n");
diff --git a/src/test/test_atomic.cpp b/src/test/test_atomic.cpp
index ecbe496..bc01dbb 100644
--- a/src/test/test_atomic.cpp
+++ b/src/test/test_atomic.cpp
@@ -52,11 +52,13 @@ struct TestStruct {
 //! Test compare_and_swap template members of class atomic<T> for memory_semantics=M
 template<typename T,tbb::memory_semantics M>
 void TestCompareAndSwapAcquireRelease( T i, T j, T k ) {
-    ASSERT( i!=j && j!=k, "values must be distinct" ); 
+    ASSERT( i!=k, "values must be distinct" ); 
+    // Test compare_and_swap that should fail
     TestStruct<T> x(i);
     T old = x.counter.template compare_and_swap<M>( j, k );
     ASSERT( old==i, NULL );
     ASSERT( x.counter==i, "old value not retained" );
+    // Test compare and swap that should suceed
     old = x.counter.template compare_and_swap<M>( j, i );
     ASSERT( old==i, NULL );
     ASSERT( x.counter==j, "value not updated?" );
@@ -65,11 +67,13 @@ void TestCompareAndSwapAcquireRelease( T i, T j, T k ) {
 //! i, j, k must be different values
 template<typename T>
 void TestCompareAndSwap( T i, T j, T k ) {
-    ASSERT( i!=j && j!=k, "values must be distinct" ); 
+    ASSERT( i!=k, "values must be distinct" ); 
+    // Test compare_and_swap that should fail
     TestStruct<T> x(i);
     T old = x.counter.compare_and_swap( j, k );
     ASSERT( old==i, NULL );
     ASSERT( x.counter==i, "old value not retained" );
+    // Test compare and swap that should suceed
     old = x.counter.compare_and_swap( j, i );
     ASSERT( old==i, NULL );
     if( x.counter==i ) {
@@ -180,6 +184,10 @@ void TestFetchAndAdd( void* ) {
     // There are no fetch-and-add operations on a void*.
 }
 
+void TestFetchAndAdd( bool ) {
+    // There are no fetch-and-add operations on a bool.
+}
+
 template<typename T>
 void TestConst( T i ) { 
     // Try const 
@@ -192,14 +200,14 @@ template<typename T>
 void TestOperations( T i, T j, T k ) {
     TestConst(i);
     TestCompareAndSwap(i,j,k);
-    TestFetchAndStore(i,j);
+    TestFetchAndStore(i,k);    // Pass i,k instead of i,j, because callee requires two distinct values.
     TestFetchAndAdd(i);
 }
 
 template<typename T>
-void TestLoadAndStoreFences( const char* name );
+void TestParallel( const char* name );
 
-bool MemoryFenceError;
+bool ParallelError;
 
 template<typename T>
 struct AlignmentChecker {
@@ -220,21 +228,22 @@ template<typename T>
 void TestAtomicInteger( const char* name ) {
     if( Verbose )
         printf("testing atomic<%s>\n",name);
-#if __linux__ && __TBB_x86_32 && __GNUC__==3 && __GNUC_MINOR__==3
+#if ( __linux__ && __TBB_x86_32 && __GNUC__==3 && __GNUC_MINOR__==3 ) || defined(__SUNPRO_CC)
     // gcc 3.3 has known problem for 32-bit Linux, so only warn if there is a problem.
+    // SUNPRO_CC does have this problem as well
     if( sizeof(T)==8 ) {
         if( sizeof(AlignmentChecker<T>)!=2*sizeof(tbb::atomic<T>) ) {
-            printf("Warning: alignment for atomic<%s> is wrong (known issue with gcc 3.3 for IA32)\n",name);
+            printf("Warning: alignment for atomic<%s> is wrong (known issue with gcc 3.3 and sunCC 5.9 2008/01/28 for IA32)\n",name);
         }
     } else
-#endif /* __linux__ && __GNUC__ */
+#endif /* ( __linux__ && __TBB_x86_32 && __GNUC__==3 && __GNUC_MINOR__==3 ) || defined(__SUNPRO_CC) */
     ASSERT( sizeof(AlignmentChecker<T>)==2*sizeof(tbb::atomic<T>), NULL );
     TestOperations<T>(0L,T(-T(1)),T(1));
     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)));
     }
-    TestLoadAndStoreFences<T>( name );
+    TestParallel<T>( name );
 }
 #if _MSC_VER && !defined(__INTEL_COMPILER)
 #pragma warning( pop )
@@ -274,7 +283,7 @@ void TestAtomicPointer() {
     TestOperations<T*>(&array[500],&array[250],&array[750]);
     TestOperations<void*>(&array[500],&array[250],&array[750]);
     TestIndirection<T>();
-    TestLoadAndStoreFences<T*>( "pointer" );
+    TestParallel<T*>( "pointer" );
 }
 
 // Specialization for void*
@@ -282,7 +291,13 @@ template<>
 void TestAtomicPointer<void*>() {
     void* array[1000];
     TestOperations<void*>(&array[500],&array[250],&array[750]);
-    TestLoadAndStoreFences<void*>( "pointer" );
+    TestParallel<void*>( "pointer" );
+}
+
+void TestAtomicBool() {
+    TestOperations<bool>(true,true,false);
+    TestOperations<bool>(false,false,true);
+    TestParallel<bool>( "bool" );
 }
 
 template<unsigned N>
@@ -319,7 +334,8 @@ int main( int argc, char* argv[] ) {
     TestAtomicPointer<ArrayElement<7> >();
     TestAtomicPointer<ArrayElement<8> >();
     TestAtomicPointer<void*>();
-    ASSERT( !MemoryFenceError, NULL );
+    TestAtomicBool();
+    ASSERT( !ParallelError, NULL );
     printf("done\n");
     return 0;
 }
@@ -353,6 +369,13 @@ void* special_sum<void*>(intptr_t arg1, intptr_t arg2) {
     return (void*)(arg1 + arg2);
 }
 
+// The specialization for bool is required to shut up gratuitous compiler warnings,
+// because some compilers warn about casting int to bool.
+template<>
+bool special_sum<bool>(intptr_t arg1, intptr_t arg2) {
+    return ((arg1!=0) + arg2)!=0;
+}
+
 volatile int One = 1;
  
 template<typename T>
@@ -392,11 +415,11 @@ public:
                 if( flag ) {
                     if( flag!=(T)-1 ) {
                         printf("ERROR: flag!=(T)-1 k=%d i=%d trial=%x type=%s (atomicity problem?)\n", k, i, trial, name );
-                        MemoryFenceError = true;
+                        ParallelError = true;
                     } 
                     if( message!=(T)-1 ) {
                         printf("ERROR: message!=(T)-1 k=%d i=%d trial=%x type=%s (memory fence problem?)\n", k, i, trial, name );
-                        MemoryFenceError = true;
+                        ParallelError = true;
                     }
                     s->message = 0; 
                     s->flag = 0;
@@ -441,3 +464,118 @@ void TestLoadAndStoreFences( const char* name ) {
         delete[] fam;
     }
 }
+
+//! Sparse set of values of integral type T.
+/** Set is designed so that if a value is read or written non-atomically, 
+    the resulting intermediate value is likely to not be a member of the set. */
+template<typename T>
+class SparseValueSet {
+    T factor;
+public:
+    SparseValueSet() {
+        // Compute factor such that:
+        // 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;
+        for( unsigned i=0; i<sizeof(T)*8-7; i+=7 ) 
+            factor |= (T)1<<i;
+     }
+     //! Get ith member of set
+     T get( int i ) const {
+         // Create multiple of factor.  The & prevents overflow of the product.
+         return (i&0x7F)*factor;
+     }        
+     //! True if set contains x
+     bool contains( T x ) const {
+         // True if 
+         return (x%factor)==0;
+     }
+};
+
+//! Specialization for pointer types.  The pointers are random and should not be dereferenced.
+template<typename T>
+class SparseValueSet<T*> {
+    SparseValueSet<ptrdiff_t> my_set;
+public:
+    T* get( int i ) const {return reinterpret_cast<T*>(my_set.get(i));} 
+    bool contains( T* x ) const {return my_set.contains(reinterpret_cast<ptrdiff_t>(x));}
+};
+
+//! Specialization for bool.  
+/** Checking bool for atomic read/write is pointless in practice, because 
+    there is no way to *not* atomically read or write a bool value. */
+template<>
+class SparseValueSet<bool> {
+public:
+    bool get( int i ) const {return i&1;}
+    bool contains( bool ) const {return true;}
+};
+
+template<typename T>
+class HammerAssignment {
+    tbb::atomic<T>& x;
+    const char* name;
+    SparseValueSet<T> set;
+public:   
+    HammerAssignment( tbb::atomic<T>& x_, const char* name_ ) : x(x_), name(name_) {}
+    void operator()( const tbb::blocked_range<int>& range ) const {
+        const int n = 1000000;
+        if( range.begin() ) {
+            tbb::atomic<T> z;
+            AssertSameType( z=x, z );    // Check that return type from assignment is correct
+            for( int i=0; i<n; ++i ) {
+                // Read x atomically into z.
+                z = x;
+                if( !set.contains(z) ) {
+                    printf("ERROR: assignment of atomic<%s> is not atomic\n", name);
+                    ParallelError = true;
+                    return;
+                }
+            }
+        } else {
+            tbb::atomic<T> y;
+            for( int i=0; i<n; ++i ) {
+                // Get pseudo-random value. 
+                y = set.get(i);
+                // Write y atomically into x.
+                x = y;
+            }
+        }
+    }
+};
+
+template<typename T>
+void TestAssignment( const char* name ) {
+    tbb::atomic<T> x;
+    x = 0;
+    NativeParallelFor( tbb::blocked_range<int>(0,2,1), HammerAssignment<T>( x, name ) );
+#if __TBB_x86_32 && (__linux__ || __FreeBSD__ || _WIN32)
+    if( sizeof(T)==8 ) {
+        // Some compilers for IA-32 fail to provide 8-byte alignment of objects on the stack, 
+        // even if the object specifies 8-byte alignment.  On such platforms, the IA-32 implementation 
+        // of atomic<long long> and atomic<unsigned long long> use different tactics depending upon 
+        // whether the object is properly aligned or not.  The following abusive test ensures that we
+        // cover both the proper and improper alignment cases, one with the x above and the other with 
+        // the y below, perhaps not respectively.
+
+        // Allocate space big enough to always contain 8-byte locations that are aligned and misaligned.
+        char raw_space[15];
+        // Set delta to 0 if x is aligned, 4 otherwise.
+        uintptr_t delta = ((reinterpret_cast<uintptr_t>(&x)&7) ? 0 : 4); 
+        // y crosses 8-byte boundary if and only if x does not cross.
+        tbb::atomic<T>& y = *reinterpret_cast<tbb::atomic<T>*>((reinterpret_cast<uintptr_t>(&raw_space[7+delta])&~7u) - delta);
+        // Assertion checks that y really did end up somewhere inside "raw_space".
+        __TBB_ASSERT( raw_space<=reinterpret_cast<char*>(&y), "y starts before raw_space" );
+        __TBB_ASSERT( reinterpret_cast<char*>(&y+1) <= raw_space+sizeof(raw_space), "y starts after raw_space" );
+        y = 0;
+        NativeParallelFor( tbb::blocked_range<int>(0,2,1), HammerAssignment<T>( y, name ) );
+    }
+#endif /* __TBB_x86_32 && (__linux__ || __FreeBSD__ || _WIN32) */
+}
+
+template<typename T>
+void TestParallel( const char* name ) {
+    TestLoadAndStoreFences<T>(name);
+    TestAssignment<T>(name);
+}
diff --git a/src/test/test_blocked_range.cpp b/src/test/test_blocked_range.cpp
index cb02b2c..40ee335 100644
--- a/src/test/test_blocked_range.cpp
+++ b/src/test/test_blocked_range.cpp
@@ -46,7 +46,7 @@ AbstractValueType MakeAbstractValueType( int i ) {
     return x;
 }
 
-size_t operator-( const AbstractValueType& u, const AbstractValueType& v ) {
+std::size_t operator-( const AbstractValueType& u, const AbstractValueType& v ) {
     return GetValueOf(u)-GetValueOf(v);
 }
 
@@ -54,7 +54,7 @@ bool operator<( const AbstractValueType& u, const AbstractValueType& v ) {
     return GetValueOf(u)<GetValueOf(v);
 }
 
-AbstractValueType operator+( const AbstractValueType& u, size_t offset ) {
+AbstractValueType operator+( const AbstractValueType& u, std::size_t offset ) {
     return MakeAbstractValueType(GetValueOf(u)+int(offset));
 }
 
@@ -63,11 +63,11 @@ static void SerialTest() {
         for( int y=-10; y<10; ++y ) {
             AbstractValueType i = MakeAbstractValueType(x);
             AbstractValueType j = MakeAbstractValueType(y);
-            for( size_t k=1; k<10; ++k ) {
+            for( std::size_t k=1; k<10; ++k ) {
                 typedef tbb::blocked_range<AbstractValueType> range_type;
                 range_type r( i, j, k );
                 AssertSameType( r.empty(), true );
-                AssertSameType( range_type::size_type(), size_t() );
+                AssertSameType( range_type::size_type(), std::size_t() );
                 AssertSameType( static_cast<range_type::const_iterator*>(0), static_cast<AbstractValueType*>(0) );
                 AssertSameType( r.begin(), MakeAbstractValueType(0) );
                 AssertSameType( r.end(), MakeAbstractValueType(0) );
@@ -75,8 +75,8 @@ static void SerialTest() {
                 ASSERT( r.grainsize()==k, NULL );
                 if( x<=y ) {
                     AssertSameType( r.is_divisible(), true );
-                    ASSERT( r.is_divisible()==(size_t(y-x)>k), NULL );
-                    ASSERT( r.size()==size_t(y-x), NULL );
+                    ASSERT( r.is_divisible()==(std::size_t(y-x)>k), NULL );
+                    ASSERT( r.size()==std::size_t(y-x), NULL );
                     if( r.is_divisible() ) {
                         tbb::blocked_range<AbstractValueType> r2(r,tbb::split());
                         ASSERT( GetValueOf(r.begin())==x, NULL );
@@ -125,6 +125,6 @@ int main( int argc, char* argv[] ) {
         tbb::task_scheduler_init init(p);
         ParallelTest();
     }
-    printf("done\n");
+    std::printf("done\n");
     return 0;
 }
diff --git a/src/test/test_blocked_range2d.cpp b/src/test/test_blocked_range2d.cpp
index 742cc9f..2caa851 100644
--- a/src/test/test_blocked_range2d.cpp
+++ b/src/test/test_blocked_range2d.cpp
@@ -56,12 +56,12 @@ bool operator<( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v
 }
 
 template<typename Tag>
-size_t operator-( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {
+std::size_t operator-( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {
     return GetValueOf(u)-GetValueOf(v);
 }
 
 template<typename Tag>
-AbstractValueType<Tag> operator+( const AbstractValueType<Tag>& u, size_t offset ) {
+AbstractValueType<Tag> operator+( const AbstractValueType<Tag>& u, std::size_t offset ) {
     return MakeAbstractValueType<Tag>(GetValueOf(u)+int(offset));
 }
 
diff --git a/src/test/test_blocked_range3d.cpp b/src/test/test_blocked_range3d.cpp
index 9cc9c26..14b70d3 100644
--- a/src/test/test_blocked_range3d.cpp
+++ b/src/test/test_blocked_range3d.cpp
@@ -56,12 +56,12 @@ bool operator<( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v
 }
 
 template<typename Tag>
-size_t operator-( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {
+std::size_t operator-( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {
     return GetValueOf(u)-GetValueOf(v);
 }
 
 template<typename Tag>
-AbstractValueType<Tag> operator+( const AbstractValueType<Tag>& u, size_t offset ) {
+AbstractValueType<Tag> operator+( const AbstractValueType<Tag>& u, std::size_t offset ) {
     return MakeAbstractValueType<Tag>(GetValueOf(u)+int(offset));
 }
 
diff --git a/src/test/test_cache_aligned_allocator.cpp b/src/test/test_cache_aligned_allocator.cpp
index 5b9deb3..3fdcc7d 100644
--- a/src/test/test_cache_aligned_allocator.cpp
+++ b/src/test/test_cache_aligned_allocator.cpp
@@ -29,6 +29,7 @@
 // Test whether cache_aligned_allocator works with some of the host's STL containers.
 
 #include "tbb/cache_aligned_allocator.h"
+#include "tbb/tbb_allocator.h"
 
 #define HARNESS_NO_PARSE_COMMAND_LINE 1
 // the real body of the test is there:
@@ -37,6 +38,8 @@
 int main(void)
 {
     int result = TestMain<tbb::cache_aligned_allocator<void> >();
+    result += TestMain<tbb::tbb_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 9215391..d3136a1 100644
--- a/src/test/test_cache_aligned_allocator_STL.cpp
+++ b/src/test/test_cache_aligned_allocator_STL.cpp
@@ -29,6 +29,7 @@
 // Test whether cache_aligned_allocator works with some of the host's STL containers.
 
 #include "tbb/cache_aligned_allocator.h"
+#include "tbb/tbb_allocator.h"
 
 #define HARNESS_NO_PARSE_COMMAND_LINE 1
 #include "test_allocator.h"
@@ -41,15 +42,11 @@
 
 int main() {
     TestContainer<std::vector<int,tbb::cache_aligned_allocator<int> > >();
-#if defined(_WIN64) && !defined(_CPPLIB_VER)
-    // Microsoft incorrectly typed the first argument to std::allocator<T>::deallocate
-    // as (void*), and depends upon this error in their early versions of list and deque.
-    printf("Warning: compatibility of cache_aligned_allocator with list and deque not tested\n"
-           "because they depend on error that Microsoft corrected later.\n");
-#else
+    TestContainer<std::vector<int,tbb::tbb_allocator<int> > >();    
     TestContainer<std::list<int,tbb::cache_aligned_allocator<int> > >();
+    TestContainer<std::list<int,tbb::tbb_allocator<int> > >();
     TestContainer<std::deque<int,tbb::cache_aligned_allocator<int> > >();
-#endif /* _WIN64 */
+    TestContainer<std::deque<int,tbb::tbb_allocator<int> > >();
     printf("done\n");
     return 0;
 }
diff --git a/src/test/test_cache_aligned_allocator_STL.cpp b/src/test/test_compiler.cpp
similarity index 57%
copy from src/test/test_cache_aligned_allocator_STL.cpp
copy to src/test/test_compiler.cpp
index 9215391..0fe30f2 100644
--- a/src/test/test_cache_aligned_allocator_STL.cpp
+++ b/src/test/test_compiler.cpp
@@ -26,31 +26,39 @@
     the GNU General Public License.
 */
 
-// Test whether cache_aligned_allocator works with some of the host's STL containers.
-
-#include "tbb/cache_aligned_allocator.h"
-
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "test_allocator.h"
-
-// Test whether an allocator works with some of the host's STL containers.
-
-#include <vector>
-#include <list>
-#include <deque>
-
-int main() {
-    TestContainer<std::vector<int,tbb::cache_aligned_allocator<int> > >();
-#if defined(_WIN64) && !defined(_CPPLIB_VER)
-    // Microsoft incorrectly typed the first argument to std::allocator<T>::deallocate
-    // as (void*), and depends upon this error in their early versions of list and deque.
-    printf("Warning: compatibility of cache_aligned_allocator with list and deque not tested\n"
-           "because they depend on error that Microsoft corrected later.\n");
-#else
-    TestContainer<std::list<int,tbb::cache_aligned_allocator<int> > >();
-    TestContainer<std::deque<int,tbb::cache_aligned_allocator<int> > >();
-#endif /* _WIN64 */
-    printf("done\n");
+#include <stdio.h>
+
+union char2bool {
+    unsigned char c;
+    volatile bool b;
+} u;
+
+#include "harness.h"
+
+// The function proves the compiler uses 0 or 1 to store a bool. It
+// inspects what a compiler does when it loads a bool.  A compiler that
+// uses a value other than 0 or 1 to represent a bool will have to normalize
+// the value to 0 or 1 when the bool is cast to an unsigned char.
+// Compilers that pass this test do not do the normalization, and thus must
+// be assuming that a bool is a 0 or 1.
+int test_bool_representation() {
+    for( unsigned i=0; i<256; ++i ) {
+        u.c = (unsigned char)i;
+        unsigned char x = (unsigned char)u.b;
+        if( x != i ) {
+            if( Verbose )
+                fprintf(stderr, "Test failed at %d iteration\n",i);
+            return 1;
+        }
+    }
     return 0;
 }
 
+int main( int argc, char* argv[] ) {
+    ParseCommandLine(argc, argv);
+    if( test_bool_representation()!=0 )
+        fprintf(stderr, "ERROR: bool representation test failed\n");
+    else
+        printf("done\n");
+    return 0;
+}
diff --git a/src/test/test_concurrent_hash_map.cpp b/src/test/test_concurrent_hash_map.cpp
index face520..9dc3dc6 100644
--- a/src/test/test_concurrent_hash_map.cpp
+++ b/src/test/test_concurrent_hash_map.cpp
@@ -26,12 +26,33 @@
     the GNU General Public License.
 */
 
-#include "tbb/concurrent_hash_map.h"
+#ifndef TBB_PERFORMANCE_WARNINGS
+#define TBB_PERFORMANCE_WARNINGS 1
+#endif
+#include "tbb/tbb_stddef.h"
 #include "tbb/parallel_for.h"
 #include "tbb/blocked_range.h"
 #include "tbb/atomic.h"
 #include "tbb/tick_count.h"
 #include "harness.h"
+#include "harness_allocator.h"
+
+// hook performance warning
+#define runtime_warning hooked_warning
+bool bad_hashing = false;
+namespace tbb { namespace internal {
+    void hooked_warning( const char* format, ... ) {
+        ASSERT(bad_hashing, NULL);
+    }
+}}// namespace tbb::internal
+
+#include "tbb/concurrent_hash_map.h"
+
+class MyException : public std::bad_alloc {
+public:
+    virtual const char *what() const throw() { return "out of items limit"; }
+    virtual ~MyException() throw() {}
+};
 
 /** Has tighly controlled interface so that we can verify
     that concurrent_hash_map uses only the required interface. */
@@ -40,6 +61,7 @@ private:
     void operator=( const MyKey&  );    // Deny access
     int key;
     friend class MyHashCompare;
+    friend class YourHashCompare;
 public:
     static MyKey make( int i ) {
         MyKey result;
@@ -50,9 +72,11 @@ public:
 };
 
 tbb::atomic<long> MyDataCount;
+long MyDataCountLimit = 0;
 
 class MyData {
-private:
+protected:
+    friend class MyData2;
     int data;
     enum state_t {
         LIVE=0x1234,
@@ -60,14 +84,19 @@ private:
     } my_state;
     void operator=( const MyData& );    // Deny acces
 public:
-    MyData() {
+    MyData(int i = 0) {
         my_state = LIVE;
+        data = i;
+        if(MyDataCountLimit && MyDataCount + 1 >= MyDataCountLimit)
+            throw MyException();
         ++MyDataCount;
     }
     MyData( const MyData& other ) {
         ASSERT( other.my_state==LIVE, NULL );
         my_state = LIVE;
         data = other.data;
+        if(MyDataCountLimit && MyDataCount + 1 >= MyDataCountLimit)
+            throw MyException();
         ++MyDataCount;
     }
     ~MyData() {
@@ -87,6 +116,36 @@ public:
         ASSERT( my_state==LIVE, NULL );
         data = i;
     }
+    bool operator==( const MyData& other ) const {
+        ASSERT( other.my_state==LIVE, NULL );
+        ASSERT( my_state==LIVE, NULL );
+        return data == other.data;
+    }
+};
+
+class MyData2 : public MyData {
+public:
+    MyData2( ) {}
+    MyData2( const MyData& other ) {
+        ASSERT( other.my_state==LIVE, NULL );
+        ASSERT( my_state==LIVE, NULL );
+        data = other.data;
+    }
+    void operator=( const MyData& other ) {
+        ASSERT( other.my_state==LIVE, NULL );
+        ASSERT( my_state==LIVE, NULL );
+        data = other.data;
+    }
+    void operator=( const MyData2& other ) {
+        ASSERT( other.my_state==LIVE, NULL );
+        ASSERT( my_state==LIVE, NULL );
+        data = other.data;
+    }
+    bool operator==( const MyData2& other ) const {
+        ASSERT( other.my_state==LIVE, NULL );
+        ASSERT( my_state==LIVE, NULL );
+        return data == other.data;
+    }
 };
 
 class MyHashCompare {
@@ -99,7 +158,36 @@ public:
     }   
 };
 
-typedef tbb::concurrent_hash_map<MyKey,MyData,MyHashCompare> MyTable;
+class YourHashCompare {
+public:
+    bool equal( const MyKey& j, const MyKey& k ) const {
+        return j.key==k.key;
+    }
+    unsigned long hash( const MyKey& k ) const {
+        return 1;
+    }   
+};
+
+typedef local_counting_allocator<std::allocator<MyData> > MyAllocator;
+typedef tbb::concurrent_hash_map<MyKey,MyData,MyHashCompare,MyAllocator> MyTable;
+typedef tbb::concurrent_hash_map<MyKey,MyData2,MyHashCompare> MyTable2;
+typedef tbb::concurrent_hash_map<MyKey,MyData,YourHashCompare> YourTable;
+
+template<typename MyTable>
+inline void CheckAllocator(MyTable &table, size_t expected_allocs, size_t expected_frees, bool exact = true) {
+    size_t items_allocated = table.get_allocator().items_allocated, items_freed = table.get_allocator().items_freed;
+    size_t allocations = table.get_allocator().allocations, frees = table.get_allocator().frees;
+    if(Verbose)
+        printf("checking allocators: items %u/%u, allocs %u/%u\n",
+            unsigned(items_allocated), unsigned(items_freed), unsigned(allocations), unsigned(frees) );
+    ASSERT( items_allocated == allocations, NULL); ASSERT( items_freed == frees, NULL);
+    if(exact) {
+        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 );
+    }
+}
 
 inline bool UseKey( size_t i ) {
     return (i&3)!=3;
@@ -107,20 +195,31 @@ inline bool UseKey( size_t i ) {
 
 struct Insert {
     static void apply( MyTable& table, int i ) {
-        MyTable::accessor a;    
         if( UseKey(i) ) {
-            table.insert( a, MyKey::make(i) );
-            if( i&1 )
-                (*a).second.set_value( i*i );
-            else
-                a->second.set_value(i*i);
+            if( i&4 ) {
+                MyTable::accessor a;
+                table.insert( a, MyKey::make(i) );
+                if( i&1 )
+                    (*a).second.set_value(i*i);
+                else
+                    a->second.set_value(i*i);
+            } else
+                if( i&1 ) {
+                    MyTable::accessor a;
+                    table.insert( a, std::make_pair(MyKey::make(i), MyData(i*i)) );
+                    ASSERT( (*a).second.value_of()==i*i, NULL );
+                } else {
+                    MyTable::const_accessor ca;
+                    table.insert( ca, std::make_pair(MyKey::make(i), MyData(i*i)) );
+                    ASSERT( ca->second.value_of()==i*i, NULL );
+                }
         }
     }
 };
 
 struct Find {
     static void apply( MyTable& table, int i ) {
-        MyTable::accessor a;    
+        MyTable::accessor a;
         const MyTable::accessor& ca = a;
         bool b = table.find( a, MyKey::make(i) );
         ASSERT( b==!a.empty(), NULL );
@@ -143,9 +242,10 @@ struct Find {
 
 struct FindConst {
     static void apply( const MyTable& table, int i ) {
-        MyTable::const_accessor a;      
+        MyTable::const_accessor a;
         const MyTable::const_accessor& ca = a;
         bool b = table.find( a, MyKey::make(i) );
+        ASSERT( b==(table.count(MyKey::make(i))>0), NULL );
         ASSERT( b==!a.empty(), NULL );
         ASSERT( b==UseKey(i), NULL );
         if( b ) {
@@ -160,12 +260,60 @@ tbb::atomic<int> EraseCount;
 
 struct Erase {
     static void apply( MyTable& table, int i ) {
-        bool b = table.erase( MyKey::make(i) );
+        bool b;
+        if(i&4) {
+            if(i&8) {
+                MyTable::const_accessor a;
+                b = table.find( a, MyKey::make(i) ) && table.erase( a );
+            } else {
+                MyTable::accessor a;
+                b = table.find( a, MyKey::make(i) ) && table.erase( a );
+            }
+        } else
+            b = table.erase( MyKey::make(i) );
         if( b ) ++EraseCount;
+        ASSERT( table.count(MyKey::make(i)) == 0, NULL );
+    }
+};
+
+static const int IE_SIZE = 2;
+tbb::atomic<YourTable::size_type> InsertEraseCount[IE_SIZE];
+
+struct InsertErase  {
+    static void apply( YourTable& table, int i ) {
+        if ( i%3 ) {
+            int key = i%IE_SIZE;
+            if ( table.insert( std::make_pair(MyKey::make(key), MyData2()) ) ) 
+                ++InsertEraseCount[key];
+        } else {
+            int key = i%IE_SIZE;
+            if( i&1 ) {
+                YourTable::accessor res;
+                if(table.find( res, MyKey::make(key) ) && table.erase( res ) )
+                    --InsertEraseCount[key];
+            } else {
+                YourTable::const_accessor res;
+                if(table.find( res, MyKey::make(key) ) && table.erase( res ) )
+                    --InsertEraseCount[key];
+            }
+        }
+    }
+};
+
+// Test for the deadlock discussed at:
+// http://softwarecommunity.intel.com/isn/Community/en-US/forums/permalink/30253302/30253302/ShowThread.aspx#30253302
+struct InnerInsert {
+    static void apply( YourTable& table, int i ) {
+        YourTable::accessor a1, a2;
+        if(i&1) __TBB_Yield();
+        table.insert( a1, MyKey::make(1) );
+        __TBB_Yield();
+        table.insert( a2, MyKey::make(1 + (1<<30)) ); // the same chain
+        table.erase( a2 ); // if erase by key it would lead to deadlock for single thread
     }
 };
 
-template<typename Op>
+template<typename Op, typename MyTable>
 class TableOperation {
     MyTable& my_table;
 public:
@@ -176,12 +324,12 @@ public:
     TableOperation( MyTable& table ) : my_table(table) {}
 };
 
-template<typename Op>
-void DoConcurrentOperations( MyTable& table, int n, char* what, int nthread ) {
+template<typename Op, typename TableType>
+void DoConcurrentOperations( TableType& table, int n, const char* what, int nthread ) {
     if( Verbose ) 
         printf("testing %s with %d threads\n",what,nthread);
     tbb::tick_count t0 = tbb::tick_count::now();
-    tbb::parallel_for( tbb::blocked_range<int>(0,n,100), TableOperation<Op>(table) );
+    tbb::parallel_for( tbb::blocked_range<int>(0,n,100), TableOperation<Op,TableType>(table) );
     tbb::tick_count t1 = tbb::tick_count::now();
     if( Verbose )
         printf("time for %s = %g with %d threads\n",what,(t1-t0).seconds(),nthread);
@@ -208,6 +356,13 @@ void TraverseTable( MyTable& table, size_t n, size_t expected_size ) {
         array[k] = true;
         ++count;
 
+        // Check lower/upper bounds
+        std::pair<MyTable::iterator, MyTable::iterator> er = table.equal_range(i->first);
+        std::pair<MyTable::const_iterator, MyTable::const_iterator> cer = const_table.equal_range(i->first);
+        ASSERT(cer.first == er.first && cer.second == er.second, NULL);
+        ASSERT(cer.first == i, NULL);
+        ASSERT(std::distance(cer.first, cer.second) == 1, NULL);
+
         // Check const_iterator
         ASSERT( ci->first.value_of()==k, NULL );
         ASSERT( (*ci).first.value_of()==k, NULL );
@@ -231,7 +386,7 @@ struct ParallelTraverseBody {
         array(array_)
     {}
     void operator()( const RangeType& range ) const {
-        for( MyTable::iterator i = range.begin(); i!=range.end(); ++i ) {
+        for( typename RangeType::iterator i = range.begin(); i!=range.end(); ++i ) {
             int k = i->first.value_of();
             ASSERT( 0<=k && size_t(k)<n, NULL ); 
             ++array[k];
@@ -279,27 +434,48 @@ void TestInsertFindErase( int nthread ) {
     for( int i=0; i<n; ++i )
         m += UseKey(i);
  
+    MyAllocator a; a.items_freed = a.frees = 100;
     ASSERT( MyDataCount==0, NULL );
-    MyTable table;
+    MyTable table(a);
     TraverseTable(table,n,0);
     ParallelTraverseTable(table,n,0);
+    CheckAllocator(table, 0, 100);
 
-    DoConcurrentOperations<Insert>(table,n,"insert",nthread);
+    DoConcurrentOperations<Insert,MyTable>(table,n,"insert",nthread);
     ASSERT( MyDataCount==m, NULL );
     TraverseTable(table,n,m);
     ParallelTraverseTable(table,n,m);
+    CheckAllocator(table, m, 100);
 
-    DoConcurrentOperations<Find>(table,n,"find",nthread);
+    DoConcurrentOperations<Find,MyTable>(table,n,"find",nthread);
     ASSERT( MyDataCount==m, NULL );
+    CheckAllocator(table, m, 100);
 
-    DoConcurrentOperations<FindConst>(table,n,"find(const)",nthread);
+    DoConcurrentOperations<FindConst,MyTable>(table,n,"find(const)",nthread);
     ASSERT( MyDataCount==m, NULL );
+    CheckAllocator(table, m, 100);
 
     EraseCount=0;
-    DoConcurrentOperations<Erase>(table,n,"erase",nthread);
+    DoConcurrentOperations<Erase,MyTable>(table,n,"erase",nthread);
     ASSERT( EraseCount==m, NULL );
     ASSERT( MyDataCount==0, NULL );
     TraverseTable(table,n,0);
+    CheckAllocator(table, m, m+100);
+
+    bad_hashing = true;
+    table.clear();
+    bad_hashing = false;
+
+    if(nthread > 1) {
+        YourTable ie_table;
+        for( int i=0; i<IE_SIZE; ++i )
+            InsertEraseCount[i] = 0;        
+        DoConcurrentOperations<InsertErase,YourTable>(ie_table,n/2,"insert_erase",nthread);
+        for( int i=0; i<IE_SIZE; ++i )
+            ASSERT( InsertEraseCount[i]==ie_table.count(MyKey::make(i)), NULL );
+
+        DoConcurrentOperations<InnerInsert,YourTable>(ie_table,2000,"inner insert",nthread);
+    }
 }
 
 volatile int Counter;
@@ -340,20 +516,56 @@ public:
     }
 };
 
+class RemoveFromTable {
+    MyTable& my_table;
+    const int my_nthread;
+    const int my_m;
+public:
+    RemoveFromTable( MyTable& table, int nthread, int m ) : my_table(table), my_nthread(nthread), my_m(m) {}
+    void operator()( const  tbb::blocked_range<int>& r ) const {
+        for( int i=0; i<my_m; ++i ) {
+            bool b;
+            if(i&4) {
+                if(i&8) {
+                    MyTable::const_accessor a;
+                    b = my_table.find( a, MyKey::make(i) ) && my_table.erase( a );
+                } else {
+                    MyTable::accessor a;
+                    b = my_table.find( a, MyKey::make(i) ) && my_table.erase( a );
+                }
+            } else
+                b = my_table.erase( MyKey::make(i) );
+            if( b ) ++EraseCount;
+        }
+    }
+};
+
 //! Test for memory leak in concurrent_hash_map (TR #153).
-void TestMultipleInsert( int nthread ) {
+void TestConcurrency( int nthread ) {
     if( Verbose ) 
-        printf("testing multiple insertions of same key with %d threads\n", nthread);
+        printf("testing multiple insertions/deletions of same key with %d threads\n", nthread);
     {
         ASSERT( MyDataCount==0, NULL );
         MyTable table;
         const int m = 1000;
+        Counter = 0;
         tbb::tick_count t0 = tbb::tick_count::now();
-        tbb::parallel_for( tbb::blocked_range<int>(0,nthread,1), AddToTable(table,nthread,m) );
+        NativeParallelFor( tbb::blocked_range<int>(0,nthread,1), AddToTable(table,nthread,m) );
         tbb::tick_count t1 = tbb::tick_count::now();
         if( Verbose )
-            printf("time for multiple insertions = %g with %d threads\n",(t1-t0).seconds(),nthread);
+            printf("time for %u insertions = %g with %d threads\n",unsigned(MyDataCount),(t1-t0).seconds(),nthread);
         ASSERT( MyDataCount==m, "memory leak detected" );
+
+        EraseCount = 0;
+        t0 = tbb::tick_count::now();
+        NativeParallelFor( tbb::blocked_range<int>(0,nthread,1), RemoveFromTable(table,nthread,m) );
+        t1 = tbb::tick_count::now();
+        if( Verbose )
+            printf("time for %u deletions = %g with %d threads\n",unsigned(EraseCount),(t1-t0).seconds(),nthread);
+        ASSERT( MyDataCount==0, "memory leak detected" );
+        ASSERT( EraseCount==m, "return value of erase() is broken" );
+
+        CheckAllocator(table, m, m, /*exact*/nthread <= 1);
     }
     ASSERT( MyDataCount==0, "memory leak detected" );
 }
@@ -380,39 +592,53 @@ void TestIteratorTraits() {
     ASSERT( &xr==xp, NULL );
 }
 
+template<typename Iterator1, typename Iterator2>
+void TestIteratorAssignment( Iterator2 j ) {
+    Iterator1 i(j), k;
+    ASSERT( i==j, NULL ); ASSERT( !(i!=j), NULL );
+    k = j;
+    ASSERT( k==j, NULL ); ASSERT( !(k!=j), NULL );
+}
+
+template<typename Range1, typename Range2>
+void TestRangeAssignment( Range2 r2 ) {
+    Range1 r1(r2); r1 = r2;
+}
 //------------------------------------------------------------------------
 // Test for copy constructor and assignment
 //------------------------------------------------------------------------
 
+template<typename MyTable>
 void FillTable( MyTable& x, int n ) {
-    for( int i=0; i<n; ++i ) {
+    for( int i=1; i<=n; ++i ) {
         MyKey key( MyKey::make(i) );
-        MyTable::accessor a;
+        typename MyTable::accessor a;
         bool b = x.insert(a,key); 
         ASSERT(b,NULL); 
         a->second.set_value( i*i );
     }
 }
 
+template<typename MyTable>
 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 );
-    for( int i=0; i<n; ++i ) {
+    for( int i=1; i<=n; ++i ) {
         MyKey key( MyKey::make(i) );
-        MyTable::const_accessor a;
+        typename MyTable::const_accessor a;
         bool b = x.find(a,key); 
         ASSERT( b, NULL ); 
         ASSERT( a->second.value_of()==i*i, NULL );
     }
     int count = 0;
     int key_sum = 0;
-    for( MyTable::const_iterator i(x.begin()); i!=x.end(); ++i ) {
+    for( typename MyTable::const_iterator i(x.begin()); i!=x.end(); ++i ) {
         ++count;
         key_sum += i->first.value_of();
     }
     ASSERT( count==n, NULL );
-    ASSERT( key_sum==n*(n-1)/2, NULL );
+    ASSERT( key_sum==n*(n+1)/2, NULL );
 }
 
 void TestCopy() {
@@ -428,14 +654,20 @@ void TestCopy() {
         MyTable t2(t1);
         // Check that copy constructor did not mangle source table.
         CheckTable(t1,i);
+        swap(t1, t2);
+        CheckTable(t1,i);
+        ASSERT( !(t1 != t2), NULL );
 
         // Clear original table
-        t1.clear();
+        t2.clear();
+        swap(t2, t1);
         CheckTable(t1,0);
 
         // Verify that copy of t1 is correct, even after t1 is cleared.
         CheckTable(t2,i);
         t2.clear();
+        t1.swap( t2 );
+        CheckTable(t1,0);
         CheckTable(t2,0);
         ASSERT( MyDataCount==0, "data leak?" );
     }
@@ -450,6 +682,7 @@ void TestAssignment() {
             MyTable t2;
             FillTable(t1,i);
             FillTable(t2,j);
+            ASSERT( (t1 == t2) == (i == j), NULL );
             CheckTable(t1,i);
             CheckTable(t2,j);
 
@@ -471,6 +704,127 @@ void TestAssignment() {
     }
 }
 
+void TestIteratorsAndRanges() {
+    if( Verbose )
+        printf("testing iterators compliance\n");
+    TestIteratorTraits<MyTable::iterator,MyTable::value_type>();
+    TestIteratorTraits<MyTable::const_iterator,const MyTable::value_type>();
+
+    MyTable v;
+    MyTable const &u = v;
+
+    TestIteratorAssignment<MyTable::const_iterator>( u.begin() );
+    TestIteratorAssignment<MyTable::const_iterator>( v.begin() );
+    TestIteratorAssignment<MyTable::iterator>( v.begin() );
+    // doesn't compile as expected: TestIteratorAssignment<typename V::iterator>( u.begin() );
+
+    // check for non-existing 
+    ASSERT(v.equal_range(MyKey::make(-1)) == std::make_pair(v.end(), v.end()), NULL);
+    ASSERT(u.equal_range(MyKey::make(-1)) == std::make_pair(u.end(), u.end()), NULL);
+
+    if( Verbose )
+        printf("testing ranges compliance\n");
+    TestRangeAssignment<MyTable::const_range_type>( u.range() );
+    TestRangeAssignment<MyTable::const_range_type>( v.range() );
+    TestRangeAssignment<MyTable::range_type>( v.range() );
+    // doesn't compile as expected: TestRangeAssignment<typename V::range_type>( u.range() );
+
+    if( Verbose )
+        printf("testing construction and insertion from iterators range\n");
+    FillTable( v, 1000 );
+    MyTable2 t(v.begin(), v.end());
+    CheckTable(t, 1000);
+    t.insert(v.begin(), v.end()); // do nothing
+    CheckTable(t, 1000);
+    t.clear();
+    t.insert(v.begin(), v.end()); // restore
+    CheckTable(t, 1000);
+
+    if( Verbose )
+        printf("testing comparison\n");
+    typedef tbb::concurrent_hash_map<MyKey,MyData2,YourHashCompare,MyAllocator> YourTable1;
+    typedef tbb::concurrent_hash_map<MyKey,MyData2,YourHashCompare> YourTable2;
+    YourTable1 t1;
+    FillTable( t1, 10 );
+    CheckTable(t1, 10 );
+    YourTable2 t2(t1.begin(), t1.end());
+    MyKey key( MyKey::make(5) ); MyData2 data;
+    ASSERT(t2.erase(key), NULL);
+    YourTable2::accessor a;
+    ASSERT(t2.insert(a, key), NULL);
+    data.set_value(0);   a->second = data;
+    ASSERT( t1 != t2, NULL);
+    data.set_value(5*5); a->second = data;
+    ASSERT( t1 == t2, NULL);
+}
+
+void TestExceptions() {
+    typedef local_counting_allocator<tbb::tbb_allocator<MyData2> > allocator_t;
+    typedef tbb::concurrent_hash_map<MyKey,MyData2,MyHashCompare,allocator_t> ThrowingTable;
+    enum methods {
+        zero_method = 0,
+        ctor_copy, op_assign, op_insert,
+        all_methods
+    };
+    if( Verbose )
+        printf("testing exception-safety guarantees\n");
+    ThrowingTable src;
+    FillTable( src, 1000 );
+    ASSERT( MyDataCount==1000, NULL );
+
+    try {
+        for(int t = 0; t < 2; t++) // exception type
+        for(int m = zero_method+1; m < all_methods; m++)
+        {
+            allocator_t a;
+            if(t) MyDataCountLimit = 101;
+            else a.set_limits(101);
+            ThrowingTable victim(a);
+            MyDataCount = 0;
+
+            try {
+                switch(m) {
+                case ctor_copy: {
+                        ThrowingTable acopy(src, a);
+                    } break;
+                case op_assign: {
+                        victim = src;
+                    } break;
+                case op_insert: {
+                        FillTable( victim, 1000 );
+                    } break;
+                default:;
+                }
+                ASSERT(false, "should throw an exception");
+            } catch(std::bad_alloc &e) {
+                MyDataCountLimit = 0;
+                size_t size = victim.size();
+                switch(m) {
+                case op_assign:
+                    ASSERT( MyDataCount==100, "data leak?" );
+                    ASSERT( size>=100, NULL );
+                    CheckAllocator(victim, 100+t, t);
+                case ctor_copy:
+                    CheckTable(src, 1000);
+                    break;
+                case op_insert:
+                    ASSERT( size==size_t(100-t), NULL );
+                    ASSERT( MyDataCount==100-t, "data leak?" );
+                    CheckTable(victim, 100-t);
+                    CheckAllocator(victim, 100, t);
+                    break;
+
+                default:; // nothing to check here
+                }
+                if( Verbose ) printf("Exception %d: %s\t- ok ()\n", m, e.what());
+            }
+        }
+    } catch(...) {
+        ASSERT(false, "unexpected exception");
+    }
+    src.clear(); MyDataCount = 0;
+}
+
 //------------------------------------------------------------------------
 // Test driver
 //------------------------------------------------------------------------
@@ -490,16 +844,21 @@ int main( int argc, char* argv[] ) {
 
     // Do serial tests
     TestTypes();
-    TestIteratorTraits<MyTable::iterator,MyTable::value_type>();
-    TestIteratorTraits<MyTable::const_iterator,const MyTable::value_type>();
     TestCopy();
     TestAssignment();
+    TestIteratorsAndRanges();
+    TestExceptions();
 
     // Do concurrency tests.
     for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) {
         tbb::task_scheduler_init init( nthread );
         TestInsertFindErase( nthread );
-        TestMultipleInsert( nthread );
+        TestConcurrency( nthread );
+    }
+    // check linking
+    #undef runtime_warning
+    if(bad_hashing) { //should be false
+        tbb::internal::runtime_warning("none\nERROR: it must not be executed");
     }
 
     printf("done\n");
diff --git a/src/test/test_concurrent_queue.cpp b/src/test/test_concurrent_queue.cpp
index 1b48e92..5425f66 100644
--- a/src/test/test_concurrent_queue.cpp
+++ b/src/test/test_concurrent_queue.cpp
@@ -31,6 +31,7 @@
 #include "tbb/tick_count.h"
 #include "tbb/blocked_range.h"
 #include "harness.h"
+#include "harness_allocator.h"
 
 static tbb::atomic<long> FooConstructed;
 static tbb::atomic<long> FooDestroyed;
@@ -70,6 +71,56 @@ public:
     bool is_const() const {return true;}
 };
 
+// problem size
+static const int N = 50000;     // # of bytes
+
+//! Exception for concurrent_queue
+class Foo_exception : public std::bad_alloc {
+public:
+    virtual const char *what() const throw() { return "out of Foo limit"; }
+    virtual ~Foo_exception() throw() {}
+};
+
+static tbb::atomic<long> FooExConstructed;
+static tbb::atomic<long> FooExDestroyed;
+static tbb::atomic<long> serial_source;
+static long MaxFooCount = 0;
+static const long Threshold = 400;
+
+class FooEx {
+    enum state_t{
+        LIVE=0x1234,
+        DEAD=0xDEAD
+    };
+    state_t state;
+public:
+    int serial;
+    FooEx() : state(LIVE) {
+        ++FooExConstructed;
+        serial = serial_source++;
+    }
+
+    FooEx( const FooEx& item ) : state(LIVE) {
+        ++FooExConstructed;
+        if( MaxFooCount && (FooExConstructed-FooExDestroyed) >= MaxFooCount ) // in push()
+            throw Foo_exception();
+        serial = item.serial;
+    }
+    ~FooEx() {
+        ASSERT( state==LIVE, NULL );
+        ++FooExDestroyed;
+        state=DEAD;
+        serial=0xDEAD;
+    }
+    void operator=( FooEx& item ) {
+        ASSERT( item.state==LIVE, NULL );
+        ASSERT( state==LIVE, NULL );
+        serial = item.serial;
+        if( MaxFooCount==2*Threshold && (FooExConstructed-FooExDestroyed) <= MaxFooCount/4 ) // in pop()
+            throw Foo_exception();
+    }
+} ;
+
 const size_t MAXTHREAD = 256;
 
 static int Sum[MAXTHREAD];
@@ -168,6 +219,7 @@ void TestPushPop( int prefill, ptrdiff_t capacity, int nthread ) {
         if( sum!=expected )
             printf("sum=%d expected=%d\n",sum,expected);
         ASSERT( FooConstructed==FooDestroyed, NULL );
+        // TODO: checks by counting allocators
 
         success = true;
         if( nthread>1 && prefill==0 ) {
@@ -332,6 +384,111 @@ void TestNegativeQueue( int nthread ) {
     NativeParallelFor( tbb::blocked_range<int>(0,nthread,1), TestNegativeQueueBody<T>(queue,nthread) );
 }
 
+template<typename T>
+void TestExceptions() {
+    typedef static_counting_allocator<std::allocator<FooEx>, size_t> allocator_t;
+    typedef static_counting_allocator<std::allocator<char>, size_t> allocator_char_t;
+    typedef tbb::concurrent_queue<FooEx, allocator_t> concur_queue_t;
+
+    enum methods {
+        m_push = 0,
+        m_pop
+    };  
+
+    // verify 'clear()' on exception; queue's destructor calls its clear()
+    {
+        concur_queue_t queue_clear;
+        try {
+            allocator_char_t::init_counters();
+            allocator_char_t::set_limits(N/2);
+            for( int k=0; k<N; k++ )
+                queue_clear.push( T() );
+        } catch (...) {
+            // TODO: some assert here?
+        }
+    }
+
+    try {
+        int n_pushed=0, n_popped=0;
+        for(int t = 0; t <= 1; t++)// exception type -- 0 : from allocator(), 1 : from Foo's constructor
+        {
+            concur_queue_t queue_test;
+            for( int m=m_push; m<=m_pop; m++ ) {
+                // concurrent_queue internally rebinds the allocator to one with 'char'
+                allocator_char_t::init_counters();
+
+                if(t) MaxFooCount = MaxFooCount + 400;
+                else allocator_char_t::set_limits(N/2);
+
+                try {
+                    switch(m) {
+                    case m_push:
+                            for( int k=0; k<N; k++ ) {
+                                queue_test.push( T() );
+                                n_pushed++;
+                            }
+                            break;
+                    case m_pop:
+                            n_popped=0;
+                            for( int k=0; k<n_pushed; k++ ) {
+                                T elt;
+                                queue_test.pop( elt );
+                                n_popped++;
+                            }
+                            n_pushed = 0;
+                            allocator_char_t::set_limits(); 
+                            break;
+                    }
+                    if( !t && m==m_push ) ASSERT(false, "should throw an exception");
+                } catch ( Foo_exception & ) {
+                    switch(m) {
+                    case m_push: {
+                                ASSERT( queue_test.size()==(n_pushed+1), "incorrect queue size" );
+                                long tc = MaxFooCount;
+                                MaxFooCount = 0;
+                                for( int k=0; k<(int)tc; k++ ) {
+                                    queue_test.push( T() );
+                                    n_pushed++;
+                                }
+                                MaxFooCount = tc;
+                            }
+                            break;
+                    case m_pop:
+                            MaxFooCount = 0; // disable exception
+                            n_pushed -= (n_popped+1); // including one that threw an exception
+                            for( int k=0; k<1000; k++ ) {
+                                queue_test.push( T() );
+                                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" );
+                            for( int k=0; k<n_pushed; k++ ) {
+                                T elt;
+                                queue_test.pop( elt );
+                            }
+                            ASSERT( queue_test.empty(), "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();
+                    switch(m) {
+                    case m_push:
+                            ASSERT( size>0, "incorrect queue size");
+                            break;
+                    case m_pop:
+                            if( !t ) ASSERT( false, "should not throw an exceptin" );
+                            break;
+                    }
+                }
+            }
+        }
+    } catch(...) {
+        ASSERT(false, "unexpected exception");
+    }
+}
+
 int main( int argc, char* argv[] ) {
     // Set default for minimum number of threads.
     MinThread = 1;
@@ -354,6 +511,11 @@ int main( int argc, char* argv[] ) {
             TestPushPop(prefill,ptrdiff_t(100),nthread);
         }
     }
+#if __GLIBC__==2&&__GLIBC_MINOR__==3
+    printf("Warning: Exception safety test is skipped due to a known issue.\n");
+#else
+    TestExceptions<FooEx>();
+#endif
     printf("done\n");
     return 0;
 }
diff --git a/src/test/test_concurrent_vector.cpp b/src/test/test_concurrent_vector.cpp
index 6947610..a199644 100644
--- a/src/test/test_concurrent_vector.cpp
+++ b/src/test/test_concurrent_vector.cpp
@@ -27,23 +27,43 @@
 */
 
 #include "tbb/concurrent_vector.h"
+#include "tbb/cache_aligned_allocator.h"
+#include "tbb/tbb_exception.h"
 #include <cstdio>
 #include <cstdlib>
+#include <stdexcept>
 #include "harness_assert.h"
+#include "harness_allocator.h"
+
+static bool known_issue_verbose = false;
+#define KNOWN_ISSUE(msg) if(!known_issue_verbose) known_issue_verbose = true, printf(msg)
 
 tbb::atomic<long> FooCount;
+long MaxFooCount = 0;
 
 //! Problem size
 const size_t N = 500000;
 
+//! Exception for concurrent_vector
+class Foo_exception : public std::bad_alloc {
+public:
+    virtual const char *what() const throw() { return "out of Foo limit"; }
+    virtual ~Foo_exception() throw() {}
+};
+
 struct Foo {
     int my_bar;
 public:
     enum State {
+        ZeroInitialized=0,
         DefaultInitialized=0x1234,
-        CopyInitialized=0x89ab,
+        CopyInitialized=0x8765,
         Destroyed=0x5678
     } state;
+    int& zero_bar() {
+        ASSERT( state==DefaultInitialized||state==CopyInitialized||state==ZeroInitialized, NULL );
+        return my_bar;
+    }
     int& bar() {
         ASSERT( state==DefaultInitialized||state==CopyInitialized, NULL );
         return my_bar;
@@ -55,22 +75,30 @@ public:
     static const int initial_value_of_bar = 42;
     Foo() {
         state = DefaultInitialized;
+        if(MaxFooCount && FooCount >= MaxFooCount)
+            throw Foo_exception();
         ++FooCount;
         my_bar = initial_value_of_bar;
     }
     Foo( const Foo& foo ) {
         state = CopyInitialized;
+        if(MaxFooCount && FooCount >= MaxFooCount)
+            throw Foo_exception();
         ++FooCount;
         my_bar = foo.my_bar;
     }
     ~Foo() {
-        ASSERT( state==DefaultInitialized||state==CopyInitialized, NULL );
+        ASSERT( state==DefaultInitialized||state==CopyInitialized||(state==ZeroInitialized && !my_bar), NULL );
         state = Destroyed;
         my_bar = ~initial_value_of_bar;
         --FooCount;
     }
+    bool operator==(const Foo &f) const { return my_bar == f.my_bar; }
+    bool operator<(const Foo &f) const { return my_bar < f.my_bar; }
     bool is_const() const {return true;}
     bool is_const() {return false;}
+private:
+    char reserve[1];
 };
 
 class FooWithAssign: public Foo {
@@ -82,37 +110,59 @@ public:
     } 
 };
 
+class FooIterator: public std::iterator<std::input_iterator_tag,FooWithAssign> {
+    int x_bar;
+public:
+    FooIterator(int x) {
+        x_bar = x;
+    }
+    FooIterator &operator++() {
+        x_bar++; return *this;
+    }
+    FooWithAssign operator*() {
+        FooWithAssign foo; foo.bar() = x_bar;
+        return foo;
+    }
+    bool operator!=(const FooIterator &i) { return x_bar != i.x_bar; }
+};
+
 inline void NextSize( int& s ) {
     if( s<=32 ) ++s;
-    else s += s/10;     
+    else s += s/10;
 }
 
-static void CheckVector( const tbb::concurrent_vector<Foo>& cv, size_t expected_size, size_t old_size ) {
+//! 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.size()==expected_size, NULL );
     ASSERT( cv.empty()==(expected_size==0), NULL );
     for( int j=0; j<int(expected_size); ++j ) {
         if( cv[j].bar()!=~j )
-            printf("ERROR on line %d for old_size=%ld expected_size=%ld j=%d\n",__LINE__,long(old_size),long(expected_size),j);
+            std::printf("ERROR on line %d for old_size=%ld expected_size=%ld j=%d\n",__LINE__,long(old_size),long(expected_size),j);
     }
 }
 
+//! Test of assign, grow, copying with various sizes
 void TestResizeAndCopy() {
-    typedef tbb::concurrent_vector<Foo> vector_t;
+	typedef static_counting_allocator<std::allocator<Foo>, std::size_t> allocator_t;
+    typedef tbb::concurrent_vector<Foo, allocator_t> vector_t;
+    allocator_t::init_counters();
     for( int old_size=0; old_size<=128; NextSize( old_size ) ) {
-        for( int new_size=old_size; new_size<=128; NextSize( new_size ) ) {
+        for( int new_size=old_size; new_size<=1280; NextSize( new_size ) ) {
             long count = FooCount;
             vector_t v;
             ASSERT( count==FooCount, NULL );
-            v.grow_by(old_size);
-            ASSERT( count+old_size==FooCount, NULL );
-            for( int j=0; j<old_size; ++j )
-                v[j].bar() = j*j;
+            v.assign(old_size/2, Foo() );
+            ASSERT( count+old_size/2==FooCount, NULL );
+            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);
             ASSERT( count+new_size==FooCount, NULL );
             for( int j=0; j<new_size; ++j ) {
-                int expected = j<old_size ? j*j : Foo::initial_value_of_bar;
+                int expected = j<old_size ? j : Foo::initial_value_of_bar;
                 if( v[j].bar()!=expected ) 
-                    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);
+                    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);
             }
             ASSERT( v.size()==size_t(new_size), NULL );
             for( int j=0; j<new_size; ++j ) {
@@ -122,34 +172,49 @@ void TestResizeAndCopy() {
             // Try copy constructor
             vector_t copy_of_v(cv);
             CheckVector(cv,new_size,old_size);
+            ASSERT( !(v != copy_of_v), NULL );
             v.clear();
             ASSERT( v.empty(), NULL );
-            CheckVector(copy_of_v,new_size,old_size);
+            swap(v, copy_of_v);
+            ASSERT( copy_of_v.empty(), NULL );
+            CheckVector(v,new_size,old_size);
         }
     }
+    ASSERT( allocator_t::items_allocated == allocator_t::items_freed, NULL);
+    ASSERT( allocator_t::allocations == allocator_t::frees, NULL);
 }
 
+//! Test reserve, compact, capacity
 void TestCapacity() {
-    for( size_t old_size=0; old_size<=10000; old_size=(old_size<5 ? old_size+1 : 3*old_size) ) {
-        for( size_t new_size=0; new_size<=10000; new_size=(new_size<5 ? new_size+1 : 3*new_size) ) {
+    typedef static_counting_allocator<tbb::cache_aligned_allocator<Foo>, std::size_t> allocator_t;
+    typedef tbb::concurrent_vector<Foo, allocator_t> vector_t;
+    allocator_t::init_counters();
+    for( size_t old_size=0; old_size<=11000; old_size=(old_size<5 ? old_size+1 : 3*old_size) ) {
+        for( size_t new_size=0; new_size<=11000; new_size=(new_size<5 ? new_size+1 : 3*new_size) ) {
             long count = FooCount; 
             {
-                typedef tbb::concurrent_vector<Foo> vector_t;
-                vector_t v;
-                v.reserve( old_size );
+                vector_t v; v.reserve(old_size);
                 ASSERT( v.capacity()>=old_size, NULL );
                 v.reserve( new_size );
                 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 ) {
                     ASSERT( size_t(FooCount)==count+i, NULL );
                     size_t j = v.grow_by(1);
                     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
+                CheckVector(v, new_size*2, old_size); // check vector correctness
+                ASSERT( v==copy_of_v, NULL ); // TODO: check also segments layout equality
             }
             ASSERT( FooCount==count, NULL );
         }
     } 
+    ASSERT( allocator_t::items_allocated == allocator_t::items_freed, NULL);
+    ASSERT( allocator_t::allocations == allocator_t::frees, NULL);
 }
 
 struct AssignElement {
@@ -158,7 +223,7 @@ struct AssignElement {
     void operator()( const tbb::concurrent_vector<int>::range_type& range ) const {
         for( iterator i=range.begin(); i!=range.end(); ++i ) {
             if( *i!=0 )
-                printf("ERROR for v[%ld]\n", long(i-base));
+                std::printf("ERROR for v[%ld]\n", long(i-base));
             *i = int(i-base);
         }
     }
@@ -171,7 +236,7 @@ struct CheckElement {
     void operator()( const tbb::concurrent_vector<int>::const_range_type& range ) const {
         for( iterator i=range.begin(); i!=range.end(); ++i )
             if( *i != int(i-base) )
-                printf("ERROR for v[%ld]\n", long(i-base));
+                std::printf("ERROR for v[%ld]\n", long(i-base));
     }
     CheckElement( iterator base_ ) : base(base_) {}
 };
@@ -180,24 +245,25 @@ struct CheckElement {
 #include "tbb/parallel_for.h"
 #include "harness.h"
 
+//! Test parallel access by iterators
 void TestParallelFor( int nthread ) {
     typedef tbb::concurrent_vector<int> vector_t;
     vector_t v;
     v.grow_to_at_least(N);  
     tbb::tick_count t0 = tbb::tick_count::now();
     if( Verbose )
-        printf("Calling parallel_for.h with %ld threads\n",long(nthread));
+        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;      
     tbb::parallel_for( u.range(10000), CheckElement(u.begin()) );
     tbb::tick_count t2 = tbb::tick_count::now();
     if( Verbose )
-        printf("Time for parallel_for.h: assign time = %8.5f, check time = %8.5f\n",
+        std::printf("Time for parallel_for: assign time = %8.5f, check time = %8.5f\n",
                (t1-t0).seconds(),(t2-t1).seconds());
     for( long i=0; size_t(i)<v.size(); ++i )
         if( v[i]!=i )
-            printf("ERROR for v[%ld]\n", i);
+            std::printf("ERROR for v[%ld]\n", i);
 }
 
 template<typename Iterator1, typename Iterator2>
@@ -211,6 +277,11 @@ void TestIteratorAssignment( Iterator2 j ) {
     ASSERT( !(k!=j), NULL );
 }
 
+template<typename Range1, typename Range2>
+void TestRangeAssignment( Range2 r2 ) {
+    Range1 r1(r2); r1 = r2;
+}
+
 template<typename Iterator, typename T>
 void TestIteratorTraits() {
     AssertSameType( static_cast<typename Iterator::difference_type*>(0), static_cast<ptrdiff_t*>(0) ); 
@@ -227,11 +298,11 @@ template<typename Vector, typename Iterator>
 void CheckConstIterator( const Vector& u, int i, const Iterator& cp ) {
     typename Vector::const_reference pref = *cp;
     if( pref.bar()!=i )
-        printf("ERROR for u[%ld] using const_iterator\n", long(i));
+        std::printf("ERROR for u[%ld] using const_iterator\n", long(i));
     typename Vector::difference_type delta = cp-u.begin();
     ASSERT( delta==i, NULL );
     if( u[i].bar()!=i )
-        printf("ERROR for u[%ld] using subscripting\n", long(i));
+        std::printf("ERROR for u[%ld] using subscripting\n", long(i));
     ASSERT( u.begin()[i].bar()==i, NULL );
 }
 
@@ -256,10 +327,12 @@ void CheckIteratorComparison( V& u ) {
 
 //! Test sequential iterators for vector type V.
 /** Also does timing. */
-template<typename V>
+template<typename T>
 void TestSequentialFor() {
+    typedef tbb::concurrent_vector<Foo> V;
     V v;
     v.grow_by(N);
+    ASSERT(v.grow_by(0) == v.grow_by(0, Foo()), NULL);
 
     // Check iterator 
     tbb::tick_count t0 = tbb::tick_count::now();
@@ -268,7 +341,7 @@ void TestSequentialFor() {
     ASSERT( !p->is_const(), NULL );
     for( int i=0; size_t(i)<v.size(); ++i, ++p ) {
         if( (*p).state!=Foo::DefaultInitialized )
-            printf("ERROR for v[%ld]\n", long(i));
+            std::printf("ERROR for v[%ld]\n", long(i));
         typename V::reference pref = *p;
         pref.bar() = i;
         typename V::difference_type delta = p-v.begin();
@@ -278,16 +351,17 @@ void TestSequentialFor() {
     tbb::tick_count t1 = tbb::tick_count::now();
     
     // Check const_iterator going forwards
-    const V& u = v;     
+    const V& u = v;
     typename V::const_iterator cp = u.begin();
     ASSERT( (*cp).is_const(), NULL );
     ASSERT( cp->is_const(), NULL );
+    ASSERT( *cp == v.front(), NULL);
     for( int i=0; size_t(i)<u.size(); ++i, ++cp ) {
         CheckConstIterator(u,i,cp);
     }
     tbb::tick_count t2 = tbb::tick_count::now();
     if( Verbose )
-        printf("Time for serial for:  assign time = %8.5f, check time = %8.5f\n",
+        std::printf("Time for serial for:  assign time = %8.5f, check time = %8.5f\n",
                (t1-t0).seconds(),(t2-t1).seconds());
 
     // Now go backwards
@@ -307,8 +381,8 @@ void TestSequentialFor() {
     }
 
     // Now go forwards and backwards
-    cp = u.begin();
     ptrdiff_t j = 0;
+    cp = u.begin();
     for( size_t i=0; i<u.size(); ++i ) {
         CheckConstIterator(u,int(j),cp);
         typename V::difference_type delta = i*3 % u.size();
@@ -342,6 +416,12 @@ void TestSequentialFor() {
     TestIteratorAssignment<typename V::const_iterator>( u.begin() );
     TestIteratorAssignment<typename V::const_iterator>( v.begin() );
     TestIteratorAssignment<typename V::iterator>( v.begin() );
+    // doesn't compile as expected: TestIteratorAssignment<typename V::iterator>( u.begin() );
+
+    TestRangeAssignment<typename V::const_range_type>( u.range() );
+    TestRangeAssignment<typename V::const_range_type>( v.range() );
+    TestRangeAssignment<typename V::range_type>( v.range() );
+    // doesn't compile as expected: TestRangeAssignment<typename V::range_type>( u.range() );
 
     // Check reverse_iterator 
     typename V::reverse_iterator rp = v.rbegin();
@@ -354,6 +434,7 @@ void TestSequentialFor() {
     
     // Check const_reverse_iterator 
     typename V::const_reverse_iterator crp = u.rbegin();
+    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 );
@@ -363,11 +444,32 @@ void TestSequentialFor() {
 
     TestIteratorAssignment<typename V::const_reverse_iterator>( u.rbegin() );
     TestIteratorAssignment<typename V::reverse_iterator>( v.rbegin() );
+
+    // test compliance with C++ Standard 2003, clause 23.1.1p9
+    {
+        tbb::concurrent_vector<int> v1, v2(1, 100);
+        v1.assign(1, 100); ASSERT(v1 == v2, NULL);
+        ASSERT(v1.size() == 1 && v1[0] == 100, "used integral iterators");
+    }
+
+    // cross-allocator tests
+#if !defined(_WIN64) || defined(_CPPLIB_VER)
+    typedef local_counting_allocator<std::allocator<int>, size_t> allocator1_t;
+    typedef tbb::cache_aligned_allocator<void> allocator2_t;
+    typedef tbb::concurrent_vector<Foo, allocator1_t> V1;
+    typedef tbb::concurrent_vector<Foo, allocator2_t> V2;
+    V1 v1( v ); // checking cross-allocator copying
+    V2 v2( 10 ); v2 = v1; // checking cross-allocator assignment
+    ASSERT( (v1 == v) && !(v2 != v), NULL);
+    ASSERT( !(v1 < v) && !(v2 > v), NULL);
+    ASSERT( (v1 <= v) && (v2 >= v), NULL);
+#endif
 }
 
 static const size_t Modulus = 7;
 
-typedef tbb::concurrent_vector<Foo> MyVector;
+typedef static_counting_allocator<tbb::cache_aligned_allocator<Foo> > MyAllocator;
+typedef tbb::concurrent_vector<Foo, MyAllocator> MyVector;
 
 class GrowToAtLeast {
     MyVector& my_vector;
@@ -375,7 +477,7 @@ 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 = n==0 ? 0 : i % (2*n+1);
+            size_t k = i % (2*n+1);
             my_vector.grow_to_at_least(k+1);
             ASSERT( my_vector.size()>=k+1, NULL );
         }
@@ -384,10 +486,15 @@ public:
 };
 
 void TestConcurrentGrowToAtLeast() {
-    MyVector v;
+    MyAllocator::init_counters();
+    MyVector v(2, Foo(), MyAllocator());
     for( size_t s=1; s<1000; s*=10 ) {
-        tbb::parallel_for( tbb::blocked_range<size_t>(0,1000000,100), GrowToAtLeast(v) );
+        tbb::parallel_for( tbb::blocked_range<size_t>(0,10000*s,s), GrowToAtLeast(v) );
     }
+    v.clear();
+    size_t items_allocated = v.get_allocator().items_allocated, items_freed = v.get_allocator().items_freed;
+    size_t allocations = v.get_allocator().allocations, frees = v.get_allocator().frees;
+    ASSERT( items_allocated == items_freed, NULL); ASSERT( allocations == frees, NULL);
 }
 
 //! Test concurrent invocations of method concurrent_vector::grow_by
@@ -396,13 +503,17 @@ class GrowBy {
 public:
     void operator()( const tbb::blocked_range<int>& range ) const {
         for( int i=range.begin(); i!=range.end(); ++i ) {
-            if( i%3 ) {
+            if( i&1 ) {
                 Foo& element = my_vector[my_vector.grow_by(1)]; 
                 element.bar() = i;
             } else {
                 Foo f;
                 f.bar() = i;
-                size_t k = my_vector.push_back( f );
+                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 );
             }
         }
@@ -412,52 +523,93 @@ public:
 
 //! Test concurrent invocations of method concurrent_vector::grow_by
 void TestConcurrentGrowBy( int nthread ) {
-    int m = 100000;
-    MyVector v;
-    tbb::parallel_for( tbb::blocked_range<int>(0,m,1000), GrowBy(v) );
-    ASSERT( v.size()==size_t(m), NULL );
-
-    // Verify that v is a permutation of 0..m
-    int inversions = 0;
-    bool* found = new bool[m];
-    memset( found, 0, m );
-    for( int i=0; i<m; ++i ) {
-        int index = v[i].bar();
-        ASSERT( !found[index], NULL );
-        found[index] = true;
-        if( i>0 )
-            inversions += v[i].bar()<v[i-1].bar();
-    }
-    for( int i=0; i<m; ++i ) {
-        ASSERT( found[i], NULL );
-        ASSERT( nthread>1 || v[i].bar()==i, "sequential execution is wrong" );
-    }
-    delete[] found;
-    if( nthread>1 && inversions<m/10 )
-        printf("WARNING: not much concurrency in TestConcurrentGrowBy\n");
+    MyAllocator::init_counters();
+    {
+        int m = 100000; MyAllocator a;
+        MyVector v( a );
+        tbb::parallel_for( tbb::blocked_range<int>(0,m,1000), GrowBy(v) );
+        ASSERT( v.size()==size_t(m), NULL );
+
+        // Verify that v is a permutation of 0..m
+        int inversions = 0;
+        bool* found = new bool[m];
+        memset( found, 0, m );
+        for( int i=0; i<m; ++i ) {
+            int index = v[i].bar();
+            ASSERT( v[i].state == (index&1 ? Foo::DefaultInitialized : Foo::CopyInitialized), NULL);
+            ASSERT( !found[index], NULL );
+            found[index] = true;
+            if( i>0 )
+                inversions += v[i].bar()<v[i-1].bar();
+        }
+        for( int i=0; i<m; ++i ) {
+            ASSERT( found[i], NULL );
+            ASSERT( nthread>1 || v[i].bar()==i, "sequential execution is wrong" );
+        }
+        delete[] found;
+        if( nthread>1 && inversions<m/10 )
+            std::printf("WARNING: not much concurrency in TestConcurrentGrowBy\n");
+    }
+    size_t items_allocated = MyAllocator::items_allocated, items_freed = MyAllocator::items_freed;
+    size_t allocations = MyAllocator::allocations, frees = MyAllocator::frees;
+    ASSERT( items_allocated == items_freed, NULL); ASSERT( allocations == frees, NULL);
 }
 
-//! Test the assignment operator
+//! Test the assignment operator and swap
 void TestAssign() {
-    typedef tbb::concurrent_vector<FooWithAssign> vector_t;
+    typedef tbb::concurrent_vector<FooWithAssign, local_counting_allocator<std::allocator<FooWithAssign>, size_t > > vector_t;
+    local_counting_allocator<std::allocator<FooWithAssign>, size_t > init_alloc;
+    init_alloc.allocations = 100;
     for( int dst_size=1; dst_size<=128; NextSize( dst_size ) ) {
         for( int src_size=2; src_size<=128; NextSize( src_size ) ) {
-            vector_t u;
-            u.grow_to_at_least(src_size);
+            vector_t u(FooIterator(0), FooIterator(src_size), init_alloc);
             for( int i=0; i<src_size; ++i )
-                u[i].bar() = i*i;
-            vector_t v;
-            v.grow_to_at_least(dst_size);
-            for( int i=0; i<dst_size; ++i )
-                v[i].bar() = -i;
+                ASSERT( u[i].bar()==i, NULL );
+            vector_t v(dst_size, FooWithAssign(), init_alloc);
+            for( int i=0; i<dst_size; ++i ) {
+                ASSERT( v[i].state==Foo::CopyInitialized, NULL );
+                v[i].bar() = ~i;
+            }
+            ASSERT( v != u, NULL);
+            v.swap(u);
+            CheckVector(u, dst_size, src_size);
+            u.swap(v);
+            // using assignment
             v = u;
+            ASSERT( v == u, NULL);
             u.clear();
             ASSERT( u.size()==0, NULL );
             ASSERT( v.size()==size_t(src_size), NULL );
             for( int i=0; i<src_size; ++i )
-                ASSERT( v[i].bar()==(i*i), NULL );
+                ASSERT( v[i].bar()==i, NULL );
+            size_t items_allocated = u.get_allocator().items_allocated, items_freed = u.get_allocator().items_freed;
+            size_t allocations = u.get_allocator().allocations, frees = u.get_allocator().frees + 100;
+            ASSERT( items_allocated == items_freed, NULL); ASSERT( allocations == frees, NULL);
+            ASSERT( u.get_allocator().allocations == u.get_allocator().frees + 100, NULL);
         }
-    }    
+    }
+}
+
+// Test the comparison operators
+#include <string>
+void TestComparison() {
+    std::string str[3]; str[0] = "abc";
+    str[1].assign("cba");
+    str[2].assign("abc"); // same as 0th
+    tbb::concurrent_vector<char> var[3];
+    var[0].assign(str[0].begin(), str[0].end());
+    var[1].assign(str[0].rbegin(), str[0].rend());
+    var[2].assign(var[1].rbegin(), var[1].rend()); // same as 0th
+    for (int i = 0; i < 3; i++) {
+        for (int j = 0; j < 3; j++) {
+            ASSERT( (var[i] == var[j]) == (str[i] == str[j]), NULL );
+            ASSERT( (var[i] != var[j]) == (str[i] != str[j]), NULL );
+            ASSERT( (var[i] < var[j]) == (str[i] < str[j]), NULL );
+            ASSERT( (var[i] > var[j]) == (str[i] > str[j]), NULL );
+            ASSERT( (var[i] <= var[j]) == (str[i] <= str[j]), NULL );
+            ASSERT( (var[i] >= var[j]) == (str[i] >= str[j]), NULL );
+        }
+    }
 }
 
 //------------------------------------------------------------------------
@@ -495,7 +647,7 @@ public:
 };
 
 static double TimeFindPrimes( int nthread ) {
-    Primes.clear();
+    Primes.clear();     // clear behavior has been changed since 2.0
     tbb::task_scheduler_init init(nthread);
     tbb::tick_count t0 = tbb::tick_count::now();
     tbb::parallel_for( tbb::blocked_range<Number>(0,1000000,500), FindPrimes() );
@@ -511,14 +663,18 @@ static void TestFindPrimes() {
     double t128 = TimeFindPrimes(128);
 
     if( Verbose ) 
-        printf("TestFindPrimes: t2==%g t128=%g\n", t2, t128 );
+        std::printf("TestFindPrimes: t2==%g t128=%g k=%g\n", t2, t128, t128/t2);
 
     // We allow the 128-thread run a little extra time to allow for thread overhead.
     // Theoretically, following test will fail on machine with >128 processors.
     // But that situation is not going to come up in the near future,
     // and the generalization to fix the issue is not worth the trouble.
-    if( t128>1.10*t2 ) {
-        printf("Warning: grow_by is pathetically slow: t2==%g t128=%g\n", t2, t128);
+    //
+    // [05.09.2007] Anton M has modified coefficient below from value 1.1 to 1.3 due to
+    // changes have been made in clear() behavior since 2.0 [U1] version.
+    // Originally, clear() kept segments allocated before which led to inaccurate measurment of t128.
+    if( t128 > 1.3*t2 ) {
+        std::printf("Warning: grow_by is pathetically slow: t2==%g t128=%g k=%g\n", t2, t128, t128/t2);
     } 
 }
 
@@ -529,11 +685,10 @@ static void TestFindPrimes() {
 #include <algorithm>
 
 void TestSort() {
-    for( int n=1; n<100; n*=3 ) {
-        tbb::concurrent_vector<int> array;
-        array.grow_by( n );
+    for( int n=0; n<100; n=n*3+1 ) {
+        tbb::concurrent_vector<int> array(n);
         for( int i=0; i<n; ++i )
-            array[i] = (i*7)%n;
+            array.at(i) = (i*7)%n;
         std::sort( array.begin(), array.end() );
         for( int i=0; i<n; ++i )
             ASSERT( array[i]==i, NULL );
@@ -541,6 +696,169 @@ void TestSort() {
 }
 
 //------------------------------------------------------------------------
+// Test exceptions safety (from allocator and items constructors)
+//------------------------------------------------------------------------
+template<typename MyVector>
+class GrowthException {
+    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;
+
+void TestExceptions() {
+	typedef static_counting_allocator<std::allocator<Foo>, std::size_t> allocator_t;
+    typedef tbb::concurrent_vector<Foo, allocator_t> vector_t;
+
+    enum methods {
+        zero_method = 0,
+        ctor_copy, ctor_size, assign_nt, assign_ir, op_equ, reserve, compact, grow,
+        all_methods
+    };
+    try {
+        vector_t src(FooIterator(0), FooIterator(N)); // original data
+
+        for(int t = 0; t < 2; t++) // exception type
+        for(int m = zero_method+1; m < all_methods; m++)
+        {
+            allocator_t::init_counters();
+            if(t) MaxFooCount = FooCount + N/2;
+            else allocator_t::set_limits(N/2);
+            vector_t victim;
+            try {
+                switch(m) {
+                case ctor_copy: {
+                        vector_t acopy(src);
+                    } break; // auto destruction after exception is checked by ~Foo
+                case ctor_size: {
+                        vector_t sized(N);
+                    } break; // auto destruction after exception is checked by ~Foo
+                // Do not test assignment constructor due to reusing of same methods as below 
+                case assign_nt: {
+                        victim.assign(N, Foo());
+                    } break;
+                case assign_ir: {
+                        victim.assign(FooIterator(0), FooIterator(N));
+                    } break;
+                case op_equ: {
+                        victim.reserve(2); victim = src; // fragmented assignment
+                    } break;
+                case reserve: {
+                        try {
+                            victim.reserve(victim.max_size()+1);
+                        } catch(std::length_error &) {
+                        } catch(...) {
+                            KNOWN_ISSUE("ERROR: unrecognized exception - known compiler issue\n");
+                        }
+                        victim.reserve(N);
+                    } break;
+                case compact: {
+                        if(t) MaxFooCount = 0; else allocator_t::set_limits(); // reset limits
+                        victim.reserve(2); victim = src; // fragmented assignment
+                        if(t) MaxFooCount = 1; else allocator_t::set_limits(1, false); // block any allocation, check NULL return from allocator
+                        victim.compact(); // 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
+                    } break;
+                default:;
+                }
+                if(!t || m != reserve) ASSERT(false, "should throw an exception");
+            } catch(std::bad_alloc &e) {
+                allocator_t::set_limits(); MaxFooCount = 0;
+                size_t capacity = victim.capacity();
+                size_t size = victim.size();
+                switch(m) {
+                case reserve:
+                    if(t) ASSERT(false, NULL);
+                case assign_nt:
+                case assign_ir:
+                    if(!t) {
+                        ASSERT(capacity < N/2, "unexpected capacity");
+                        ASSERT(size == 0, "unexpected size");
+                        break;
+                    } else {
+                        ASSERT(size == N, "unexpected size");
+                        ASSERT(capacity >= N, "unexpected capacity");
+                        int i;
+                        for(i = 1; true; i++)
+                            if(!victim[i].zero_bar()) break;
+                            else ASSERT(victim[i].bar() == (m == assign_ir)? i : Foo::initial_value_of_bar, NULL);
+                        for(; size_t(i) < size; i++) ASSERT(!victim[i].zero_bar(), NULL);
+                        ASSERT(size_t(i) == size, NULL);
+                        break;
+                    }
+                case grow:
+                case op_equ:
+                    if(!t) ASSERT(capacity > 0 && capacity < N, "unexpected capacity");
+                    {// not related to if(!t)
+                        vector_t copy_of_victim(victim);
+                        ASSERT(copy_of_victim.size() > 0, NULL);
+                        for(int i = 0; true; i++) {
+                            try {
+                                Foo &foo = victim.at(i);
+                                int bar = t? foo.zero_bar() : foo.bar();
+                                if(m != grow) ASSERT( bar == i || (t && bar == 0), NULL);
+                                if(size_t(i) < copy_of_victim.size()) ASSERT( copy_of_victim[i].bar() == bar, NULL);
+                            } catch(std::range_error &) { // skip broken segment
+                                ASSERT( size_t(i) < size, NULL ); if(m == op_equ) break;
+                            } catch(std::out_of_range &){
+                                ASSERT( i > 0, NULL ); break;
+                            } catch(...) {
+                                KNOWN_ISSUE("ERROR: unrecognized exception - known compiler issue\n"); break;
+                            }
+                        }
+                        vector_t copy_of_victim2(10); copy_of_victim2 = victim;
+                        ASSERT(copy_of_victim == copy_of_victim2, "assignment doesn't match copying");
+                        try {
+                            victim = copy_of_victim;
+                        } catch(tbb::bad_last_alloc &) { break;
+                        } catch(...) {
+                            KNOWN_ISSUE("ERROR: unrecognized exception - known compiler issue\n"); break;
+                        }
+                        ASSERT(t, NULL);
+                    } break;
+                case compact:
+                    ASSERT(capacity > 0, "unexpected capacity");
+                    ASSERT(victim == src, "compact() is broken");
+                    break;
+
+                default:; // nothing to check here
+                }
+                if( Verbose ) std::printf("Exception %d: %s\t- ok ()\n", m, e.what());
+            }
+        }
+    } catch(...) {
+        ASSERT(false, "unexpected exception");
+    }
+}
+
+//------------------------------------------------------------------------
 
 //! Test driver
 int main( int argc, char* argv[] ) {
@@ -548,12 +866,13 @@ int main( int argc, char* argv[] ) {
     MinThread = 1;
     ParseCommandLine( argc, argv );
     if( MinThread<1 ) {
-        printf("ERROR: MinThread=%d, but must be at least 1\n",MinThread);
+        std::printf("ERROR: MinThread=%d, but must be at least 1\n",MinThread); MinThread = 1;
     }
+    known_issue_verbose = !Verbose;
 
     TestIteratorTraits<tbb::concurrent_vector<Foo>::iterator,Foo>();
     TestIteratorTraits<tbb::concurrent_vector<Foo>::const_iterator,const Foo>();
-    TestSequentialFor<tbb::concurrent_vector<Foo> > ();
+    TestSequentialFor<Foo> ();
     TestResizeAndCopy();
     TestAssign();
     TestCapacity();
@@ -563,8 +882,17 @@ int main( int argc, char* argv[] ) {
         TestConcurrentGrowToAtLeast();
         TestConcurrentGrowBy( nthread );
     }
+    TestComparison();
     TestFindPrimes();
     TestSort();
-    printf("done\n");
+#if __GLIBC__==2&&__GLIBC_MINOR__==3
+    printf("Warning: Exception safety test is skipped due to a known issue.\n");
+#else
+    TestExceptions();
+#endif
+
+    if( Verbose ) 
+        std::printf("sizeof(concurrent_vector<int>) == %d\n", (int)sizeof(tbb::concurrent_vector<int>));
+    std::printf("done\n");
     return 0;
 }
diff --git a/src/test/test_eh_algorithms.cpp b/src/test/test_eh_algorithms.cpp
new file mode 100644
index 0000000..c399f84
--- /dev/null
+++ b/src/test/test_eh_algorithms.cpp
@@ -0,0 +1,605 @@
+/*
+    Copyright 2005-2008 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 "stddef.h"
+#include "tbb/task_scheduler_init.h"
+#include "tbb/tbb_exception.h"
+#include "tbb/task.h"
+#include "tbb/atomic.h"
+#include "tbb/parallel_for.h"
+#include "tbb/parallel_reduce.h"
+#include "tbb/blocked_range.h"
+
+#include <cmath>
+#include <typeinfo>
+
+#include "harness.h"
+#include "harness_trace.h"
+
+
+#if __TBB_EXCEPTIONS
+
+//------------------------------------------------------------------------
+// Utility definitions
+//------------------------------------------------------------------------
+
+#define ITER_RANGE  100000
+#define ITER_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 ) {
+    return (intptr)std::pow(2., std::ceil(std::log((double)length / grain) / std::log(2.)));
+}
+
+} // 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) {}
+};
+
+
+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)
+
+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;
+}
+
+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());
+        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));
+    }
+}
+
+#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_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
+//------------------------------------------------------------------------
+
+typedef size_t count_type;
+typedef tbb::blocked_range<count_type> range_type;
+
+
+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);
+    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;
+}
+
+class no_throw_pfor_body {
+public:
+    void operator()( const range_type& r ) const {
+        volatile long x;
+        count_type end = r.end();
+        for( count_type i=r.begin(); i<end; ++i )
+            x = 0;
+    }
+};
+
+void Test0 () {
+    TRACEP ("");
+    reset_globals();
+    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 );
+    }
+} // void Test0 ()
+
+
+class simple_pfor_body {
+public:
+    void operator()( const range_type& r ) const {
+        volatile long x;
+        count_type end = r.end();
+        for( count_type i=r.begin(); i<end; ++i )
+            x = 0;
+        ++g_cur_executed;
+        if ( g_exception_in_master ^ (util::get_my_tid() == g_master) )
+        {
+            //while ( g_no_exception ) __TBB_Yield();
+            // Make absolutely sure that worker threads on multicore machines had a chance to steal something
+            util::sleep(10);
+        }
+        throw_test_exception(1);
+    }
+};
+
+void Test1 () {
+    TRACEP ("");
+    reset_globals();
+    TRY();
+        tbb::parallel_for( range_type(0, ITER_RANGE, ITER_GRAIN), simple_pfor_body() ); // , tbb::simple_partitioner()
+    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");
+} // void Test1 ()
+
+
+class nesting_pfor_body {
+public:
+    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() );
+    }
+};
+
+//! 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 
+    algorithms. **/
+void Test2 () {
+    TRACEP ("");
+    reset_globals();
+    TRY();
+        tbb::parallel_for( range_type(0, NESTING_RANGE, NESTING_GRAIN), nesting_pfor_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");
+} // void Test2 ()
+
+
+class nesting_pfor_with_isolated_context_body {
+public:
+    void operator()( const range_type& ) const {
+        tbb::task_group_context ctx(tbb::task_group_context::isolated);
+        ++g_cur_executed;
+//        util::sleep(1); // 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 );
+    }
+};
+
+//! 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
+    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;
+    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 (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");
+} // void Test3 ()
+
+
+class nesting_pfor_with_eh_body {
+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 );
+        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 
+    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);
+    TRY();
+        tbb::parallel_for( range_type(0, NESTING_RANGE, NESTING_GRAIN), nesting_pfor_with_eh_body() );
+    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");
+    }
+    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");
+    }
+} // 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 {
+public:
+    void operator()( const range_type& r ) const {
+        ++g_cur_executed;
+        do {
+            __TBB_Yield();
+        } while( !my_cancellator_task::s_cancellator_ready );
+    }
+};
+
+template<class B>
+class my_worker_task : 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 );
+        return NULL;
+    }
+public:
+    my_worker_task ( 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");
+} // void Test5 ()
+
+class my_cancellator_2_task : public tbb::task
+{
+    tbb::task_group_context &my_ctx_to_cancel;
+
+    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;
+        return NULL;
+    }
+public:
+    my_cancellator_2_task ( tbb::task_group_context& ctx ) : my_ctx_to_cancel(ctx) {}
+};
+
+class pfor_body_to_cancel_2 {
+public:
+    void operator()( const range_type& r ) const {
+        ++g_cur_executed;
+        // 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();
+    }
+};
+
+//! 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");
+} // void Test6 ()
+
+////////////////////////////////////////////////////////////////////////////////
+// Regression test based on the contribution by the author of the following forum post:
+// http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30254959.aspx
+
+#define LOOP_COUNT 16
+#define MAX_NESTING 3
+#define REDUCE_RANGE 1024 
+#define REDUCE_GRAIN 256
+
+class my_worker_t {
+public:
+    void doit (int & result, int nest);
+};
+
+class reduce_test_body_t {
+    my_worker_t * my_shared_worker;
+    int my_nesting_level;
+    int my_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)
+    {}
+    reduce_test_body_t ( my_worker_t *w, int nesting )
+        : my_shared_worker(w)
+        , my_nesting_level(nesting)
+        , my_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;
+        }
+    }
+    void join (const reduce_test_body_t & x) {
+        my_result += x.my_result;
+    }
+    int result () { return my_result; }
+};
+
+void my_worker_t::doit ( int& result, int nest ) {
+    ++nest;
+    if ( nest < MAX_NESTING ) {
+        reduce_test_body_t rt (this, nest);
+        tbb::parallel_reduce (tbb::blocked_range<size_t>(0, REDUCE_RANGE, REDUCE_GRAIN), rt);
+        result = rt.result ();
+    }
+    else
+        ++result;
+}
+
+//! Regression test for hanging that occurred with the first version of cancellation propagation
+void Test7 () {
+    TRACEP ("");
+    my_worker_t w;
+    int result = 0;
+    w.doit (result, 0);
+    ASSERT ( result == 1048576, "Wrong calculation result");
+}
+
+void RunTests () {
+    TRACE ("Number of threads %d", g_num_threads);
+    tbb::task_scheduler_init init (g_num_threads);
+    g_master = util::get_my_tid();
+    
+    Test0();
+#if !(__GLIBC__==2&&__GLIBC_MINOR__==3)
+    Test1();
+    Test3();
+    Test4();
+#endif
+    Test5();
+    Test6();
+    Test7();
+}
+
+#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) 
+    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(MinThread, MaxThread);
+    ASSERT (MinThread>=2, "Minimal number of threads must be 2 or more");
+    ASSERT (ITER_RANGE >= ITER_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 ) {
+        g_max_concurrency = min(g_num_threads, tbb::task_scheduler_init::default_num_threads());
+        // 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();
+        }
+    }
+#if __GLIBC__==2&&__GLIBC_MINOR__==3
+    printf("Warning: Exception handling tests are skipped due to a known issue.\n");
+#endif // workaround
+    printf("done\n");
+#else  /* __TBB_EXCEPTIONS */
+    printf("skipped\n");
+#endif /* __TBB_EXCEPTIONS */
+    return 0;
+}
+
diff --git a/src/test/test_eh_tasks.cpp b/src/test/test_eh_tasks.cpp
new file mode 100644
index 0000000..41f12b5
--- /dev/null
+++ b/src/test/test_eh_tasks.cpp
@@ -0,0 +1,806 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+// to avoid usage of #pragma comment
+#define __TBB_NO_IMPLICIT_LINKAGE 1
+
+#define  COUNT_TASK_NODES 1
+#define __TBB_TASK_CPP_DIRECTLY_INCLUDED 1
+#include "../tbb/task.cpp"
+
+#if __TBB_EXCEPTIONS
+
+#include "tbb/task_scheduler_init.h"
+#include "tbb/spin_mutex.h"
+#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
+{
+    typedef tbb::spin_mutex::scoped_lock lock_t;
+    //! Number of tasks allocated that was ever allocated
+    volatile intptr my_existed;
+    //! Number of tasks executed to the moment
+    volatile intptr my_executed;
+    //! Number of tasks allocated but not yet destroyed to the moment
+    volatile intptr my_existing;
+
+    mutable tbb::spin_mutex  my_mutex;
+
+public:
+    //! Assumes that assignment is noncontended for the left-hand operand
+    const task_statistics_t& operator= ( const task_statistics_t& 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;
+        }
+        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);
+    }
+};
+
+task_statistics_t   g_cur_stat,
+                    g_exc_stat; // snapshot of statistics at the moment of exception throwing
+
+internal::GenericScheduler  *g_master = NULL;
+
+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;
+
+bool    g_exception_in_master = false;
+bool    g_solitary_exception = true;
+
+//volatile intptr g_num_tasks_when_last_exception = 0;
+
+
+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;
+}
+
+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");
+}
+
+#define TRY()   \
+    bool no_exception = true, unknown_exception = false;    \
+    try {
+
+// 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");  \
+    
+
+class my_base_task : 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();
+        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(); }
+
+    virtual tbb::task* do_execute () = 0;
+
+    bool my_throw;
+}; // class my_base_task
+
+class my_leaf_task : public my_base_task
+{
+    tbb::task* do_execute () {
+        ++g_tasks_started;
+        if ( my_throw )
+            throw_test_exception(NUM_CHILD_TASKS/2);
+        if ( !g_throw_exception )
+            __TBB_Yield();
+        return NULL;
+    }
+public:
+    my_leaf_task ( bool throw_exception = true ) : my_base_task(throw_exception) {}
+};
+
+class my_simple_root_task : public my_base_task
+{
+    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");
+        }
+        wait_for_all();
+        return NULL;
+    }
+public:
+    my_simple_root_task ( bool throw_exception = true ) : my_base_task(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 () {
+    TRACEP ("");
+    reset_globals();
+    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(), 
+            "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");
+    }
+    TRY();
+        r.wait_for_all();
+    CATCH_AND_ASSERT();
+    ASSERT_TEST_POSTCOND();
+    r.destroy(r);
+} // void Test1 ()
+
+//! Default exception behavior test. 
+/** Allocates and spawns root task that runs a bunch of children, one of which throws
+    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 ()
+{
+    TRACEP ("");
+    reset_globals();
+    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(), 
+            "something wrong with the task accounting");
+    TRY();
+        tbb::task::spawn_root_and_wait(r);
+    CATCH_AND_ASSERT();
+    ASSERT (!g_no_exception, "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 ()
+{
+    TRACEP ("");
+    reset_globals();
+    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(), 
+            "something wrong with the task accounting");
+    TRY();
+        tbb::task::spawn_root_and_wait(r);
+    CATCH_AND_ASSERT();
+    ASSERT (!g_no_exception, "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;
+ 
+    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;
+        TRY();
+            spawn_root_and_wait(r);
+            // Give a child of our siblings a chance to throw the test exception
+            wait_for_exception_with_timeout();
+        CATCH();
+        ASSERT_WARNING (!g_no_exception, "no exception occurred - machine overloaded?");
+        ASSERT (!g_unknown_exception, "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) {}
+};
+
+/** 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 () {
+    TRACEP ("");
+    reset_globals();
+    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);
+    }
+    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");
+    ASSERT_TEST_POSTCOND();
+
+} // void Test4 ()
+
+class my_root_with_context_group_launcher_task : public my_base_task
+{
+    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);
+        }
+        TRY();
+            spawn_root_and_wait(tl);
+            // Give worker a chance to throw exception
+            wait_for_exception_with_timeout();
+        CATCH_AND_ASSERT();
+        return NULL;
+    }
+};
+
+/** Allocates and spawns a bunch of roots, which allocate and spawn groups of roots 
+    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 () {
+    TRACEP ("");
+    reset_globals();
+    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);
+    }
+    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_TEST_POSTCOND();
+} // void Test5 ()
+
+class my_throwing_root_with_context_launcher_task : public my_base_task
+{
+    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);
+        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();
+        return NULL;
+    }
+};
+
+class my_bound_hierarchy_launcher_task : public my_base_task
+{
+    bool my_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);
+        }
+    }
+
+    tbb::task* do_execute () {
+        tbb::task_group_context  ctx (tbb::task_group_context::isolated);
+        tbb::task_list tl;
+        alloc_roots(ctx, tl);
+        TRY();
+            spawn_root_and_wait(tl);
+        CATCH_AND_ASSERT();
+        ASSERT (!no_exception, "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 ) {
+            // Test task_group_context::unbind and task_group_context::reset methods
+            g_throw_exception = false;
+            no_exception = true;
+            tl.clear();
+            alloc_roots(ctx, tl);
+            ctx.reset();
+            try {
+                spawn_root_and_wait(tl);
+            }
+            catch (...) {
+                no_exception = false;
+            }
+            ASSERT (no_exception, "unexpected exception occurred");
+        }
+        return NULL;
+    }
+public:
+    my_bound_hierarchy_launcher_task ( bool recover = false ) : my_recover(recover) {}
+
+}; // class my_bound_hierarchy_launcher_task
+
+//! 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 
+    the same isolated context, each of which in their turn spawns a single 3rd level 
+    root with  the bound context, and these 3rd level roots spawn bunches of leaves 
+    in the end. Leaves do not generate exceptions. The test exception is generated 
+    by one of the 2nd level roots. **/
+void Test6 () {
+    TRACEP ("");
+    reset_globals();
+    my_bound_hierarchy_launcher_task &r = *new( tbb::task::allocate_root() ) my_bound_hierarchy_launcher_task;
+    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, 
+    // 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
+    // g_num_threads corresponds to my_bound_hierarchy_launcher_task
+    intptr  min_num_tasks_executed = 2 + g_num_threads + 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");
+    ASSERT_TEST_POSTCOND();
+} // void Test6 ()
+
+//! Tests task_group_context::unbind and task_group_context::reset methods.
+/** Allocates and spawns a root that spawns a bunch of 2nd level roots sharing 
+    the same isolated context, each of which in their turn spawns a single 3rd level 
+    root with  the bound context, and these 3rd level roots spawn bunches of leaves 
+    in the end. Leaves do not generate exceptions. The test exception is generated 
+    by one of the 2nd level roots. **/
+void Test7 () {
+    TRACEP ("");
+    reset_globals();
+    my_bound_hierarchy_launcher_task &r = *new( tbb::task::allocate_root() ) my_bound_hierarchy_launcher_task;
+    TRY();
+        tbb::task::spawn_root_and_wait(r);
+    CATCH_AND_ASSERT();
+    ASSERT (no_exception, "unexpected exception intercepted");
+    ASSERT_TEST_POSTCOND();
+} // void Test6 ()
+
+class my_bound_hierarchy_launcher_task_2 : public my_base_task
+{
+    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);
+        }
+        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");
+        return NULL;
+    }
+}; // class my_bound_hierarchy_launcher_task_2
+
+
+//! 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 
+    the same isolated context, each of which in their turn spawns a single 3rd level 
+    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 () {
+    TRACEP ("");
+    reset_globals();
+    my_bound_hierarchy_launcher_task_2 &r = *new( tbb::task::allocate_root() ) my_bound_hierarchy_launcher_task_2;
+    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");
+    }
+    ASSERT_TEST_POSTCOND();
+} // void Test8 ()
+
+
+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 );
+        return NULL;
+    }
+public:
+    my_calculation_root_task ( tbb::task_group_context& ctx ) : my_ctx(ctx) {}
+};
+
+
+//! Test for cancelling a task hierarchy from outside (from a task running in parallel with it).
+void Test9 () {
+    TRACEP ("");
+    reset_globals();
+    g_throw_exception = false;
+    g_tasks_wait_limit = g_num_threads - 1;
+    intptr  threshold = NUM_CHILD_TASKS / 4;
+    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) );
+    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");
+} // 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) )
+        return; 
+    if ( !g_solitary_exception ) {
+        TRACE ("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... :");
+        throw tbb::movable_exception<T>(data);
+    }
+}
+
+const int g_int_exception_data = -375;
+const std::string g_string_exception_data = "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) {}
+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 () {}
+
+    int my_int;
+    std::string my_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;
+};
+
+my_exception_data_t my_exception_data_t::s_data(g_int_exception_data);
+
+typedef tbb::movable_exception<int> solitary_movable_exception;
+typedef tbb::movable_exception<my_exception_data_t> multiple_movable_exception;
+
+class my_leaf_task_with_movable_exceptions : public my_base_task
+{
+    bool my_int_as_data;
+
+    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);
+        }
+        return NULL;
+    }
+};
+
+//! Test for movable_exception behavior and semantics. 
+/** 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). **/
+void Test10 () {
+    TRACEP ("");
+    reset_globals();
+    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(), 
+            "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");
+    }
+    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");
+        }
+        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     :");
+        }
+        g_no_exception = no_exception = false;
+    }
+    catch ( ... ) {
+        g_no_exception = false;
+        g_unknown_exception = unknown_exception = true;
+    }
+    ASSERT_EXCEPTION();
+    ASSERT_TEST_POSTCOND();
+    r.destroy(r);
+} // void Test10 ()
+
+
+
+void TestExceptionHandling ()
+{
+    TRACE ("Number of threads %d", g_num_threads);
+    {
+    tbb::task_scheduler_init init (g_num_threads);
+    g_master = internal::GetThreadSpecific();
+
+    util::sleep(20);
+    Test1();
+    Test2();
+    Test3();
+    Test4();
+    Test5();
+    Test6();
+    Test7();
+    Test8();
+    Test9();
+    Test10();
+    util::sleep(20);
+    }
+    ASSERT (!g_cur_stat.existing(), "Not all tasks objects have been destroyed");
+    // The following assertion must hold true because if the dummy context is not cleaned up 
+    // properly none of the tasks after Test1 completion will be executed.
+    ASSERT (g_cur_stat.executed(), "Scheduler's dummy task context has not been cleaned up properly");
+}
+
+#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 );
+    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
+    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 ( size_t j = 0; j < 2; ++j ) {
+            g_solitary_exception = (j & 2) == 1;
+            TestExceptionHandling();
+        }
+    }
+    printf("done\n");
+#else
+    printf("skipped\n");
+#endif /* __TBB_EXCEPTIONS */
+    return 0;
+}
+
+
diff --git a/src/test/test_inits_loop.cpp b/src/test/test_inits_loop.cpp
index 1ed018d..86a7fc7 100644
--- a/src/test/test_inits_loop.cpp
+++ b/src/test/test_inits_loop.cpp
@@ -26,12 +26,14 @@
     the GNU General Public License.
 */
 
+#include <stdio.h>
+
+#if __APPLE__
+
 #include "harness.h"
 #include <cstdlib>
-#include <cstdio>
 #include "tbb/task_scheduler_init.h"
 
-#if __APPLE__
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
@@ -71,23 +73,25 @@ bool exec_test(const char *self) {
     }
     return true;
 }
-#endif
+#endif /* __APPLE__ */
 
 int main( int argc, char * argv[] ) {
+#if __APPLE__
     MinThread = 3000;
     ParseCommandLine( argc, argv );
     if( MinThread <= 0 ) {
-        tbb::task_scheduler_init init( 2 ); // even number reuired for an error
+        tbb::task_scheduler_init init( 2 ); // even number required for an error
     } else {
-#if __APPLE__
         for(int i = 0; i<MinThread; i++)
             if(exec_test(argv[0])) {
                 printf("ERROR: execution fails at %d-th iteration!\n", i);
                 exit(1);
             }
 
-#endif
         printf("done\n");
     }
+#else
+        printf("skip\n");
+#endif
     return 0;
 }
diff --git a/src/test/test_malloc_compliance.cpp b/src/test/test_malloc_compliance.cpp
index cd23292..e6c4dde 100644
--- a/src/test/test_malloc_compliance.cpp
+++ b/src/test/test_malloc_compliance.cpp
@@ -57,8 +57,14 @@ void limitMem( int limit )
 #include <vector>
 #include "tbb/scalable_allocator.h"
 
+/* to avoid dependency on TBB shared library, the following macro should be
+   defined to non-zero _before_ including any TBB or test harness headers.
+   Also tbb_assert_impl.h from src/tbb should be included right after */
+#define __TBB_NO_IMPLICIT_LINKAGE 1
+#include "../tbb/tbb_assert_impl.h"
+
 #include "tbb/blocked_range.h"
-#include "test/harness.h"
+#include "harness.h"
 
 #pragma pack(1)
 
@@ -67,7 +73,6 @@ void limitMem( int limit )
 
 #define COUNT_ELEM 50000
 #define MAX 1000
-#define MByte 1048576 //1MB
 #define APPROACHES 100
 #define COUNTEXPERIMENT 10000
 #define MB 25
@@ -93,9 +98,6 @@ TestRealloc* Trealloc;
 TestFree* Tfree;
 
 
-using namespace tbb;
-
-
 
 struct MemStruct
 {
@@ -187,7 +189,7 @@ struct TestStruct
     UCHAR *tmp;
     tmp=(UCHAR*)this;
     bool b=true;
-    for (int i=0; i<sizeof(TestStruct); i++)
+    for (int i=0; i<(int)sizeof(TestStruct); i++)
       if (tmp[i]) b=false;
     return b;
   }
@@ -199,14 +201,14 @@ CMemTest::CMemTest()
   time_t zzz;
   srand((UINT)time(&zzz));
   FullLog=false;
-  UINT i=rand()%100;
+  rand();
 }
 CMemTest::CMemTest(bool verb)
 {
   time_t zzz;
   srand((UINT)time(&zzz));
   FullLog=verb;
-  UINT i=rand()%100;
+  rand();
 }
 
 void CMemTest::InvariantDataRealloc()
@@ -315,7 +317,7 @@ void CMemTest::AddrArifm()
   if (FullLog) printf("Count zero: %d\n",CountZero);
   for (int i=0; i<COUNT_ELEM-1; i++)
   {
-    if ((DWORD)MasPointer[i]+MasCountElem[i] > (DWORD)MasPointer[i+1])
+    if ((uintptr_t)MasPointer[i]+MasCountElem[i] > (uintptr_t)MasPointer[i+1])
     {
       CountErrors++;
 //      if (FullLog) printf("intersection detect at 0x%x between %d element(int) and 0x%x\n"
@@ -350,7 +352,7 @@ void CMemTest::AddrArifm()
   // now we have a sorted array of pointers
   for (int i=0; i<COUNT_ELEM-1; i++)
   {
-    if ((DWORD)MasPointer[i]+MasCountElem[i] > (DWORD)MasPointer[i+1])
+    if ((uintptr_t)MasPointer[i]+MasCountElem[i] > (uintptr_t)MasPointer[i+1])
     {
       CountErrors++;
 //      if (FullLog) printf("intersection detect at 0x%x between %d element(int) and 0x%x\n"
@@ -389,7 +391,7 @@ void CMemTest::AddrArifm()
   // now we have a sorted array of pointers
   for (int i=0; i<COUNT_ELEM-1; i++)
   {
-    if ((DWORD)MasPointer[i]+MasCountElem[i] > (DWORD)MasPointer[i+1])
+    if ((uintptr_t)MasPointer[i]+MasCountElem[i] > (uintptr_t)MasPointer[i+1])
     {
       CountErrors++;
 //      if (FullLog) printf("intersection detect at 0x%x between %d element(int) and 0x%x\n"
diff --git a/src/test/test_model_plugin.cpp b/src/test/test_model_plugin.cpp
index aaaf4d4..1fde28b 100644
--- a/src/test/test_model_plugin.cpp
+++ b/src/test/test_model_plugin.cpp
@@ -41,10 +41,10 @@
 
 class CModel {
 public:
-  CModel(void) {};
-  static tbb::task_scheduler_init tbb_init;
+    CModel(void) {};
+    static tbb::task_scheduler_init tbb_init;
 
-  void init_and_terminate( int );
+    void init_and_terminate( int );
 };
 
 tbb::task_scheduler_init CModel::tbb_init(1);
@@ -97,7 +97,7 @@ void plugin_call(int maxthread)
 
 extern "C" void plugin_call(int);
 
-void report_error_in(char* function_name)
+void report_error_in(const char* function_name)
 {
 #if _WIN32 || _WIN64
     char* message;
@@ -108,7 +108,7 @@ void report_error_in(char* function_name)
         NULL, code,MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
         (char*)&message, 0, NULL );
 #else
-    char* message = dlerror();
+    char* message = (char*)dlerror();
     int code = 0;
 #endif
     fprintf(stderr,
@@ -120,52 +120,98 @@ void report_error_in(char* function_name)
 #endif
 }
 
+int use_lot_of_tls() {
+    int count = 0;
+#if _WIN32 || _WIN64
+    DWORD last_handles[10];
+    DWORD result;
+    result = TlsAlloc();
+    while( result!=TLS_OUT_OF_INDEXES ) {
+        last_handles[++count%10] = result;
+        result = TlsAlloc();
+    }
+    for( int i=0; i<10; ++i )
+        TlsFree(last_handles[i]);
+#else
+    pthread_key_t last_handles[10];
+    pthread_key_t result;
+    while( pthread_key_create(&result, NULL)==0 ) {
+        last_handles[++count%10] = result;
+        if(Verbose) printf("%d\n", count);
+    }
+    for( int i=0; i<10; ++i )
+        pthread_key_delete(last_handles[i]);
+#endif
+    return count-10;
+}
+
 typedef void (*PLUGIN_CALL)(int);
 
 int main(int argc, char* argv[])
 {
-  ParseCommandLine( argc, argv );
+    ParseCommandLine( argc, argv );
+
+    PLUGIN_CALL my_plugin_call;
+
+    int tls_key_count = use_lot_of_tls();
+    if( Verbose )
+        printf("%d thread local objects allocated in advance\n", tls_key_count);
 
-  PLUGIN_CALL plugin_call;
-  
+    for( int i=1; i<100; ++i ) {  
 #if _WIN32 || _WIN64
-  HMODULE hLib = LoadLibrary("test_model_plugin.dll");
-  if (hLib==NULL){
-    report_error_in("LoadLibrary");
-    return -1;
-  }
-  plugin_call = (PLUGIN_CALL) GetProcAddress(hLib, "plugin_call");
-  if (plugin_call==NULL) {
-    report_error_in("GetProcAddress");
-    return -1;
-  }
+        HMODULE hLib = LoadLibrary("test_model_plugin.dll");
+        if (hLib==NULL){
+#if !__TBB_NO_IMPLICIT_LINKAGE
+            report_error_in("LoadLibrary");
+            return -1;
+#else
+            printf("skip\n");
+            return 0;
+#endif
+        }
+        my_plugin_call = (PLUGIN_CALL) GetProcAddress(hLib, "plugin_call");
+        if (my_plugin_call==NULL) {
+            report_error_in("GetProcAddress");
+            return -1;
+        }
 #else
 #if __APPLE__
-  char *dllname = "test_model_plugin.dylib";
+        const char *dllname = "test_model_plugin.dylib";
 #else
-  char *dllname = "test_model_plugin.so";
+        const char *dllname = "test_model_plugin.so";
 #endif
-  void* hLib = dlopen( dllname, RTLD_LAZY ); 
-  if (hLib==NULL){
-    report_error_in("dlopen");
-    return -1;
-  }
-  plugin_call = PLUGIN_CALL (dlsym(hLib, "plugin_call"));
-  if (plugin_call==NULL) {
-    report_error_in("dlsym");
-    return -1;
-  }
+        void* hLib = dlopen( dllname, RTLD_LAZY ); 
+        if (hLib==NULL){
+#if !__TBB_NO_IMPLICIT_LINKAGE
+            report_error_in("dlopen");
+            return -1;
+#else
+            printf("skip\n");
+            return 0;
+#endif
+        }
+        my_plugin_call = PLUGIN_CALL (dlsym(hLib, "plugin_call"));
+        if (my_plugin_call==NULL) {
+            report_error_in("dlsym");
+            return -1;
+        }
 #endif
 
-  plugin_call(MaxThread);
+        if( Verbose )
+            printf("Iteration %d, calling plugin... ", i);
+        my_plugin_call(MaxThread);
+        if( Verbose )
+            printf("succeeded\n");
 
 #if _WIN32 || _WIN64
-  FreeLibrary(hLib);
+        FreeLibrary(hLib);
 #else
-  dlclose(hLib);
+        dlclose(hLib);
 #endif
-  printf("done\n");
-  return 0;
+    } // end for(1,100)
+
+    printf("done\n");
+    return 0;
 }
 
 #endif
diff --git a/src/test/test_mutex.cpp b/src/test/test_mutex.cpp
index fb9e611..6a1851e 100644
--- a/src/test/test_mutex.cpp
+++ b/src/test/test_mutex.cpp
@@ -40,6 +40,7 @@
 #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/tick_count.h"
@@ -52,12 +53,6 @@
 #endif /* _OPENMP */
 
 
-#if __linux__
-#define STD std
-#else
-#define STD   /* Cater to broken Windows compilers that are missing "std". */
-#endif /* __linux__ */
-
 // This test deliberately avoids a "using tbb" statement,
 // so that the error of putting types in the wrong namespace will be caught.
 
@@ -105,10 +100,12 @@ void Test( const char * name ) {
     tbb::tick_count t0 = tbb::tick_count::now();
     tbb::parallel_for(tbb::blocked_range<size_t>(0,n,10000),AddOne<Counter<M> >(counter));
     tbb::tick_count t1 = tbb::tick_count::now();
-    if( Verbose )
+    if( Verbose ) {
         printf("%g usec\n",(t1-t0).seconds());
+        fflush(stdout);
+    }
     if( counter.value!=n )
-        STD::printf("ERROR for %s: counter.value=%ld\n",name,counter.value);
+        std::printf("ERROR for %s: counter.value=%ld\n",name,counter.value);
 }
 
 template<typename M, size_t N>
@@ -132,10 +129,8 @@ struct Invariant {
     bool value_is( long expected_value ) const {
         long tmp;
         for( size_t k=0; k<N; ++k )
-//            if( value[k]!=expected_value )
-//                return false;
             if( (tmp=value[k])!=expected_value ) {
-                printf("ATTN! %ld!=%ld\n", tmp, expected_value);
+                printf("ERROR: %ld!=%ld\n", tmp, expected_value);
                 return false;
             }
         return true;
@@ -206,7 +201,7 @@ struct TwiddleInvariant {
                 }
             }
             if( !okay ) {
-                STD::printf( "ERROR for %s at %ld: %s %s %s %s\n",invariant.mutex_name, long(i),
+                std::printf( "ERROR for %s at %ld: %s %s %s %s\n",invariant.mutex_name, long(i),
                              write?"write,":"read,", write?(i%16==7?"downgrade,":""):(i%8==3?"upgrade,":""),
                              lock_kept?"lock kept,":"lock not kept,", (i/8)&1?"imp/exp":"exp/imp" );
             }
@@ -230,9 +225,37 @@ void TestReaderWriterLock( const char * mutex_name ) {
     // There is either a writer or a reader upgraded to a writer for each 4th iteration
     long expected_value = n/4;
     if( !invariant.value_is(expected_value) )
-        STD::printf("ERROR for %s: final invariant value is wrong\n",mutex_name);
-    if( Verbose )
+        std::printf("ERROR for %s: final invariant value is wrong\n",mutex_name);
+    if( Verbose ) {
         printf("%g usec\n",(t1-t0).seconds());
+        fflush(stdout);
+    }
+}
+
+/** Test try_acquire_reader functionality of a non-reenterable reader-writer mutex */
+template<typename M>
+void TestTryAcquireReader_OneThread( const char * mutex_name ) {
+    M tested_mutex;
+    typename M::scoped_lock lock1;
+    if( M::is_rw_mutex ) {
+        if( lock1.try_acquire(tested_mutex, false) )
+            lock1.release();
+        else
+            std::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
+	{
+            typename M::scoped_lock lock2(tested_mutex, false);
+            if( lock1.try_acquire(tested_mutex) )
+                std::printf("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
+	    lock2.release();
+	    lock2.acquire(tested_mutex, true);
+            if( lock1.try_acquire(tested_mutex, false) )
+                std::printf("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
+	}
+        if( lock1.try_acquire(tested_mutex, false) )
+            lock1.release();
+        else
+            std::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
+    }
 }
 
 /** Test try_acquire functionality of a non-reenterable mutex */
@@ -243,52 +266,146 @@ void TestTryAcquire_OneThread( const char * mutex_name ) {
     if( lock1.try_acquire(tested_mutex) )
         lock1.release();
     else
-        STD::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
+        std::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
     {
-        typename M::scoped_lock lock2(tested_mutex);
-        if( lock1.try_acquire(tested_mutex) )
-            STD::printf("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
+        if( M::is_recursive_mutex ) {
+            typename M::scoped_lock lock2(tested_mutex);
+            if( lock1.try_acquire(tested_mutex) )
+                lock1.release();
+            else
+                std::printf("ERROR for %s: try_acquire on recursive lock failed though it should not\n", mutex_name);
+            //windows.. -- both are recursive
+        } else {
+            typename M::scoped_lock lock2(tested_mutex);
+            if( lock1.try_acquire(tested_mutex) )
+                std::printf("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
+        }
     }
     if( lock1.try_acquire(tested_mutex) )
         lock1.release();
     else
-        STD::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
+        std::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
+} 
+
+
+const int RecurN = 4;
+int RecurArray[ RecurN ];
+tbb::recursive_mutex RecurMutex[ RecurN ];
+
+struct RecursiveAcquisition {
+    /** x = number being decoded in base N
+        max_lock = index of highest lock acquired so far
+        mask = bit mask; ith bit set if lock i has been acquired. */
+    void Body( size_t x, int max_lock=-1, unsigned int mask=0 ) const
+    {
+        int i = (int) (x % RecurN);
+        bool first = (mask&1U<<i)==0;
+        if( first ) {
+            // first time to acquire lock
+            if( i<max_lock ) 
+                // out of order acquisition might lead to deadlock, so stop
+                return;
+            max_lock = i;
+        }
+
+        if( (i&1)!=0 ) {
+            // acquire lock on location RecurArray[i] using explict acquire
+            tbb::recursive_mutex::scoped_lock r_lock;
+            r_lock.acquire( RecurMutex[i] );
+            int a = RecurArray[i];
+            ASSERT( (a==0)==first, "should be either a==0 if it is the first time to acquire the lock or a!=0 otherwise" );
+            ++RecurArray[i];
+            if( x ) 
+                Body( x/RecurN, max_lock, mask|1U<<i );
+            --RecurArray[i];
+            ASSERT( a==RecurArray[i], "a is not equal to RecurArray[i]" );                        
+
+            // release lock on location RecurArray[i] using explicit release; otherwise, use implicit one
+            if( (i&2)!=0 ) r_lock.release();
+        } else {
+            // acquire lock on location RecurArray[i] using implicit acquire
+            tbb::recursive_mutex::scoped_lock r_lock( RecurMutex[i] );
+            int a = RecurArray[i];
+
+            ASSERT( (a==0)==first, "should be either a==0 if it is the first time to acquire the lock or a!=0 otherwise" );
+
+            ++RecurArray[i];
+            if( x ) 
+                Body( x/RecurN, max_lock, mask|1U<<i );
+            --RecurArray[i];
+
+            ASSERT( a==RecurArray[i], "a is not equal to RecurArray[i]" );                        
+
+            // release lock on location RecurArray[i] using explicit release; otherwise, use implicit one
+            if( (i&2)!=0 ) r_lock.release();
+        }
+    }
+
+    void operator()( const tbb::blocked_range<size_t> &r ) const
+    {   
+        for( size_t x=r.begin(); x<r.end(); x++ ) {
+            Body( x );
+        }
+    }
+};
+
+/** Thie test is generic so that we may test other kinds of recursive mutexes.*/
+template<typename M>
+void TestRecursiveMutex( const char * mutex_name )
+{
+    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();
+
+    if( Verbose ) {
+        printf("%s recursive mutex time = %g usec\n",
+               mutex_name, (t1-t0).seconds());
+    }
 }
 
+
 #include "tbb/task_scheduler_init.h"
 
 int main( int argc, char * argv[] ) {
+    // Default is to run on two threads
+    MinThread = MaxThread = 2;
     ParseCommandLine( argc, argv );
     for( int p=MinThread; p<=MaxThread; ++p ) {
         tbb::task_scheduler_init init( p );
-	if( Verbose )
-	    printf( "testing with %d workers\n", static_cast<int>(p) );
-	// Run each test 3 times.
-	for( int i=0; i<3; ++i ) {
-	    Test<tbb::spin_mutex>( "Spin Mutex" );
+        if( Verbose )
+            printf( "testing with %d workers\n", static_cast<int>(p) );
+        // Run each test 3 times.
+        for( int i=0; i<3; ++i ) {
+            Test<tbb::spin_mutex>( "Spin Mutex" );
 #if _OPENMP
-	    Test<OpenMP_Mutex>( "OpenMP_Mutex" );
+            Test<OpenMP_Mutex>( "OpenMP_Mutex" );
 #endif /* _OPENMP */
-	    Test<tbb::queuing_mutex>( "Queuing Mutex" );
-	    Test<tbb::mutex>( "Wrapper Mutex" );
-	    Test<tbb::queuing_rw_mutex>( "Queuing RW Mutex" );
-	    Test<tbb::spin_rw_mutex>( "Spin RW Mutex" );
+            Test<tbb::queuing_mutex>( "Queuing Mutex" );
+            Test<tbb::mutex>( "Wrapper Mutex" );
+            Test<tbb::recursive_mutex>( "Recursive Mutex" );
+            Test<tbb::queuing_rw_mutex>( "Queuing RW Mutex" );
+            Test<tbb::spin_rw_mutex>( "Spin RW Mutex" );
             
             TestTryAcquire_OneThread<tbb::spin_mutex>("Spin Mutex");
             TestTryAcquire_OneThread<tbb::queuing_mutex>("Queuing Mutex");
-#if USE_PTHREAD
+#if USE_PTHREAD 
             // under ifdef because on Windows tbb::mutex is reenterable and the test will fail
             TestTryAcquire_OneThread<tbb::mutex>("Wrapper Mutex");
 #endif /* USE_PTHREAD */
+            TestTryAcquire_OneThread<tbb::recursive_mutex>( "Recursive Mutex" );
             TestTryAcquire_OneThread<tbb::spin_rw_mutex>("Spin RW Mutex"); // only tests try_acquire for writers
             TestTryAcquire_OneThread<tbb::queuing_rw_mutex>("Queuing RW Mutex"); // only tests try_acquire for writers
+            TestTryAcquireReader_OneThread<tbb::spin_rw_mutex>("Spin RW Mutex"); 
+            TestTryAcquireReader_OneThread<tbb::queuing_rw_mutex>("Queuing RW Mutex"); 
 
-	    TestReaderWriterLock<tbb::queuing_rw_mutex>( "Queuing RW Mutex" );
-	    TestReaderWriterLock<tbb::spin_rw_mutex>( "Spin RW Mutex" );
-	if( Verbose )
-	    printf( "calling destructor for task_scheduler_init\n" );
-	}
+            TestReaderWriterLock<tbb::queuing_rw_mutex>( "Queuing RW Mutex" );
+            TestReaderWriterLock<tbb::spin_rw_mutex>( "Spin RW Mutex" );
+
+            TestRecursiveMutex<tbb::recursive_mutex>( "Recursive Mutex" );
+        }
+        if( Verbose )
+            printf( "calling destructor for task_scheduler_init\n" );
     }
-    STD::printf("done\n");
+    std::printf("done\n");
     return 0;
 }
diff --git a/src/test/test_mutex_native_threads.cpp b/src/test/test_mutex_native_threads.cpp
index 3a789e7..663622d 100644
--- a/src/test/test_mutex_native_threads.cpp
+++ b/src/test/test_mutex_native_threads.cpp
@@ -40,12 +40,6 @@
 #include "tbb/atomic.h"
 
 
-#if __linux__
-#define STD std
-#else
-#define STD   /* Cater to broken Windows compilers that are missing "std". */
-#endif /* __linux__ */
-
 // This test deliberately avoids a "using tbb" statement,
 // so that the error of putting types in the wrong namespace will be caught.
 
@@ -164,7 +158,7 @@ void TwiddleInvariant( I& invariant, size_t mode )
         }
     }
     if( !okay ) {
-        STD::printf( "ERROR for %s at %ld: %s %s %s %s\n",invariant.mutex_name, long(mode),
+        std::printf( "ERROR for %s at %ld: %s %s %s %s\n",invariant.mutex_name, long(mode),
                      write?"write,":"read,", write?(mode%16==7?"downgrade,":""):(mode%8==3?"upgrade,":""),
                      lock_kept?"lock kept,":"lock not kept,", (mode/8)&1?"imp/exp":"exp/imp" );
     }
@@ -232,7 +226,7 @@ void Test( const char * name ) {
     if( Verbose )
         printf("%s time = %g usec\n",name, (t1-t0).seconds() );
     if( counter.value!=Work<M>::mutex_test_size )
-        STD::printf("ERROR for %s: counter.value=%ld\n",name,counter.value);
+        std::printf("ERROR for %s: counter.value=%ld\n",name,counter.value);
     delete[] thr;
 }
 
@@ -255,7 +249,7 @@ void TestReaderWriterLock( const char * mutex_name ) {
     // There is either a writer or a reader upgraded to a writer for each 4th iteration
     long expected_value = Work<M>::readwrite_test_size/4;
     if( !invariant.value_is(expected_value) )
-        STD::printf("ERROR for %s: final invariant value is wrong\n",mutex_name);
+        std::printf("ERROR for %s: final invariant value is wrong\n",mutex_name);
     if( Verbose )
         printf("%s readers & writers time = %g usec\n",mutex_name,(t1-t0).seconds());
     delete[] thr;
@@ -273,7 +267,7 @@ int main( int argc, char * argv[] ) {
     Test<tbb::spin_rw_mutex>( "Spin RW Mutex" );
     TestReaderWriterLock<tbb::queuing_rw_mutex>( "Queuing RW Mutex" );
     TestReaderWriterLock<tbb::spin_rw_mutex>( "Spin RW Mutex" );
-    STD::printf("done\n");
+    std::printf("done\n");
 #else
     if( Verbose )
         printf("this test need pthreads to work; define USE_PTHREAD before compilation.\n");
diff --git a/src/test/test_parallel_do.cpp b/src/test/test_parallel_do.cpp
new file mode 100644
index 0000000..7287a0f
--- /dev/null
+++ b/src/test/test_parallel_do.cpp
@@ -0,0 +1,278 @@
+/*
+    Copyright 2005-2008 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_do.h"
+#include "tbb/task_scheduler_init.h"
+#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
+    #pragma warning (disable: 4267)
+#endif /* _MSC_VER && _Wp64 */
+
+#define N_DEPTHS     20
+
+static tbb::atomic<int> g_values_counter;
+
+class value_t {
+    size_t x;
+    value_t& operator= ( const value_t& );
+public:
+    value_t ( size_t xx ) : x(xx) { ++g_values_counter; }
+    value_t ( const value_t& v ) : x(v.value()) { ++g_values_counter; }
+    ~value_t () { --g_values_counter; }
+    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; }
+};
+
+static size_t g_tasks_expected = 0;
+static tbb::atomic<size_t> g_tasks_observed;
+
+size_t FindNumOfTasks ( size_t max_depth ) {
+    if( max_depth == 0 )
+        return 1;
+    return  max_depth * FindNumOfTasks( max_depth - 1 ) + 1;
+}
+
+//! Simplest form of the parallel_do functor object.
+class FakeTaskGeneratorBody {
+public:
+    //! The simplest form of the function call operator
+    /** It does not allow adding new tasks during its execution. **/
+    void operator() ( value_t depth ) const {
+        g_tasks_observed += FindNumOfTasks(depth.value());
+    }
+};
+
+/** Work item is passed by reference here. **/
+class FakeTaskGeneratorBody_RefVersion {
+public:
+    void operator() ( value_t& depth ) const {
+        g_tasks_observed += FindNumOfTasks(depth.value());
+    }
+};
+
+/** Work item is passed by reference to const here. **/
+class FakeTaskGeneratorBody_ConstRefVersion {
+public:
+    void operator() ( const value_t& depth ) const {
+        g_tasks_observed += FindNumOfTasks(depth.value());
+    }
+};
+
+/** Work item is passed by reference to volatile here. **/
+class FakeTaskGeneratorBody_VolatileRefVersion {
+public:
+    void operator() ( volatile value_t& depth, tbb::parallel_do_feeder<value_t>& ) const {
+        g_tasks_observed += FindNumOfTasks(depth.value());
+    }
+};
+
+void do_work ( const value_t& depth, tbb::parallel_do_feeder<value_t>& feeder ) {
+    ++g_tasks_observed;
+    size_t  d=depth.value();
+    --d;
+    for( size_t i = 0; i < depth.value(); ++i)
+        feeder.add(value_t(d));
+}
+
+//! Standard form of the parallel_do functor object.
+/** Allows adding new work items on the fly. **/
+class TaskGeneratorBody
+{
+public:
+    //! This form of the function call operator can be used when the body needs to add more work during the processing
+    void operator() ( value_t depth, tbb::parallel_do_feeder<value_t>& feeder ) const {
+        do_work(depth, feeder);
+    }
+private:
+    // Assert that parallel_do does not ever access body constructors
+    TaskGeneratorBody () {}
+    TaskGeneratorBody ( const TaskGeneratorBody& );
+    // TestBody() needs access to the default constructor
+    template<class Body, class Iterator> friend void TestBody( size_t );
+}; // class TaskGeneratorBody
+
+/** Work item is passed by reference here. **/
+class TaskGeneratorBody_RefVersion
+{
+public:
+    void operator() ( value_t& depth, tbb::parallel_do_feeder<value_t>& feeder ) const {
+        do_work(depth, feeder);
+    }
+}; // class TaskGeneratorBody
+
+/** Work item is passed as const here. Compilers must ignore the const qualifier. **/
+class TaskGeneratorBody_ConstVersion
+{
+public:
+    void operator() ( const value_t depth, tbb::parallel_do_feeder<value_t>& feeder ) const {
+        do_work(depth, feeder);
+    }
+}; // class TaskGeneratorBody
+
+/** Work item is passed by reference to const here. **/
+class TaskGeneratorBody_ConstRefVersion
+{
+public:
+    void operator() ( const value_t& depth, tbb::parallel_do_feeder<value_t>& feeder ) const {
+        do_work(depth, feeder);
+    }
+}; // class TaskGeneratorBody
+
+/** Work item is passed by reference to volatile here. **/
+class TaskGeneratorBody_VolatileRefVersion
+{
+public:
+    void operator() ( volatile value_t& depth, tbb::parallel_do_feeder<value_t>& feeder ) const {
+        do_work(const_cast<value_t&>(depth), feeder);
+    }
+}; // class TaskGeneratorBody
+
+/** Work item is passed by reference to volatile here. **/
+class TaskGeneratorBody_ConstVolatileRefVersion
+{
+public:
+    void operator() ( const volatile value_t& depth, tbb::parallel_do_feeder<value_t>& feeder ) const {
+        do_work(const_cast<value_t&>(depth), feeder);
+    }
+}; // class TaskGeneratorBody
+
+
+static value_t g_depths[N_DEPTHS] = {0, 1, 2, 3, 4, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2};
+
+template<class Body, class Iterator>
+void TestBody ( size_t depth ) {
+    typedef typename std::iterator_traits<Iterator>::value_type value_type;
+    value_type a_depths[N_DEPTHS] = {0, 1, 2, 3, 4, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2};
+    Body body;
+    Iterator begin(a_depths);
+    Iterator end(a_depths + depth);
+    g_tasks_observed = 0;
+    tbb::parallel_do(begin, end, body);
+    ASSERT (g_tasks_observed == g_tasks_expected, NULL);
+}
+
+template<class Iterator>
+void TestIterator_RvalueOnly ( int nthread, size_t depth ) {
+    g_values_counter = 0;
+    TestBody<FakeTaskGeneratorBody, Iterator> (depth);
+    TestBody<FakeTaskGeneratorBody_ConstRefVersion, Iterator> (depth);
+    TestBody<TaskGeneratorBody, Iterator> (depth);
+    TestBody<TaskGeneratorBody_ConstVersion, Iterator> (depth);
+    TestBody<TaskGeneratorBody_ConstRefVersion, Iterator> (depth);
+}
+
+template<class Iterator>
+void TestIterator ( int nthread, size_t depth ) {
+    TestIterator_RvalueOnly<Iterator>(nthread, depth);
+    TestBody<FakeTaskGeneratorBody_RefVersion, Iterator> (depth);
+    TestBody<FakeTaskGeneratorBody_VolatileRefVersion, Iterator> (depth);
+    TestBody<TaskGeneratorBody_RefVersion, Iterator> (depth);
+    TestBody<TaskGeneratorBody_VolatileRefVersion, Iterator> (depth);
+    TestBody<TaskGeneratorBody_ConstVolatileRefVersion, Iterator> (depth);
+}
+
+void Run( int nthread ) {
+    for( size_t depth = 0; depth <= N_DEPTHS; ++depth ) {
+        g_tasks_expected = 0;
+        for ( size_t i=0; i < depth; ++i )
+            g_tasks_expected += FindNumOfTasks( g_depths[i].value() );
+        // Test for iterators over values convertible to work item type
+        TestIterator_RvalueOnly<size_t*>(nthread, depth);
+        // Test for random access iterators
+        TestIterator<value_t*>(nthread, depth);
+        // Test for input iterators
+        TestIterator<InputIterator<value_t> >(nthread, depth);
+        // Test for forward iterators
+        TestIterator<ForwardIterator<value_t> >(nthread, depth);
+    }
+}
+
+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 );
+        Run(p);
+        // Test that all workers sleep when no work
+        TestCPUUserTime(p);
+    }
+    // This check must be performed after the scheduler terminated because only in this 
+    // case there is a guarantee that the workers already destroyed their last tasks. 
+    ASSERT( g_values_counter == 0, "Value objects were leaked" );
+    printf("done\n");
+    return 0;
+}
diff --git a/src/test/test_parallel_for.cpp b/src/test/test_parallel_for.cpp
index 44ebb78..084527e 100644
--- a/src/test/test_parallel_for.cpp
+++ b/src/test/test_parallel_for.cpp
@@ -98,7 +98,8 @@ template<size_t Pad>
 void Flog( int nthread ) {
     tbb::tick_count T0 = tbb::tick_count::now();
     for( int i=0; i<N; ++i ) {
-        for ( int mode = 0; mode < 3; ++mode) {
+        for ( int mode = 0; mode < 4; ++mode) 
+        {
             FooRange<Pad> r( 0, i );
             const FooRange<Pad> rc = r;
             FooBody<Pad> f( Array );
@@ -115,6 +116,11 @@ void Flog( int nthread ) {
                 case 2:
                     tbb::parallel_for( rc, fc, tbb::auto_partitioner() );
                 break;
+                case 3: {
+                    static tbb::affinity_partitioner affinity;
+                    tbb::parallel_for( rc, fc, affinity );
+                }
+                break;
             }
             for( int j=0; j<i; ++j ) 
                 ASSERT( Array[j]==1, NULL );
@@ -122,9 +128,8 @@ void Flog( int nthread ) {
                 ASSERT( Array[j]==0, NULL );
             // Destruction of bodies might take a while, but there should be at most one body per thread
             // at this point.
-            while( FooBodyCount>1 ) { 
-                ASSERT( FooBodyCount<=nthread, NULL );
-            }
+            while( FooBodyCount>1 && FooBodyCount<=nthread )
+                __TBB_Yield();
             ASSERT( FooBodyCount==1, NULL );
         }
     }
@@ -154,7 +159,7 @@ int main( int argc, char* argv[] ) {
             Flog<10000>(p);
 
            // Test that all workers sleep when no work
-           TestCPUUserTime(p-1);
+           TestCPUUserTime(p);
         }
     } 
     printf("done\n");
diff --git a/src/test/test_parallel_reduce.cpp b/src/test/test_parallel_reduce.cpp
index 4c38525..c2c4794 100644
--- a/src/test/test_parallel_reduce.cpp
+++ b/src/test/test_parallel_reduce.cpp
@@ -27,26 +27,38 @@
 */
 
 #include "tbb/parallel_reduce.h"
-#include "tbb/blocked_range.h"
-#include "tbb/tick_count.h"
 #include "tbb/atomic.h"
 #include "harness_assert.h"
-#include <cstdlib>
-#include <cstdio>
 
 using namespace std;
 
 static tbb::atomic<long> ForkCount;
+static tbb::atomic<long> FooBodyCount;
+
+//! Class with public interface that is exactly minimal requirements for Range concept
+class MinimalRange {
+    size_t begin, end;
+    friend class FooBody;
+    explicit MinimalRange( size_t i ) : begin(0), end(i) {}
+    friend void Flog( int nthread );
+public:
+    MinimalRange( MinimalRange& r, tbb::split ) : end(r.end) {
+        begin = r.end = (r.begin+r.end)/2;
+    }
+    bool is_divisible() const {return end-begin>=2;}
+    bool empty() const {return begin==end;}
+};
 
+//! Class with public interface that is exactly minimal requirements for Body of a parallel_reduce
 class FooBody {
 private:
     FooBody( const FooBody& );          // Deny access
     void operator=( const FooBody& );   // Deny access
-public:
+    friend void Flog( int nthread );
     //! 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.
-    long sum;
+    size_t sum;
     //! Number of join operations done so far on this body and its children.
     long join_count;
     //! Range that has been processed so far by this body and its children.
@@ -55,14 +67,16 @@ public:
     bool is_new;
     //! 1 if body was created by split; 0 if original body.
     int forked;
- 
-    FooBody() : parent(reinterpret_cast<FooBody*>(-1L)), forked(0) {}
+    FooBody() {++FooBodyCount;}
+public:
     ~FooBody() {
         forked = 0xDEADBEEF; 
         sum=0xDEADBEEF;
         join_count=0xDEADBEEF;
+        --FooBodyCount;
     } 
     FooBody( FooBody& other, tbb::split ) {
+        ++FooBodyCount;
         ++ForkCount;
         sum = 0;
         parent = &other;
@@ -73,66 +87,76 @@ public:
     void join( FooBody& s ) {
         ASSERT( s.forked==1, NULL );
         ASSERT( this!=&s, NULL );
-        if( this!=s.parent ) {
-            printf( "ERROR: %p.join(%p): s.parent=%p\n", this, &s, s.parent );
-            exit(1);
-        }
+        ASSERT( this==s.parent, NULL ); 
         ASSERT( end==s.begin, NULL );
         end = s.end;
         sum += s.sum;
         join_count += s.join_count + 1;
         s.forked = 2;
     }
-    void operator()( tbb::blocked_range<size_t>& r ) {
-        for( size_t k=r.begin(); k<r.end(); ++k )
+    void operator()( const MinimalRange& r ) {
+        for( size_t k=r.begin; k<r.end; ++k )
             ++sum;
         if( is_new ) {
             is_new = false;
-            begin = r.begin();
+            begin = r.begin;
         } else
-            ASSERT( end==r.begin(), NULL );
-        end = r.end();
+            ASSERT( end==r.begin, NULL );
+        end = r.end;
     }
 };
 
-static size_t ChunkSize = 1;
-
+#include <cstdio>
 #include "harness.h"
+#include "tbb/tick_count.h"
 
 void Flog( int nthread ) {
-    FooBody f;
-    tbb::tick_count T0 = tbb::tick_count::now();
-    long join_count = 0;        
-    for( size_t i=0; i<=1000; ++i ) {
-        for (int mode = 0;  mode < 3; mode++) {
+    for (int mode = 0;  mode < 4; mode++) {
+        tbb::tick_count T0 = tbb::tick_count::now();
+        long join_count = 0;        
+        tbb::affinity_partitioner ap;
+        for( size_t i=0; i<=1000; ++i ) {
+            FooBody f;
             f.sum = 0;
             f.parent = NULL;
             f.join_count = 0;
             f.is_new = true;
             f.forked = 0;
+            f.begin = ~size_t(0);
+            f.end = ~size_t(0);
+            ASSERT( FooBodyCount==1, NULL );
             switch (mode) {
                 case 0:
-                    tbb::parallel_reduce( tbb::blocked_range<size_t>(0,i,ChunkSize), f );
-                break;
+                    tbb::parallel_reduce( MinimalRange(i), f );
+                    break;
                 case 1:
-                    tbb::parallel_reduce( tbb::blocked_range<size_t>(0,i,ChunkSize), f, tbb::simple_partitioner() );
-                break;
+                    tbb::parallel_reduce( MinimalRange(i), f, tbb::simple_partitioner() );
+                    break;
                 case 2:
-                    tbb::parallel_reduce( tbb::blocked_range<size_t>(0,i,ChunkSize), f, tbb::auto_partitioner() );
-                break;
+                    tbb::parallel_reduce( MinimalRange(i), f, tbb::auto_partitioner() );
+                    break;
+                case 3: 
+                    tbb::parallel_reduce( MinimalRange(i), f, ap );
+                    break;
             }
             join_count += f.join_count;
-	}
+            ASSERT( FooBodyCount==1, NULL );
+            ASSERT( f.sum==i, NULL );
+            ASSERT( f.begin==(i==0 ? ~size_t(0) : 0), NULL );
+            ASSERT( f.end==(i==0 ? ~size_t(0) : i), NULL );
+        }
+        tbb::tick_count T1 = tbb::tick_count::now();
+        if( Verbose )
+            printf("time=%g join_count=%ld ForkCount=%ld nthread=%d\n",(T1-T0).seconds(),join_count,long(ForkCount), nthread);
     }
-    tbb::tick_count T1 = tbb::tick_count::now();
-    if( Verbose )
-        printf("time=%g f.sum=%ld join_count=%ld ForkCount=%ld nthread=%d\n",(T1-T0).seconds(),f.sum,join_count,long(ForkCount), nthread);
 }
 
 #include "tbb/task_scheduler_init.h"
 #include "harness_cpu.h"
 
 int main( int argc, char* argv[] ) {
+    // Set default number of threads
+    MinThread = MaxThread = 2;
     ParseCommandLine( argc, argv );
     if( MinThread<0 ) {
         printf("Usage: nthread must be positive\n");
@@ -143,7 +167,7 @@ int main( int argc, char* argv[] ) {
         Flog(p);
 
         // Test that all workers sleep when no work
-        TestCPUUserTime(p-1);
+        TestCPUUserTime(p);
     }
     printf("done\n");
     return 0;
diff --git a/src/test/test_parallel_scan.cpp b/src/test/test_parallel_scan.cpp
index 32e0bb2..ac9894d 100644
--- a/src/test/test_parallel_scan.cpp
+++ b/src/test/test_parallel_scan.cpp
@@ -128,7 +128,7 @@ public:
         else
             printf("%d computing %s [%ld..%ld) [%ld..%ld)\n",id,tag.is_final_scan()?"final":"lookahead",my_range.begin(),my_range.end(),r.begin(),r.end());
 #endif /* PRINT_DEBUG */
-        ASSERT( !tag.is_final_scan() || my_range.begin()==0 && my_range.end()==r.begin() || my_range.empty() && r.begin()==0, NULL );
+        ASSERT( !tag.is_final_scan() || (my_range.begin()==0 && my_range.end()==r.begin()) || (my_range.empty() && r.begin()==0), NULL );
         for( long i=r.begin(); i<r.end(); ++i ) {
             my_total += my_array[i];
             if( tag.is_final_scan() ) {
@@ -250,6 +250,8 @@ static void TestScanTags() {
 #include "harness_cpu.h"
 
 int main(int argc, char* argv[]) {
+    // Default is to run on two threads.
+    MinThread = MaxThread = 2;
     ParseCommandLine(argc,argv);
     TestScanTags();
     for( int p=MinThread; p<=MaxThread; ++p ) {
@@ -259,7 +261,7 @@ int main(int argc, char* argv[]) {
             TestAccumulator(mode, p);
 
             // Test that all workers sleep when no work
-            TestCPUUserTime(p-1);
+            TestCPUUserTime(p);
 
             // Checking has to be done late, because when parallel_scan makes copies of
             // the user's "Body", the copies might be destroyed slightly after parallel_scan 
diff --git a/src/test/test_parallel_sort.cpp b/src/test/test_parallel_sort.cpp
index b4bfe68..00d2ec0 100644
--- a/src/test/test_parallel_sort.cpp
+++ b/src/test/test_parallel_sort.cpp
@@ -518,7 +518,7 @@ int main( int argc, char* argv[] ) {
             Flog(p);
 
             // Test that all workers sleep when no work
-            TestCPUUserTime(p-1);
+            TestCPUUserTime(p);
         }
     } 
     printf("done\n");
diff --git a/src/test/test_parallel_while.cpp b/src/test/test_parallel_while.cpp
index e26a959..3d29a9e 100644
--- a/src/test/test_parallel_while.cpp
+++ b/src/test/test_parallel_while.cpp
@@ -175,7 +175,7 @@ int main( int argc, char* argv[] ) {
             Run(p,n);
 
         // Test that all workers sleep when no work
-        TestCPUUserTime(p-1);
+        TestCPUUserTime(p);
     }
     printf("done\n");
     return 0;
diff --git a/src/test/test_pipeline.cpp b/src/test/test_pipeline.cpp
index cda4257..82574e9 100644
--- a/src/test/test_pipeline.cpp
+++ b/src/test/test_pipeline.cpp
@@ -27,7 +27,7 @@
 */
 
 #include "tbb/pipeline.h"
-#include "tbb/tick_count.h"
+#include "tbb/spin_mutex.h"
 #include <cstdlib>
 #include <cstdio>
 #include "harness.h"
@@ -61,18 +61,22 @@ static waiting_probe WaitTest;
 
 class MyFilter: public tbb::filter {
     bool* const my_done;
-    const bool my_is_last;      
+    const bool my_is_last;  
+    const bool input_was_ordered;
 public:
-    MyFilter( bool is_ordered, bool done[], bool is_last ) : 
-        filter(is_ordered) ,
+    MyFilter( bool is_ordered, bool done[], bool is_last, bool first_stage_is_ordered ) : 
+        filter(is_ordered? tbb::filter::serial : tbb::filter::parallel) ,
         my_done(done),
-        my_is_last(is_last)
+        my_is_last(is_last),
+        input_was_ordered(first_stage_is_ordered)
     {}
     /*override*/void* operator()( void* item ) {
         Buffer& b = *static_cast<Buffer*>(item);
         ASSERT( 0<=b.id && size_t(b.id)<StreamSize, NULL );
         ASSERT( !my_done[b.id], "duplicate processing of token?" );
-        ASSERT( !is_serial() || b.id==0 || my_done[b.id-1], NULL );
+        // The below assertion is no more kept if the first stage was parallel
+        if( input_was_ordered )
+            ASSERT( !is_serial() || b.id==0 || my_done[b.id-1], NULL );
         ASSERT( b.is_busy, NULL );
         my_done[b.id] = true;
         if( my_is_last ) {
@@ -83,66 +87,124 @@ public:
 };
 
 class MyInput: public tbb::filter {
-    const size_t my_number_of_filters;
-    size_t next_buffer;
+    const bool my_is_last;
+    const size_t my_number_of_tokens;
     Buffer buffer[MaxBuffer];
+    tbb::spin_mutex input_lock;
+    bool my_is_running;
     /*override*/void* operator()( void* );
 public:
-    MyInput( bool is_ordered, int number_of_filters ) : 
+    MyInput( bool is_ordered, size_t ntokens, bool is_last ) : 
         tbb::filter(is_ordered),
-        my_number_of_filters(number_of_filters),
-        next_buffer(0)
-    {}
-    bool last_filter_is_ordered;        
+        my_is_last(is_last),
+        my_number_of_tokens(ntokens),
+        my_is_running(false)
+    {
+        ASSERT( my_number_of_tokens<=MaxBuffer, NULL );
+    }
 };
 
 void* MyInput::operator()(void*) {
-    if( InputCounter>=StreamSize ) 
-        return NULL;
-    else {
-retry:
-        Buffer& b = buffer[next_buffer];
-        ASSERT( &buffer[0] <= &b, NULL );
-        ASSERT( &b <= &buffer[MaxBuffer-1], NULL ); 
-        next_buffer = (next_buffer+1) % MaxBuffer;
-        if( !last_filter_is_ordered && b.is_busy ) {
-            WaitTest.probe();
-            goto retry;
+    size_t next_input, free_buffer = 0;
+    if( is_serial() )
+        ASSERT( !my_is_running, "premature entry to serial input stage" );
+    my_is_running = true;
+    { // lock protected scope
+        tbb::spin_mutex::scoped_lock lock(input_lock);
+        if( InputCounter>=StreamSize ) {
+            my_is_running = false;
+            return NULL;
         }
-        ASSERT( !b.is_busy, "premature reuse of buffer");
-        b.id = int(InputCounter++);
-        b.is_busy = my_number_of_filters>1;
-        return &b;
+        next_input = InputCounter++;
+        // once in a while, emulate waiting for input; this only makes sense for serial input
+        if( is_serial() && WaitTest.required() )
+            WaitTest.probe( );
+        while( free_buffer<MaxBuffer )
+            if( 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 ); 
+    b.id = int(next_input);
+    b.is_busy = !my_is_last;
+    my_is_running = false;
+    return &b;
 }
 
-//! Test pipeline that has a single stage, which is ordered, or two stages, where first is unordered.
-void TestTrivialpipeline( size_t nthread, int number_of_filters ) {
+//! 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::internal::Token input_tokens;
+    tbb::internal::Token token_counter;
+    bool end_of_input;
+
+    virtual ~hacked_pipeline();
+};
+
+//! The struct below repeats layout of tbb::internal::ordered_buffer.
+struct hacked_ordered_buffer {
+    tbb::task** array;
+    tbb::internal::Token array_size;
+    tbb::internal::Token low_token;
+    tbb::spin_mutex array_mutex;
+};
+
+//! 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;
+
+    virtual ~hacked_filter();
+};
+
+const tbb::internal::Token tokens_before_wraparound = 0xF;
+
+void TestTrivialPipeline( size_t nthread, int number_of_filters ) {
     if( Verbose ) 
-        printf("testing with %d filters\n", number_of_filters );
+        printf("testing with %d threads and %d filters\n", int(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;
     // Iterate over possible ordered/unordered filter sequences
     for( int bitmask=0; bitmask<1<<number_of_filters; ++bitmask ) {
         // 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;
         tbb::filter* filter[MaxFilters];
+        bool first_stage_is_ordered = false;
         for( int i=0; i<number_of_filters; ++i ) {
             const bool is_ordered = bitmask>>i&1;
             const bool is_last = i==number_of_filters-1;
-            if( i==0 )
-                filter[i] = new MyInput(is_ordered,number_of_filters);
+            if( i==0 ) {
+                filter[i] = new MyInput(is_ordered,ntokens,is_last);
+                first_stage_is_ordered = is_ordered;
+            }
             else
-                filter[i] = new MyFilter(is_ordered,Done[i],is_last);
+                filter[i] = new MyFilter(is_ordered,Done[i],is_last,first_stage_is_ordered);
             pipeline.add_filter(*filter[i]);
-            if( is_last ) 
-                static_cast<MyInput*>(filter[0])->last_filter_is_ordered = is_ordered;
+            // The ordered buffer of serial filters is hacked as well.
+            if (is_ordered)
+                ((hacked_filter*)(void*)filter[i])->input_buffer->low_token = ~tokens_before_wraparound;
         }
         for( StreamSize=0; StreamSize<=MaxStreamSize; StreamSize += StreamSize/3+1 ) {
             memset( Done, 0, sizeof(Done) );
             InputCounter = 0;
-            tbb::tick_count t0 = tbb::tick_count::now();
-            pipeline.run( nthread<MaxBuffer ? nthread : MaxBuffer-1 );
-            tbb::tick_count t1 = tbb::tick_count::now();
+
+            pipeline.run( ntokens );
+
             if( number_of_filters>0 ) 
                 ASSERT( InputCounter==StreamSize, NULL );
             for( int i=1; i<MaxFilters; ++i )
@@ -158,7 +220,8 @@ void TestTrivialpipeline( size_t nthread, int number_of_filters ) {
     }
 }
 
-#include "tbb/task_scheduler_init.h"
+#include "tbb/tick_count.h"
+#include "tbb/tbb_machine.h"
 #include "harness_cpu.h"
 
 static int nthread; // knowing number of threads is necessary to call TestCPUUserTime
@@ -167,9 +230,12 @@ void waiting_probe::probe( ) {
     if( nthread==1 ) return;
     if( Verbose ) printf("emulating wait for input\n");
     // Test that threads sleep while no work.
-    TestCPUUserTime(nthread-1);
+    // 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;
@@ -182,14 +248,14 @@ int main( int argc, char* argv[] ) {
     // Test with varying number of threads.
     for( nthread=MinThread; nthread<=MaxThread; ++nthread ) {
         // Initialize TBB task scheduler
-        tbb::task_scheduler_init init( nthread );
+        tbb::task_scheduler_init init(nthread);
 
         // Test pipelines with n filters
         for( int n=0; n<=5; ++n )
-            TestTrivialpipeline(size_t(nthread),n);
+            TestTrivialPipeline(size_t(nthread),n);
 
         // Test that all workers sleep when no work
-        TestCPUUserTime(nthread-1);
+        TestCPUUserTime(nthread);
     }
     printf("done\n");
     return 0;
diff --git a/src/test/test_task.cpp b/src/test/test_task.cpp
index 6b4379a..a3d7446 100644
--- a/src/test/test_task.cpp
+++ b/src/test/test_task.cpp
@@ -152,79 +152,62 @@ void TestSafeContinuation( int nthread ) {
 }
 
 //------------------------------------------------------------------------
-// Test that important assertions in class task fail as expected.
+// Test affinity interface
 //------------------------------------------------------------------------
-
-#include "tbb/blocked_range.h"
-#include "harness_bad_expr.h"
-
-//! Task that will be abused.
-tbb::task* volatile AbusedTask;
-
-//! Number of times that AbuseOneTask
-int AbuseOneTaskRan;
-
-//! Body used to create task in thread 0 and abuse it in thread 1.
-struct AbuseOneTask {
-    void operator()( const tbb::blocked_range<int>& r ) const {
-        tbb::task_scheduler_init init;
-        // Thread 1 attempts to incorrectly use the task created by thread 0.
-        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");
-        // 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);
-        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");
-
-        // 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" );
-
-        // Check correct use of depth parameter
-        tbb::task::depth_type depth = AbusedTask->depth();
-        ASSERT( depth==0, NULL );
-        for( int k=1; k<=81; k*=3 ) {
-            AbusedTask->set_depth(depth+k);
-            ASSERT( AbusedTask->depth()==depth+k, NULL );
-            AbusedTask->add_to_depth(k+1);
-            ASSERT( AbusedTask->depth()==depth+2*k+1, NULL );
-        }
-        AbusedTask->set_depth(0);
-
-        // Try abusing the depth parameter
-        TRY_BAD_EXPR(AbusedTask->set_depth(-1),"negative");
-        TRY_BAD_EXPR(AbusedTask->add_to_depth(-1),"negative");
-
-        ++AbuseOneTaskRan;
+tbb::atomic<int> TotalCount;
+
+struct AffinityTask: public tbb::task {
+    const tbb::task::affinity_id expected_affinity_id; 
+    bool noted;
+    /** Computing affinities is NOT supported by TBB, and may disappear in the future.
+        It is done here for sake of unit testing. */
+    AffinityTask( int expected_affinity_id_ ) : 
+        expected_affinity_id(tbb::task::affinity_id(expected_affinity_id_)), 
+        noted(false) 
+    {
+        set_affinity(expected_affinity_id);
+        ASSERT( 0u-expected_affinity_id>0u, "affinity_id not an unsigned integral type?" );  
+        ASSERT( affinity()==expected_affinity_id, NULL );
+    } 
+    /*override*/ tbb::task* execute() {
+        ++TotalCount;
+        return NULL;
+    }
+    /*override*/ void note_affinity( affinity_id id ) {
+        // There is no guarantee in TBB that a task runs on its affinity thread.
+        // However, the current implementation does accidentally guarantee it
+        // under certain conditions, such as the conditions here.
+        // We exploit those conditions for sake of unit testing.
+        ASSERT( id!=expected_affinity_id, NULL );
+        ASSERT( !noted, "note_affinity_id called twice!" );
+        noted = true;
     }
 };
 
-//! Test various __TBB_ASSERT assertions related to class tbb::task.
-void TestTaskAssertions() {
-#if TBB_DO_ASSERT
-    // Catch assertion failures
-    tbb::set_assertion_handler( AssertionFailureHandler );
-    tbb::task_scheduler_init init;
-    // Create task to be abused
-    AbusedTask = new( tbb::task::allocate_root() ) tbb::empty_task;
-    NativeParallelFor( tbb::blocked_range<int>(0,1,1), AbuseOneTask() );
-    ASSERT( AbuseOneTaskRan==1, NULL );
-    AbusedTask->destroy(*AbusedTask);
-    // Restore normal assertion handling
-    tbb::set_assertion_handler( NULL );
-#endif /* TBB_DO_ASSERT */
+/** Note: This test assumes a lot about the internal implementation of affinity.
+    Do NOT use this as an example of good programming practice with TBB */
+void TestAffinity( int nthread ) {
+    TotalCount = 0;
+    int n = tbb::task_scheduler_init::default_num_threads();
+    if( n>nthread ) 
+        n = nthread;
+    tbb::task_scheduler_init init(n);
+    tbb::empty_task* t = new( tbb::task::allocate_root() ) tbb::empty_task;
+    tbb::task::affinity_id affinity_id = t->affinity();
+    ASSERT( affinity_id==0, NULL );
+    // Set ref_count for n-1 children, plus 1 for the wait.
+    t->set_ref_count(n);
+    // Spawn n-1 affinitized children.
+    for( int i=1; i<n; ++i ) 
+        t->spawn( *new(t->allocate_child()) AffinityTask(i) );
+    if( n>1 ) {
+        // Keep master from stealing
+        while( TotalCount!=n-1 ) 
+            __TBB_Yield();
+    }
+    // Wait for the children
+    t->wait_for_all();
+    t->destroy(*t);
 }
 
 //------------------------------------------------------------------------
@@ -238,7 +221,9 @@ struct ConstructionFailure {
 };
 
 //! Task that cannot be constructed.  
+template<size_t N>
 struct UnconstructibleTask: public tbb::empty_task {
+    char space[N];
     UnconstructibleTask() {
         throw ConstructionFailure();
     }
@@ -247,7 +232,7 @@ struct UnconstructibleTask: public tbb::empty_task {
 #define TRY_BAD_CONSTRUCTION(x)                  \
     {                                            \
         try {                                    \
-            new(x) UnconstructibleTask;          \
+            new(x) UnconstructibleTask<N>;       \
         } catch( ConstructionFailure ) {         \
             ASSERT( parent()==original_parent, NULL ); \
             ASSERT( ref_count()==original_ref_count, "incorrectly changed ref_count" );\
@@ -255,6 +240,7 @@ struct UnconstructibleTask: public tbb::empty_task {
         }                                        \
     }
 
+template<size_t N>
 struct RootTaskForTestUnconstructibleTask: public tbb::task {
     tbb::task* execute() {
         tbb::task* original_parent = parent();
@@ -268,26 +254,118 @@ struct RootTaskForTestUnconstructibleTask: public tbb::task {
     }
 };
 
+template<size_t N>
 void TestUnconstructibleTask() {
     TestUnconstructibleTaskCount = 0;
     tbb::task_scheduler_init init;
-    tbb::task* t = new( tbb::task::allocate_root() ) RootTaskForTestUnconstructibleTask;
+    tbb::task* t = new( tbb::task::allocate_root() ) RootTaskForTestUnconstructibleTask<N>;
     tbb::task::spawn_root_and_wait(*t);
     ASSERT( TestUnconstructibleTaskCount==4, NULL );
 }
 
 //------------------------------------------------------------------------
+// Test for alignment problems with task objects.
+//------------------------------------------------------------------------
+
+//! Task with members of type T.
+/** The task recursively creates tasks. */
+template<typename T> 
+class TaskWithMember: public tbb::task {
+    T x;
+    T y;
+    unsigned char count;
+    /*override*/ tbb::task* execute() {
+        x = y;
+        if( count>0 ) { 
+            set_ref_count(2);
+            tbb::task* t = new( tbb::task::allocate_child() ) TaskWithMember<T>(count-1);
+            spawn_and_wait_for_all(*t);
+        }
+        return NULL;
+    }
+public:
+    TaskWithMember( unsigned char n ) : count(n) {}
+};
 
+template<typename T> 
+void TestAlignmentOfOneClass() {
+    typedef TaskWithMember<T> task_type;
+    tbb::task* t = new( tbb::task::allocate_root() ) task_type(10);
+    tbb::task::spawn_root_and_wait(*t);
+}
+
+#include "harness_m128.h"
+
+void TestAlignment() {
+    if( Verbose ) 
+        printf("testing alignment\n");
+    tbb::task_scheduler_init init;
+    // Try types that have variety of alignments
+    TestAlignmentOfOneClass<char>();
+    TestAlignmentOfOneClass<short>();
+    TestAlignmentOfOneClass<int>();
+    TestAlignmentOfOneClass<long>();
+    TestAlignmentOfOneClass<void*>();
+    TestAlignmentOfOneClass<float>();
+    TestAlignmentOfOneClass<double>();
+#if HAVE_m128
+    TestAlignmentOfOneClass<__m128>();
+#endif /* HAVE_m128 */
+}
+
+//------------------------------------------------------------------------
+// Test for recursing on left while spawning on right
+//------------------------------------------------------------------------
+
+int Fib( int n );
+
+struct RightFibTask: public tbb::task {
+    int* y;
+    const int n;
+    RightFibTask( int* y_, int n_ ) : y(y_), n(n_) {}
+    task* execute() {
+        *y = Fib(n-1);
+        return 0;
+    } 
+};
+
+int Fib( int n ) {
+    if( n<2 ) {
+        return n;
+    } else {
+        int y;
+        tbb::task* root_task = new( tbb::task::allocate_root() ) tbb::empty_task;
+        root_task->set_ref_count(2);
+        root_task->spawn( *new( root_task->allocate_child() ) RightFibTask(&y,n) );
+        int x = Fib(n-2);
+        root_task->wait_for_all();
+        tbb::task::self().destroy(*root_task);
+        return y+x;
+    }
+}
+
+void TestLeftRecursion( int p ) {
+    tbb::task_scheduler_init init(p);
+    int sum = 0; 
+    for( int i=0; i<100; ++i )
+        sum +=Fib(10);
+    ASSERT( sum==5500, NULL );
+}
+
+//------------------------------------------------------------------------
 int main(int argc, char* argv[]) {
     srand(2);
     MinThread = 1;
     ParseCommandLine( argc, argv );
-    TestTaskAssertions();
-    TestUnconstructibleTask();
+    TestUnconstructibleTask<1>();
+    TestUnconstructibleTask<10000>();
+    TestAlignment();
     for( int p=MinThread; p<=MaxThread; ++p ) {
         TestSpawnChildren( p );
         TestSpawnRootList( p );
         TestSafeContinuation( p );
+        TestLeftRecursion( p );
+        TestAffinity( p );
     }
     printf("done\n");
     return 0;
diff --git a/src/test/test_task_assertions.cpp b/src/test/test_task_assertions.cpp
new file mode 100644
index 0000000..496cabb
--- /dev/null
+++ b/src/test/test_task_assertions.cpp
@@ -0,0 +1,119 @@
+/*
+    Copyright 2005-2008 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.
+*/
+
+// to avoid usage of #pragma comment
+#define __TBB_NO_IMPLICIT_LINKAGE 1
+#define __TBB_TASK_CPP_DIRECTLY_INCLUDED 1
+#include "../tbb/task.cpp"
+
+//------------------------------------------------------------------------
+// Test that important assertions in class task fail as expected.
+//------------------------------------------------------------------------
+
+#include "tbb/blocked_range.h"
+#include "harness.h"
+#include "harness_bad_expr.h"
+
+//! Task that will be abused.
+tbb::task* volatile AbusedTask;
+
+//! Number of times that AbuseOneTask
+int AbuseOneTaskRan;
+
+//! Body used to create task in thread 0 and abuse it in thread 1.
+struct AbuseOneTask {
+    void operator()( const tbb::blocked_range<int>& r ) const {
+        tbb::task_scheduler_init init;
+        // Thread 1 attempts to incorrectly use the task created by thread 0.
+        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");
+        // 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);
+        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");
+
+        // 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" );
+
+        // Check correct use of depth parameter
+        tbb::task::depth_type depth = AbusedTask->depth();
+        ASSERT( depth==0, NULL );
+        for( int k=1; k<=81; k*=3 ) {
+            AbusedTask->set_depth(depth+k);
+            ASSERT( AbusedTask->depth()==depth+k, NULL );
+            AbusedTask->add_to_depth(k+1);
+            ASSERT( AbusedTask->depth()==depth+2*k+1, NULL );
+        }
+        AbusedTask->set_depth(0);
+
+        // Try abusing the depth parameter
+        TRY_BAD_EXPR(AbusedTask->set_depth(-1),"negative");
+        TRY_BAD_EXPR(AbusedTask->add_to_depth(-1),"negative");
+
+        ++AbuseOneTaskRan;
+    }
+};
+
+//! Test various __TBB_ASSERT assertions related to class tbb::task.
+void TestTaskAssertions() {
+#if TBB_DO_ASSERT
+    // Catch assertion failures
+    tbb::set_assertion_handler( AssertionFailureHandler );
+    tbb::task_scheduler_init init;
+    // Create task to be abused
+    AbusedTask = new( tbb::task::allocate_root() ) tbb::empty_task;
+    NativeParallelFor( tbb::blocked_range<int>(0,1,1), AbuseOneTask() );
+    ASSERT( AbuseOneTaskRan==1, NULL );
+    AbusedTask->destroy(*AbusedTask);
+    // Restore normal assertion handling
+    tbb::set_assertion_handler( NULL );
+#endif /* TBB_DO_ASSERT */
+}
+
+//------------------------------------------------------------------------
+int main(int argc, char* argv[]) {
+    srand(2);
+    MinThread = 1;
+    ParseCommandLine( argc, argv );
+    TestTaskAssertions();
+    printf("done\n");
+    return 0;
+}
diff --git a/src/test/test_task_leaks.cpp b/src/test/test_task_leaks.cpp
index f54c8c5..01c039a 100644
--- a/src/test/test_task_leaks.cpp
+++ b/src/test/test_task_leaks.cpp
@@ -26,8 +26,11 @@
     the GNU General Public License.
 */
 
+// to avoid usage of #pragma comment
+#define __TBB_NO_IMPLICIT_LINKAGE 1
 
 #define  COUNT_TASK_NODES 1
+#define __TBB_TASK_CPP_DIRECTLY_INCLUDED 1
 #include "../tbb/task.cpp"
 
 #include "tbb/atomic.h"
@@ -39,63 +42,122 @@
 //------------------------------------------------------------------------
 
 tbb::atomic<int> Count;
+tbb::atomic<tbb::task*> Exchanger;
+tbb::internal::scheduler* Producer;
 
 #include "tbb/task_scheduler_init.h"
 #include "harness.h"
 using namespace tbb;
 using namespace tbb::internal;
 
+class ChangeProducer: public tbb::task {
+public:
+    /*override*/ tbb::task* execute() {
+        if( is_stolen_task() ) {
+            Producer = GetThreadSpecific();
+        }
+        return NULL;
+    }
+};
+
 class TaskGenerator: public tbb::task {
     const int my_child_count;
     int my_depth;
 public:
-    TaskGenerator(int child_count, int depth) : my_child_count(child_count), my_depth(depth) {}
+    TaskGenerator(int child_count, int depth) : my_child_count(child_count), my_depth(depth) {
+        ASSERT(my_child_count>1, "The TaskGenerator should produce at least two children");
+    }
     /*override*/ tbb::task* execute() {
         if( my_depth>0 ) {
+            int child_count = my_child_count;
+            scheduler* my_sched = GetThreadSpecific();
             tbb::task& c  = *new( tbb::task::allocate_continuation() ) tbb::empty_task;
-            c.set_ref_count( my_child_count );
+            c.set_ref_count( child_count );
             recycle_as_child_of(c);
-            for( int j=1; j<my_child_count; ++j ) {
-                tbb::task& t = *new( c.allocate_child() ) TaskGenerator(my_child_count, my_depth-1);
-                c.spawn(t);
+            --child_count;
+            if( Producer==my_sched ) {
+                // produce a task and put it into Exchanger
+                tbb::task* t = new( c.allocate_child() ) tbb::empty_task;
+                --child_count;
+                t = Exchanger.fetch_and_store(t);
+                if( t ) this->spawn(*t);
+            } else {
+                tbb::task* t = Exchanger.fetch_and_store(NULL);
+                if( t ) this->spawn(*t);
+            }
+            while( child_count ) {
+                c.spawn( *new( c.allocate_child() ) TaskGenerator(my_child_count, my_depth-1) );
+                --child_count;
             }
             --my_depth;
             return this;
+        } else {
+            tbb::task* t = Exchanger.fetch_and_store(NULL);
+            if( t ) this->spawn(*t);
+            return NULL;
         }
-        return NULL;
     }
 };
 
 #include "harness_memory.h"
 #include <math.h>
 
+void RunTaskGenerators( int i ) {
+    tbb::task* dummy_root;
+    if( i==250 ) {
+        Producer = NULL;
+    }
+    dummy_root = new( tbb::task::allocate_root() ) tbb::empty_task;
+    dummy_root->set_ref_count( 2 );
+    // If no producer, start elections; some worker will take the role
+    if( Producer )
+        dummy_root->spawn( *new( dummy_root->allocate_child() ) tbb::empty_task );
+    else
+        dummy_root->spawn( *new( dummy_root->allocate_child() ) ChangeProducer );
+    if( i==260 && !Producer ) {
+        fprintf(stderr, "Warning: producer has not changed after 10 attempts; running on a single core?\n");
+    }
+    for( int j=0; j<100; ++j ) {
+        tbb::task& t = *new( tbb::task::allocate_root() ) TaskGenerator(/*child_count=*/4, /*depth=*/6);
+        tbb::task::spawn_root_and_wait(t);
+    }
+    dummy_root->wait_for_all();
+    dummy_root->destroy( *dummy_root );
+}
+
 //! Tests whether task scheduler allows thieves to hoard task objects.
 /** The test takes a while to run, so we run it only with the default
     number of threads. */
 void TestTaskReclamation() {
     if( Verbose )
         printf("testing task reclamation\n");
+
     size_t initial_amount_of_memory = 0;
     double task_count_sum = 0;
     double task_count_sum_square = 0;
     double average, sigma;
 
-    tbb::task_scheduler_init init;
+    tbb::task_scheduler_init init (MinThread);
+    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();
     int N = 20;
+    // First N iterations fill internal buffers and collect initial statistics
     for( int i=0; i<N; ++i ) {
         // First N iterations fill internal buffers and collect initial statistics
-        for( int j=0; j<10; ++j ) {
-            tbb::task& t = *new( tbb::task::allocate_root() ) TaskGenerator(/*child_count=*/4, /*depth=*/6);
-            tbb::task::spawn_root_and_wait(t);
-        }
+        RunTaskGenerators( i );
 
         size_t m = GetMemoryUsage();
         if( m-initial_amount_of_memory > 0)
             initial_amount_of_memory = m;
 
-        tbb::internal::intptr n = (*reinterpret_cast<GenericScheduler**>(&init))->get_task_node_count( /*count_arena_workers=*/true );
+        tbb::internal::intptr n = GetThreadSpecific()->get_task_node_count( /*count_arena_workers=*/true );
         task_count_sum += n;
         task_count_sum_square += n*n;
+
+        if( Verbose )
+            printf( "Consumed %ld bytes and %ld objects (iteration=%d)\n", long(m), long(n), i );
     }
     // Calculate statistical values
     average = task_count_sum / N;
@@ -106,11 +168,9 @@ void TestTaskReclamation() {
     int error_count = 0;
     for( int i=0; i<500; ++i ) {
         // These iterations check for excessive memory use and unreasonable task count
-        for( int j=0; j<10; ++j ) {
-            tbb::task& t = *new( tbb::task::allocate_root() ) TaskGenerator(/*child_count=*/4, /*depth=*/6);
-            tbb::task::spawn_root_and_wait(t);
-        }
-        tbb::internal::intptr n = (*reinterpret_cast<GenericScheduler**>(&init))->get_task_node_count( /*count_arena_workers=*/true );
+        RunTaskGenerators( i );
+
+        tbb::internal::intptr n = GetThreadSpecific()->get_task_node_count( /*count_arena_workers=*/true );
         size_t m = GetMemoryUsage();
 
         if( (m-initial_amount_of_memory > 0) && (n > average+4*sigma) ) {
@@ -118,7 +178,7 @@ void TestTaskReclamation() {
             // Use 4*sigma interval (for normal distribution, 3*sigma contains ~99% of values).
             // Issue a warning for the first couple of times, then errors
             printf( "%s: possible leak of up to %ld bytes; currently %ld cached task objects (iteration=%d)\n",
-                    error_count>3?"Error":"Warning", long(m-initial_amount_of_memory), long(n), i );
+                    error_count>3?"Error":"Warning", static_cast<unsigned long>(m-initial_amount_of_memory), long(n), i );
             initial_amount_of_memory = m;
             if( error_count>5 ) break;
         } else {
@@ -131,17 +191,17 @@ void TestTaskReclamation() {
 //------------------------------------------------------------------------
 
 int main(int argc, char* argv[]) {
-#if _WIN32||_WIN64
-    // This initialization is normally done by DllMain in task.cpp,
-    // but because this test directly includes task.cpp,
-    // the initialization must be done explicitly.
-    InitializeCriticalSection(&OneTimeInitializationCriticalSection);
-#endif /* _WIN32||_WIN64 */
     srand(2);
-    MinThread = 1;
+    MinThread = -1;
     ParseCommandLine( argc, argv );
-    TestTaskReclamation();
-    printf("done\n");
+    if( !GetMemoryUsage() ) {
+        if( Verbose )
+            printf("GetMemoryUsage is not implemented for this platform\n");
+        printf("skip\n");
+    } else {
+        TestTaskReclamation();
+        printf("done\n");
+    }
     return 0;
 }
 
diff --git a/src/test/test_task_scheduler_init.cpp b/src/test/test_task_scheduler_init.cpp
index 5ded554..8648be8 100644
--- a/src/test/test_task_scheduler_init.cpp
+++ b/src/test/test_task_scheduler_init.cpp
@@ -35,7 +35,7 @@ void InitializeAndTerminate( int maxthread ) {
     for( int i=0; i<200; ++i ) {
         switch( i&3 ) {
             default: {
-                tbb::task_scheduler_init init( rand() % maxthread + 1 );
+                tbb::task_scheduler_init init( std::rand() % maxthread + 1 );
                 break;
             }
             case 0: {   
@@ -48,7 +48,7 @@ void InitializeAndTerminate( int maxthread ) {
             }
             case 2: {
                 tbb::task_scheduler_init init( tbb::task_scheduler_init::deferred );
-                init.initialize( rand() % maxthread + 1 );
+                init.initialize( std::rand() % maxthread + 1 );
                 init.terminate();
                 break;
             }
@@ -78,8 +78,22 @@ struct ThreadedInit {
     }
 };
 
+#if _MSC_VER
+#include <windows.h>
+#include <tchar.h>
+#endif /* _MSC_VER */
+
 //! Test driver
 int main(int argc, char* argv[]) {
+#if _MSC_VER && !__TBB_NO_IMPLICIT_LINKAGE
+    #ifdef _DEBUG
+        ASSERT(!GetModuleHandle(_T("tbb.dll")) && GetModuleHandle(_T("tbb_debug.dll")),
+            "debug application links with non-debug tbb library");
+    #else
+        ASSERT(!GetModuleHandle(_T("tbb_debug.dll")) && GetModuleHandle(_T("tbb.dll")),
+            "non-debug application links with debug tbb library");
+    #endif
+#endif /* _MSC_VER && !__TBB_NO_IMPLICIT_LINKAGE */
     std::srand(2);
     // Set defaults
     MaxThread = MinThread = 2;
diff --git a/src/test/test_task_scheduler_observer.cpp b/src/test/test_task_scheduler_observer.cpp
new file mode 100644
index 0000000..7a08d22
--- /dev/null
+++ b/src/test/test_task_scheduler_observer.cpp
@@ -0,0 +1,165 @@
+/*
+    Copyright 2005-2008 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/task_scheduler_observer.h"
+
+typedef uintptr_t FlagType;
+const int MaxFlagIndex = sizeof(FlagType)*8-1;
+
+class MyObserver: public tbb::task_scheduler_observer {
+    FlagType flags;
+    /*override*/ void on_scheduler_entry( bool is_worker );
+    /*override*/ void on_scheduler_exit( bool is_worker );
+public:
+    MyObserver( FlagType flags_ ) : flags(flags_) {
+        observe(true);
+    }
+};
+
+#include "harness_assert.h"
+#include "tbb/atomic.h"
+
+struct TLS {
+    FlagType MyFlags;
+    bool 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;
+
+void MyObserver::on_scheduler_entry( bool is_worker ) {
+    TLS& tls = GetTLS();
+    ASSERT( is_worker==!tls.IsMaster, NULL );
+    ASSERT( (tls.MyFlags & flags)==0, NULL );
+    ++EntryCount;
+    tls.MyFlags |= flags;
+}
+
+void MyObserver::on_scheduler_exit( bool is_worker ) {
+    TLS& tls = GetTLS();
+    ASSERT( is_worker==!tls.IsMaster, NULL );
+    ++ExitCount;
+    tls.MyFlags &= ~flags;
+}
+
+#include "tbb/task.h"
+
+class FibTask: public tbb::task {
+    const int n;
+    FlagType flags;
+public:
+    FibTask( int n_, FlagType flags_ ) : n(n_), flags(flags_) {}
+    /*override*/ tbb::task* execute() {
+        TLS& tls = GetTLS();
+        ASSERT( !(~tls.MyFlags& flags), NULL );
+        if( n>=2 ) {
+            set_ref_count(3);
+            spawn(*new( tbb::task::allocate_child() ) FibTask(n-1,flags));
+            spawn_and_wait_for_all(*new( tbb::task::allocate_child() ) FibTask(n-2,flags));
+        }
+        return NULL;
+    }
+};
+
+void DoFib( FlagType flags ) {
+    tbb::task* t = new( tbb::task::allocate_root() ) FibTask(10,flags);
+    tbb::task::spawn_root_and_wait(*t);
+}
+
+#include "tbb/task_scheduler_init.h"
+#include "tbb/blocked_range.h"
+#include "harness.h"
+
+class DoTest {
+    int nthread;
+public:
+    DoTest( int n ) : nthread(n) {}
+    void operator()( tbb::blocked_range<int> r ) const {
+        TLS& tls = GetTLS();
+        tls.IsMaster = true;
+        int i = r.begin(); 
+        if( i==0 ) {   
+            tbb::task_scheduler_init(nthread);
+            DoFib(0);
+        } else {
+            FlagType f = i<=MaxFlagIndex? 1<<i : 0;
+            MyObserver w(f);
+            tbb::task_scheduler_init(nthread);
+            DoFib(f);
+        }
+    }
+};
+
+void TestObserver( int p, int q ) {
+    NativeParallelFor( tbb::blocked_range<int>(0,p,1), DoTest(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);
+    ASSERT( EntryCount>0, "on_scheduler_entry not exercised" );
+    ASSERT( ExitCount>0, "on_scheduler_exit not exercised" );
+    printf("done\n");
+    return 0;
+}
diff --git a/src/test/test_tbb_thread.cpp b/src/test/test_tbb_thread.cpp
new file mode 100644
index 0000000..99f7fca
--- /dev/null
+++ b/src/test/test_tbb_thread.cpp
@@ -0,0 +1,268 @@
+/*
+    Copyright 2005-2008 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/tbb_thread.h"
+#include "tbb/atomic.h"
+#include "harness_assert.h"
+
+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];
+
+class Base {
+    mutable int copy_throws;
+    friend void RunTests();
+    friend void CheckExceptionSafety();
+    void operator=( const Base& );   // Deny access
+protected:
+    Base() : copy_throws(100) {++BaseCount;}
+    Base( const Base& c ) : copy_throws(c.copy_throws) {
+        if( --copy_throws<=0 ) 
+            throw 0;
+        ++BaseCount; 
+    }
+    ~Base() {--BaseCount;}
+};
+
+template<int N>
+class Data: Base {
+    Data();                          // Deny access
+    explicit Data(int v) : value(v) {}
+
+    friend void RunTests();
+    friend void CheckExceptionSafety();
+public:
+    int value;
+};
+
+class ThreadFunc: Base {
+    ThreadFunc() {}
+
+    void init() {
+        ++ready;
+        while (ready != THRDS)
+            tbb::this_tbb_thread::yield();
+    }
+
+    friend void RunTests();
+public:
+    void operator()(){
+        real_ids[0] = tbb::this_tbb_thread::get_id();
+        init();
+        
+        sum.fetch_and_add(1);
+    }
+    void operator()(int num){
+        real_ids[num] = tbb::this_tbb_thread::get_id();
+        init();
+
+        sum.fetch_and_add(num);
+    }
+    void operator()(int num, Data<0> dx) { 
+        real_ids[num] = tbb::this_tbb_thread::get_id();
+
+        const double WAIT = .1;
+        tbb::tick_count t0 = tbb::tick_count::now();
+        tbb::this_tbb_thread::sleep( tbb::tick_count::interval_t(WAIT) );
+        tbb::tick_count t1 = tbb::tick_count::now();
+        ASSERT( ( WAIT - (t1-t0).seconds() ) < 1e-10 
+                || (t1-t0).seconds() > WAIT, "Should sleep enough.");
+
+        init();
+
+        sum.fetch_and_add(num);
+        sum.fetch_and_add(dx.value);
+    }
+    void operator()(Data<0> d) {
+        tbb::this_tbb_thread::sleep( tbb::tick_count::interval_t(d.value*1.) );
+    }
+};
+
+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];
+        for( int j=0; j<n; ++j ) {
+            const tbb::tbb_thread::id y = ids[j];
+            ASSERT( (x==y)==!(x!=y), NULL );
+            ASSERT( (x<y)==!(x>=y), NULL );
+            ASSERT( (x>y)==!(x<=y), NULL );
+            ASSERT( (x<y)+(x==y)+(x>y)==1, NULL );
+            ASSERT( x!=y || i==j || duplicates_allowed, NULL );
+            for( int k=0; k<n; ++k ) {
+                const tbb::tbb_thread::id z = ids[j];
+                ASSERT( !(x<y && y<z) || x<z, "< is not transitive" );
+            }    
+        }
+    }
+}
+
+class AnotherThreadFunc: Base {
+public:
+    void operator()() {}
+    void operator()(const Data<1>&) {}
+    void operator()(const Data<1>&, const Data<2>&) {}
+    friend void CheckExceptionSafety();
+};
+
+void CheckExceptionSafety() { 
+    int original_count = BaseCount;
+    // d loops over number of copies before throw occurs 
+    for( int d=1; d<=3; ++d ) {
+        // Try all combinations of throw/nothrow for f, x, and y's copy constructor.
+        for( int i=0; i<8; ++i ) {
+            { 
+                const AnotherThreadFunc f = AnotherThreadFunc();
+                if( i&1 ) f.copy_throws = d;
+                const Data<1> x(0);
+                if( i&2 ) x.copy_throws = d;
+                const Data<2> y(0);
+                if( i&4 ) y.copy_throws = d;
+                bool exception_caught = false;
+                for( int j=0; j<3; ++j ) {
+                    try { 
+                        switch(j) {
+                            case 0: {tbb::tbb_thread t(f); t.join();} break;
+                            case 1: {tbb::tbb_thread t(f,x); t.join();} break;
+                            case 2: {tbb::tbb_thread t(f,x,y); t.join();} break;
+                        }
+                    } catch(...) {
+                        exception_caught = true;
+                    } 
+                    ASSERT( !exception_caught||(i&((1<<(j+1))-1))!=0, NULL );
+                }
+            }
+// Intel Compiler sometimes fails to destroy all implicitly generated copies 
+// of an object when a copy constructor throws an exception.
+// Problem was reported as Quad issue 482935.
+// This #if should be removed or tightened when the bug is fixed.
+#if !((_WIN32 || _WIN64) && defined(__INTEL_COMPILER))
+            ASSERT( BaseCount==original_count, "object leak detected" );
+#endif
+        }
+    }
+}
+
+#include <cstdio>
+
+void RunTests() {
+
+    ThreadFunc t;
+    Data<0> d100(100), d1(1), d0(0);
+    tbb::tbb_thread::id id;
+    tbb::tbb_thread::id id0, uniq_ids[THRDS];
+    
+    tbb::tbb_thread thrs[THRDS];
+    tbb::tbb_thread thr;
+    tbb::tbb_thread thr0(t);
+    tbb::tbb_thread thr1(t, 2);
+    tbb::tbb_thread thr2(t, 1, d100);
+    
+    ASSERT( thr0.get_id() != id, NULL );
+    id0 = thr0.get_id();
+    tbb::move(thrs[0], thr0);
+    ASSERT( thr0.get_id() == id, NULL );
+    ASSERT( thrs[0].get_id() == id0, NULL );
+
+    tbb::tbb_thread::native_handle_type h1 = thr1.native_handle();
+    tbb::tbb_thread::native_handle_type h2 = thr2.native_handle();
+    tbb::tbb_thread::id id1 = thr1.get_id();
+    tbb::tbb_thread::id id2 = thr2.get_id();
+    tbb::swap(thr1, thr2);
+    ASSERT( thr1.native_handle() == h2, NULL );
+    ASSERT( thr2.native_handle() == h1, NULL );
+    ASSERT( thr1.get_id() == id2, NULL );
+    ASSERT( thr2.get_id() == id1, NULL );
+
+    tbb::move(thrs[1], thr1);
+    ASSERT( thr1.get_id() == id, NULL );
+
+    tbb::move(thrs[2], thr2);
+    ASSERT( thr2.get_id() == id, NULL );
+
+    for (int i=0; i<THRDS; i++)
+        uniq_ids[i] = thrs[i].get_id();
+
+    ASSERT( thrs[2].joinable(), NULL );
+
+    for (int i=0; i<THRDS; i++)
+        thrs[i].join();
+    for (int i=0; i<THRDS; i++)
+        ASSERT(  real_ids[i] == uniq_ids[i], NULL );
+
+    int current_sum = sum;
+    ASSERT( current_sum == 104, NULL );
+    ASSERT( ! thrs[2].joinable(), NULL );
+    ASSERT( BaseCount==4, "object leak detected" );
+
+    CheckExceptionSafety(); 
+
+    // Note: all tests involving BaseCount should be put before the tests
+    // involing detached threads, because there is no way of knowing when 
+    // a detached thread destroys its arguments.
+
+    tbb::tbb_thread thr_detach_0(t, d0);
+    real_ids[THRDS] = thr_detach_0.get_id();
+    thr_detach_0.detach();
+    ASSERT( thr_detach_0.get_id() == id, NULL );
+
+    tbb::tbb_thread thr_detach_1(t, d1);
+    real_ids[THRDS+1] = thr_detach_1.get_id();
+    thr_detach_1.detach();
+    ASSERT( thr_detach_1.get_id() == id, NULL );
+
+    CheckRelations(real_ids, THRDS+THRDS_DETACH, true);
+
+    CheckRelations(uniq_ids, THRDS, false);
+
+    ASSERT( tbb::tbb_thread::hardware_concurrency() > 0, NULL);
+}
+
+typedef bool (*id_relation)( tbb::tbb_thread::id, tbb::tbb_thread::id );
+
+id_relation CheckSignatures() {
+    id_relation r[6] = {&tbb::operator==,
+                        &tbb::operator!=,
+                        &tbb::operator<,
+                        &tbb::operator>,
+                        &tbb::operator<=,
+                        &tbb::operator>=};
+    return r[1];
+}
+
+int main( int , char *[] ) {
+    CheckSignatures();
+    RunTests();
+    std::printf("done\n");
+    return 0;
+}
+
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
diff --git a/src/test/test_tbb_version.cpp b/src/test/test_tbb_version.cpp
new file mode 100644
index 0000000..3cf3868
--- /dev/null
+++ b/src/test/test_tbb_version.cpp
@@ -0,0 +1,226 @@
+/*
+    Copyright 2005-2008 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 <stdio.h>
+#include <stdlib.h>
+#include <vector>
+#include <string>
+#include <utility>
+
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "tbb/task_scheduler_init.h"
+#include "harness.h"
+
+#if defined (_WIN32) || defined (_WIN64)
+#define TEST_SYSTEM_COMMAND "test_tbb_version.exe 1"
+#define putenv _putenv
+#else
+#define TEST_SYSTEM_COMMAND "./test_tbb_version.exe 1"
+#endif
+
+enum string_required {
+    required,
+    not_required
+    };
+
+typedef std::pair <std::string, string_required> string_pair;
+
+void initialize_strings_vector(std::vector <string_pair>* vector);
+
+const char stderr_stream[] = "version_test.err";
+const char stdout_stream[] = "version_test.out";
+
+int main(int argc, char **argv)
+{
+    try{
+        FILE *stream_out;
+        FILE *stream_err;   
+        char psBuffer[512];
+        
+        if(argc>1) {
+            stream_err = freopen( stderr_stream, "w", stderr );
+            if( stream_err == NULL ){
+                fprintf( stderr, "Internal test error (freopen)\n" );
+                exit( 1 );
+            }
+            stream_out = freopen( stdout_stream, "w", stdout );
+            if( stream_out == NULL ){
+                fprintf( stderr, "Internal test error (freopen)\n" );
+                exit( 1 );
+            }
+            {
+                tbb::task_scheduler_init init(1);
+            }
+            fclose( stream_out );
+            fclose( stream_err );
+            exit(0);
+        }
+        //1st step check that output is empty if TBB_VERSION is not defined.
+        if ( getenv("TBB_VERSION") ){
+            printf( "TBB_VERSION defined, skipping step 1 (empty output check)\n" );
+        }else{
+            if( ( system(TEST_SYSTEM_COMMAND) ) != 0 ){
+                fprintf( stderr, "Error (step 1): Internal test error\n" );
+                exit( 1 );
+            }
+            //Checking output streams - they should be empty
+            stream_err = fopen( stderr_stream, "r" );
+            if( stream_err == NULL ){
+                fprintf( stderr, "Error (step 1):Internal test error (stderr open)\n" );
+                exit( 1 );
+            }
+            while( !feof( stream_err ) ) {
+                if( fgets( psBuffer, 512, stream_err ) != NULL ){
+                    fprintf( stderr, "Error (step 1): stderr should be empty\n" );
+                    exit( 1 );
+                }
+            }
+            fclose( stream_err );
+            stream_out = fopen( stdout_stream, "r" );
+            if( stream_out == NULL ){
+                fprintf( stderr, "Error (step 1):Internal test error (stdout open)\n" );
+                exit( 1 );
+            }
+            while( !feof( stream_out ) ) {
+                if( fgets( psBuffer, 512, stream_out ) != NULL ){
+                    fprintf( stderr, "Error (step 1): stdout should be empty\n" );
+                    exit( 1 );
+                }
+            }
+            fclose( stream_out );
+        }
+
+        //Setting TBB_VERSION in case it is not set
+        if ( !getenv("TBB_VERSION") ){
+            putenv(const_cast<char*>("TBB_VERSION=1"));
+        }
+
+        if( ( system(TEST_SYSTEM_COMMAND) ) != 0 ){
+            fprintf( stderr, "Error (step 2):Internal test error\n" );
+            exit( 1 );
+        }
+        //Checking pipe - it should contain version data
+        std::vector <string_pair> strings_vector;
+        std::vector <string_pair>::iterator strings_iterator;
+
+        initialize_strings_vector( &strings_vector );
+        strings_iterator = strings_vector.begin();
+
+        stream_out = fopen( stdout_stream, "r" );
+        if( stream_out == NULL ){
+            fprintf( stderr, "Error (step 2):Internal test error (stdout open)\n" );
+            exit( 1 );
+        }
+        while( !feof( stream_out ) ) {
+            if( fgets( psBuffer, 512, stream_out ) != NULL ){
+                fprintf( stderr, "Error (step 2): stdout should be empty\n" );
+                exit( 1 );
+            }
+        }
+        fclose( stream_out );
+
+        stream_err = fopen( stderr_stream, "r" );
+        if( stream_err == NULL ){
+            fprintf( stderr, "Error (step 1):Internal test error (stderr open)\n" );
+            exit( 1 );
+        }
+        
+        int skip_line = 0;
+        
+        while( !feof( stream_err ) ) {
+            if( fgets( psBuffer, 512, stream_err ) != NULL ){
+                do{
+                    if ( strings_iterator == strings_vector.end() ){
+                        fprintf( stderr, "Error: version string dictionary ended prematurely.\n" );
+                        fprintf( stderr, "No match for: \t%s", psBuffer );
+                        exit( 1 );
+                    }
+                    if ( strstr( psBuffer, strings_iterator->first.c_str() ) == NULL ){
+                        if( strings_iterator->second == required ){
+                            fprintf( stderr, "Error: version strings do not match.\n" );
+                            fprintf( stderr, "Expected \"%s\" not found in:\n\t%s", strings_iterator->first.c_str(), psBuffer );
+                            exit( 1 );
+                        }else{
+                            //Do we need to print in case there is no non-required string?
+                            skip_line = 1;
+                        }
+                    }else{
+                           skip_line = 0;
+                    }
+                    if ( strings_iterator != strings_vector.end() ) strings_iterator ++;
+                }while( skip_line );
+            }
+        }
+        fclose( stream_err );
+    } catch(...) {
+        ASSERT( 0,"unexpected exception" );
+    }
+    printf("done\n");
+    return 0;
+}
+
+
+// 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\t3011", required)); // check TBB_INTERFACE_VERSION
+    vector->push_back(string_pair("TBB: BUILD_DATE", required));
+    vector->push_back(string_pair("TBB: BUILD_HOST", required));
+#if _WIN32||_WIN64
+    vector->push_back(string_pair("TBB: BUILD_OS", required));
+    vector->push_back(string_pair("TBB: BUILD_CL", required));
+    vector->push_back(string_pair("TBB: BUILD_COMPILER", required));
+#elif __APPLE__
+    vector->push_back(string_pair("TBB: BUILD_KERNEL", required));
+    vector->push_back(string_pair("TBB: BUILD_GCC", required));
+    vector->push_back(string_pair("TBB: BUILD_COMPILER", not_required)); //if( getenv("COMPILER_VERSION") )
+    vector->push_back(string_pair("TBB: BUILD_LD", required));
+#elif __sun
+    vector->push_back(string_pair("TBB: BUILD_OS", required));
+    vector->push_back(string_pair("TBB: BUILD_KERNEL", required));
+    vector->push_back(string_pair("TBB: BUILD_SUNCC", required));
+    vector->push_back(string_pair("TBB: BUILD_COMPILER", not_required)); //if( getenv("COMPILER_VERSION") )
+#else //We use version_info_linux.sh for unsupported OSes
+    vector->push_back(string_pair("TBB: BUILD_OS", required));
+    vector->push_back(string_pair("TBB: BUILD_KERNEL", required));
+    vector->push_back(string_pair("TBB: BUILD_GCC", required));
+    vector->push_back(string_pair("TBB: BUILD_COMPILER", not_required)); //if( getenv("COMPILER_VERSION") )
+    vector->push_back(string_pair("TBB: BUILD_GLIBC", required));
+    vector->push_back(string_pair("TBB: BUILD_LD", required));
+#endif
+    vector->push_back(string_pair("TBB: BUILD_TARGET", required));
+    vector->push_back(string_pair("TBB: BUILD_COMMAND", required));
+    vector->push_back(string_pair("TBB: TBB_DO_ASSERT", required));
+    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: SCHEDULER", required));
+
+    return;
+}

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